@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * Contructor |
| 30 | 30 | */ |
| 31 | 31 | public function __construct() { |
| 32 | - add_action( 'init', array( $this, 'cmb2_post_search_ajax' ) ); |
|
| 32 | + add_action('init', array($this, 'cmb2_post_search_ajax')); |
|
| 33 | 33 | $this->load_vendors(); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | public static function get_instance() { |
| 44 | 44 | |
| 45 | 45 | // If the single instance hasn't been set, set it now. |
| 46 | - if ( null === self::$instance ) { |
|
| 46 | + if (null === self::$instance) { |
|
| 47 | 47 | self::$instance = new self(); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -56,8 +56,8 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | private function load_vendors() { |
| 58 | 58 | // Configure custom fields. |
| 59 | - if ( ! class_exists( 'CMB2' ) ) { |
|
| 60 | - require_once LSX_TEAM_PATH . 'vendor/CMB2/init.php'; |
|
| 59 | + if (!class_exists('CMB2')) { |
|
| 60 | + require_once LSX_TEAM_PATH.'vendor/CMB2/init.php'; |
|
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | |
@@ -67,11 +67,11 @@ discard block |
||
| 67 | 67 | * @return void |
| 68 | 68 | */ |
| 69 | 69 | public function get_post_types() { |
| 70 | - $post_types = apply_filters( 'lsx_team_post_types', isset( $this->post_types ) ); |
|
| 71 | - foreach ( $post_types as $index => $post_type ) { |
|
| 72 | - $is_disabled = \cmb2_get_option( 'lsx_team_options', $post_type . '_disabled', false ); |
|
| 73 | - if ( true === $is_disabled || 1 === $is_disabled || 'on' === $is_disabled ) { |
|
| 74 | - unset( $post_types[ $index ] ); |
|
| 70 | + $post_types = apply_filters('lsx_team_post_types', isset($this->post_types)); |
|
| 71 | + foreach ($post_types as $index => $post_type) { |
|
| 72 | + $is_disabled = \cmb2_get_option('lsx_team_options', $post_type.'_disabled', false); |
|
| 73 | + if (true === $is_disabled || 1 === $is_disabled || 'on' === $is_disabled) { |
|
| 74 | + unset($post_types[$index]); |
|
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | return $post_types; |
@@ -83,8 +83,8 @@ discard block |
||
| 83 | 83 | * @return void |
| 84 | 84 | */ |
| 85 | 85 | public function cmb2_post_search_ajax() { |
| 86 | - require_once LSX_TEAM_PATH . 'vendor/lsx-field-post-search-ajax/cmb-field-post-search-ajax.php'; |
|
| 87 | - if ( method_exists( 'MAG_CMB2_Field_Post_Search_Ajax', 'get_instance' ) ) { |
|
| 86 | + require_once LSX_TEAM_PATH.'vendor/lsx-field-post-search-ajax/cmb-field-post-search-ajax.php'; |
|
| 87 | + if (method_exists('MAG_CMB2_Field_Post_Search_Ajax', 'get_instance')) { |
|
| 88 | 88 | $this->cmb2_post_search_ajax = \MAG_CMB2_Field_Post_Search_Ajax::get_instance(); |
| 89 | 89 | } |
| 90 | 90 | } |
@@ -36,14 +36,14 @@ discard block |
||
| 36 | 36 | * Contructor |
| 37 | 37 | */ |
| 38 | 38 | public function __construct() { |
| 39 | - add_filter( 'cmb2_enqueue_css', array( $this, 'disable_cmb2_styles' ), 1, 1 ); |
|
| 40 | - add_action( 'cmb2_before_form', array( $this, 'generate_navigation' ), 10, 4 ); |
|
| 41 | - add_action( 'cmb2_before_title_field_row', array( $this, 'output_tab_open_div' ), 10, 1 ); |
|
| 42 | - add_action( 'cmb2_after_tab_closing_field_row', array( $this, 'output_tab_closing_div' ), 10, 1 ); |
|
| 43 | - add_action( 'cmb2_render_tab_closing', array( $this, 'cmb2_render_callback_for_tab_closing' ), 10, 5 ); |
|
| 44 | - add_filter( 'cmb2_sanitize_tab_closing', array( $this, 'cmb2_sanitize_tab_closing_callback' ), 10, 2 ); |
|
| 45 | - add_action( 'cmb2_after_form', array( $this, 'navigation_js' ), 10, 4 ); |
|
| 46 | - add_filter( 'cmb2_options_page_redirect_url', array( $this, 'add_tab_argument' ), 10, 1 ); |
|
| 39 | + add_filter('cmb2_enqueue_css', array($this, 'disable_cmb2_styles'), 1, 1); |
|
| 40 | + add_action('cmb2_before_form', array($this, 'generate_navigation'), 10, 4); |
|
| 41 | + add_action('cmb2_before_title_field_row', array($this, 'output_tab_open_div'), 10, 1); |
|
| 42 | + add_action('cmb2_after_tab_closing_field_row', array($this, 'output_tab_closing_div'), 10, 1); |
|
| 43 | + add_action('cmb2_render_tab_closing', array($this, 'cmb2_render_callback_for_tab_closing'), 10, 5); |
|
| 44 | + add_filter('cmb2_sanitize_tab_closing', array($this, 'cmb2_sanitize_tab_closing_callback'), 10, 2); |
|
| 45 | + add_action('cmb2_after_form', array($this, 'navigation_js'), 10, 4); |
|
| 46 | + add_filter('cmb2_options_page_redirect_url', array($this, 'add_tab_argument'), 10, 1); |
|
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | /** |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public static function get_instance() { |
| 57 | 57 | // If the single instance hasn't been set, set it now. |
| 58 | - if ( null == self::$instance ) { |
|
| 58 | + if (null == self::$instance) { |
|
| 59 | 59 | self::$instance = new self(); |
| 60 | 60 | } |
| 61 | 61 | return self::$instance; |
@@ -66,10 +66,10 @@ discard block |
||
| 66 | 66 | * |
| 67 | 67 | * @return bool $enabled Whether to enable (enqueue) styles. |
| 68 | 68 | */ |
| 69 | - public function disable_cmb2_styles( $enabled ) { |
|
| 70 | - if ( is_admin() ) { |
|
| 69 | + public function disable_cmb2_styles($enabled) { |
|
| 70 | + if (is_admin()) { |
|
| 71 | 71 | $current_screen = get_current_screen(); |
| 72 | - if ( is_object( $current_screen ) && 'team_page_lsx_team_options' === $current_screen->id ) { |
|
| 72 | + if (is_object($current_screen) && 'team_page_lsx_team_options' === $current_screen->id) { |
|
| 73 | 73 | $enabled = false; |
| 74 | 74 | } |
| 75 | 75 | } |
@@ -85,14 +85,14 @@ discard block |
||
| 85 | 85 | * @param object $cmb2_obj |
| 86 | 86 | * @return void |
| 87 | 87 | */ |
| 88 | - public function generate_navigation( $cmb_id, $object_id, $object_type, $cmb2_obj ) { |
|
| 89 | - if ( 'lsx_team_settings' === $cmb_id && 'lsx_team_options' === $object_id && 'options-page' === $object_type ) { |
|
| 88 | + public function generate_navigation($cmb_id, $object_id, $object_type, $cmb2_obj) { |
|
| 89 | + if ('lsx_team_settings' === $cmb_id && 'lsx_team_options' === $object_id && 'options-page' === $object_type) { |
|
| 90 | 90 | $this->navigation = array(); |
| 91 | 91 | $this->is_options_page = true; |
| 92 | - if ( isset( $cmb2_obj->meta_box['fields'] ) && ! empty( $cmb2_obj->meta_box['fields'] ) ) { |
|
| 93 | - foreach ( $cmb2_obj->meta_box['fields'] as $field_index => $field ) { |
|
| 94 | - if ( 'title' === $field['type'] ) { |
|
| 95 | - $this->navigation[ $field_index ] = $field['name']; |
|
| 92 | + if (isset($cmb2_obj->meta_box['fields']) && !empty($cmb2_obj->meta_box['fields'])) { |
|
| 93 | + foreach ($cmb2_obj->meta_box['fields'] as $field_index => $field) { |
|
| 94 | + if ('title' === $field['type']) { |
|
| 95 | + $this->navigation[$field_index] = $field['name']; |
|
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | } |
@@ -106,32 +106,32 @@ discard block |
||
| 106 | 106 | * @return void |
| 107 | 107 | */ |
| 108 | 108 | public function output_navigation() { |
| 109 | - if ( ! empty( $this->navigation ) ) { |
|
| 109 | + if (!empty($this->navigation)) { |
|
| 110 | 110 | ?> |
| 111 | 111 | <div class="wp-filter hide-if-no-js"> |
| 112 | 112 | <ul class="filter-links"> |
| 113 | 113 | <?php |
| 114 | 114 | $first_tab = true; |
| 115 | - $total = count( $this->navigation ); |
|
| 115 | + $total = count($this->navigation); |
|
| 116 | 116 | $count = 0; |
| 117 | 117 | $separator = ' |'; |
| 118 | 118 | $selected_tab = ''; |
| 119 | - if ( isset( $_GET['cmb_tab'] ) && '' !== $_GET['cmb_tab'] ) { |
|
| 120 | - $selected_tab = sanitize_text_field( wp_unslash( $_GET['cmb_tab'] ) ); |
|
| 121 | - $selected_tab = 'settings_' . $selected_tab; |
|
| 119 | + if (isset($_GET['cmb_tab']) && '' !== $_GET['cmb_tab']) { |
|
| 120 | + $selected_tab = sanitize_text_field(wp_unslash($_GET['cmb_tab'])); |
|
| 121 | + $selected_tab = 'settings_'.$selected_tab; |
|
| 122 | 122 | } |
| 123 | - foreach ( $this->navigation as $key => $label ) { |
|
| 123 | + foreach ($this->navigation as $key => $label) { |
|
| 124 | 124 | $count++; |
| 125 | 125 | $current_css = ''; |
| 126 | - if ( ( true === $first_tab && '' === $selected_tab ) || $key === $selected_tab ) { |
|
| 126 | + if ((true === $first_tab && '' === $selected_tab) || $key === $selected_tab) { |
|
| 127 | 127 | $first_tab = false; |
| 128 | 128 | $current_css = 'current'; |
| 129 | 129 | } |
| 130 | - if ( $count === $total ) { |
|
| 130 | + if ($count === $total) { |
|
| 131 | 131 | $separator = ''; |
| 132 | 132 | } |
| 133 | 133 | ?> |
| 134 | - <li><a href="#" class="<?php echo esc_attr( $current_css ); ?>" data-sort="<?php echo esc_attr( $key ); ?>_tab"><?php echo esc_attr( $label ); ?></a><?php echo esc_attr( $separator ); ?></li> |
|
| 134 | + <li><a href="#" class="<?php echo esc_attr($current_css); ?>" data-sort="<?php echo esc_attr($key); ?>_tab"><?php echo esc_attr($label); ?></a><?php echo esc_attr($separator); ?></li> |
|
| 135 | 135 | <?php |
| 136 | 136 | } |
| 137 | 137 | ?> |
@@ -147,10 +147,10 @@ discard block |
||
| 147 | 147 | * @param object $field CMB2_Field(); |
| 148 | 148 | * @return void |
| 149 | 149 | */ |
| 150 | - public function output_tab_open_div( $field ) { |
|
| 151 | - if ( true === $this->is_options_page && isset( $field->args['type'] ) && 'title' === $field->args['type'] ) { |
|
| 150 | + public function output_tab_open_div($field) { |
|
| 151 | + if (true === $this->is_options_page && isset($field->args['type']) && 'title' === $field->args['type']) { |
|
| 152 | 152 | ?> |
| 153 | - <div id="<?php echo esc_attr( $field->args['id'] ); ?>_tab" class="tab tab-nav hidden"> |
|
| 153 | + <div id="<?php echo esc_attr($field->args['id']); ?>_tab" class="tab tab-nav hidden"> |
|
| 154 | 154 | <?php |
| 155 | 155 | } |
| 156 | 156 | } |
@@ -161,19 +161,19 @@ discard block |
||
| 161 | 161 | * @param object $field CMB2_Field(); |
| 162 | 162 | * @return void |
| 163 | 163 | */ |
| 164 | - public function output_tab_closing_div( $field ) { |
|
| 165 | - if ( true === $this->is_options_page && isset( $field->args['type'] ) && 'tab_closing' === $field->args['type'] ) { |
|
| 164 | + public function output_tab_closing_div($field) { |
|
| 165 | + if (true === $this->is_options_page && isset($field->args['type']) && 'tab_closing' === $field->args['type']) { |
|
| 166 | 166 | ?> |
| 167 | 167 | </div> |
| 168 | 168 | <?php |
| 169 | 169 | } |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | - public function cmb2_render_callback_for_tab_closing( $field, $escaped_value, $object_id, $object_type, $field_type_object ) { |
|
| 172 | + public function cmb2_render_callback_for_tab_closing($field, $escaped_value, $object_id, $object_type, $field_type_object) { |
|
| 173 | 173 | return; |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - public function cmb2_sanitize_tab_closing_callback( $override_value, $value ) { |
|
| 176 | + public function cmb2_sanitize_tab_closing_callback($override_value, $value) { |
|
| 177 | 177 | return ''; |
| 178 | 178 | } |
| 179 | 179 | |
@@ -186,8 +186,8 @@ discard block |
||
| 186 | 186 | * @param object $cmb2_obj |
| 187 | 187 | * @return void |
| 188 | 188 | */ |
| 189 | - public function navigation_js( $cmb_id, $object_id, $object_type, $cmb2_obj ) { |
|
| 190 | - if ( 'lsx_team_settings' === $cmb_id && 'lsx_team_options' === $object_id && 'options-page' === $object_type ) { |
|
| 189 | + public function navigation_js($cmb_id, $object_id, $object_type, $cmb2_obj) { |
|
| 190 | + if ('lsx_team_settings' === $cmb_id && 'lsx_team_options' === $object_id && 'options-page' === $object_type) { |
|
| 191 | 191 | ?> |
| 192 | 192 | <script> |
| 193 | 193 | var LSX_TEAM_CMB2 = Object.create( null ); |
@@ -270,14 +270,14 @@ discard block |
||
| 270 | 270 | * @param string $url |
| 271 | 271 | * @return void |
| 272 | 272 | */ |
| 273 | - public function add_tab_argument( $url ) { |
|
| 274 | - if ( isset( $_POST['cmb_tab'] ) && '' !== $_POST['cmb_tab'] ) { // @codingStandardsIgnoreLine |
|
| 275 | - $tab_selection = sanitize_text_field( $_POST['cmb_tab'] ); // @codingStandardsIgnoreLine |
|
| 276 | - $tab_selection = str_replace( array( 'settings_', '_tab' ), '', $tab_selection ); // @codingStandardsIgnoreLine |
|
| 277 | - if ( 'single' !== $tab_selection ) { |
|
| 278 | - $url = add_query_arg( 'cmb_tab', $tab_selection, $url ); |
|
| 273 | + public function add_tab_argument($url) { |
|
| 274 | + if (isset($_POST['cmb_tab']) && '' !== $_POST['cmb_tab']) { // @codingStandardsIgnoreLine |
|
| 275 | + $tab_selection = sanitize_text_field($_POST['cmb_tab']); // @codingStandardsIgnoreLine |
|
| 276 | + $tab_selection = str_replace(array('settings_', '_tab'), '', $tab_selection); // @codingStandardsIgnoreLine |
|
| 277 | + if ('single' !== $tab_selection) { |
|
| 278 | + $url = add_query_arg('cmb_tab', $tab_selection, $url); |
|
| 279 | 279 | } else { |
| 280 | - $url = remove_query_arg( 'cmb_tab', $url ); |
|
| 280 | + $url = remove_query_arg('cmb_tab', $url); |
|
| 281 | 281 | } |
| 282 | 282 | } |
| 283 | 283 | return $url; |
@@ -13,35 +13,35 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | |
| 15 | 15 | // If this file is called directly, abort. |
| 16 | -if ( ! defined( 'WPINC' ) ) { |
|
| 16 | +if (!defined('WPINC')) { |
|
| 17 | 17 | die; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | -define( 'LSX_TEAM_PATH', plugin_dir_path( __FILE__ ) ); |
|
| 21 | -define( 'LSX_TEAM_CORE', __FILE__ ); |
|
| 22 | -define( 'LSX_TEAM_URL', plugin_dir_url( __FILE__ ) ); |
|
| 23 | -define( 'LSX_TEAM_VER', '1.3.0' ); |
|
| 20 | +define('LSX_TEAM_PATH', plugin_dir_path(__FILE__)); |
|
| 21 | +define('LSX_TEAM_CORE', __FILE__); |
|
| 22 | +define('LSX_TEAM_URL', plugin_dir_url(__FILE__)); |
|
| 23 | +define('LSX_TEAM_VER', '1.3.0'); |
|
| 24 | 24 | |
| 25 | 25 | |
| 26 | 26 | /* ======================= Below is the Plugin Class init ========================= */ |
| 27 | 27 | |
| 28 | 28 | // Template Tag and functions. |
| 29 | -require_once LSX_TEAM_PATH . '/includes/functions.php'; |
|
| 29 | +require_once LSX_TEAM_PATH.'/includes/functions.php'; |
|
| 30 | 30 | |
| 31 | 31 | // Core Class. |
| 32 | -require_once LSX_TEAM_PATH . '/classes/class-lsx-team-core.php'; |
|
| 32 | +require_once LSX_TEAM_PATH.'/classes/class-lsx-team-core.php'; |
|
| 33 | 33 | |
| 34 | 34 | // Post Type and Custom Fields. |
| 35 | -require_once LSX_TEAM_PATH . '/classes/class-lsx-team-admin.php'; |
|
| 35 | +require_once LSX_TEAM_PATH.'/classes/class-lsx-team-admin.php'; |
|
| 36 | 36 | |
| 37 | 37 | // Frontend resources. |
| 38 | -require_once LSX_TEAM_PATH . '/classes/class-lsx-team-frontend.php'; |
|
| 38 | +require_once LSX_TEAM_PATH.'/classes/class-lsx-team-frontend.php'; |
|
| 39 | 39 | |
| 40 | 40 | // Shortcode. |
| 41 | -require_once LSX_TEAM_PATH . '/classes/class-lsx-team.php'; |
|
| 41 | +require_once LSX_TEAM_PATH.'/classes/class-lsx-team.php'; |
|
| 42 | 42 | |
| 43 | 43 | // Widget. |
| 44 | -require_once LSX_TEAM_PATH . '/classes/class-lsx-team-widget.php'; |
|
| 44 | +require_once LSX_TEAM_PATH.'/classes/class-lsx-team-widget.php'; |
|
| 45 | 45 | |
| 46 | 46 | // Post reorder. |
| 47 | -require_once LSX_TEAM_PATH . '/includes/class-lsx-team-scpo-engine.php'; |
|
| 47 | +require_once LSX_TEAM_PATH.'/includes/class-lsx-team-scpo-engine.php'; |
|
@@ -7,34 +7,34 @@ discard block |
||
| 7 | 7 | <?php |
| 8 | 8 | global $lsx_team; |
| 9 | 9 | |
| 10 | - $thumbnail = $lsx_team->get_thumbnail( get_the_ID(), 'lsx-team-single' ); |
|
| 10 | + $thumbnail = $lsx_team->get_thumbnail(get_the_ID(), 'lsx-team-single'); |
|
| 11 | 11 | |
| 12 | - $job_title = get_post_meta( get_the_ID(), 'lsx_job_title', true ); |
|
| 12 | + $job_title = get_post_meta(get_the_ID(), 'lsx_job_title', true); |
|
| 13 | 13 | |
| 14 | 14 | $links = array( |
| 15 | - 'facebook' => get_post_meta( get_the_ID(), 'lsx_facebook', true ), |
|
| 16 | - 'twitter' => get_post_meta( get_the_ID(), 'lsx_twitter', true ), |
|
| 17 | - 'linkedin' => get_post_meta( get_the_ID(), 'lsx_linkedin', true ), |
|
| 18 | - 'github' => get_post_meta( get_the_ID(), 'lsx_github', true ), |
|
| 19 | - 'wordpress' => get_post_meta( get_the_ID(), 'lsx_wordpress', true ), |
|
| 15 | + 'facebook' => get_post_meta(get_the_ID(), 'lsx_facebook', true), |
|
| 16 | + 'twitter' => get_post_meta(get_the_ID(), 'lsx_twitter', true), |
|
| 17 | + 'linkedin' => get_post_meta(get_the_ID(), 'lsx_linkedin', true), |
|
| 18 | + 'github' => get_post_meta(get_the_ID(), 'lsx_github', true), |
|
| 19 | + 'wordpress' => get_post_meta(get_the_ID(), 'lsx_wordpress', true), |
|
| 20 | 20 | ); |
| 21 | 21 | |
| 22 | - foreach ( $links as $service => $link ) { |
|
| 23 | - if ( empty( $link ) ) { |
|
| 24 | - unset( $links[ $service ] ); |
|
| 22 | + foreach ($links as $service => $link) { |
|
| 23 | + if (empty($link)) { |
|
| 24 | + unset($links[$service]); |
|
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - $email = get_post_meta( get_the_ID(), 'lsx_email_contact', true ); |
|
| 29 | - $phone = get_post_meta( get_the_ID(), 'lsx_tel', true ); |
|
| 30 | - $skype = get_post_meta( get_the_ID(), 'lsx_skype', true ); |
|
| 28 | + $email = get_post_meta(get_the_ID(), 'lsx_email_contact', true); |
|
| 29 | + $phone = get_post_meta(get_the_ID(), 'lsx_tel', true); |
|
| 30 | + $skype = get_post_meta(get_the_ID(), 'lsx_skype', true); |
|
| 31 | 31 | |
| 32 | 32 | $phone_attr = $phone; |
| 33 | - $phone_attr = str_replace( ' ', '', $phone_attr ); |
|
| 34 | - $phone_attr = str_replace( '+', '', $phone_attr ); |
|
| 35 | - $phone_attr = str_replace( '(', '', $phone_attr ); |
|
| 36 | - $phone_attr = str_replace( ')', '', $phone_attr ); |
|
| 37 | - $phone_attr = str_replace( '.', '', $phone_attr ); |
|
| 33 | + $phone_attr = str_replace(' ', '', $phone_attr); |
|
| 34 | + $phone_attr = str_replace('+', '', $phone_attr); |
|
| 35 | + $phone_attr = str_replace('(', '', $phone_attr); |
|
| 36 | + $phone_attr = str_replace(')', '', $phone_attr); |
|
| 37 | + $phone_attr = str_replace('.', '', $phone_attr); |
|
| 38 | 38 | |
| 39 | 39 | // Tabs |
| 40 | 40 | |
@@ -42,13 +42,13 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | // Tab Posts |
| 44 | 44 | |
| 45 | - $site_user = get_post_meta( get_the_ID(), 'lsx_site_user', true ); |
|
| 45 | + $site_user = get_post_meta(get_the_ID(), 'lsx_site_user', true); |
|
| 46 | 46 | |
| 47 | - if ( ! empty( $site_user ) ) { |
|
| 48 | - if ( is_user_member_of_blog( $site_user ) ) { |
|
| 49 | - $user_posts = count_user_posts( $site_user, 'post' ); |
|
| 47 | + if (!empty($site_user)) { |
|
| 48 | + if (is_user_member_of_blog($site_user)) { |
|
| 49 | + $user_posts = count_user_posts($site_user, 'post'); |
|
| 50 | 50 | |
| 51 | - if ( $user_posts > 0 ) { |
|
| 51 | + if ($user_posts > 0) { |
|
| 52 | 52 | $params = array( |
| 53 | 53 | 'post_type' => 'post', |
| 54 | 54 | 'author' => $site_user, |
@@ -76,16 +76,16 @@ discard block |
||
| 76 | 76 | ), |
| 77 | 77 | ); |
| 78 | 78 | |
| 79 | - $posts_query = new \WP_Query( $params ); |
|
| 79 | + $posts_query = new \WP_Query($params); |
|
| 80 | 80 | |
| 81 | - if ( $posts_query->have_posts() ) { |
|
| 81 | + if ($posts_query->have_posts()) { |
|
| 82 | 82 | $tab_post['post_type'] = 'post'; |
| 83 | - $tab_post['title'] = esc_html__( 'Posts', 'lsx-team' ); |
|
| 83 | + $tab_post['title'] = esc_html__('Posts', 'lsx-team'); |
|
| 84 | 84 | $tab_post['posts'] = $posts_query->posts; |
| 85 | 85 | |
| 86 | - if ( ! empty( $tab_post['posts'] ) ) { |
|
| 87 | - $post_ids = join( ',', $tab_post['posts'] ); |
|
| 88 | - $tab_post['shortcode'] = '[lsx_posts columns="3" include="' . $post_ids . '"]'; |
|
| 86 | + if (!empty($tab_post['posts'])) { |
|
| 87 | + $post_ids = join(',', $tab_post['posts']); |
|
| 88 | + $tab_post['shortcode'] = '[lsx_posts columns="3" include="'.$post_ids.'"]'; |
|
| 89 | 89 | $tabs[] = $tab_post; |
| 90 | 90 | } |
| 91 | 91 | } |
@@ -96,25 +96,25 @@ discard block |
||
| 96 | 96 | // Tab Projects |
| 97 | 97 | |
| 98 | 98 | $tab_project['post_type'] = 'project'; |
| 99 | - $tab_project['title'] = esc_html__( 'Projects', 'lsx-team' ); |
|
| 100 | - $tab_project['posts'] = get_post_meta( get_the_ID(), 'project_to_team', true ); |
|
| 99 | + $tab_project['title'] = esc_html__('Projects', 'lsx-team'); |
|
| 100 | + $tab_project['posts'] = get_post_meta(get_the_ID(), 'project_to_team', true); |
|
| 101 | 101 | |
| 102 | - if ( is_plugin_active( 'lsx-projects/lsx-projects.php' ) && ( ! empty( $tab_project['posts'] ) ) ) { |
|
| 103 | - $post_ids = join( ',', $tab_project['posts'] ); |
|
| 104 | - $tab_project['shortcode'] = '[lsx_projects columns="3" include="' . $post_ids . '"]'; |
|
| 102 | + if (is_plugin_active('lsx-projects/lsx-projects.php') && (!empty($tab_project['posts']))) { |
|
| 103 | + $post_ids = join(',', $tab_project['posts']); |
|
| 104 | + $tab_project['shortcode'] = '[lsx_projects columns="3" include="'.$post_ids.'"]'; |
|
| 105 | 105 | $tabs[] = $tab_project; |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | // Tab Services |
| 109 | 109 | |
| 110 | - if ( is_plugin_active( 'lsx-services/lsx-services.php' ) ) { |
|
| 110 | + if (is_plugin_active('lsx-services/lsx-services.php')) { |
|
| 111 | 111 | $tab_service['post_type'] = 'service'; |
| 112 | - $tab_service['title'] = esc_html__( 'Services', 'lsx-team' ); |
|
| 113 | - $tab_service['posts'] = get_post_meta( get_the_ID(), 'service_to_team', true ); |
|
| 112 | + $tab_service['title'] = esc_html__('Services', 'lsx-team'); |
|
| 113 | + $tab_service['posts'] = get_post_meta(get_the_ID(), 'service_to_team', true); |
|
| 114 | 114 | |
| 115 | - if ( ! empty( $tab_service['posts'] ) ) { |
|
| 116 | - $post_ids = join( ',', $tab_service['posts'] ); |
|
| 117 | - $tab_service['shortcode'] = '[lsx_services columns="3" include="' . $post_ids . '"]'; |
|
| 115 | + if (!empty($tab_service['posts'])) { |
|
| 116 | + $post_ids = join(',', $tab_service['posts']); |
|
| 117 | + $tab_service['shortcode'] = '[lsx_services columns="3" include="'.$post_ids.'"]'; |
|
| 118 | 118 | $tabs[] = $tab_service; |
| 119 | 119 | } |
| 120 | 120 | } |
@@ -122,18 +122,18 @@ discard block |
||
| 122 | 122 | // Tab Testimonials |
| 123 | 123 | |
| 124 | 124 | $tab_testimonial['post_type'] = 'testimonial'; |
| 125 | - $tab_testimonial['title'] = esc_html__( 'Testimonials', 'lsx-team' ); |
|
| 126 | - $tab_testimonial['posts'] = get_post_meta( get_the_ID(), 'testimonial_to_team', true ); |
|
| 125 | + $tab_testimonial['title'] = esc_html__('Testimonials', 'lsx-team'); |
|
| 126 | + $tab_testimonial['posts'] = get_post_meta(get_the_ID(), 'testimonial_to_team', true); |
|
| 127 | 127 | |
| 128 | - if ( is_plugin_active( 'lsx-testimonials/lsx-testimonials.php' ) && ( ! empty( $tab_testimonial['posts'] ) ) ) { |
|
| 129 | - if ( count( $tab_testimonial['posts'] ) <= 2 ) { |
|
| 130 | - $columns = count( $tab_testimonial['posts'] ); |
|
| 128 | + if (is_plugin_active('lsx-testimonials/lsx-testimonials.php') && (!empty($tab_testimonial['posts']))) { |
|
| 129 | + if (count($tab_testimonial['posts']) <= 2) { |
|
| 130 | + $columns = count($tab_testimonial['posts']); |
|
| 131 | 131 | } else { |
| 132 | 132 | $columns = 2; |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - $post_ids = join( ',', $tab_testimonial['posts'] ); |
|
| 136 | - $tab_testimonial['shortcode'] = '[lsx_testimonials columns="' . $columns . '" include="' . $post_ids . '" orderby="date" order="DESC" display="excerpt"]'; |
|
| 135 | + $post_ids = join(',', $tab_testimonial['posts']); |
|
| 136 | + $tab_testimonial['shortcode'] = '[lsx_testimonials columns="'.$columns.'" include="'.$post_ids.'" orderby="date" order="DESC" display="excerpt"]'; |
|
| 137 | 137 | $tabs[] = $tab_testimonial; |
| 138 | 138 | } |
| 139 | 139 | ?> |
@@ -147,15 +147,15 @@ discard block |
||
| 147 | 147 | <div class="row"> |
| 148 | 148 | <div class="col-xs-12 col-sm-6 col-md-4"> |
| 149 | 149 | <figure class="lsx-team-avatar"> |
| 150 | - <?php echo wp_kses_post( $thumbnail ); ?> |
|
| 150 | + <?php echo wp_kses_post($thumbnail); ?> |
|
| 151 | 151 | </figure> |
| 152 | 152 | |
| 153 | - <?php if ( count( $links ) > 0 ) : ?> |
|
| 154 | - <span class="lsx-team-socials-header"><?php echo esc_html__( 'Follow', 'lsx-team' ) . ':'; ?></span> |
|
| 153 | + <?php if (count($links) > 0) : ?> |
|
| 154 | + <span class="lsx-team-socials-header"><?php echo esc_html__('Follow', 'lsx-team').':'; ?></span> |
|
| 155 | 155 | |
| 156 | 156 | <ul class="lsx-team-socials list-inline"> |
| 157 | - <?php foreach ( $links as $service => $link ) : ?> |
|
| 158 | - <li><a href="<?php echo esc_html( $link ); ?>" target="_blank" rel="nofollow noreferrer noopener"><i class="fa fa-<?php echo esc_html( $service ); ?>" aria-hidden="true"></i></a></li> |
|
| 157 | + <?php foreach ($links as $service => $link) : ?> |
|
| 158 | + <li><a href="<?php echo esc_html($link); ?>" target="_blank" rel="nofollow noreferrer noopener"><i class="fa fa-<?php echo esc_html($service); ?>" aria-hidden="true"></i></a></li> |
|
| 159 | 159 | <?php endforeach; ?> |
| 160 | 160 | </ul> |
| 161 | 161 | <?php endif; ?> |
@@ -163,39 +163,39 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | <div class="col-xs-12 col-sm-6 col-md-8"> |
| 165 | 165 | <h2 class="lsx-team-name"><?php the_title(); ?></h2> |
| 166 | - <h5 class="lsx-team-job-title"><?php echo esc_html( $job_title ); ?></h5> |
|
| 166 | + <h5 class="lsx-team-job-title"><?php echo esc_html($job_title); ?></h5> |
|
| 167 | 167 | <div class="lsx-team-content"><?php the_content(); ?></div> |
| 168 | 168 | |
| 169 | - <?php if ( ! empty( $email ) || ! empty( $phone ) || ! empty( $skype ) ) : ?> |
|
| 169 | + <?php if (!empty($email) || !empty($phone) || !empty($skype)) : ?> |
|
| 170 | 170 | <ul class="lsx-team-contact list-inline"> |
| 171 | - <?php if ( ! empty( $email ) ) : ?> |
|
| 172 | - <li><a href="mailto:<?php echo esc_attr( $email ); ?>"><i class="fa fa-envelope-o" aria-hidden="true"></i> <?php echo esc_attr( $email ); ?></a></li> |
|
| 171 | + <?php if (!empty($email)) : ?> |
|
| 172 | + <li><a href="mailto:<?php echo esc_attr($email); ?>"><i class="fa fa-envelope-o" aria-hidden="true"></i> <?php echo esc_attr($email); ?></a></li> |
|
| 173 | 173 | <?php endif; ?> |
| 174 | 174 | |
| 175 | - <?php if ( ! empty( $phone ) ) : ?> |
|
| 176 | - <li><a href="tel:<?php echo esc_attr( $phone_attr ); ?>"><i class="fa fa-phone" aria-hidden="true"></i> <?php echo esc_attr( $phone ); ?></a></li> |
|
| 175 | + <?php if (!empty($phone)) : ?> |
|
| 176 | + <li><a href="tel:<?php echo esc_attr($phone_attr); ?>"><i class="fa fa-phone" aria-hidden="true"></i> <?php echo esc_attr($phone); ?></a></li> |
|
| 177 | 177 | <?php endif; ?> |
| 178 | 178 | |
| 179 | - <?php if ( ! empty( $skype ) ) : ?> |
|
| 180 | - <li><i class="fa fa-skype" aria-hidden="true"></i> <?php echo esc_attr( $skype ); ?></li> |
|
| 179 | + <?php if (!empty($skype)) : ?> |
|
| 180 | + <li><i class="fa fa-skype" aria-hidden="true"></i> <?php echo esc_attr($skype); ?></li> |
|
| 181 | 181 | <?php endif; ?> |
| 182 | 182 | </ul> |
| 183 | 183 | <?php endif; ?> |
| 184 | 184 | </div> |
| 185 | 185 | </div> |
| 186 | 186 | |
| 187 | - <?php if ( count( $tabs ) > 0 ) : ?> |
|
| 187 | + <?php if (count($tabs) > 0) : ?> |
|
| 188 | 188 | <div class="entry-tabs"> |
| 189 | 189 | <ul class="nav nav-tabs"> |
| 190 | - <?php foreach ( $tabs as $i => $tab ) : ?> |
|
| 191 | - <li<?php if ( 0 === $i ) echo ' class="active"'; ?>><a data-toggle="tab" href="#<?php echo esc_attr( sanitize_title( $tab['title'] ) ); ?>"><?php echo esc_html( $tab['title'] ); ?></a></li> |
|
| 190 | + <?php foreach ($tabs as $i => $tab) : ?> |
|
| 191 | + <li<?php if (0 === $i) echo ' class="active"'; ?>><a data-toggle="tab" href="#<?php echo esc_attr(sanitize_title($tab['title'])); ?>"><?php echo esc_html($tab['title']); ?></a></li> |
|
| 192 | 192 | <?php endforeach; ?> |
| 193 | 193 | </ul> |
| 194 | 194 | |
| 195 | 195 | <div class="tab-content"> |
| 196 | - <?php foreach ( $tabs as $i => $tab ) : ?> |
|
| 197 | - <div id="<?php echo esc_attr( sanitize_title( $tab['title'] ) ); ?>" class="tab-pane fade<?php if ( 0 === $i ) echo ' in active'; ?>"> |
|
| 198 | - <?php echo do_shortcode( $tab['shortcode'] ); ?> |
|
| 196 | + <?php foreach ($tabs as $i => $tab) : ?> |
|
| 197 | + <div id="<?php echo esc_attr(sanitize_title($tab['title'])); ?>" class="tab-pane fade<?php if (0 === $i) echo ' in active'; ?>"> |
|
| 198 | + <?php echo do_shortcode($tab['shortcode']); ?> |
|
| 199 | 199 | </div> |
| 200 | 200 | <?php endforeach; ?> |
| 201 | 201 | </div> |
@@ -14,46 +14,46 @@ discard block |
||
| 14 | 14 | public function __construct() { |
| 15 | 15 | $this->load_classes(); |
| 16 | 16 | |
| 17 | - add_action( 'init', array( $this, 'post_type_setup' ) ); |
|
| 18 | - add_action( 'init', array( $this, 'taxonomy_setup' ) ); |
|
| 17 | + add_action('init', array($this, 'post_type_setup')); |
|
| 18 | + add_action('init', array($this, 'taxonomy_setup')); |
|
| 19 | 19 | |
| 20 | - add_action( 'cmb2_admin_init', array( $this, 'details_metabox' ) ); |
|
| 21 | - add_action( 'cmb2_admin_init', array( $this, 'projects_details_metabox' ) ); |
|
| 22 | - add_action( 'cmb2_admin_init', array( $this, 'services_details_metabox' ) ); |
|
| 23 | - add_action( 'cmb2_admin_init', array( $this, 'testimonials_details_metabox' ) ); |
|
| 20 | + add_action('cmb2_admin_init', array($this, 'details_metabox')); |
|
| 21 | + add_action('cmb2_admin_init', array($this, 'projects_details_metabox')); |
|
| 22 | + add_action('cmb2_admin_init', array($this, 'services_details_metabox')); |
|
| 23 | + add_action('cmb2_admin_init', array($this, 'testimonials_details_metabox')); |
|
| 24 | 24 | |
| 25 | - add_action( 'admin_enqueue_scripts', array( $this, 'assets' ) ); |
|
| 25 | + add_action('admin_enqueue_scripts', array($this, 'assets')); |
|
| 26 | 26 | |
| 27 | - add_filter( 'type_url_form_media', array( $this, 'change_attachment_field_button' ), 20, 1 ); |
|
| 28 | - add_filter( 'enter_title_here', array( $this, 'change_title_text' ) ); |
|
| 27 | + add_filter('type_url_form_media', array($this, 'change_attachment_field_button'), 20, 1); |
|
| 28 | + add_filter('enter_title_here', array($this, 'change_title_text')); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Loads the admin subclasses |
| 33 | 33 | */ |
| 34 | 34 | private function load_classes() { |
| 35 | - require_once LSX_TEAM_PATH . 'classes/admin/class-settings.php'; |
|
| 35 | + require_once LSX_TEAM_PATH.'classes/admin/class-settings.php'; |
|
| 36 | 36 | $this->settings = \lsx\team\classes\admin\Settings::get_instance(); |
| 37 | 37 | |
| 38 | - require_once LSX_TEAM_PATH . 'classes/admin/class-settings-theme.php'; |
|
| 38 | + require_once LSX_TEAM_PATH.'classes/admin/class-settings-theme.php'; |
|
| 39 | 39 | $this->settings_theme = \lsx\team\classes\admin\Settings_Theme::get_instance(); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | public function post_type_setup() { |
| 43 | 43 | $labels = array( |
| 44 | - 'name' => esc_html_x( 'Team Members', 'post type general name', 'lsx-team' ), |
|
| 45 | - 'singular_name' => esc_html_x( 'Team Member', 'post type singular name', 'lsx-team' ), |
|
| 46 | - 'add_new' => esc_html_x( 'Add New', 'post type general name', 'lsx-team' ), |
|
| 47 | - 'add_new_item' => esc_html__( 'Add New Team Member', 'lsx-team' ), |
|
| 48 | - 'edit_item' => esc_html__( 'Edit Team Member', 'lsx-team' ), |
|
| 49 | - 'new_item' => esc_html__( 'New Team Member', 'lsx-team' ), |
|
| 50 | - 'all_items' => esc_html__( 'All Team Members', 'lsx-team' ), |
|
| 51 | - 'view_item' => esc_html__( 'View Team Member', 'lsx-team' ), |
|
| 52 | - 'search_items' => esc_html__( 'Search Team Members', 'lsx-team' ), |
|
| 53 | - 'not_found' => esc_html__( 'No team members found', 'lsx-team' ), |
|
| 54 | - 'not_found_in_trash' => esc_html__( 'No team members found in Trash', 'lsx-team' ), |
|
| 44 | + 'name' => esc_html_x('Team Members', 'post type general name', 'lsx-team'), |
|
| 45 | + 'singular_name' => esc_html_x('Team Member', 'post type singular name', 'lsx-team'), |
|
| 46 | + 'add_new' => esc_html_x('Add New', 'post type general name', 'lsx-team'), |
|
| 47 | + 'add_new_item' => esc_html__('Add New Team Member', 'lsx-team'), |
|
| 48 | + 'edit_item' => esc_html__('Edit Team Member', 'lsx-team'), |
|
| 49 | + 'new_item' => esc_html__('New Team Member', 'lsx-team'), |
|
| 50 | + 'all_items' => esc_html__('All Team Members', 'lsx-team'), |
|
| 51 | + 'view_item' => esc_html__('View Team Member', 'lsx-team'), |
|
| 52 | + 'search_items' => esc_html__('Search Team Members', 'lsx-team'), |
|
| 53 | + 'not_found' => esc_html__('No team members found', 'lsx-team'), |
|
| 54 | + 'not_found_in_trash' => esc_html__('No team members found in Trash', 'lsx-team'), |
|
| 55 | 55 | 'parent_item_colon' => '', |
| 56 | - 'menu_name' => esc_html_x( 'Team Members', 'admin menu', 'lsx-team' ), |
|
| 56 | + 'menu_name' => esc_html_x('Team Members', 'admin menu', 'lsx-team'), |
|
| 57 | 57 | ); |
| 58 | 58 | |
| 59 | 59 | $args = array( |
@@ -81,22 +81,22 @@ discard block |
||
| 81 | 81 | 'show_in_rest' => true, |
| 82 | 82 | ); |
| 83 | 83 | |
| 84 | - register_post_type( 'team', $args ); |
|
| 84 | + register_post_type('team', $args); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | public function taxonomy_setup() { |
| 88 | 88 | $labels = array( |
| 89 | - 'name' => esc_html_x( 'Roles', 'taxonomy general name', 'lsx-team' ), |
|
| 90 | - 'singular_name' => esc_html_x( 'Role', 'taxonomy singular name', 'lsx-team' ), |
|
| 91 | - 'search_items' => esc_html__( 'Search Roles', 'lsx-team' ), |
|
| 92 | - 'all_items' => esc_html__( 'All Roles', 'lsx-team' ), |
|
| 93 | - 'parent_item' => esc_html__( 'Parent Role', 'lsx-team' ), |
|
| 94 | - 'parent_item_colon' => esc_html__( 'Parent Role:', 'lsx-team' ), |
|
| 95 | - 'edit_item' => esc_html__( 'Edit Role', 'lsx-team' ), |
|
| 96 | - 'update_item' => esc_html__( 'Update Role', 'lsx-team' ), |
|
| 97 | - 'add_new_item' => esc_html__( 'Add New Role', 'lsx-team' ), |
|
| 98 | - 'new_item_name' => esc_html__( 'New Role Name', 'lsx-team' ), |
|
| 99 | - 'menu_name' => esc_html__( 'Roles', 'lsx-team' ), |
|
| 89 | + 'name' => esc_html_x('Roles', 'taxonomy general name', 'lsx-team'), |
|
| 90 | + 'singular_name' => esc_html_x('Role', 'taxonomy singular name', 'lsx-team'), |
|
| 91 | + 'search_items' => esc_html__('Search Roles', 'lsx-team'), |
|
| 92 | + 'all_items' => esc_html__('All Roles', 'lsx-team'), |
|
| 93 | + 'parent_item' => esc_html__('Parent Role', 'lsx-team'), |
|
| 94 | + 'parent_item_colon' => esc_html__('Parent Role:', 'lsx-team'), |
|
| 95 | + 'edit_item' => esc_html__('Edit Role', 'lsx-team'), |
|
| 96 | + 'update_item' => esc_html__('Update Role', 'lsx-team'), |
|
| 97 | + 'add_new_item' => esc_html__('Add New Role', 'lsx-team'), |
|
| 98 | + 'new_item_name' => esc_html__('New Role Name', 'lsx-team'), |
|
| 99 | + 'menu_name' => esc_html__('Roles', 'lsx-team'), |
|
| 100 | 100 | ); |
| 101 | 101 | |
| 102 | 102 | $args = array( |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | 'show_in_rest' => true, |
| 112 | 112 | ); |
| 113 | 113 | |
| 114 | - register_taxonomy( 'team_role', array( 'team' ), $args ); |
|
| 114 | + register_taxonomy('team_role', array('team'), $args); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | /** |
@@ -121,16 +121,16 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | $prefix = 'lsx_'; |
| 123 | 123 | |
| 124 | - $users = get_transient( 'lsx_team_users' ); |
|
| 124 | + $users = get_transient('lsx_team_users'); |
|
| 125 | 125 | |
| 126 | - if ( false === $users || '' === $users ) { |
|
| 127 | - $users = get_users( array( |
|
| 128 | - 'role__in' => array( 'administrator', 'editor', 'author' ), |
|
| 129 | - ) ); |
|
| 130 | - set_transient( 'lsx_team_users', $users, 5 * 60 ); |
|
| 126 | + if (false === $users || '' === $users) { |
|
| 127 | + $users = get_users(array( |
|
| 128 | + 'role__in' => array('administrator', 'editor', 'author'), |
|
| 129 | + )); |
|
| 130 | + set_transient('lsx_team_users', $users, 5 * 60); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | - foreach ( $users as $user ) { |
|
| 133 | + foreach ($users as $user) { |
|
| 134 | 134 | $user_array[] = array( |
| 135 | 135 | 'name' => $user->nice_name, |
| 136 | 136 | 'value' => $user->ID, |
@@ -139,8 +139,8 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | $cmb = new_cmb2_box( |
| 141 | 141 | array( |
| 142 | - 'id' => $prefix . '_team', |
|
| 143 | - 'title' => esc_html__( 'Team Member Details', 'lsx-team' ), |
|
| 142 | + 'id' => $prefix.'_team', |
|
| 143 | + 'title' => esc_html__('Team Member Details', 'lsx-team'), |
|
| 144 | 144 | 'object_types' => 'team', |
| 145 | 145 | 'context' => 'normal', |
| 146 | 146 | 'priority' => 'low', |
@@ -150,8 +150,8 @@ discard block |
||
| 150 | 150 | |
| 151 | 151 | $cmb->add_field( |
| 152 | 152 | array( |
| 153 | - 'name' => esc_html__( 'Featured:', 'lsx-team' ), |
|
| 154 | - 'id' => $prefix . 'featured', |
|
| 153 | + 'name' => esc_html__('Featured:', 'lsx-team'), |
|
| 154 | + 'id' => $prefix.'featured', |
|
| 155 | 155 | 'type' => 'checkbox', |
| 156 | 156 | 'value' => 1, |
| 157 | 157 | 'default' => 0, |
@@ -161,8 +161,8 @@ discard block |
||
| 161 | 161 | |
| 162 | 162 | $cmb->add_field( |
| 163 | 163 | array( |
| 164 | - 'name' => esc_html__( 'Site User', 'lsx-team' ), |
|
| 165 | - 'id' => $prefix . 'site_user', |
|
| 164 | + 'name' => esc_html__('Site User', 'lsx-team'), |
|
| 165 | + 'id' => $prefix.'site_user', |
|
| 166 | 166 | 'allow_none' => true, |
| 167 | 167 | 'type' => 'select', |
| 168 | 168 | 'options' => $user_array, |
@@ -172,8 +172,8 @@ discard block |
||
| 172 | 172 | |
| 173 | 173 | $cmb->add_field( |
| 174 | 174 | array( |
| 175 | - 'name' => esc_html__( 'Job Title:', 'lsx-team' ), |
|
| 176 | - 'id' => $prefix . 'job_title', |
|
| 175 | + 'name' => esc_html__('Job Title:', 'lsx-team'), |
|
| 176 | + 'id' => $prefix.'job_title', |
|
| 177 | 177 | 'type' => 'text', |
| 178 | 178 | 'show_in_rest' => true, |
| 179 | 179 | ) |
@@ -181,8 +181,8 @@ discard block |
||
| 181 | 181 | |
| 182 | 182 | $cmb->add_field( |
| 183 | 183 | array( |
| 184 | - 'name' => esc_html__( 'Location:', 'lsx-team' ), |
|
| 185 | - 'id' => $prefix . 'location', |
|
| 184 | + 'name' => esc_html__('Location:', 'lsx-team'), |
|
| 185 | + 'id' => $prefix.'location', |
|
| 186 | 186 | 'type' => 'text', |
| 187 | 187 | 'show_in_rest' => true, |
| 188 | 188 | ) |
@@ -190,8 +190,8 @@ discard block |
||
| 190 | 190 | |
| 191 | 191 | $cmb->add_field( |
| 192 | 192 | array( |
| 193 | - 'name' => esc_html__( 'Contact Email Address:', 'lsx-team' ), |
|
| 194 | - 'id' => $prefix . 'email_contact', |
|
| 193 | + 'name' => esc_html__('Contact Email Address:', 'lsx-team'), |
|
| 194 | + 'id' => $prefix.'email_contact', |
|
| 195 | 195 | 'type' => 'text', |
| 196 | 196 | 'show_in_rest' => true, |
| 197 | 197 | ) |
@@ -199,9 +199,9 @@ discard block |
||
| 199 | 199 | |
| 200 | 200 | $cmb->add_field( |
| 201 | 201 | array( |
| 202 | - 'name' => esc_html__( 'Gravatar Email Address:', 'lsx-team' ), |
|
| 203 | - 'desc' => esc_html__( 'Used for Gravatar if a featured image is not set', 'lsx-team' ), |
|
| 204 | - 'id' => $prefix . 'email_gravatar', |
|
| 202 | + 'name' => esc_html__('Gravatar Email Address:', 'lsx-team'), |
|
| 203 | + 'desc' => esc_html__('Used for Gravatar if a featured image is not set', 'lsx-team'), |
|
| 204 | + 'id' => $prefix.'email_gravatar', |
|
| 205 | 205 | 'type' => 'text', |
| 206 | 206 | 'show_in_rest' => true, |
| 207 | 207 | ) |
@@ -209,8 +209,8 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | $cmb->add_field( |
| 211 | 211 | array( |
| 212 | - 'name' => esc_html__( 'Telephone Number:', 'lsx-team' ), |
|
| 213 | - 'id' => $prefix . 'tel', |
|
| 212 | + 'name' => esc_html__('Telephone Number:', 'lsx-team'), |
|
| 213 | + 'id' => $prefix.'tel', |
|
| 214 | 214 | 'type' => 'text', |
| 215 | 215 | 'show_in_rest' => true, |
| 216 | 216 | ) |
@@ -218,8 +218,8 @@ discard block |
||
| 218 | 218 | |
| 219 | 219 | $cmb->add_field( |
| 220 | 220 | array( |
| 221 | - 'name' => esc_html__( 'Skype Name:', 'lsx-team' ), |
|
| 222 | - 'id' => $prefix . 'skype', |
|
| 221 | + 'name' => esc_html__('Skype Name:', 'lsx-team'), |
|
| 222 | + 'id' => $prefix.'skype', |
|
| 223 | 223 | 'type' => 'text', |
| 224 | 224 | 'show_in_rest' => true, |
| 225 | 225 | ) |
@@ -227,8 +227,8 @@ discard block |
||
| 227 | 227 | |
| 228 | 228 | $cmb->add_field( |
| 229 | 229 | array( |
| 230 | - 'name' => esc_html__( 'Facebook URL', 'lsx-team' ), |
|
| 231 | - 'id' => $prefix . 'facebook', |
|
| 230 | + 'name' => esc_html__('Facebook URL', 'lsx-team'), |
|
| 231 | + 'id' => $prefix.'facebook', |
|
| 232 | 232 | 'type' => 'text_url', |
| 233 | 233 | 'show_in_rest' => true, |
| 234 | 234 | ) |
@@ -236,8 +236,8 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | $cmb->add_field( |
| 238 | 238 | array( |
| 239 | - 'name' => esc_html__( 'Twitter URL', 'lsx-team' ), |
|
| 240 | - 'id' => $prefix . 'twitter', |
|
| 239 | + 'name' => esc_html__('Twitter URL', 'lsx-team'), |
|
| 240 | + 'id' => $prefix.'twitter', |
|
| 241 | 241 | 'type' => 'text_url', |
| 242 | 242 | 'show_in_rest' => true, |
| 243 | 243 | ) |
@@ -245,8 +245,8 @@ discard block |
||
| 245 | 245 | |
| 246 | 246 | $cmb->add_field( |
| 247 | 247 | array( |
| 248 | - 'name' => esc_html__( 'LinkedIn URL', 'lsx-team' ), |
|
| 249 | - 'id' => $prefix . 'linkedin', |
|
| 248 | + 'name' => esc_html__('LinkedIn URL', 'lsx-team'), |
|
| 249 | + 'id' => $prefix.'linkedin', |
|
| 250 | 250 | 'type' => 'text_url', |
| 251 | 251 | 'show_in_rest' => true, |
| 252 | 252 | ) |
@@ -254,8 +254,8 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | $cmb->add_field( |
| 256 | 256 | array( |
| 257 | - 'name' => esc_html__( 'Github URL', 'lsx-team' ), |
|
| 258 | - 'id' => $prefix . 'github', |
|
| 257 | + 'name' => esc_html__('Github URL', 'lsx-team'), |
|
| 258 | + 'id' => $prefix.'github', |
|
| 259 | 259 | 'type' => 'text_url', |
| 260 | 260 | 'show_in_rest' => true, |
| 261 | 261 | ) |
@@ -263,8 +263,8 @@ discard block |
||
| 263 | 263 | |
| 264 | 264 | $cmb->add_field( |
| 265 | 265 | array( |
| 266 | - 'name' => esc_html__( 'WordPress URL', 'lsx-team' ), |
|
| 267 | - 'id' => $prefix . 'wordpress', |
|
| 266 | + 'name' => esc_html__('WordPress URL', 'lsx-team'), |
|
| 267 | + 'id' => $prefix.'wordpress', |
|
| 268 | 268 | 'type' => 'text_url', |
| 269 | 269 | 'show_in_rest' => true, |
| 270 | 270 | ) |
@@ -276,29 +276,29 @@ discard block |
||
| 276 | 276 | */ |
| 277 | 277 | public function projects_details_metabox() { |
| 278 | 278 | |
| 279 | - if ( class_exists( 'LSX_Projects' ) ) { |
|
| 279 | + if (class_exists('LSX_Projects')) { |
|
| 280 | 280 | |
| 281 | 281 | $prefix = 'lsx_'; |
| 282 | 282 | |
| 283 | 283 | $cmb = new_cmb2_box( |
| 284 | 284 | array( |
| 285 | - 'id' => $prefix . '_team', |
|
| 285 | + 'id' => $prefix.'_team', |
|
| 286 | 286 | 'context' => 'normal', |
| 287 | 287 | 'priority' => 'low', |
| 288 | 288 | 'show_names' => true, |
| 289 | - 'object_types' => array( 'team' ), |
|
| 289 | + 'object_types' => array('team'), |
|
| 290 | 290 | ) |
| 291 | 291 | ); |
| 292 | 292 | $cmb->add_field( |
| 293 | 293 | array( |
| 294 | - 'name' => __( 'Projects:', 'lsx-team' ), |
|
| 294 | + 'name' => __('Projects:', 'lsx-team'), |
|
| 295 | 295 | 'id' => 'project_to_team', |
| 296 | 296 | 'type' => 'post_search_ajax', |
| 297 | 297 | 'limit' => 15, |
| 298 | 298 | 'sortable' => true, |
| 299 | 299 | 'query_args' => array( |
| 300 | - 'post_type' => array( 'project' ), |
|
| 301 | - 'post_status' => array( 'publish' ), |
|
| 300 | + 'post_type' => array('project'), |
|
| 301 | + 'post_status' => array('publish'), |
|
| 302 | 302 | 'posts_per_page' => -1, |
| 303 | 303 | ), |
| 304 | 304 | ) |
@@ -311,29 +311,29 @@ discard block |
||
| 311 | 311 | */ |
| 312 | 312 | public function services_details_metabox() { |
| 313 | 313 | |
| 314 | - if ( class_exists( 'LSX_Services' ) ) { |
|
| 314 | + if (class_exists('LSX_Services')) { |
|
| 315 | 315 | |
| 316 | 316 | $prefix = 'lsx_'; |
| 317 | 317 | |
| 318 | 318 | $cmb = new_cmb2_box( |
| 319 | 319 | array( |
| 320 | - 'id' => $prefix . '_team', |
|
| 320 | + 'id' => $prefix.'_team', |
|
| 321 | 321 | 'context' => 'normal', |
| 322 | 322 | 'priority' => 'low', |
| 323 | 323 | 'show_names' => true, |
| 324 | - 'object_types' => array( 'team' ), |
|
| 324 | + 'object_types' => array('team'), |
|
| 325 | 325 | ) |
| 326 | 326 | ); |
| 327 | 327 | $cmb->add_field( |
| 328 | 328 | array( |
| 329 | - 'name' => __( 'Services:', 'lsx-team' ), |
|
| 329 | + 'name' => __('Services:', 'lsx-team'), |
|
| 330 | 330 | 'id' => 'service_to_team', |
| 331 | 331 | 'type' => 'post_search_ajax', |
| 332 | 332 | 'limit' => 15, |
| 333 | 333 | 'sortable' => true, |
| 334 | 334 | 'query_args' => array( |
| 335 | - 'post_type' => array( 'service' ), |
|
| 336 | - 'post_status' => array( 'publish' ), |
|
| 335 | + 'post_type' => array('service'), |
|
| 336 | + 'post_status' => array('publish'), |
|
| 337 | 337 | 'posts_per_page' => -1, |
| 338 | 338 | ), |
| 339 | 339 | ) |
@@ -346,29 +346,29 @@ discard block |
||
| 346 | 346 | */ |
| 347 | 347 | public function testimonials_details_metabox() { |
| 348 | 348 | |
| 349 | - if ( class_exists( 'LSX_Testimonials' ) ) { |
|
| 349 | + if (class_exists('LSX_Testimonials')) { |
|
| 350 | 350 | |
| 351 | 351 | $prefix = 'lsx_'; |
| 352 | 352 | |
| 353 | 353 | $cmb = new_cmb2_box( |
| 354 | 354 | array( |
| 355 | - 'id' => $prefix . '_team', |
|
| 355 | + 'id' => $prefix.'_team', |
|
| 356 | 356 | 'context' => 'normal', |
| 357 | 357 | 'priority' => 'low', |
| 358 | 358 | 'show_names' => true, |
| 359 | - 'object_types' => array( 'team' ), |
|
| 359 | + 'object_types' => array('team'), |
|
| 360 | 360 | ) |
| 361 | 361 | ); |
| 362 | 362 | $cmb->add_field( |
| 363 | 363 | array( |
| 364 | - 'name' => __( 'Testimonials:', 'lsx-team' ), |
|
| 364 | + 'name' => __('Testimonials:', 'lsx-team'), |
|
| 365 | 365 | 'id' => 'testimonial_to_team', |
| 366 | 366 | 'type' => 'post_search_ajax', |
| 367 | 367 | 'limit' => 15, |
| 368 | 368 | 'sortable' => true, |
| 369 | 369 | 'query_args' => array( |
| 370 | - 'post_type' => array( 'testimonial' ), |
|
| 371 | - 'post_status' => array( 'publish' ), |
|
| 370 | + 'post_type' => array('testimonial'), |
|
| 371 | + 'post_status' => array('publish'), |
|
| 372 | 372 | 'posts_per_page' => -1, |
| 373 | 373 | ), |
| 374 | 374 | ) |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | /** |
| 381 | 381 | * Sets up the "post relations". |
| 382 | 382 | */ |
| 383 | - public function post_relations( $post_id, $field, $value ) { |
|
| 383 | + public function post_relations($post_id, $field, $value) { |
|
| 384 | 384 | $connections = array( |
| 385 | 385 | 'team_to_testimonial', |
| 386 | 386 | 'testimonial_to_team', |
@@ -392,31 +392,31 @@ discard block |
||
| 392 | 392 | 'service_to_team', |
| 393 | 393 | ); |
| 394 | 394 | |
| 395 | - if ( in_array( $field['id'], $connections ) ) { |
|
| 396 | - $this->save_related_post( $connections, $post_id, $field, $value ); |
|
| 395 | + if (in_array($field['id'], $connections)) { |
|
| 396 | + $this->save_related_post($connections, $post_id, $field, $value); |
|
| 397 | 397 | } |
| 398 | 398 | } |
| 399 | 399 | |
| 400 | 400 | /** |
| 401 | 401 | * Save the reverse post relation. |
| 402 | 402 | */ |
| 403 | - public function save_related_post( $connections, $post_id, $field, $value ) { |
|
| 404 | - $ids = explode( '_to_', $field['id'] ); |
|
| 405 | - $relation = $ids[1] . '_to_' . $ids[0]; |
|
| 403 | + public function save_related_post($connections, $post_id, $field, $value) { |
|
| 404 | + $ids = explode('_to_', $field['id']); |
|
| 405 | + $relation = $ids[1].'_to_'.$ids[0]; |
|
| 406 | 406 | |
| 407 | - if ( in_array( $relation, $connections ) ) { |
|
| 408 | - $previous_values = get_post_meta( $post_id, $field['id'], false ); |
|
| 407 | + if (in_array($relation, $connections)) { |
|
| 408 | + $previous_values = get_post_meta($post_id, $field['id'], false); |
|
| 409 | 409 | |
| 410 | - if ( ! empty( $previous_values ) ) { |
|
| 411 | - foreach ( $previous_values as $v ) { |
|
| 412 | - delete_post_meta( $v, $relation, $post_id ); |
|
| 410 | + if (!empty($previous_values)) { |
|
| 411 | + foreach ($previous_values as $v) { |
|
| 412 | + delete_post_meta($v, $relation, $post_id); |
|
| 413 | 413 | } |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | - if ( is_array( $value ) ) { |
|
| 417 | - foreach ( $value as $v ) { |
|
| 418 | - if ( ! empty( $v ) ) { |
|
| 419 | - add_post_meta( $v, $relation, $post_id ); |
|
| 416 | + if (is_array($value)) { |
|
| 417 | + foreach ($value as $v) { |
|
| 418 | + if (!empty($v)) { |
|
| 419 | + add_post_meta($v, $relation, $post_id); |
|
| 420 | 420 | } |
| 421 | 421 | } |
| 422 | 422 | } |
@@ -425,30 +425,30 @@ discard block |
||
| 425 | 425 | |
| 426 | 426 | public function assets() { |
| 427 | 427 | //wp_enqueue_media(); |
| 428 | - wp_enqueue_script( 'media-upload' ); |
|
| 429 | - wp_enqueue_script( 'thickbox' ); |
|
| 430 | - wp_enqueue_style( 'thickbox' ); |
|
| 428 | + wp_enqueue_script('media-upload'); |
|
| 429 | + wp_enqueue_script('thickbox'); |
|
| 430 | + wp_enqueue_style('thickbox'); |
|
| 431 | 431 | |
| 432 | - wp_enqueue_script( 'lsx-team-admin', LSX_TEAM_URL . 'assets/js/lsx-team-admin.min.js', array( 'jquery' ), LSX_TEAM_VER ); |
|
| 433 | - wp_enqueue_style( 'lsx-team-admin', LSX_TEAM_URL . 'assets/css/lsx-team-admin.css', array(), LSX_TEAM_VER ); |
|
| 432 | + wp_enqueue_script('lsx-team-admin', LSX_TEAM_URL.'assets/js/lsx-team-admin.min.js', array('jquery'), LSX_TEAM_VER); |
|
| 433 | + wp_enqueue_style('lsx-team-admin', LSX_TEAM_URL.'assets/css/lsx-team-admin.css', array(), LSX_TEAM_VER); |
|
| 434 | 434 | } |
| 435 | 435 | |
| 436 | 436 | /** |
| 437 | 437 | * Change the "Insert into Post" button text when media modal is used for feature images |
| 438 | 438 | */ |
| 439 | - public function change_attachment_field_button( $html ) { |
|
| 440 | - if ( isset( $_GET['feature_image_text_button'] ) ) { |
|
| 441 | - $html = str_replace( 'value="Insert into Post"', sprintf( 'value="%s"', esc_html__( 'Select featured image', 'lsx-team' ) ), $html ); |
|
| 439 | + public function change_attachment_field_button($html) { |
|
| 440 | + if (isset($_GET['feature_image_text_button'])) { |
|
| 441 | + $html = str_replace('value="Insert into Post"', sprintf('value="%s"', esc_html__('Select featured image', 'lsx-team')), $html); |
|
| 442 | 442 | } |
| 443 | 443 | |
| 444 | 444 | return $html; |
| 445 | 445 | } |
| 446 | 446 | |
| 447 | - public function change_title_text( $title ) { |
|
| 447 | + public function change_title_text($title) { |
|
| 448 | 448 | $screen = get_current_screen(); |
| 449 | 449 | |
| 450 | - if ( 'team' === $screen->post_type ) { |
|
| 451 | - $title = esc_attr__( 'Enter team member name', 'lsx-team' ); |
|
| 450 | + if ('team' === $screen->post_type) { |
|
| 451 | + $title = esc_attr__('Enter team member name', 'lsx-team'); |
|
| 452 | 452 | } |
| 453 | 453 | |
| 454 | 454 | return $title; |
@@ -29,9 +29,9 @@ discard block |
||
| 29 | 29 | * Contructor |
| 30 | 30 | */ |
| 31 | 31 | public function __construct() { |
| 32 | - add_action( 'cmb2_admin_init', array( $this, 'register_settings_page' ) ); |
|
| 33 | - add_action( 'lsx_team_settings_page', array( $this, 'general_settings' ), 1, 1 ); |
|
| 34 | - add_action( 'lsx_team_settings_page', array( $this, 'global_defaults' ), 3, 1 ); |
|
| 32 | + add_action('cmb2_admin_init', array($this, 'register_settings_page')); |
|
| 33 | + add_action('lsx_team_settings_page', array($this, 'general_settings'), 1, 1); |
|
| 34 | + add_action('lsx_team_settings_page', array($this, 'global_defaults'), 3, 1); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /** |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public static function get_instance() { |
| 45 | 45 | // If the single instance hasn't been set, set it now. |
| 46 | - if ( null === self::$instance ) { |
|
| 46 | + if (null === self::$instance) { |
|
| 47 | 47 | self::$instance = new self(); |
| 48 | 48 | } |
| 49 | 49 | return self::$instance; |
@@ -56,14 +56,14 @@ discard block |
||
| 56 | 56 | $cmb = new_cmb2_box( |
| 57 | 57 | array( |
| 58 | 58 | 'id' => $this->screen_id, |
| 59 | - 'title' => esc_html__( 'Settings', 'lsx-team' ), |
|
| 60 | - 'object_types' => array( 'options-page' ), |
|
| 59 | + 'title' => esc_html__('Settings', 'lsx-team'), |
|
| 60 | + 'object_types' => array('options-page'), |
|
| 61 | 61 | 'option_key' => 'lsx_team_options', // The option key and admin menu page slug. |
| 62 | 62 | 'parent_slug' => 'edit.php?post_type=team', // Make options page a submenu item of the themes menu. |
| 63 | 63 | 'capability' => 'manage_options', // Cap required to view options-page. |
| 64 | 64 | ) |
| 65 | 65 | ); |
| 66 | - do_action( 'lsx_team_settings_page', $cmb ); |
|
| 66 | + do_action('lsx_team_settings_page', $cmb); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -72,39 +72,39 @@ discard block |
||
| 72 | 72 | * @param object $cmb new_cmb2_box(). |
| 73 | 73 | * @return void |
| 74 | 74 | */ |
| 75 | - public function general_settings( $cmb ) { |
|
| 75 | + public function general_settings($cmb) { |
|
| 76 | 76 | $cmb->add_field( |
| 77 | 77 | array( |
| 78 | 78 | 'id' => 'settings_general_title', |
| 79 | 79 | 'type' => 'title', |
| 80 | - 'name' => __( 'General', 'lsx-team' ), |
|
| 81 | - 'default' => __( 'General', 'lsx-team' ), |
|
| 80 | + 'name' => __('General', 'lsx-team'), |
|
| 81 | + 'default' => __('General', 'lsx-team'), |
|
| 82 | 82 | ) |
| 83 | 83 | ); |
| 84 | 84 | $cmb->add_field( |
| 85 | 85 | array( |
| 86 | - 'name' => __( 'Disable Single Posts', 'lsx-team' ), |
|
| 86 | + 'name' => __('Disable Single Posts', 'lsx-team'), |
|
| 87 | 87 | 'id' => 'team_disable_single', |
| 88 | 88 | 'type' => 'checkbox', |
| 89 | 89 | 'value' => 1, |
| 90 | 90 | 'default' => 0, |
| 91 | - 'description' => __( 'Disable Single Posts.', 'lsx-health-plan' ), |
|
| 91 | + 'description' => __('Disable Single Posts.', 'lsx-health-plan'), |
|
| 92 | 92 | ) |
| 93 | 93 | ); |
| 94 | 94 | |
| 95 | 95 | $cmb->add_field( |
| 96 | 96 | array( |
| 97 | - 'name' => __( 'Group By Role', 'lsx-team' ), |
|
| 97 | + 'name' => __('Group By Role', 'lsx-team'), |
|
| 98 | 98 | 'id' => 'group_by_role', |
| 99 | 99 | 'type' => 'checkbox', |
| 100 | 100 | 'value' => 1, |
| 101 | 101 | 'default' => 0, |
| 102 | - 'description' => __( 'This setting creates Role sub-headings on the Team Member archive.', 'lsx-health-plan' ), |
|
| 102 | + 'description' => __('This setting creates Role sub-headings on the Team Member archive.', 'lsx-health-plan'), |
|
| 103 | 103 | ) |
| 104 | 104 | ); |
| 105 | - $cmb->add_field( array( |
|
| 105 | + $cmb->add_field(array( |
|
| 106 | 106 | 'name' => 'Placeholder', |
| 107 | - 'desc' => __( 'This image displays on the archive, search results and team members single if no featured image is set.', 'lsx-health-plan' ), |
|
| 107 | + 'desc' => __('This image displays on the archive, search results and team members single if no featured image is set.', 'lsx-health-plan'), |
|
| 108 | 108 | 'id' => 'team_placeholder', |
| 109 | 109 | 'type' => 'file', |
| 110 | 110 | 'options' => array( |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | 'text' => array( |
| 114 | 114 | 'add_upload_file_text' => 'Choose Image', |
| 115 | 115 | ), |
| 116 | - ) ); |
|
| 116 | + )); |
|
| 117 | 117 | $cmb->add_field( |
| 118 | 118 | array( |
| 119 | 119 | 'id' => 'settings_general_closing', |
@@ -128,30 +128,30 @@ discard block |
||
| 128 | 128 | * @param object $cmb new_cmb2_box(). |
| 129 | 129 | * @return void |
| 130 | 130 | */ |
| 131 | - public function global_defaults( $cmb ) { |
|
| 131 | + public function global_defaults($cmb) { |
|
| 132 | 132 | $cmb->add_field( |
| 133 | 133 | array( |
| 134 | 134 | 'id' => 'global_defaults_title', |
| 135 | 135 | 'type' => 'title', |
| 136 | - 'name' => __( 'Careers CTA', 'lsx-team' ), |
|
| 137 | - 'default' => __( 'Careers CTA', 'lsx-team' ), |
|
| 136 | + 'name' => __('Careers CTA', 'lsx-team'), |
|
| 137 | + 'default' => __('Careers CTA', 'lsx-team'), |
|
| 138 | 138 | ) |
| 139 | 139 | ); |
| 140 | 140 | |
| 141 | 141 | $cmb->add_field( |
| 142 | 142 | array( |
| 143 | - 'name' => __( 'Enable careers CTA', 'lsx-team' ), |
|
| 143 | + 'name' => __('Enable careers CTA', 'lsx-team'), |
|
| 144 | 144 | 'id' => 'team_careers_cta_enable', |
| 145 | 145 | 'type' => 'checkbox', |
| 146 | 146 | 'value' => 1, |
| 147 | 147 | 'default' => 0, |
| 148 | - 'description' => __( 'Displays careers CTA mystery man on team archive.', 'lsx-health-plan' ), |
|
| 148 | + 'description' => __('Displays careers CTA mystery man on team archive.', 'lsx-health-plan'), |
|
| 149 | 149 | ) |
| 150 | 150 | ); |
| 151 | 151 | |
| 152 | 152 | $cmb->add_field( |
| 153 | 153 | array( |
| 154 | - 'name' => __( 'Title', 'lsx-team' ), |
|
| 154 | + 'name' => __('Title', 'lsx-team'), |
|
| 155 | 155 | 'id' => 'team_careers_cta_title', |
| 156 | 156 | 'type' => 'text', |
| 157 | 157 | ) |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | $cmb->add_field( |
| 161 | 161 | array( |
| 162 | - 'name' => __( 'Tagline', 'lsx-team' ), |
|
| 162 | + 'name' => __('Tagline', 'lsx-team'), |
|
| 163 | 163 | 'id' => 'team_careers_cta_tagline', |
| 164 | 164 | 'type' => 'text', |
| 165 | 165 | ) |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | $cmb->add_field( |
| 169 | 169 | array( |
| 170 | - 'name' => __( 'Link Text', 'lsx-team' ), |
|
| 170 | + 'name' => __('Link Text', 'lsx-team'), |
|
| 171 | 171 | 'id' => 'team_careers_cta_link_text', |
| 172 | 172 | 'type' => 'text', |
| 173 | 173 | ) |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | |
| 176 | 176 | $cmb->add_field( |
| 177 | 177 | array( |
| 178 | - 'name' => __( 'Careers page link', 'lsx-team' ), |
|
| 178 | + 'name' => __('Careers page link', 'lsx-team'), |
|
| 179 | 179 | 'id' => 'team_careers_cta_link', |
| 180 | 180 | 'type' => 'text', |
| 181 | 181 | ) |