From 124151bca03dc94671fd91a3874048860f5e22af Mon Sep 17 00:00:00 2001 From: John James Jacoby Date: Fri, 30 Dec 2022 16:41:26 -0600 Subject: [PATCH] Options: ensure "syntax_highlighting" saves correctly. See #82. --- wp-user-profiles/includes/capabilities.php | 2 +- .../includes/metaboxes/options-contact.php | 12 ++++++++++-- wp-user-profiles/includes/sections/options.php | 5 +++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/wp-user-profiles/includes/capabilities.php b/wp-user-profiles/includes/capabilities.php index 80b3077..f84573d 100644 --- a/wp-user-profiles/includes/capabilities.php +++ b/wp-user-profiles/includes/capabilities.php @@ -182,7 +182,7 @@ function wp_user_profiles_user_supports( $thing = '', $user_id = 0 ) { } // Filter & return - return apply_filters( '', $retval, $thing, $user_id ); + return apply_filters( 'wp_user_profiles_user_supports', $retval, $thing, $user_id ); } /** diff --git a/wp-user-profiles/includes/metaboxes/options-contact.php b/wp-user-profiles/includes/metaboxes/options-contact.php index 50cdd95..94bfbc3 100644 --- a/wp-user-profiles/includes/metaboxes/options-contact.php +++ b/wp-user-profiles/includes/metaboxes/options-contact.php @@ -28,7 +28,9 @@ function wp_user_profiles_contact_metabox( $user = null ) { foreach ( $methods as $name => $desc ) : - ?> + $row_class = "user-{$name}-wrap"; + + ?> - + syntax_highlighting = isset( $_POST['syntax_highlighting'] ) + ? 'false' + : 'true'; + // Admin bar front $user->show_admin_bar_front = isset( $_POST['admin_bar_front'] ) ? 'true'