diff --git a/includes/admin/core/class-admin-metabox.php b/includes/admin/core/class-admin-metabox.php index 776e25a8..934577e0 100644 --- a/includes/admin/core/class-admin-metabox.php +++ b/includes/admin/core/class-admin-metabox.php @@ -93,7 +93,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) { */ function hide_metabox_restrict_content_shop( $hide ) { if ( function_exists( 'wc_get_page_id' ) && ! empty( $_GET['post'] ) && - absint( $_GET['post'] ) == wc_get_page_id( 'shop' ) ) { + absint( $_GET['post'] ) == wc_get_page_id( 'shop' ) ) { return true; } @@ -220,7 +220,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) { public function save_metabox_custom( $post_id, $post ) { // validate nonce if ( ! isset( $_POST['um_admin_save_metabox_custom_nonce'] ) || - ! wp_verify_nonce( $_POST['um_admin_save_metabox_custom_nonce'], basename( __FILE__ ) ) ) { + ! wp_verify_nonce( $_POST['um_admin_save_metabox_custom_nonce'], basename( __FILE__ ) ) ) { return; } @@ -324,7 +324,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) { function save_metabox_restrict_content( $post_id, $post ) { // validate nonce if ( ! isset( $_POST['um_admin_save_metabox_restrict_content_nonce'] ) || - ! wp_verify_nonce( $_POST['um_admin_save_metabox_restrict_content_nonce'], basename( __FILE__ ) ) ) { + ! wp_verify_nonce( $_POST['um_admin_save_metabox_restrict_content_nonce'], basename( __FILE__ ) ) ) { return; } @@ -351,7 +351,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) { function save_attachment_metabox_restrict_content( $post_id ) { // validate nonce if ( ! isset( $_POST['um_admin_save_metabox_restrict_content_nonce'] ) - || ! wp_verify_nonce( $_POST['um_admin_save_metabox_restrict_content_nonce'], basename( __FILE__ ) ) ) { + || ! wp_verify_nonce( $_POST['um_admin_save_metabox_restrict_content_nonce'], basename( __FILE__ ) ) ) { return; } @@ -1166,7 +1166,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) { // validate nonce if ( ! isset( $_POST['um_admin_save_metabox_form_nonce'] ) || - ! wp_verify_nonce( $_POST['um_admin_save_metabox_form_nonce'], basename( __FILE__ ) ) ) { + ! wp_verify_nonce( $_POST['um_admin_save_metabox_form_nonce'], basename( __FILE__ ) ) ) { return; } @@ -1254,7 +1254,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) { } } - /** * Show field input for edit at modal field * @@ -1262,7 +1261,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) { * @param null $form_id * @param array $field_args */ - function field_input( $attribute, $form_id = null, $field_args = array() ) { + public function field_input( $attribute, $form_id = null, $field_args = array() ) { if ( $this->in_edit == true ) { // we're editing a field $real_attr = substr( $attribute, 1 ); @@ -1270,9 +1269,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) { } switch ( $attribute ) { - default: - /** * UM hook * @@ -1299,7 +1296,8 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) { case '_visibility': ?> -
+
+