From fac00658e8745f82d96d90fce7419560cb37e536 Mon Sep 17 00:00:00 2001 From: Developer Ravi Date: Sat, 21 Feb 2026 09:38:16 +0545 Subject: [PATCH 1/3] Fix: user profile/edit SCF field table layout (Fixes #349) --- includes/forms/form-user.php | 77 ++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/includes/forms/form-user.php b/includes/forms/form-user.php index 14531b58..85343312 100644 --- a/includes/forms/form-user.php +++ b/includes/forms/form-user.php @@ -28,6 +28,7 @@ function __construct() { // enqueue add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); add_action( 'login_form_register', array( $this, 'login_form_register' ) ); + add_action( 'admin_head', array( $this, 'scf_user_form_layout_fix' ), 20 ); // render add_action( 'show_user_profile', array( $this, 'render_edit' ) ); @@ -64,6 +65,82 @@ function admin_enqueue_scripts() { // enqueue acf_enqueue_scripts(); } + /** + * Fix SCF field layout on user profile/edit screens. + * + * SCF fields on user screens render inside WordPress `table.form-table` rows, + * so we apply scoped CSS only on profile.php and user-edit.php screens. + * + * @see https://github.com/WordPress/secure-custom-fields/issues/349 + */ + function scf_user_form_layout_fix() + { + + // Only run in wp-admin, and only on profile/edit user screens. + if (!is_admin()) { + return; + } + + $screen = function_exists('get_current_screen') ? get_current_screen() : null; + if (!$screen || !in_array($screen->base, array('profile', 'user-edit'), true)) { + return; + } + + ?> + + Date: Sat, 21 Feb 2026 10:31:40 +0545 Subject: [PATCH 2/3] Docs: improve local development and PR contribution instructions --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 5e7223f9..f9e4278f 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,30 @@ If you have a patch, or stumbled upon an issue with SCF core, you can contribute ## Translations If you're looking to translate SCF, please use [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/secure-custom-fields/stable/). + +## Local Development & Testing + +To test Secure Custom Fields locally with WordPress: + +1. Clone the repository into your WordPress plugins directory: wp-content/plugins/secure-custom-fields + +2. Activate the plugin from wp-admin. + +3. Recommended development setup: +- WordPress 6.9+ +- PHP 8.0+ +- LocalWP or wp-env + +4. After making changes: +- Test on post edit screen +- Test on user profile/edit screen +- Check browser console for JS errors + +### Pull Requests + +- Create feature branch from `trunk` +- Keep PR small and focused +- Include screenshots for UI fixes when relevant +- Reference related issue number (Fixes #xxx) + +Thank you for contributing ❤️ From d90e587bccaad471e474776818830fab6742e257 Mon Sep 17 00:00:00 2001 From: Developer Ravi Date: Sat, 21 Feb 2026 10:52:57 +0545 Subject: [PATCH 3/3] Docs: add local development and PR guidance --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f9e4278f..3b5f2b23 100644 --- a/README.md +++ b/README.md @@ -44,4 +44,4 @@ To test Secure Custom Fields locally with WordPress: - Include screenshots for UI fixes when relevant - Reference related issue number (Fixes #xxx) -Thank you for contributing ❤️ +Thank you for contributing \ No newline at end of file