From 45100e89dcd65c624fbe0607f6acf7b788db50b9 Mon Sep 17 00:00:00 2001 From: Erick Hitter <ehitter@gmail.com> Date: Thu, 1 Aug 2013 19:25:17 -0400 Subject: [PATCH] Revert function name and action changes from 3e914baad to avoid breaking things for someone who has manually removed the metabox. --- external-permalinks-redux.php | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/external-permalinks-redux.php b/external-permalinks-redux.php index e4b34ac..6041603 100644 --- a/external-permalinks-redux.php +++ b/external-permalinks-redux.php @@ -53,7 +53,7 @@ class external_permalinks_redux { */ function __construct() { add_action( 'init', array( $this, 'action_init' ), 0 ); // other init actions may rely on permalinks so filter early - add_action( 'add_meta_boxes', array( $this, 'action_add_meta_boxes' ) ); + add_action( 'admin_init', array( $this, 'action_admin_init' ) ); add_action( 'save_post', array( $this, 'action_save_post' ) ); add_filter( 'post_link', array( $this, 'filter_post_permalink' ), 1, 2 ); @@ -86,10 +86,10 @@ class external_permalinks_redux { * @uses apply_filters * @uses __ * @uses add_meta_box - * @action add_meta_boxes + * @action admin_init * @return null */ - function action_add_meta_boxes() { + function action_admin_init() { $post_types = apply_filters( 'epr_post_types', array( 'post', 'page' ) ); if ( ! is_array( $post_types ) ) @@ -237,20 +237,6 @@ class external_permalinks_redux { exit; } } - - /** - ** BACKWARDS COMPATIBILITY - ** FUNCTIONS FOUNDS BELOW ARE DEPRECATED - **/ - - /** - * Action changed and function renamed in v1.1. - * - * @uses this::action_add_meta_boxes - */ - public function action_admin_init() { - $this->action_add_meta_boxes(); - } } // Initialize the plugin if it hasn't already -- GitLab