From 0f6eff87043d29f3df5cdd37b6f08623b3286470 Mon Sep 17 00:00:00 2001 From: William Patton Date: Mon, 18 Mar 2024 12:55:05 +0000 Subject: [PATCH] Remove the old meta-boxes functions and flagthem deprecated --- accessibility-checker.php | 2 -- includes/deprecated/deprecated.php | 24 ++++++++++++++++++++ includes/meta-boxes.php | 36 ------------------------------ 3 files changed, 24 insertions(+), 38 deletions(-) delete mode 100644 includes/meta-boxes.php diff --git a/accessibility-checker.php b/accessibility-checker.php index f5506594..299d7ee4 100755 --- a/accessibility-checker.php +++ b/accessibility-checker.php @@ -123,7 +123,6 @@ require_once plugin_dir_path( __FILE__ ) . 'includes/activation.php'; require_once plugin_dir_path( __FILE__ ) . 'includes/deactivation.php'; require_once plugin_dir_path( __FILE__ ) . 'includes/helper-functions.php'; -require_once plugin_dir_path( __FILE__ ) . 'includes/meta-boxes.php'; require_once plugin_dir_path( __FILE__ ) . 'includes/options-page.php'; require_once plugin_dir_path( __FILE__ ) . 'includes/validate.php'; require_once plugin_dir_path( __FILE__ ) . 'includes/insert.php'; @@ -131,7 +130,6 @@ /** * Filters and Actions */ -add_action( 'add_meta_boxes', 'edac_register_meta_boxes' ); add_action( 'admin_menu', 'edac_add_options_page' ); add_action( 'admin_init', 'edac_register_setting' ); add_action( 'admin_head', 'edac_post_on_load' ); diff --git a/includes/deprecated/deprecated.php b/includes/deprecated/deprecated.php index cb8902e1..8bb6feee 100644 --- a/includes/deprecated/deprecated.php +++ b/includes/deprecated/deprecated.php @@ -73,3 +73,27 @@ function edac_delete_cpt_posts( $post_type ) { _deprecated_function( __FUNCTION__, '1.10.0', 'EDAC\Admin\Purge_Post_Data::delete_cpt_posts' ); Purge_Post_Data::delete_cpt_posts( $post_type ); } + +/** + * Register custom meta boxes + * + * @deprecated 1.10.0 + * + * @return void + */ +function edac_register_meta_boxes() { + _deprecated_function( __FUNCTION__, '1.10.0', 'EDAC\Admin\Meta_Boxes::register_meta_boxes' ); + ( new EDAC\Admin\Meta_Boxes() )->register_meta_boxes(); +} + +/** + * Render the custom meta box html + * + * @deprecated 1.10.0 + * + * @return void + */ +function edac_custom_meta_box_cb() { + _deprecated_function( __FUNCTION__, '1.10.0', 'EDAC\Admin\Meta_Boxes::render' ); + ( new EDAC\Admin\Meta_Boxes() )->render(); +} diff --git a/includes/meta-boxes.php b/includes/meta-boxes.php deleted file mode 100644 index 470023b9..00000000 --- a/includes/meta-boxes.php +++ /dev/null @@ -1,36 +0,0 @@ -