@@ -30,12 +30,12 @@ discard block |
||
| 30 | 30 | * Contructor |
| 31 | 31 | */ |
| 32 | 32 | public function __construct() { |
| 33 | - add_action( 'init', array( $this, 'register_post_type' ) ); |
|
| 33 | + add_action('init', array($this, 'register_post_type')); |
|
| 34 | 34 | |
| 35 | - add_filter( 'lsx_health_plan_single_template', array( $this, 'enable_post_type' ), 10, 1 ); |
|
| 36 | - add_filter( 'lsx_health_plan_connections', array( $this, 'enable_connections' ), 10, 1 ); |
|
| 37 | - add_action( 'cmb2_admin_init', array( $this, 'featured_metabox' ), 5 ); |
|
| 38 | - add_action( 'cmb2_admin_init', array( $this, 'details_metaboxes' ) ); |
|
| 35 | + add_filter('lsx_health_plan_single_template', array($this, 'enable_post_type'), 10, 1); |
|
| 36 | + add_filter('lsx_health_plan_connections', array($this, 'enable_connections'), 10, 1); |
|
| 37 | + add_action('cmb2_admin_init', array($this, 'featured_metabox'), 5); |
|
| 38 | + add_action('cmb2_admin_init', array($this, 'details_metaboxes')); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | public static function get_instance() { |
| 49 | 49 | // If the single instance hasn't been set, set it now. |
| 50 | - if ( null === self::$instance ) { |
|
| 50 | + if (null === self::$instance) { |
|
| 51 | 51 | self::$instance = new self(); |
| 52 | 52 | } |
| 53 | 53 | return self::$instance; |
@@ -57,21 +57,21 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function register_post_type() { |
| 59 | 59 | $labels = array( |
| 60 | - 'name' => esc_html__( 'Meals', 'lsx-health-plan' ), |
|
| 61 | - 'singular_name' => esc_html__( 'Meal', 'lsx-health-plan' ), |
|
| 62 | - 'add_new' => esc_html_x( 'Add New', 'post type general name', 'lsx-health-plan' ), |
|
| 63 | - 'add_new_item' => esc_html__( 'Add New', 'lsx-health-plan' ), |
|
| 64 | - 'edit_item' => esc_html__( 'Edit', 'lsx-health-plan' ), |
|
| 65 | - 'new_item' => esc_html__( 'New', 'lsx-health-plan' ), |
|
| 66 | - 'all_items' => esc_html__( 'All Meals', 'lsx-health-plan' ), |
|
| 67 | - 'view_item' => esc_html__( 'View', 'lsx-health-plan' ), |
|
| 68 | - 'search_items' => esc_html__( 'Search', 'lsx-health-plan' ), |
|
| 69 | - 'not_found' => esc_html__( 'None found', 'lsx-health-plan' ), |
|
| 70 | - 'not_found_in_trash' => esc_html__( 'None found in Trash', 'lsx-health-plan' ), |
|
| 60 | + 'name' => esc_html__('Meals', 'lsx-health-plan'), |
|
| 61 | + 'singular_name' => esc_html__('Meal', 'lsx-health-plan'), |
|
| 62 | + 'add_new' => esc_html_x('Add New', 'post type general name', 'lsx-health-plan'), |
|
| 63 | + 'add_new_item' => esc_html__('Add New', 'lsx-health-plan'), |
|
| 64 | + 'edit_item' => esc_html__('Edit', 'lsx-health-plan'), |
|
| 65 | + 'new_item' => esc_html__('New', 'lsx-health-plan'), |
|
| 66 | + 'all_items' => esc_html__('All Meals', 'lsx-health-plan'), |
|
| 67 | + 'view_item' => esc_html__('View', 'lsx-health-plan'), |
|
| 68 | + 'search_items' => esc_html__('Search', 'lsx-health-plan'), |
|
| 69 | + 'not_found' => esc_html__('None found', 'lsx-health-plan'), |
|
| 70 | + 'not_found_in_trash' => esc_html__('None found in Trash', 'lsx-health-plan'), |
|
| 71 | 71 | 'parent_item_colon' => '', |
| 72 | - 'menu_name' => esc_html__( 'Meals', 'lsx-health-plan' ), |
|
| 72 | + 'menu_name' => esc_html__('Meals', 'lsx-health-plan'), |
|
| 73 | 73 | ); |
| 74 | - $args = array( |
|
| 74 | + $args = array( |
|
| 75 | 75 | 'labels' => $labels, |
| 76 | 76 | 'public' => true, |
| 77 | 77 | 'publicly_queryable' => true, |
@@ -81,10 +81,10 @@ discard block |
||
| 81 | 81 | 'menu_icon' => 'dashicons-carrot', |
| 82 | 82 | 'query_var' => true, |
| 83 | 83 | 'rewrite' => array( |
| 84 | - 'slug' => \lsx_health_plan\functions\get_option( 'meal_single_slug', 'meal' ), |
|
| 84 | + 'slug' => \lsx_health_plan\functions\get_option('meal_single_slug', 'meal'), |
|
| 85 | 85 | ), |
| 86 | 86 | 'capability_type' => 'post', |
| 87 | - 'has_archive' => \lsx_health_plan\functions\get_option( 'endpoint_meal_archive', 'meals' ), |
|
| 87 | + 'has_archive' => \lsx_health_plan\functions\get_option('endpoint_meal_archive', 'meals'), |
|
| 88 | 88 | 'hierarchical' => true, |
| 89 | 89 | 'menu_position' => null, |
| 90 | 90 | 'supports' => array( |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | 'custom-fields', |
| 96 | 96 | ), |
| 97 | 97 | ); |
| 98 | - register_post_type( 'meal', $args ); |
|
| 98 | + register_post_type('meal', $args); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | * @param array $post_types |
| 105 | 105 | * @return array |
| 106 | 106 | */ |
| 107 | - public function enable_post_type( $post_types = array() ) { |
|
| 107 | + public function enable_post_type($post_types = array()) { |
|
| 108 | 108 | $post_types[] = $this->slug; |
| 109 | 109 | return $post_types; |
| 110 | 110 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | * @param array $connections |
| 116 | 116 | * @return void |
| 117 | 117 | */ |
| 118 | - public function enable_connections( $connections = array() ) { |
|
| 118 | + public function enable_connections($connections = array()) { |
|
| 119 | 119 | $connections['meal']['connected_plans'] = 'connected_meals'; |
| 120 | 120 | $connections['plan']['connected_meals'] = 'connected_plans'; |
| 121 | 121 | return $connections; |
@@ -128,8 +128,8 @@ discard block |
||
| 128 | 128 | $cmb = new_cmb2_box( |
| 129 | 129 | array( |
| 130 | 130 | 'id' => $this->slug . '_featured_metabox_meal', |
| 131 | - 'title' => __( 'Featured Meal', 'lsx-health-plan' ), |
|
| 132 | - 'object_types' => array( $this->slug ), // Post type |
|
| 131 | + 'title' => __('Featured Meal', 'lsx-health-plan'), |
|
| 132 | + 'object_types' => array($this->slug), // Post type |
|
| 133 | 133 | 'context' => 'side', |
| 134 | 134 | 'priority' => 'high', |
| 135 | 135 | 'show_names' => true, |
@@ -137,8 +137,8 @@ discard block |
||
| 137 | 137 | ); |
| 138 | 138 | $cmb->add_field( |
| 139 | 139 | array( |
| 140 | - 'name' => __( 'Featured Meal', 'lsx-health-plan' ), |
|
| 141 | - 'desc' => __( 'Enable a featured meal' ), |
|
| 140 | + 'name' => __('Featured Meal', 'lsx-health-plan'), |
|
| 141 | + 'desc' => __('Enable a featured meal'), |
|
| 142 | 142 | 'id' => $this->slug . '_featured_meal', |
| 143 | 143 | 'type' => 'checkbox', |
| 144 | 144 | 'show_on_cb' => 'cmb2_hide_if_no_cats', |
@@ -150,66 +150,66 @@ discard block |
||
| 150 | 150 | * Define the metabox and field configurations. |
| 151 | 151 | */ |
| 152 | 152 | public function details_metaboxes() { |
| 153 | - $cmb = new_cmb2_box( array( |
|
| 153 | + $cmb = new_cmb2_box(array( |
|
| 154 | 154 | 'id' => $this->slug . '_shopping_list_metabox', |
| 155 | - 'title' => __( 'Shopping List', 'lsx-health-plan' ), |
|
| 156 | - 'object_types' => array( $this->slug ), // Post type |
|
| 155 | + 'title' => __('Shopping List', 'lsx-health-plan'), |
|
| 156 | + 'object_types' => array($this->slug), // Post type |
|
| 157 | 157 | 'context' => 'normal', |
| 158 | 158 | 'priority' => 'high', |
| 159 | 159 | 'show_names' => true, |
| 160 | - ) ); |
|
| 161 | - $cmb->add_field( array( |
|
| 162 | - 'name' => __( 'Shopping List', 'lsx-health-plan' ), |
|
| 163 | - 'desc' => __( 'Connect the shopping list page that applies to this meal by entering the name of the page in the field provided.' ), |
|
| 160 | + )); |
|
| 161 | + $cmb->add_field(array( |
|
| 162 | + 'name' => __('Shopping List', 'lsx-health-plan'), |
|
| 163 | + 'desc' => __('Connect the shopping list page that applies to this meal by entering the name of the page in the field provided.'), |
|
| 164 | 164 | 'id' => $this->slug . '_shopping_list', |
| 165 | 165 | 'type' => 'post_search_ajax', |
| 166 | 166 | // Optional : |
| 167 | - 'limit' => 1, // Limit selection to X items only (default 1) |
|
| 167 | + 'limit' => 1, // Limit selection to X items only (default 1) |
|
| 168 | 168 | 'sortable' => true, // Allow selected items to be sortable (default false) |
| 169 | 169 | 'query_args' => array( |
| 170 | - 'post_type' => array( 'page' ), |
|
| 171 | - 'post_status' => array( 'publish' ), |
|
| 170 | + 'post_type' => array('page'), |
|
| 171 | + 'post_status' => array('publish'), |
|
| 172 | 172 | 'posts_per_page' => -1, |
| 173 | 173 | ), |
| 174 | - ) ); |
|
| 175 | - $cmb = new_cmb2_box( array( |
|
| 174 | + )); |
|
| 175 | + $cmb = new_cmb2_box(array( |
|
| 176 | 176 | 'id' => $this->slug . '_details_metabox', |
| 177 | - 'title' => __( 'Meal Details', 'lsx-health-plan' ), |
|
| 178 | - 'object_types' => array( $this->slug ), // Post type |
|
| 177 | + 'title' => __('Meal Details', 'lsx-health-plan'), |
|
| 178 | + 'object_types' => array($this->slug), // Post type |
|
| 179 | 179 | 'context' => 'normal', |
| 180 | 180 | 'priority' => 'high', |
| 181 | 181 | 'show_names' => true, |
| 182 | - ) ); |
|
| 182 | + )); |
|
| 183 | 183 | |
| 184 | - $cmb->add_field( array( |
|
| 185 | - 'name' => __( 'Meal Short Description', 'lsx-health-plan' ), |
|
| 184 | + $cmb->add_field(array( |
|
| 185 | + 'name' => __('Meal Short Description', 'lsx-health-plan'), |
|
| 186 | 186 | 'id' => $this->slug . '_short_description', |
| 187 | 187 | 'type' => 'textarea_small', |
| 188 | - 'desc' => __( 'Add a small description for this meal (optional)', 'lsx-health-plan' ), |
|
| 189 | - ) ); |
|
| 188 | + 'desc' => __('Add a small description for this meal (optional)', 'lsx-health-plan'), |
|
| 189 | + )); |
|
| 190 | 190 | |
| 191 | - $cmb->add_field( array( |
|
| 192 | - 'name' => __( 'Pre Breakfast Snack', 'lsx-health-plan' ), |
|
| 191 | + $cmb->add_field(array( |
|
| 192 | + 'name' => __('Pre Breakfast Snack', 'lsx-health-plan'), |
|
| 193 | 193 | 'id' => $this->slug . '_pre_breakfast_snack', |
| 194 | 194 | 'type' => 'wysiwyg', |
| 195 | 195 | 'show_on_cb' => 'cmb2_hide_if_no_cats', |
| 196 | 196 | 'options' => array( |
| 197 | 197 | 'textarea_rows' => 5, |
| 198 | 198 | ), |
| 199 | - ) ); |
|
| 200 | - $cmb->add_field( array( |
|
| 201 | - 'name' => __( 'Breakfast', 'lsx-health-plan' ), |
|
| 199 | + )); |
|
| 200 | + $cmb->add_field(array( |
|
| 201 | + 'name' => __('Breakfast', 'lsx-health-plan'), |
|
| 202 | 202 | 'id' => $this->slug . '_breakfast', |
| 203 | 203 | 'type' => 'wysiwyg', |
| 204 | 204 | 'show_on_cb' => 'cmb2_hide_if_no_cats', |
| 205 | 205 | 'options' => array( |
| 206 | 206 | 'textarea_rows' => 5, |
| 207 | 207 | ), |
| 208 | - ) ); |
|
| 208 | + )); |
|
| 209 | 209 | |
| 210 | 210 | $cmb->add_field( |
| 211 | 211 | array( |
| 212 | - 'name' => __( 'Post Breakfast Snack', 'lsx-health-plan' ), |
|
| 212 | + 'name' => __('Post Breakfast Snack', 'lsx-health-plan'), |
|
| 213 | 213 | 'id' => $this->slug . '_breakfast_snack', |
| 214 | 214 | 'type' => 'wysiwyg', |
| 215 | 215 | 'show_on_cb' => 'cmb2_hide_if_no_cats', |
@@ -219,19 +219,19 @@ discard block |
||
| 219 | 219 | ) |
| 220 | 220 | ); |
| 221 | 221 | |
| 222 | - if ( post_type_exists( 'recipe' ) ) { |
|
| 222 | + if (post_type_exists('recipe')) { |
|
| 223 | 223 | $cmb->add_field( |
| 224 | 224 | array( |
| 225 | - 'name' => __( 'Breakfast Recipes', 'lsx-health-plan' ), |
|
| 226 | - 'desc' => __( 'Connect additional recipes options for breakfast.', 'lsx-health-plan' ), |
|
| 225 | + 'name' => __('Breakfast Recipes', 'lsx-health-plan'), |
|
| 226 | + 'desc' => __('Connect additional recipes options for breakfast.', 'lsx-health-plan'), |
|
| 227 | 227 | 'id' => 'breakfast_recipes', |
| 228 | 228 | 'type' => 'post_search_ajax', |
| 229 | 229 | // Optional : |
| 230 | - 'limit' => 15, // Limit selection to X items only (default 1) |
|
| 230 | + 'limit' => 15, // Limit selection to X items only (default 1) |
|
| 231 | 231 | 'sortable' => true, // Allow selected items to be sortable (default false) |
| 232 | 232 | 'query_args' => array( |
| 233 | - 'post_type' => array( 'recipe' ), |
|
| 234 | - 'post_status' => array( 'publish' ), |
|
| 233 | + 'post_type' => array('recipe'), |
|
| 234 | + 'post_status' => array('publish'), |
|
| 235 | 235 | 'posts_per_page' => -1, |
| 236 | 236 | ), |
| 237 | 237 | ) |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | |
| 241 | 241 | $cmb->add_field( |
| 242 | 242 | array( |
| 243 | - 'name' => __( 'Pre Lunch Snack', 'lsx-health-plan' ), |
|
| 243 | + 'name' => __('Pre Lunch Snack', 'lsx-health-plan'), |
|
| 244 | 244 | 'id' => $this->slug . '_pre_lunch_snack', |
| 245 | 245 | 'type' => 'wysiwyg', |
| 246 | 246 | 'show_on_cb' => 'cmb2_hide_if_no_cats', |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | ); |
| 252 | 252 | $cmb->add_field( |
| 253 | 253 | array( |
| 254 | - 'name' => __( 'Lunch', 'lsx-health-plan' ), |
|
| 254 | + 'name' => __('Lunch', 'lsx-health-plan'), |
|
| 255 | 255 | 'id' => $this->slug . '_lunch', |
| 256 | 256 | 'type' => 'wysiwyg', |
| 257 | 257 | 'show_on_cb' => 'cmb2_hide_if_no_cats', |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | ); |
| 263 | 263 | $cmb->add_field( |
| 264 | 264 | array( |
| 265 | - 'name' => __( 'Post Lunch Snack', 'lsx-health-plan' ), |
|
| 265 | + 'name' => __('Post Lunch Snack', 'lsx-health-plan'), |
|
| 266 | 266 | 'id' => $this->slug . '_lunch_snack', |
| 267 | 267 | 'type' => 'wysiwyg', |
| 268 | 268 | 'show_on_cb' => 'cmb2_hide_if_no_cats', |
@@ -272,19 +272,19 @@ discard block |
||
| 272 | 272 | ) |
| 273 | 273 | ); |
| 274 | 274 | |
| 275 | - if ( post_type_exists( 'recipe' ) ) { |
|
| 275 | + if (post_type_exists('recipe')) { |
|
| 276 | 276 | $cmb->add_field( |
| 277 | 277 | array( |
| 278 | - 'name' => __( 'Lunch Recipes', 'lsx-health-plan' ), |
|
| 279 | - 'desc' => __( 'Connect additional recipes options for lunch.', 'lsx-health-plan' ), |
|
| 278 | + 'name' => __('Lunch Recipes', 'lsx-health-plan'), |
|
| 279 | + 'desc' => __('Connect additional recipes options for lunch.', 'lsx-health-plan'), |
|
| 280 | 280 | 'id' => 'lunch_recipes', |
| 281 | 281 | 'type' => 'post_search_ajax', |
| 282 | 282 | // Optional : |
| 283 | - 'limit' => 15, // Limit selection to X items only (default 1) |
|
| 283 | + 'limit' => 15, // Limit selection to X items only (default 1) |
|
| 284 | 284 | 'sortable' => true, // Allow selected items to be sortable (default false) |
| 285 | 285 | 'query_args' => array( |
| 286 | - 'post_type' => array( 'recipe' ), |
|
| 287 | - 'post_status' => array( 'publish' ), |
|
| 286 | + 'post_type' => array('recipe'), |
|
| 287 | + 'post_status' => array('publish'), |
|
| 288 | 288 | 'posts_per_page' => -1, |
| 289 | 289 | ), |
| 290 | 290 | ) |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | |
| 294 | 294 | $cmb->add_field( |
| 295 | 295 | array( |
| 296 | - 'name' => __( 'Pre Dinner Snack', 'lsx-health-plan' ), |
|
| 296 | + 'name' => __('Pre Dinner Snack', 'lsx-health-plan'), |
|
| 297 | 297 | 'id' => $this->slug . '_pre_dinner_snack', |
| 298 | 298 | 'type' => 'wysiwyg', |
| 299 | 299 | 'show_on_cb' => 'cmb2_hide_if_no_cats', |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | ); |
| 305 | 305 | $cmb->add_field( |
| 306 | 306 | array( |
| 307 | - 'name' => __( 'Dinner', 'lsx-health-plan' ), |
|
| 307 | + 'name' => __('Dinner', 'lsx-health-plan'), |
|
| 308 | 308 | 'id' => $this->slug . '_dinner', |
| 309 | 309 | 'type' => 'wysiwyg', |
| 310 | 310 | 'show_on_cb' => 'cmb2_hide_if_no_cats', |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | ); |
| 316 | 316 | $cmb->add_field( |
| 317 | 317 | array( |
| 318 | - 'name' => __( 'Post Dinner Snack', 'lsx-health-plan' ), |
|
| 318 | + 'name' => __('Post Dinner Snack', 'lsx-health-plan'), |
|
| 319 | 319 | 'id' => $this->slug . '_dinner_snack', |
| 320 | 320 | 'type' => 'wysiwyg', |
| 321 | 321 | 'show_on_cb' => 'cmb2_hide_if_no_cats', |
@@ -325,19 +325,19 @@ discard block |
||
| 325 | 325 | ) |
| 326 | 326 | ); |
| 327 | 327 | |
| 328 | - if ( post_type_exists( 'recipe' ) ) { |
|
| 328 | + if (post_type_exists('recipe')) { |
|
| 329 | 329 | $cmb->add_field( |
| 330 | 330 | array( |
| 331 | - 'name' => __( 'Dinner Recipes', 'lsx-health-plan' ), |
|
| 332 | - 'desc' => __( 'Connect additional recipes options for dinner.', 'lsx-health-plan' ), |
|
| 331 | + 'name' => __('Dinner Recipes', 'lsx-health-plan'), |
|
| 332 | + 'desc' => __('Connect additional recipes options for dinner.', 'lsx-health-plan'), |
|
| 333 | 333 | 'id' => 'dinner_recipes', |
| 334 | 334 | 'type' => 'post_search_ajax', |
| 335 | 335 | // Optional : |
| 336 | - 'limit' => 15, // Limit selection to X items only (default 1) |
|
| 336 | + 'limit' => 15, // Limit selection to X items only (default 1) |
|
| 337 | 337 | 'sortable' => true, // Allow selected items to be sortable (default false) |
| 338 | 338 | 'query_args' => array( |
| 339 | - 'post_type' => array( 'recipe' ), |
|
| 340 | - 'post_status' => array( 'publish' ), |
|
| 339 | + 'post_type' => array('recipe'), |
|
| 340 | + 'post_status' => array('publish'), |
|
| 341 | 341 | 'posts_per_page' => -1, |
| 342 | 342 | ), |
| 343 | 343 | ) |
@@ -32,17 +32,17 @@ discard block |
||
| 32 | 32 | * Contructor |
| 33 | 33 | */ |
| 34 | 34 | public function __construct() { |
| 35 | - add_action( 'init', array( $this, 'register_post_type' ) ); |
|
| 36 | - add_filter( 'lsx_health_plan_single_template', array( $this, 'enable_post_type' ), 10, 1 ); |
|
| 37 | - add_action( 'init', array( $this, 'recipe_type_taxonomy_setup' ) ); |
|
| 38 | - add_filter( 'lsx_health_plan_connections', array( $this, 'enable_connections' ), 10, 1 ); |
|
| 39 | - add_action( 'cmb2_admin_init', array( $this, 'featured_metabox' ), 5 ); |
|
| 40 | - add_action( 'cmb2_admin_init', array( $this, 'details_metaboxes' ) ); |
|
| 41 | - add_action( 'lsx_hp_settings_page', array( $this, 'register_settings' ), 8, 1 ); |
|
| 42 | - add_filter( 'get_the_archive_title', array( $this, 'get_the_archive_title' ), 100 ); |
|
| 35 | + add_action('init', array($this, 'register_post_type')); |
|
| 36 | + add_filter('lsx_health_plan_single_template', array($this, 'enable_post_type'), 10, 1); |
|
| 37 | + add_action('init', array($this, 'recipe_type_taxonomy_setup')); |
|
| 38 | + add_filter('lsx_health_plan_connections', array($this, 'enable_connections'), 10, 1); |
|
| 39 | + add_action('cmb2_admin_init', array($this, 'featured_metabox'), 5); |
|
| 40 | + add_action('cmb2_admin_init', array($this, 'details_metaboxes')); |
|
| 41 | + add_action('lsx_hp_settings_page', array($this, 'register_settings'), 8, 1); |
|
| 42 | + add_filter('get_the_archive_title', array($this, 'get_the_archive_title'), 100); |
|
| 43 | 43 | |
| 44 | 44 | // Template Redirects. |
| 45 | - add_filter( 'lsx_health_plan_archive_template', array( $this, 'enable_post_type' ), 10, 1 ); |
|
| 45 | + add_filter('lsx_health_plan_archive_template', array($this, 'enable_post_type'), 10, 1); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public static function get_instance() { |
| 56 | 56 | // If the single instance hasn't been set, set it now. |
| 57 | - if ( null === self::$instance ) { |
|
| 57 | + if (null === self::$instance) { |
|
| 58 | 58 | self::$instance = new self(); |
| 59 | 59 | } |
| 60 | 60 | return self::$instance; |
@@ -64,19 +64,19 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function register_post_type() { |
| 66 | 66 | $labels = array( |
| 67 | - 'name' => esc_html__( 'Workouts', 'lsx-health-plan' ), |
|
| 68 | - 'singular_name' => esc_html__( 'Workout', 'lsx-health-plan' ), |
|
| 69 | - 'add_new' => esc_html_x( 'Add New', 'post type general name', 'lsx-health-plan' ), |
|
| 70 | - 'add_new_item' => esc_html__( 'Add New', 'lsx-health-plan' ), |
|
| 71 | - 'edit_item' => esc_html__( 'Edit', 'lsx-health-plan' ), |
|
| 72 | - 'new_item' => esc_html__( 'New', 'lsx-health-plan' ), |
|
| 73 | - 'all_items' => esc_html__( 'All Workouts', 'lsx-health-plan' ), |
|
| 74 | - 'view_item' => esc_html__( 'View', 'lsx-health-plan' ), |
|
| 75 | - 'search_items' => esc_html__( 'Search', 'lsx-health-plan' ), |
|
| 76 | - 'not_found' => esc_html__( 'None found', 'lsx-health-plan' ), |
|
| 77 | - 'not_found_in_trash' => esc_html__( 'None found in Trash', 'lsx-health-plan' ), |
|
| 67 | + 'name' => esc_html__('Workouts', 'lsx-health-plan'), |
|
| 68 | + 'singular_name' => esc_html__('Workout', 'lsx-health-plan'), |
|
| 69 | + 'add_new' => esc_html_x('Add New', 'post type general name', 'lsx-health-plan'), |
|
| 70 | + 'add_new_item' => esc_html__('Add New', 'lsx-health-plan'), |
|
| 71 | + 'edit_item' => esc_html__('Edit', 'lsx-health-plan'), |
|
| 72 | + 'new_item' => esc_html__('New', 'lsx-health-plan'), |
|
| 73 | + 'all_items' => esc_html__('All Workouts', 'lsx-health-plan'), |
|
| 74 | + 'view_item' => esc_html__('View', 'lsx-health-plan'), |
|
| 75 | + 'search_items' => esc_html__('Search', 'lsx-health-plan'), |
|
| 76 | + 'not_found' => esc_html__('None found', 'lsx-health-plan'), |
|
| 77 | + 'not_found_in_trash' => esc_html__('None found in Trash', 'lsx-health-plan'), |
|
| 78 | 78 | 'parent_item_colon' => '', |
| 79 | - 'menu_name' => esc_html__( 'Workouts', 'lsx-health-plan' ), |
|
| 79 | + 'menu_name' => esc_html__('Workouts', 'lsx-health-plan'), |
|
| 80 | 80 | ); |
| 81 | 81 | $args = array( |
| 82 | 82 | 'labels' => $labels, |
@@ -88,10 +88,10 @@ discard block |
||
| 88 | 88 | 'menu_icon' => 'dashicons-universal-access', |
| 89 | 89 | 'query_var' => true, |
| 90 | 90 | 'rewrite' => array( |
| 91 | - 'slug' => \lsx_health_plan\functions\get_option( 'endpoint_workout', 'workout' ), |
|
| 91 | + 'slug' => \lsx_health_plan\functions\get_option('endpoint_workout', 'workout'), |
|
| 92 | 92 | ), |
| 93 | 93 | 'capability_type' => 'page', |
| 94 | - 'has_archive' => \lsx_health_plan\functions\get_option( 'endpoint_workout_archive', 'workouts' ), |
|
| 94 | + 'has_archive' => \lsx_health_plan\functions\get_option('endpoint_workout_archive', 'workouts'), |
|
| 95 | 95 | 'hierarchical' => true, |
| 96 | 96 | 'menu_position' => null, |
| 97 | 97 | 'supports' => array( |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | 'custom-fields', |
| 104 | 104 | ), |
| 105 | 105 | ); |
| 106 | - register_post_type( 'workout', $args ); |
|
| 106 | + register_post_type('workout', $args); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
@@ -111,17 +111,17 @@ discard block |
||
| 111 | 111 | */ |
| 112 | 112 | public function recipe_type_taxonomy_setup() { |
| 113 | 113 | $labels = array( |
| 114 | - 'name' => esc_html_x( 'Workout Type', 'taxonomy general name', 'lsx-health-plan' ), |
|
| 115 | - 'singular_name' => esc_html_x( 'Workout Type', 'taxonomy singular name', 'lsx-health-plan' ), |
|
| 116 | - 'search_items' => esc_html__( 'Search', 'lsx-health-plan' ), |
|
| 117 | - 'all_items' => esc_html__( 'All', 'lsx-health-plan' ), |
|
| 118 | - 'parent_item' => esc_html__( 'Parent', 'lsx-health-plan' ), |
|
| 119 | - 'parent_item_colon' => esc_html__( 'Parent:', 'lsx-health-plan' ), |
|
| 120 | - 'edit_item' => esc_html__( 'Edit', 'lsx-health-plan' ), |
|
| 121 | - 'update_item' => esc_html__( 'Update', 'lsx-health-plan' ), |
|
| 122 | - 'add_new_item' => esc_html__( 'Add New', 'lsx-health-plan' ), |
|
| 123 | - 'new_item_name' => esc_html__( 'New Name', 'lsx-health-plan' ), |
|
| 124 | - 'menu_name' => esc_html__( 'Workout Types', 'lsx-health-plan' ), |
|
| 114 | + 'name' => esc_html_x('Workout Type', 'taxonomy general name', 'lsx-health-plan'), |
|
| 115 | + 'singular_name' => esc_html_x('Workout Type', 'taxonomy singular name', 'lsx-health-plan'), |
|
| 116 | + 'search_items' => esc_html__('Search', 'lsx-health-plan'), |
|
| 117 | + 'all_items' => esc_html__('All', 'lsx-health-plan'), |
|
| 118 | + 'parent_item' => esc_html__('Parent', 'lsx-health-plan'), |
|
| 119 | + 'parent_item_colon' => esc_html__('Parent:', 'lsx-health-plan'), |
|
| 120 | + 'edit_item' => esc_html__('Edit', 'lsx-health-plan'), |
|
| 121 | + 'update_item' => esc_html__('Update', 'lsx-health-plan'), |
|
| 122 | + 'add_new_item' => esc_html__('Add New', 'lsx-health-plan'), |
|
| 123 | + 'new_item_name' => esc_html__('New Name', 'lsx-health-plan'), |
|
| 124 | + 'menu_name' => esc_html__('Workout Types', 'lsx-health-plan'), |
|
| 125 | 125 | ); |
| 126 | 126 | |
| 127 | 127 | $args = array( |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | ), |
| 136 | 136 | ); |
| 137 | 137 | |
| 138 | - register_taxonomy( 'workout-type', array( 'workout' ), $args ); |
|
| 138 | + register_taxonomy('workout-type', array('workout'), $args); |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | /** |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | * @param array $post_types |
| 145 | 145 | * @return array |
| 146 | 146 | */ |
| 147 | - public function enable_post_type( $post_types = array() ) { |
|
| 147 | + public function enable_post_type($post_types = array()) { |
|
| 148 | 148 | $post_types[] = $this->slug; |
| 149 | 149 | return $post_types; |
| 150 | 150 | } |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | * @param array $connections |
| 156 | 156 | * @return void |
| 157 | 157 | */ |
| 158 | - public function enable_connections( $connections = array() ) { |
|
| 158 | + public function enable_connections($connections = array()) { |
|
| 159 | 159 | $connections['workout']['connected_plans'] = 'connected_workouts'; |
| 160 | 160 | $connections['plan']['connected_workouts'] = 'connected_plans'; |
| 161 | 161 | |
@@ -173,9 +173,9 @@ discard block |
||
| 173 | 173 | * @param string $title the term title. |
| 174 | 174 | * @return string |
| 175 | 175 | */ |
| 176 | - public function get_the_archive_title( $title ) { |
|
| 177 | - if ( is_post_type_archive( 'workout' ) ) { |
|
| 178 | - $title = __( 'Workouts', 'lsx-health-plan' ); |
|
| 176 | + public function get_the_archive_title($title) { |
|
| 177 | + if (is_post_type_archive('workout')) { |
|
| 178 | + $title = __('Workouts', 'lsx-health-plan'); |
|
| 179 | 179 | } |
| 180 | 180 | return $title; |
| 181 | 181 | } |
@@ -187,8 +187,8 @@ discard block |
||
| 187 | 187 | $cmb = new_cmb2_box( |
| 188 | 188 | array( |
| 189 | 189 | 'id' => $this->slug . '_featured_metabox_workout', |
| 190 | - 'title' => __( 'Featured Workout', 'lsx-health-plan' ), |
|
| 191 | - 'object_types' => array( $this->slug ), // Post type |
|
| 190 | + 'title' => __('Featured Workout', 'lsx-health-plan'), |
|
| 191 | + 'object_types' => array($this->slug), // Post type |
|
| 192 | 192 | 'context' => 'side', |
| 193 | 193 | 'priority' => 'high', |
| 194 | 194 | 'show_names' => true, |
@@ -196,8 +196,8 @@ discard block |
||
| 196 | 196 | ); |
| 197 | 197 | $cmb->add_field( |
| 198 | 198 | array( |
| 199 | - 'name' => __( 'Featured Workout', 'lsx-health-plan' ), |
|
| 200 | - 'desc' => __( 'Enable a featured plan' ), |
|
| 199 | + 'name' => __('Featured Workout', 'lsx-health-plan'), |
|
| 200 | + 'desc' => __('Enable a featured plan'), |
|
| 201 | 201 | 'id' => $this->slug . '_featured_workout', |
| 202 | 202 | 'type' => 'checkbox', |
| 203 | 203 | 'show_on_cb' => 'cmb2_hide_if_no_cats', |
@@ -210,43 +210,43 @@ discard block |
||
| 210 | 210 | */ |
| 211 | 211 | public function details_metaboxes() { |
| 212 | 212 | |
| 213 | - $cmb = new_cmb2_box( array( |
|
| 213 | + $cmb = new_cmb2_box(array( |
|
| 214 | 214 | 'id' => $this->slug . '_details_metabox', |
| 215 | - 'title' => __( 'Workout Details', 'lsx-health-plan' ), |
|
| 216 | - 'object_types' => array( $this->slug ), // Post type |
|
| 215 | + 'title' => __('Workout Details', 'lsx-health-plan'), |
|
| 216 | + 'object_types' => array($this->slug), // Post type |
|
| 217 | 217 | 'context' => 'normal', |
| 218 | 218 | 'priority' => 'high', |
| 219 | 219 | 'show_names' => true, |
| 220 | - ) ); |
|
| 220 | + )); |
|
| 221 | 221 | |
| 222 | - $cmb->add_field( array( |
|
| 223 | - 'name' => __( 'Workout Short Description', 'lsx-health-plan' ), |
|
| 222 | + $cmb->add_field(array( |
|
| 223 | + 'name' => __('Workout Short Description', 'lsx-health-plan'), |
|
| 224 | 224 | 'id' => $this->slug . '_short_description', |
| 225 | 225 | 'type' => 'textarea_small', |
| 226 | - 'desc' => __( 'Add a small description for this workout (optional)', 'lsx-health-plan' ), |
|
| 227 | - ) ); |
|
| 226 | + 'desc' => __('Add a small description for this workout (optional)', 'lsx-health-plan'), |
|
| 227 | + )); |
|
| 228 | 228 | |
| 229 | - $workout_sections = apply_filters( 'lsx_health_plan_workout_sections_amount', 6 ); |
|
| 230 | - if ( false !== $workout_sections && null !== $workout_sections ) { |
|
| 229 | + $workout_sections = apply_filters('lsx_health_plan_workout_sections_amount', 6); |
|
| 230 | + if (false !== $workout_sections && null !== $workout_sections) { |
|
| 231 | 231 | $i = 1; |
| 232 | - while ( $i <= $workout_sections ) { |
|
| 232 | + while ($i <= $workout_sections) { |
|
| 233 | 233 | |
| 234 | - $cmb_group = new_cmb2_box( array( |
|
| 234 | + $cmb_group = new_cmb2_box(array( |
|
| 235 | 235 | 'id' => $this->slug . '_section_' . $i . '_metabox', |
| 236 | - 'title' => esc_html__( 'Exercise Group ', 'lsx-health-plan' ) . $i, |
|
| 237 | - 'object_types' => array( $this->slug ), |
|
| 238 | - ) ); |
|
| 236 | + 'title' => esc_html__('Exercise Group ', 'lsx-health-plan') . $i, |
|
| 237 | + 'object_types' => array($this->slug), |
|
| 238 | + )); |
|
| 239 | 239 | |
| 240 | - $cmb_group->add_field( array( |
|
| 241 | - 'name' => __( 'Title', 'lsx-health-plan' ), |
|
| 240 | + $cmb_group->add_field(array( |
|
| 241 | + 'name' => __('Title', 'lsx-health-plan'), |
|
| 242 | 242 | 'id' => $this->slug . '_section_' . $i . '_title', |
| 243 | 243 | 'type' => 'text', |
| 244 | 244 | 'show_on_cb' => 'cmb2_hide_if_no_cats', |
| 245 | - ) ); |
|
| 245 | + )); |
|
| 246 | 246 | |
| 247 | 247 | $cmb_group->add_field( |
| 248 | 248 | array( |
| 249 | - 'name' => __( 'Description', 'lsx-health-plan' ), |
|
| 249 | + 'name' => __('Description', 'lsx-health-plan'), |
|
| 250 | 250 | 'id' => $this->slug . '_section_' . $i . '_description', |
| 251 | 251 | 'type' => 'wysiwyg', |
| 252 | 252 | 'show_on_cb' => 'cmb2_hide_if_no_cats', |
@@ -265,27 +265,27 @@ discard block |
||
| 265 | 265 | 'id' => $this->slug . '_section_' . $i, |
| 266 | 266 | 'type' => 'group', |
| 267 | 267 | 'options' => array( |
| 268 | - 'group_title' => esc_html__( 'Exercise {#}', 'lsx-health-plan' ), // {#} gets replaced by row number |
|
| 269 | - 'add_button' => esc_html__( 'Add New', 'lsx-health-plan' ), |
|
| 270 | - 'remove_button' => esc_html__( 'Delete', 'lsx-health-plan' ), |
|
| 268 | + 'group_title' => esc_html__('Exercise {#}', 'lsx-health-plan'), // {#} gets replaced by row number |
|
| 269 | + 'add_button' => esc_html__('Add New', 'lsx-health-plan'), |
|
| 270 | + 'remove_button' => esc_html__('Delete', 'lsx-health-plan'), |
|
| 271 | 271 | 'sortable' => true, |
| 272 | 272 | ), |
| 273 | 273 | ) |
| 274 | 274 | ); |
| 275 | 275 | |
| 276 | - if ( false !== \lsx_health_plan\functions\get_option( 'exercise_enabled', false ) ) { |
|
| 276 | + if (false !== \lsx_health_plan\functions\get_option('exercise_enabled', false)) { |
|
| 277 | 277 | $cmb_group->add_group_field( |
| 278 | 278 | $group_field_id, |
| 279 | 279 | array( |
| 280 | - 'name' => __( 'Exercise related to this workout', 'lsx-health-plan' ), |
|
| 280 | + 'name' => __('Exercise related to this workout', 'lsx-health-plan'), |
|
| 281 | 281 | 'id' => 'connected_exercises', |
| 282 | 282 | 'type' => 'post_search_ajax', |
| 283 | 283 | // Optional : |
| 284 | 284 | 'limit' => 1, // Limit selection to X items only (default 1) |
| 285 | - 'sortable' => true, // Allow selected items to be sortable (default false) |
|
| 285 | + 'sortable' => true, // Allow selected items to be sortable (default false) |
|
| 286 | 286 | 'query_args' => array( |
| 287 | - 'post_type' => array( 'exercise' ), |
|
| 288 | - 'post_status' => array( 'publish' ), |
|
| 287 | + 'post_type' => array('exercise'), |
|
| 288 | + 'post_status' => array('publish'), |
|
| 289 | 289 | 'posts_per_page' => -1, |
| 290 | 290 | ), |
| 291 | 291 | ) |
@@ -294,15 +294,15 @@ discard block |
||
| 294 | 294 | $cmb_group->add_group_field( |
| 295 | 295 | $group_field_id, |
| 296 | 296 | array( |
| 297 | - 'name' => __( 'Video related to this workout', 'lsx-health-plan' ), |
|
| 297 | + 'name' => __('Video related to this workout', 'lsx-health-plan'), |
|
| 298 | 298 | 'id' => 'connected_videos', |
| 299 | 299 | 'type' => 'post_search_ajax', |
| 300 | 300 | // Optional : |
| 301 | 301 | 'limit' => 1, // Limit selection to X items only (default 1) |
| 302 | - 'sortable' => true, // Allow selected items to be sortable (default false) |
|
| 302 | + 'sortable' => true, // Allow selected items to be sortable (default false) |
|
| 303 | 303 | 'query_args' => array( |
| 304 | - 'post_type' => array( 'video' ), |
|
| 305 | - 'post_status' => array( 'publish' ), |
|
| 304 | + 'post_type' => array('video'), |
|
| 305 | + 'post_status' => array('publish'), |
|
| 306 | 306 | 'posts_per_page' => -1, |
| 307 | 307 | ), |
| 308 | 308 | ) |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | $cmb_group->add_group_field( |
| 311 | 311 | $group_field_id, |
| 312 | 312 | array( |
| 313 | - 'name' => esc_html__( 'Workout Name', 'lsx-health-plan' ), |
|
| 313 | + 'name' => esc_html__('Workout Name', 'lsx-health-plan'), |
|
| 314 | 314 | 'id' => 'name', |
| 315 | 315 | 'type' => 'text', |
| 316 | 316 | // 'repeatable' => true, // Repeatable fields are supported w/in repeatable groups (for most types) |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | $cmb_group->add_group_field( |
| 321 | 321 | $group_field_id, |
| 322 | 322 | array( |
| 323 | - 'name' => __( 'Description', 'lsx-health-plan' ), |
|
| 323 | + 'name' => __('Description', 'lsx-health-plan'), |
|
| 324 | 324 | 'id' => 'description', |
| 325 | 325 | 'type' => 'wysiwyg', |
| 326 | 326 | 'options' => array( |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | $cmb_group->add_group_field( |
| 334 | 334 | $group_field_id, |
| 335 | 335 | array( |
| 336 | - 'name' => esc_html__( 'Exercise title (Optional)', 'lsx-health-plan' ), |
|
| 336 | + 'name' => esc_html__('Exercise title (Optional)', 'lsx-health-plan'), |
|
| 337 | 337 | 'id' => 'alt_title', |
| 338 | 338 | 'type' => 'text', |
| 339 | 339 | ) |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | $cmb_group->add_group_field( |
| 342 | 342 | $group_field_id, |
| 343 | 343 | array( |
| 344 | - 'name' => esc_html__( 'Exercise Description (Optional)', 'lsx-health-plan' ), |
|
| 344 | + 'name' => esc_html__('Exercise Description (Optional)', 'lsx-health-plan'), |
|
| 345 | 345 | 'id' => 'alt_description', |
| 346 | 346 | 'type' => 'textarea_small', |
| 347 | 347 | ) |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | $cmb_group->add_group_field( |
| 350 | 350 | $group_field_id, |
| 351 | 351 | array( |
| 352 | - 'name' => esc_html__( 'Reps / Time / Distance', 'lsx-health-plan' ), |
|
| 352 | + 'name' => esc_html__('Reps / Time / Distance', 'lsx-health-plan'), |
|
| 353 | 353 | 'id' => 'reps', |
| 354 | 354 | 'type' => 'text', |
| 355 | 355 | // 'repeatable' => true, // Repeatable fields are supported w/in repeatable groups (for most types) |
@@ -358,13 +358,13 @@ discard block |
||
| 358 | 358 | $cmb_group->add_group_field( |
| 359 | 359 | $group_field_id, |
| 360 | 360 | array( |
| 361 | - 'name' => __( 'Exercise Image (Optional)', 'lsx-health-plan' ), |
|
| 361 | + 'name' => __('Exercise Image (Optional)', 'lsx-health-plan'), |
|
| 362 | 362 | 'id' => 'exercise_alt_thumbnail', |
| 363 | 363 | 'type' => 'file', |
| 364 | 364 | 'text' => array( |
| 365 | - 'add_upload_file_text' => __( 'Add File', 'lsx-health-plan' ), |
|
| 365 | + 'add_upload_file_text' => __('Add File', 'lsx-health-plan'), |
|
| 366 | 366 | ), |
| 367 | - 'desc' => __( 'Upload an image 300px x 300px in size.', 'lsx-health-plan' ), |
|
| 367 | + 'desc' => __('Upload an image 300px x 300px in size.', 'lsx-health-plan'), |
|
| 368 | 368 | 'query_args' => array( |
| 369 | 369 | 'type' => array( |
| 370 | 370 | 'image/gif', |
@@ -388,14 +388,14 @@ discard block |
||
| 388 | 388 | * @param object $cmb new_cmb2_box(). |
| 389 | 389 | * @return void |
| 390 | 390 | */ |
| 391 | - public function register_settings( $cmb ) { |
|
| 392 | - if ( false !== \lsx_health_plan\functions\get_option( 'exercise_enabled', false ) ) { |
|
| 391 | + public function register_settings($cmb) { |
|
| 392 | + if (false !== \lsx_health_plan\functions\get_option('exercise_enabled', false)) { |
|
| 393 | 393 | $cmb->add_field( |
| 394 | 394 | array( |
| 395 | 395 | 'id' => 'workout_settings_title', |
| 396 | 396 | 'type' => 'title', |
| 397 | - 'name' => __( 'Workout Settings', 'lsx-health-plan' ), |
|
| 398 | - 'description' => __( 'Choose the layout, content and link settings for your exercises.', 'lsx-health-plan' ), |
|
| 397 | + 'name' => __('Workout Settings', 'lsx-health-plan'), |
|
| 398 | + 'description' => __('Choose the layout, content and link settings for your exercises.', 'lsx-health-plan'), |
|
| 399 | 399 | ) |
| 400 | 400 | ); |
| 401 | 401 | |
@@ -403,12 +403,12 @@ discard block |
||
| 403 | 403 | array( |
| 404 | 404 | 'id' => 'workout_tab_layout', |
| 405 | 405 | 'type' => 'select', |
| 406 | - 'name' => __( 'Workout Tab Layout', 'lsx-health-plan' ), |
|
| 407 | - 'description' => __( 'Choose the layout for the workouts.', 'lsx-health-plan' ), |
|
| 406 | + 'name' => __('Workout Tab Layout', 'lsx-health-plan'), |
|
| 407 | + 'description' => __('Choose the layout for the workouts.', 'lsx-health-plan'), |
|
| 408 | 408 | 'options' => array( |
| 409 | - 'table' => __( 'Table', 'lsx-health-plan' ), |
|
| 410 | - 'list' => __( 'List', 'lsx-health-plan' ), |
|
| 411 | - 'grid' => __( 'Grid', 'lsx-health-plan' ), |
|
| 409 | + 'table' => __('Table', 'lsx-health-plan'), |
|
| 410 | + 'list' => __('List', 'lsx-health-plan'), |
|
| 411 | + 'grid' => __('Grid', 'lsx-health-plan'), |
|
| 412 | 412 | ), |
| 413 | 413 | ) |
| 414 | 414 | ); |
@@ -416,12 +416,12 @@ discard block |
||
| 416 | 416 | array( |
| 417 | 417 | 'id' => 'workout_tab_link', |
| 418 | 418 | 'type' => 'select', |
| 419 | - 'name' => __( 'Workout Tab Link', 'lsx-health-plan' ), |
|
| 420 | - 'description' => __( 'Choose to show the excerpt, full content or nothing.', 'lsx-health-plan' ), |
|
| 419 | + 'name' => __('Workout Tab Link', 'lsx-health-plan'), |
|
| 420 | + 'description' => __('Choose to show the excerpt, full content or nothing.', 'lsx-health-plan'), |
|
| 421 | 421 | 'options' => array( |
| 422 | - '' => __( 'None', 'lsx-health-plan' ), |
|
| 423 | - 'single' => __( 'Single', 'lsx-health-plan' ), |
|
| 424 | - 'modal' => __( 'Modal', 'lsx-health-plan' ), |
|
| 422 | + '' => __('None', 'lsx-health-plan'), |
|
| 423 | + 'single' => __('Single', 'lsx-health-plan'), |
|
| 424 | + 'modal' => __('Modal', 'lsx-health-plan'), |
|
| 425 | 425 | ), |
| 426 | 426 | 'default' => 'modal', |
| 427 | 427 | ) |
@@ -430,12 +430,12 @@ discard block |
||
| 430 | 430 | array( |
| 431 | 431 | 'id' => 'workout_tab_modal_content', |
| 432 | 432 | 'type' => 'select', |
| 433 | - 'name' => __( 'Modal Content', 'lsx-health-plan' ), |
|
| 434 | - 'description' => __( 'Choose to show the excerpt, full content or nothing. For the modal content only', 'lsx-health-plan' ), |
|
| 433 | + 'name' => __('Modal Content', 'lsx-health-plan'), |
|
| 434 | + 'description' => __('Choose to show the excerpt, full content or nothing. For the modal content only', 'lsx-health-plan'), |
|
| 435 | 435 | 'options' => array( |
| 436 | - '' => __( 'None', 'lsx-health-plan' ), |
|
| 437 | - 'excerpt' => __( 'Excerpt', 'lsx-health-plan' ), |
|
| 438 | - 'full' => __( 'Full Content', 'lsx-health-plan' ), |
|
| 436 | + '' => __('None', 'lsx-health-plan'), |
|
| 437 | + 'excerpt' => __('Excerpt', 'lsx-health-plan'), |
|
| 438 | + 'full' => __('Full Content', 'lsx-health-plan'), |
|
| 439 | 439 | ), |
| 440 | 440 | 'default' => '', |
| 441 | 441 | ) |
@@ -444,14 +444,14 @@ discard block |
||
| 444 | 444 | array( |
| 445 | 445 | 'id' => 'workout_tab_columns', |
| 446 | 446 | 'type' => 'select', |
| 447 | - 'name' => __( 'Grid Columns', 'lsx-health-plan' ), |
|
| 448 | - 'description' => __( 'If you are displaying a grid, set the amount of columns you want to use.', 'lsx-health-plan' ), |
|
| 447 | + 'name' => __('Grid Columns', 'lsx-health-plan'), |
|
| 448 | + 'description' => __('If you are displaying a grid, set the amount of columns you want to use.', 'lsx-health-plan'), |
|
| 449 | 449 | 'options' => array( |
| 450 | - '12' => __( '1', 'lsx-health-plan' ), |
|
| 451 | - '6' => __( '2', 'lsx-health-plan' ), |
|
| 452 | - '4' => __( '3', 'lsx-health-plan' ), |
|
| 453 | - '3' => __( '4', 'lsx-health-plan' ), |
|
| 454 | - '2' => __( '6', 'lsx-health-plan' ), |
|
| 450 | + '12' => __('1', 'lsx-health-plan'), |
|
| 451 | + '6' => __('2', 'lsx-health-plan'), |
|
| 452 | + '4' => __('3', 'lsx-health-plan'), |
|
| 453 | + '3' => __('4', 'lsx-health-plan'), |
|
| 454 | + '2' => __('6', 'lsx-health-plan'), |
|
| 455 | 455 | ), |
| 456 | 456 | 'default' => '4', |
| 457 | 457 | ) |
@@ -460,18 +460,18 @@ discard block |
||
| 460 | 460 | array( |
| 461 | 461 | 'id' => 'workout_tab_content', |
| 462 | 462 | 'type' => 'select', |
| 463 | - 'name' => __( 'Grid Content', 'lsx-health-plan' ), |
|
| 464 | - 'description' => __( 'Choose to show the excerpt, full content or nothing. For the grid layout only', 'lsx-health-plan' ), |
|
| 463 | + 'name' => __('Grid Content', 'lsx-health-plan'), |
|
| 464 | + 'description' => __('Choose to show the excerpt, full content or nothing. For the grid layout only', 'lsx-health-plan'), |
|
| 465 | 465 | 'options' => array( |
| 466 | - '' => __( 'None', 'lsx-health-plan' ), |
|
| 467 | - 'excerpt' => __( 'Excerpt', 'lsx-health-plan' ), |
|
| 468 | - 'full' => __( 'Full Content', 'lsx-health-plan' ), |
|
| 466 | + '' => __('None', 'lsx-health-plan'), |
|
| 467 | + 'excerpt' => __('Excerpt', 'lsx-health-plan'), |
|
| 468 | + 'full' => __('Full Content', 'lsx-health-plan'), |
|
| 469 | 469 | ), |
| 470 | 470 | 'default' => '', |
| 471 | 471 | ) |
| 472 | 472 | ); |
| 473 | 473 | |
| 474 | - do_action( 'lsx_hp_workout_settings_page', $cmb ); |
|
| 474 | + do_action('lsx_hp_workout_settings_page', $cmb); |
|
| 475 | 475 | |
| 476 | 476 | $cmb->add_field( |
| 477 | 477 | array( |