From fd21316b23330bdaee4e08302fba10fa8b04059c Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Mon, 22 Jan 2018 01:30:24 +1100 Subject: [PATCH] Add [staff_profile] shortcode for backward compatibility with sites already using [staff] --- .../class-sp-meta-box-staff-shortcode.php | 2 +- includes/class-sp-shortcodes.php | 12 ++++++++ .../class-sp-shortcode-staff-profile.php | 28 +++++++++++++++++++ .../shortcodes/class-sp-shortcode-staff.php | 3 -- 4 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 includes/shortcodes/class-sp-shortcode-staff-profile.php diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-shortcode.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-shortcode.php index f7ee8ee4..6de6c799 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-shortcode.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-shortcode.php @@ -23,7 +23,7 @@ class SP_Meta_Box_Staff_Shortcode {

-

+

__CLASS__ . '::player_details', 'player_statistics' => __CLASS__ . '::player_statistics', 'staff' => __CLASS__ . '::staff', + 'staff_profile' => __CLASS__ . '::staff_profile', 'event_calendar' => __CLASS__ . '::event_calendar', 'event_list' => __CLASS__ . '::event_list', 'event_blocks' => __CLASS__ . '::event_blocks', @@ -232,4 +233,15 @@ class SP_Shortcodes { public static function staff( $atts ) { return self::shortcode_wrapper( array( 'SP_Shortcode_Staff', 'output' ), $atts ); } + + /** + * Staff profile shortcode. + * + * @access public + * @param mixed $atts + * @return string + */ + public static function staff_profile( $atts ) { + return self::shortcode_wrapper( array( 'SP_Shortcode_Staff_Profile', 'output' ), $atts ); + } } diff --git a/includes/shortcodes/class-sp-shortcode-staff-profile.php b/includes/shortcodes/class-sp-shortcode-staff-profile.php new file mode 100644 index 00000000..28e5fd77 --- /dev/null +++ b/includes/shortcodes/class-sp-shortcode-staff-profile.php @@ -0,0 +1,28 @@ +