@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * Constructor |
| 26 | 26 | */ |
| 27 | 27 | public function __construct() { |
| 28 | - add_action( 'lsx_hp_settings_page_workout_top', array( $this, 'settings' ), 1, 1 ); |
|
| 28 | + add_action('lsx_hp_settings_page_workout_top', array($this, 'settings'), 1, 1); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | /** |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public static function get_instance() { |
| 39 | 39 | // If the single instance hasn't been set, set it now. |
| 40 | - if ( null === self::$instance ) { |
|
| 40 | + if (null === self::$instance) { |
|
| 41 | 41 | self::$instance = new self(); |
| 42 | 42 | } |
| 43 | 43 | return self::$instance; |
@@ -49,34 +49,34 @@ discard block |
||
| 49 | 49 | * @param object $cmb new_cmb2_box(). |
| 50 | 50 | * @return void |
| 51 | 51 | */ |
| 52 | - public function settings( $cmb ) { |
|
| 52 | + public function settings($cmb) { |
|
| 53 | 53 | $cmb->add_field( |
| 54 | 54 | array( |
| 55 | - 'name' => __( 'Disable Workouts', 'lsx-health-plan' ), |
|
| 55 | + 'name' => __('Disable Workouts', 'lsx-health-plan'), |
|
| 56 | 56 | 'id' => 'workout_disabled', |
| 57 | 57 | 'type' => 'checkbox', |
| 58 | 58 | 'value' => 1, |
| 59 | 59 | 'default' => 0, |
| 60 | - 'description' => __( 'Disable workout post type if you are wanting a minimal site.', 'lsx-health-plan' ), |
|
| 60 | + 'description' => __('Disable workout post type if you are wanting a minimal site.', 'lsx-health-plan'), |
|
| 61 | 61 | ) |
| 62 | 62 | ); |
| 63 | 63 | $cmb->add_field( |
| 64 | 64 | array( |
| 65 | - 'name' => __( 'Your Warm-up Intro', 'lsx-health-plan' ), |
|
| 65 | + 'name' => __('Your Warm-up Intro', 'lsx-health-plan'), |
|
| 66 | 66 | 'id' => 'warmup_intro', |
| 67 | 67 | 'type' => 'textarea_small', |
| 68 | 68 | 'value' => '', |
| 69 | - 'default' => __( "Don't forget your warm-up! It's a vital part of your daily workout routine.", 'lsx-health-plan' ), |
|
| 69 | + 'default' => __("Don't forget your warm-up! It's a vital part of your daily workout routine.", 'lsx-health-plan'), |
|
| 70 | 70 | ) |
| 71 | 71 | ); |
| 72 | - if ( post_type_exists( 'workout' ) ) { |
|
| 72 | + if (post_type_exists('workout')) { |
|
| 73 | 73 | $cmb->add_field( |
| 74 | 74 | array( |
| 75 | - 'name' => __( 'Your Workout Intro', 'lsx-health-plan' ), |
|
| 75 | + 'name' => __('Your Workout Intro', 'lsx-health-plan'), |
|
| 76 | 76 | 'id' => 'workout_intro', |
| 77 | 77 | 'type' => 'textarea_small', |
| 78 | 78 | 'value' => '', |
| 79 | - 'default' => __( "Let's do this! Smash your daily workout and reach your fitness goals.", 'lsx-health-plan' ), |
|
| 79 | + 'default' => __("Let's do this! Smash your daily workout and reach your fitness goals.", 'lsx-health-plan'), |
|
| 80 | 80 | ) |
| 81 | 81 | ); |
| 82 | 82 | } |
@@ -85,12 +85,12 @@ discard block |
||
| 85 | 85 | 'before_row' => '<h4><b><u>Layout Options</u></b></h4>', |
| 86 | 86 | 'id' => 'workout_tab_layout', |
| 87 | 87 | 'type' => 'select', |
| 88 | - 'name' => __( 'Workout Tab Layout', 'lsx-health-plan' ), |
|
| 89 | - 'description' => __( 'Choose the layout for the workouts.', 'lsx-health-plan' ), |
|
| 88 | + 'name' => __('Workout Tab Layout', 'lsx-health-plan'), |
|
| 89 | + 'description' => __('Choose the layout for the workouts.', 'lsx-health-plan'), |
|
| 90 | 90 | 'options' => array( |
| 91 | - 'table' => __( 'Table', 'lsx-health-plan' ), |
|
| 92 | - 'list' => __( 'List', 'lsx-health-plan' ), |
|
| 93 | - 'grid' => __( 'Grid', 'lsx-health-plan' ), |
|
| 91 | + 'table' => __('Table', 'lsx-health-plan'), |
|
| 92 | + 'list' => __('List', 'lsx-health-plan'), |
|
| 93 | + 'grid' => __('Grid', 'lsx-health-plan'), |
|
| 94 | 94 | ), |
| 95 | 95 | ) |
| 96 | 96 | ); |
@@ -98,12 +98,12 @@ discard block |
||
| 98 | 98 | array( |
| 99 | 99 | 'id' => 'workout_tab_link', |
| 100 | 100 | 'type' => 'select', |
| 101 | - 'name' => __( 'Workout Tab Link', 'lsx-health-plan' ), |
|
| 102 | - 'description' => __( 'Choose to show the excerpt, full content or nothing.', 'lsx-health-plan' ), |
|
| 101 | + 'name' => __('Workout Tab Link', 'lsx-health-plan'), |
|
| 102 | + 'description' => __('Choose to show the excerpt, full content or nothing.', 'lsx-health-plan'), |
|
| 103 | 103 | 'options' => array( |
| 104 | - 'none' => __( 'None', 'lsx-health-plan' ), |
|
| 105 | - 'single' => __( 'Single', 'lsx-health-plan' ), |
|
| 106 | - 'modal' => __( 'Modal', 'lsx-health-plan' ), |
|
| 104 | + 'none' => __('None', 'lsx-health-plan'), |
|
| 105 | + 'single' => __('Single', 'lsx-health-plan'), |
|
| 106 | + 'modal' => __('Modal', 'lsx-health-plan'), |
|
| 107 | 107 | ), |
| 108 | 108 | 'default' => '', |
| 109 | 109 | ) |
@@ -112,12 +112,12 @@ discard block |
||
| 112 | 112 | array( |
| 113 | 113 | 'id' => 'workout_tab_modal_content', |
| 114 | 114 | 'type' => 'select', |
| 115 | - 'name' => __( 'Modal Content', 'lsx-health-plan' ), |
|
| 116 | - 'description' => __( 'Choose to show the excerpt, full content or nothing. For the modal content only', 'lsx-health-plan' ), |
|
| 115 | + 'name' => __('Modal Content', 'lsx-health-plan'), |
|
| 116 | + 'description' => __('Choose to show the excerpt, full content or nothing. For the modal content only', 'lsx-health-plan'), |
|
| 117 | 117 | 'options' => array( |
| 118 | - '' => __( 'None', 'lsx-health-plan' ), |
|
| 119 | - 'excerpt' => __( 'Excerpt', 'lsx-health-plan' ), |
|
| 120 | - 'full' => __( 'Full Content', 'lsx-health-plan' ), |
|
| 118 | + '' => __('None', 'lsx-health-plan'), |
|
| 119 | + 'excerpt' => __('Excerpt', 'lsx-health-plan'), |
|
| 120 | + 'full' => __('Full Content', 'lsx-health-plan'), |
|
| 121 | 121 | ), |
| 122 | 122 | 'default' => '', |
| 123 | 123 | ) |
@@ -126,14 +126,14 @@ discard block |
||
| 126 | 126 | array( |
| 127 | 127 | 'id' => 'workout_tab_columns', |
| 128 | 128 | 'type' => 'select', |
| 129 | - 'name' => __( 'Grid Columns', 'lsx-health-plan' ), |
|
| 130 | - 'description' => __( 'If you are displaying a grid, set the amount of columns you want to use.', 'lsx-health-plan' ), |
|
| 129 | + 'name' => __('Grid Columns', 'lsx-health-plan'), |
|
| 130 | + 'description' => __('If you are displaying a grid, set the amount of columns you want to use.', 'lsx-health-plan'), |
|
| 131 | 131 | 'options' => array( |
| 132 | - '12' => __( '1', 'lsx-health-plan' ), |
|
| 133 | - '6' => __( '2', 'lsx-health-plan' ), |
|
| 134 | - '4' => __( '3', 'lsx-health-plan' ), |
|
| 135 | - '3' => __( '4', 'lsx-health-plan' ), |
|
| 136 | - '2' => __( '6', 'lsx-health-plan' ), |
|
| 132 | + '12' => __('1', 'lsx-health-plan'), |
|
| 133 | + '6' => __('2', 'lsx-health-plan'), |
|
| 134 | + '4' => __('3', 'lsx-health-plan'), |
|
| 135 | + '3' => __('4', 'lsx-health-plan'), |
|
| 136 | + '2' => __('6', 'lsx-health-plan'), |
|
| 137 | 137 | ), |
| 138 | 138 | 'default' => '4', |
| 139 | 139 | ) |
@@ -142,12 +142,12 @@ discard block |
||
| 142 | 142 | array( |
| 143 | 143 | 'id' => 'workout_tab_content', |
| 144 | 144 | 'type' => 'select', |
| 145 | - 'name' => __( 'Grid Content', 'lsx-health-plan' ), |
|
| 146 | - 'description' => __( 'Choose to show the excerpt, full content or nothing. For the grid layout only', 'lsx-health-plan' ), |
|
| 145 | + 'name' => __('Grid Content', 'lsx-health-plan'), |
|
| 146 | + 'description' => __('Choose to show the excerpt, full content or nothing. For the grid layout only', 'lsx-health-plan'), |
|
| 147 | 147 | 'options' => array( |
| 148 | - '' => __( 'None', 'lsx-health-plan' ), |
|
| 149 | - 'excerpt' => __( 'Excerpt', 'lsx-health-plan' ), |
|
| 150 | - 'full' => __( 'Full Content', 'lsx-health-plan' ), |
|
| 148 | + '' => __('None', 'lsx-health-plan'), |
|
| 149 | + 'excerpt' => __('Excerpt', 'lsx-health-plan'), |
|
| 150 | + 'full' => __('Full Content', 'lsx-health-plan'), |
|
| 151 | 151 | ), |
| 152 | 152 | 'default' => '', |
| 153 | 153 | ) |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $cmb->add_field( |
| 157 | 157 | array( |
| 158 | 158 | 'before_row' => '<h4><b><u>URL Slug Options</u></b></h4><p style="font-style: italic;">If you need to translate the custom slug for this custom post type, do so below.</p>', |
| 159 | - 'name' => __( 'Single Workout Slug', 'lsx-health-plan' ), |
|
| 159 | + 'name' => __('Single Workout Slug', 'lsx-health-plan'), |
|
| 160 | 160 | 'id' => 'endpoint_workout', |
| 161 | 161 | 'type' => 'input', |
| 162 | 162 | 'value' => '', |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | ); |
| 166 | 166 | $cmb->add_field( |
| 167 | 167 | array( |
| 168 | - 'name' => __( 'Workouts Archive Slug', 'lsx-health-plan' ), |
|
| 168 | + 'name' => __('Workouts Archive Slug', 'lsx-health-plan'), |
|
| 169 | 169 | 'id' => 'endpoint_workout_archive', |
| 170 | 170 | 'type' => 'input', |
| 171 | 171 | 'value' => '', |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | ); |
| 175 | 175 | $cmb->add_field( |
| 176 | 176 | array( |
| 177 | - 'name' => __( 'Warm Up Slug', 'lsx-health-plan' ), |
|
| 177 | + 'name' => __('Warm Up Slug', 'lsx-health-plan'), |
|
| 178 | 178 | 'id' => 'endpoint_warm_up', |
| 179 | 179 | 'type' => 'input', |
| 180 | 180 | 'value' => '', |
@@ -186,68 +186,68 @@ discard block |
||
| 186 | 186 | $cmb->add_field( |
| 187 | 187 | array( |
| 188 | 188 | 'before_row' => '<h4><b><u>Default Options</u></b></h4>', |
| 189 | - 'name' => __( 'Warm Up', 'lsx-health-plan' ), |
|
| 190 | - 'description' => __( 'Set a default warm up routine.', 'lsx-health-plan' ), |
|
| 189 | + 'name' => __('Warm Up', 'lsx-health-plan'), |
|
| 190 | + 'description' => __('Set a default warm up routine.', 'lsx-health-plan'), |
|
| 191 | 191 | 'limit' => 1, |
| 192 | 192 | 'id' => 'plan_warmup', |
| 193 | 193 | 'type' => 'post_search_ajax', |
| 194 | 194 | 'query_args' => array( |
| 195 | 195 | 'post_type' => 'post', |
| 196 | - 'post_status' => array( 'publish' ), |
|
| 196 | + 'post_status' => array('publish'), |
|
| 197 | 197 | 'posts_per_page' => -1, |
| 198 | 198 | ), |
| 199 | 199 | ) |
| 200 | 200 | ); |
| 201 | 201 | $cmb->add_field( |
| 202 | 202 | array( |
| 203 | - 'name' => __( 'Workout', 'lsx-health-plan' ), |
|
| 204 | - 'description' => __( 'Set a default workout routine.', 'lsx-health-plan' ), |
|
| 203 | + 'name' => __('Workout', 'lsx-health-plan'), |
|
| 204 | + 'description' => __('Set a default workout routine.', 'lsx-health-plan'), |
|
| 205 | 205 | 'limit' => 1, |
| 206 | 206 | 'id' => 'connected_workouts', |
| 207 | 207 | 'type' => 'post_search_ajax', |
| 208 | 208 | 'query_args' => array( |
| 209 | 209 | 'post_type' => 'workout', |
| 210 | - 'post_status' => array( 'publish' ), |
|
| 210 | + 'post_status' => array('publish'), |
|
| 211 | 211 | 'posts_per_page' => -1, |
| 212 | 212 | ), |
| 213 | 213 | ) |
| 214 | 214 | ); |
| 215 | - if ( function_exists( 'download_monitor' ) ) { |
|
| 215 | + if (function_exists('download_monitor')) { |
|
| 216 | 216 | $page_url = 'https://wordpress.org/plugins/download-monitor/'; |
| 217 | 217 | $plugin_name = 'Download Monitor'; |
| 218 | 218 | $description = sprintf( |
| 219 | 219 | /* translators: %s: The subscription info */ |
| 220 | - __( 'If you are using <a target="_blank" href="%1$s">%2$s</a> you can set a default download file for your meal here.', 'lsx-search' ), |
|
| 220 | + __('If you are using <a target="_blank" href="%1$s">%2$s</a> you can set a default download file for your meal here.', 'lsx-search'), |
|
| 221 | 221 | $page_url, |
| 222 | 222 | $plugin_name |
| 223 | 223 | ); |
| 224 | 224 | $cmb->add_field( |
| 225 | 225 | array( |
| 226 | - 'name' => __( 'Default Warm Up PDF', 'lsx-health-plan' ), |
|
| 226 | + 'name' => __('Default Warm Up PDF', 'lsx-health-plan'), |
|
| 227 | 227 | 'description' => $description, |
| 228 | 228 | 'id' => 'download_page', |
| 229 | 229 | 'type' => 'post_search_ajax', |
| 230 | 230 | 'limit' => 1, |
| 231 | 231 | 'query_args' => array( |
| 232 | - 'post_type' => array( 'dlm_download' ), |
|
| 233 | - 'post_status' => array( 'publish' ), |
|
| 232 | + 'post_type' => array('dlm_download'), |
|
| 233 | + 'post_status' => array('publish'), |
|
| 234 | 234 | 'posts_per_page' => -1, |
| 235 | 235 | ), |
| 236 | 236 | ) |
| 237 | 237 | ); |
| 238 | 238 | $cmb->add_field( |
| 239 | 239 | array( |
| 240 | - 'name' => __( 'Default Workout PDF', 'lsx-health-plan' ), |
|
| 240 | + 'name' => __('Default Workout PDF', 'lsx-health-plan'), |
|
| 241 | 241 | 'description' => $description, |
| 242 | 242 | 'id' => 'download_workout', |
| 243 | 243 | 'type' => 'post_search_ajax', |
| 244 | 244 | 'limit' => 1, |
| 245 | 245 | 'query_args' => array( |
| 246 | - 'post_type' => array( 'dlm_download' ), |
|
| 247 | - 'post_status' => array( 'publish' ), |
|
| 246 | + 'post_type' => array('dlm_download'), |
|
| 247 | + 'post_status' => array('publish'), |
|
| 248 | 248 | 'posts_per_page' => -1, |
| 249 | 249 | ), |
| 250 | - 'after_row' => __( '<p style="font-style: italic;">If you have changed any URL slugs, please remember re-save your permalinks in Settings > Permalinks.</p>', 'lsx-health-plan' ), |
|
| 250 | + 'after_row' => __('<p style="font-style: italic;">If you have changed any URL slugs, please remember re-save your permalinks in Settings > Permalinks.</p>', 'lsx-health-plan'), |
|
| 251 | 251 | ) |
| 252 | 252 | ); |
| 253 | 253 | } |