| @@ -1,10 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -namespace PXLBSAdminify\Inc\Admin\Options; | |
| 3 | +namespace WPAdminify\Inc\Admin\Options; | |
| 4 | 4 | |
| 5 | -use PXLBSAdminify\Inc\Utils; | |
| 6 | -use PXLBSAdminify\Inc\Admin\AdminSettingsModel; | |
| 5 | +use WPAdminify\Inc\Utils; | |
| 6 | +use WPAdminify\Inc\Admin\AdminSettingsModel; | |
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | if (!defined('ABSPATH')) { |
| 10 | 10 | die; |
| @@ -25,9 +25,12 @@ | ||
| 25 | 25 | { |
| 26 | 26 | return [ |
| 27 | 27 | 'performance' => [ |
| 28 | 28 | 'performance_enable' => true, |
| 29 | - 'performance_data' => [] | |
| 29 | + 'performance_data' => [ | |
| 30 | + 'version_strings', | |
| 31 | + 'emoji', | |
| 32 | + ] | |
| 30 | 33 | ], |
| 31 | 34 | 'disable_embeds' => false, // Gutenberg |
| 32 | 35 | // Gutenberg |
| 33 | 36 | 'disable_gutenberg' => [ |
| @@ -71,9 +74,9 @@ | ||
| 71 | 74 | [ |
| 72 | 75 | 'id' => 'disable_gutenberg_enable', |
| 73 | 76 | 'type' => 'switcher', |
| 74 | 77 | 'class' => 'adminify-pl-0 adminify-pt-0', |
| 75 | - 'title' => '', | |
| 78 | + 'title' => __('', 'adminify'), | |
| 76 | 79 | 'text_on' => __('Show', 'adminify'), |
| 77 | 80 | 'text_off' => __('Hide', 'adminify'), |
| 78 | 81 | 'text_width' => 80, |
| 79 | 82 | // 'default' => $this->get_default_field('disable_gutenberg')['disable_gutenberg_enable'], |
| @@ -80,9 +83,9 @@ | ||
| 80 | 83 | ], |
| 81 | 84 | [ |
| 82 | 85 | 'id' => 'disable_for', |
| 83 | 86 | 'type' => 'checkbox', |
| 84 | - 'title' => '', | |
| 87 | + 'title' => __('', 'adminify'), | |
| 85 | 88 | 'class' => 'adminify-one-col', |
| 86 | 89 | 'options' => $disable_gutenberg_for, |
| 87 | 90 | // 'default' => $this->get_default_field('disable_gutenberg')['disable_for'], |
| 88 | 91 | 'dependency' => ['disable_gutenberg_enable', '==', 'true', true], |
| @@ -120,9 +123,9 @@ | ||
| 120 | 123 | [ |
| 121 | 124 | 'id' => 'performance_enable', |
| 122 | 125 | 'type' => 'switcher', |
| 123 | 126 | 'class' => 'adminify-pl-0 adminify-pt-0', |
| 124 | - 'title' => '', | |
| 127 | + 'title' => __('', 'adminify'), | |
| 125 | 128 | 'text_on' => __('Show', 'adminify'), |
| 126 | 129 | 'text_off' => __('Hide', 'adminify'), |
| 127 | 130 | 'text_width' => 80 |
| 128 | 131 | ], |
| @@ -128,9 +131,9 @@ | ||
| 128 | 131 | ], |
| 129 | 132 | [ |
| 130 | 133 | 'id' => 'performance_data', |
| 131 | 134 | 'type' => 'checkbox', |
| 132 | - 'title' => '', | |
| 135 | + 'title' => __('', 'adminify'), | |
| 133 | 136 | 'class' => 'adminify-one-col', |
| 134 | 137 | 'options' => $performance_data, |
| 135 | 138 | 'dependency' => ['performance_enable', '==', 'true', true], |
| 136 | 139 | ] |
| @@ -158,25 +161,24 @@ | ||
| 158 | 161 | */ |
| 159 | 162 | public function disable_embeds(&$disable_embeds) |
| 160 | 163 | { |
| 161 | 164 | $disable_embeds[] = [ |
| 162 | - 'id' => 'performance_subheading', | |
| 165 | + 'id' => 'performance_subheading', | |
| 163 | 166 | 'type' => 'subheading', |
| 164 | - 'content' => Utils::help_urls( | |
| 165 | - '<span></span>', | |
| 166 | - 'https://wpadminify.com/docs/adminify/performance/disable-embeds', | |
| 167 | - 'https://www.youtube.com/watch?v=xALg4WWZ_bE', | |
| 167 | + 'content' => Utils::adminfiy_help_urls( | |
| 168 | + __('<span></span>', 'adminify'), | |
| 169 | + 'https://wpadminify.com/kb/performance/', | |
| 170 | + '', | |
| 168 | 171 | 'https://www.facebook.com/groups/jeweltheme', |
| 169 | - \PXLBSAdminify\Inc\Admin\AdminSettings::support_url() | |
| 172 | + \WPAdminify\Inc\Admin\AdminSettings::support_url() | |
| 170 | 173 | ), |
| 171 | - ]; | |
| 174 | + ]; | |
| 172 | 175 | |
| 173 | 176 | $disable_embeds[] = [ |
| 174 | 177 | 'id' => 'disable_embeds', |
| 175 | 178 | 'type' => 'switcher', |
| 176 | 179 | 'class' => 'adminify-pro-fieldset adminify-pro-notice', |
| 177 | - /* translators: %s: pro upgrade badge HTML */ | |
| 178 | - 'title' => sprintf(__('Disable Embeds %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 180 | + 'title' => sprintf(__('Disable Embeds %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 179 | 181 | 'subtitle' => __('Disable all Embeds from everywhere like - REST API, Head Tag, Tinymce Editor, Remote results etc.', 'adminify'), |
| 180 | 182 | 'text_on' => __('Yes', 'adminify'), |
| 181 | 183 | 'text_off' => __('No', 'adminify'), |
| 182 | 184 | 'text_width' => 80, |
| @@ -188,9 +190,9 @@ | ||
| 188 | 190 | $fields[] = [ |
| 189 | 191 | 'id' => 'enabled', |
| 190 | 192 | 'type' => 'switcher', |
| 191 | 193 | 'class' => 'adminify-pt-0 adminify-pl-0', |
| 192 | - 'title' => '', | |
| 194 | + 'title' => __('', 'adminify'), | |
| 193 | 195 | 'text_on' => __('Show', 'adminify'), |
| 194 | 196 | 'text_off' => __('Hide', 'adminify'), |
| 195 | 197 | 'text_width' => 80, |
| 196 | 198 | 'default' => $this->get_default_field('heartbeat_api')['enabled'], |
| @@ -198,9 +200,9 @@ | ||
| 198 | 200 | $fields[] = [ |
| 199 | 201 | 'id' => 'backend', |
| 200 | 202 | 'type' => 'radio', |
| 201 | 203 | 'inline' => true, |
| 202 | - 'class' => Utils::upgrade_pro_notice_class(), | |
| 204 | + 'class' => Utils::upgrade_pro_class(), | |
| 203 | 205 | 'title' => __('WordPress Dashboard', 'adminify'), |
| 204 | 206 | 'subtitle' => __('Backend Post Types', 'adminify'), |
| 205 | 207 | 'options' => [ |
| 206 | 208 | 'default' => __('Default', 'adminify'), |
| @@ -230,9 +232,9 @@ | ||
| 230 | 232 | |
| 231 | 233 | $fields[] = [ |
| 232 | 234 | 'id' => 'on_post_create', |
| 233 | 235 | 'type' => 'radio', |
| 234 | - 'class' => Utils::upgrade_pro_notice_class(), | |
| 236 | + 'class' => Utils::upgrade_pro_class(), | |
| 235 | 237 | 'inline' => true, |
| 236 | 238 | 'title' => __('Create Post Editor', 'adminify'), |
| 237 | 239 | 'subtitle' => __('On post creation and edit screens', 'adminify'), |
| 238 | 240 | 'options' => [ |
| @@ -264,9 +266,9 @@ | ||
| 264 | 266 | |
| 265 | 267 | $fields[] = [ |
| 266 | 268 | 'id' => 'on_frontend', |
| 267 | 269 | 'type' => 'radio', |
| 268 | - 'class' => Utils::upgrade_pro_notice_class(), | |
| 270 | + 'class' => Utils::upgrade_pro_class(), | |
| 269 | 271 | 'inline' => true, |
| 270 | 272 | 'title' => __('Frontend', 'adminify'), |
| 271 | 273 | 'subtitle' => __('Frontend Heartbits', 'adminify'), |
| 272 | 274 | 'options' => [ |
| @@ -308,10 +310,9 @@ | ||
| 308 | 310 | $fields[] = array( |
| 309 | 311 | 'id' => 'heartbeat_api', |
| 310 | 312 | 'type' => 'fieldset', |
| 311 | 313 | 'class' => 'adminify-nopadding', |
| 312 | - /* translators: %s: pro upgrade badge HTML */ | |
| 313 | - 'title' => sprintf(__('Control Heartbeat API %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 314 | + 'title' => sprintf(__('Control Heartbeat API %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 314 | 315 | 'class' => 'adminify-pro-fieldset', |
| 315 | 316 | 'subtitle' => __('Modify the interval of the WordPress Heartbeat API or disable it on admin pages, post creation/edit screens, and the frontend to reduce CPU load on the server', 'adminify'), |
| 316 | 317 | 'fields' => $heartbeat_settings |
| 317 | 318 | ); |
| @@ -327,9 +328,9 @@ | ||
| 327 | 328 | $revisions_settings[] = [ |
| 328 | 329 | 'id' => 'revisions_enable', |
| 329 | 330 | 'type' => 'switcher', |
| 330 | 331 | 'class' => 'adminify-p-0 adminify-pro-feature', |
| 331 | - 'title' => '', | |
| 332 | + 'title' => __('', 'adminify'), | |
| 332 | 333 | 'text_on' => __('Show', 'adminify'), |
| 333 | 334 | 'text_off' => __('Hide', 'adminify'), |
| 334 | 335 | 'text_width' => 80, |
| 335 | 336 | |
| @@ -350,9 +351,9 @@ | ||
| 350 | 351 | 'type' => 'checkbox', |
| 351 | 352 | 'title' => __('Apply for Post Types', 'adminify'), |
| 352 | 353 | 'class' => 'adminify-pro-feature adminify-pro-notice', |
| 353 | 354 | 'subtitle' => __('Disable all Embeds from everywhere like - REST API, Head Tag, Tinymce Editor, Remote results etc.', 'adminify'), |
| 354 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 355 | + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 355 | 356 | 'default' => $this->get_default_field('revisions')['post_types'], |
| 356 | 357 | 'dependency' => ['revisions_enable', '==', 'true', 'true'], |
| 357 | 358 | ]; |
| 358 | 359 | |
| @@ -367,10 +368,9 @@ | ||
| 367 | 368 | |
| 368 | 369 | $fields[] = array( |
| 369 | 370 | 'id' => 'revisions', |
| 370 | 371 | 'type' => 'fieldset', |
| 371 | - /* translators: %s: pro upgrade badge HTML */ | |
| 372 | - 'title' => sprintf(__('Control Revisions %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 372 | + 'title' => sprintf(__('Control Revisions %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 373 | 373 | 'subtitle' => __('Limit the number of revisions kept for post types supporting revisions to prevent database bloat.', 'adminify'), |
| 374 | 374 | 'fields' => $revisions_settings, |
| 375 | 375 | 'default' => $this->get_default_field('revisions'), |
| 376 | 376 | ); |
| @@ -385,15 +385,15 @@ | ||
| 385 | 385 | |
| 386 | 386 | $fields = []; |
| 387 | 387 | |
| 388 | 388 | $this->disable_embeds( $fields ); |
| 389 | - $this->control_heartbit_api( $fields ); | |
| 389 | + // $this->control_heartbit_api( $fields ); | |
| 390 | 390 | // $this->control_revisions( $fields ); |
| 391 | 391 | $this->performances( $fields ); |
| 392 | 392 | $this->gutenberg_settings($fields); |
| 393 | 393 | |
| 394 | 394 | |
| 395 | - $fields = apply_filters('pxlbsadminify_settings/performance', $fields, $this); | |
| 395 | + $fields = apply_filters('adminify_settings/performance', $fields, $this); | |
| 396 | 396 | |
| 397 | 397 | // Optimization Section |
| 398 | 398 | \ADMINIFY::createSection( |
| 399 | 399 | $this->prefix, |