| @@ -1,13 +1,13 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -namespace PXLBSAdminify\Inc\Admin\Options; | |
| 3 | +namespace WPAdminify\Inc\Admin\Options; | |
| 4 | 4 | |
| 5 | -use PXLBSAdminify\Inc\Classes\Helper; | |
| 6 | -use PXLBSAdminify\Inc\Utils; | |
| 7 | -use PXLBSAdminify\Inc\Admin\Options\Productivity\Duplicate_Post; | |
| 8 | -use PXLBSAdminify\Inc\Admin\Options\Productivity\PostTypesOrder; | |
| 9 | -use PXLBSAdminify\Inc\Admin\AdminSettingsModel; | |
| 5 | +use WPAdminify\Inc\Classes\Helper; | |
| 6 | +use WPAdminify\Inc\Utils; | |
| 7 | +use WPAdminify\Inc\Admin\Options\Productivity\Duplicate_Post; | |
| 8 | +use WPAdminify\Inc\Admin\Options\Productivity\PostTypesOrder; | |
| 9 | +use WPAdminify\Inc\Admin\AdminSettingsModel; | |
| 10 | 10 | |
| 11 | 11 | |
| 12 | 12 | if (!defined('ABSPATH')) { |
| 13 | 13 | die; |
| @@ -34,11 +34,9 @@ | ||
| 34 | 34 | ], |
| 35 | 35 | |
| 36 | 36 | 'media_attachments' => [ |
| 37 | 37 | 'enable_media' => false, |
| 38 | - 'media_ininite_scroll' => false, | |
| 39 | - 'media_replace' => false, | |
| 40 | - 'media_replace_backup_limit' => 1, | |
| 38 | + // 'media_ininite_scroll' => false, | |
| 41 | 39 | 'thumbnails_rss_feed' => false, |
| 42 | 40 | // 'allowed_upload_files' => [], |
| 43 | 41 | // 'convert_to_webp' => false, |
| 44 | 42 | // 'featured_to_post' => false, |
| @@ -90,14 +88,14 @@ | ||
| 90 | 88 | { |
| 91 | 89 | $fields[] = [ |
| 92 | 90 | 'id' => 'productivity_sub_heading', |
| 93 | 91 | 'type' => 'subheading', |
| 94 | - 'content' => Utils::help_urls( | |
| 92 | + 'content' => Utils::adminfiy_help_urls( | |
| 95 | 93 | '<span></span>', |
| 96 | 94 | 'https://wpadminify.com/docs/adminify/productivity/hide-admin-notices', |
| 97 | 95 | 'https://www.youtube.com/watch?v=49Cd3dYzYHs', |
| 98 | 96 | 'https://www.facebook.com/groups/jeweltheme', |
| 99 | - \PXLBSAdminify\Inc\Admin\AdminSettings::support_url() | |
| 97 | + \WPAdminify\Inc\Admin\AdminSettings::support_url() | |
| 100 | 98 | ), |
| 101 | 99 | ]; |
| 102 | 100 | |
| 103 | 101 | $fields[] = [ |
| @@ -102,10 +100,9 @@ | ||
| 102 | 100 | |
| 103 | 101 | $fields[] = [ |
| 104 | 102 | 'id' => 'hide_notices', |
| 105 | 103 | 'type' => 'switcher', |
| 106 | - /* translators: %s: PRO badge label */ | |
| 107 | - 'title' => sprintf(__('Hide "Admin Notices"? %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 104 | + 'title' => sprintf(__('Hide "Admin Notices"? %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 108 | 105 | 'subtitle' => __('Hide Admin Notices to make your Dashboard Clean. ', 'adminify'), |
| 109 | 106 | 'class' => 'adminify-pro-fieldset adminify-pro-notice', |
| 110 | 107 | 'text_on' => __('Yes', 'adminify'), |
| 111 | 108 | 'text_off' => __('No', 'adminify'), |
| @@ -114,10 +111,9 @@ | ||
| 114 | 111 | ]; |
| 115 | 112 | $fields[] = [ |
| 116 | 113 | 'id' => 'hide_notices_non_admin', |
| 117 | 114 | 'type' => 'checkbox', |
| 118 | - /* translators: %s: PRO upgrade notice markup */ | |
| 119 | - 'label' => sprintf(__('Also, Hide for Non-Admin Users? %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 115 | + 'label' => sprintf(__('Also, Hide for Non-Admin Users? %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 120 | 116 | 'title' => ' ', |
| 121 | 117 | 'default' => $this->get_default_field('hide_notices_non_admin'), |
| 122 | 118 | 'dependency' => ['hide_notices', '==', 'true', 'true'], |
| 123 | 119 | ]; |
| @@ -122,27 +118,20 @@ | ||
| 122 | 118 | 'dependency' => ['hide_notices', '==', 'true', 'true'], |
| 123 | 119 | ]; |
| 124 | 120 | |
| 125 | 121 | $other_notices_data = [ |
| 126 | - /* translators: %s: PRO upgrade notice markup */ | |
| 127 | - 'welcome_panel' => sprintf(__('Remove Welcome Panel %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 128 | - /* translators: %s: PRO upgrade notice markup */ | |
| 129 | - 'php_nag' => sprintf(__('Remove "PHP Update Required" Notice %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 130 | - /* translators: %s: PRO upgrade notice markup */ | |
| 131 | - 'core_update_notice' => sprintf(__('Hide Core Update Notice %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 132 | - /* translators: %s: PRO upgrade notice markup */ | |
| 133 | - 'plugin_update_notice' => sprintf(__('Hide Plugin Update Notice %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 134 | - /* translators: %s: PRO upgrade notice markup */ | |
| 135 | - 'theme_update_notice' => sprintf(__('Hide Theme Update Notice %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 136 | - /* translators: %s: PRO upgrade notice markup */ | |
| 137 | - 'site_health' => sprintf(__('Disable Site Health checks %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 122 | + 'welcome_panel' => sprintf(__('Remove Welcome Panel %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 123 | + 'php_nag' => sprintf(__('Remove "PHP Update Required" Notice %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 124 | + 'core_update_notice' => sprintf(__('Hide Core Update Notice %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 125 | + 'plugin_update_notice' => sprintf(__('Hide Plugin Update Notice %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 126 | + 'theme_update_notice' => sprintf(__('Hide Theme Update Notice %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 127 | + 'site_health' => sprintf(__('Disable Site Health checks %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 138 | 128 | ]; |
| 139 | 129 | |
| 140 | 130 | $fields[] = [ |
| 141 | 131 | 'id' => 'other_notices', |
| 142 | 132 | 'type' => 'checkbox', |
| 143 | - /* translators: %s: PRO badge label */ | |
| 144 | - 'title' => sprintf(__('Other Notices %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 133 | + 'title' => sprintf(__('Other Notices %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 145 | 134 | 'subtitle' => __('Show/Remove Dashboard Welcome Panel, Hide WordPress Themes,Plugins,Core Update Notices', 'adminify'), |
| 146 | 135 | 'options' => $other_notices_data, |
| 147 | 136 | 'default' => $this->get_default_field('other_notices'), |
| 148 | 137 | 'dependency' => ['hide_notices', '==', 'true', 'true'], |
| @@ -155,18 +144,15 @@ | ||
| 155 | 144 | */ |
| 156 | 145 | public function screen_options(&$fields) |
| 157 | 146 | { |
| 158 | 147 | $screen_options_settings = [ |
| 159 | - /* translators: %s: PRO upgrade notice markup */ | |
| 160 | - 'hide_screen_options' => sprintf(__('Hide Screen Options %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 161 | - /* translators: %s: PRO upgrade notice markup */ | |
| 162 | - 'hide_help_tab' => sprintf(__('Hide Help Tab %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 148 | + 'hide_screen_options' => sprintf(__('Hide Screen Options %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 149 | + 'hide_help_tab' => sprintf(__('Hide Help Tab %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 163 | 150 | ]; |
| 164 | 151 | |
| 165 | 152 | $fields[] = [ |
| 166 | 153 | 'id' => 'screen_help_tab', |
| 167 | - /* translators: %s: PRO badge label */ | |
| 168 | - 'title' => sprintf(__('Screen Options and Help Tab %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 154 | + 'title' => sprintf(__('Screen Options and Help Tab %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 169 | 155 | 'subtitle' => __('Screen Options and Help Tab', 'adminify'), |
| 170 | 156 | 'type' => 'fieldset', |
| 171 | 157 | 'fields' => [ |
| 172 | 158 | [ |
| @@ -171,9 +157,9 @@ | ||
| 171 | 157 | 'fields' => [ |
| 172 | 158 | [ |
| 173 | 159 | 'id' => 'enable_for_screen', |
| 174 | 160 | 'type' => 'switcher', |
| 175 | - 'title' => '', | |
| 161 | + 'title' => __('', 'adminify'), | |
| 176 | 162 | 'class' => 'adminify-pl-0 adminify-pt-0 adminify-pro-feature', |
| 177 | 163 | 'text_on' => __('Show', 'adminify'), |
| 178 | 164 | 'text_off' => __('Hide', 'adminify'), |
| 179 | 165 | 'text_width' => 80, |
| @@ -182,9 +168,9 @@ | ||
| 182 | 168 | [ |
| 183 | 169 | 'id' => 'screen_help_data', |
| 184 | 170 | 'type' => 'checkbox', |
| 185 | 171 | 'class' => 'adminify-one-col', |
| 186 | - 'title' => '', | |
| 172 | + 'title' => __('', 'adminify'), | |
| 187 | 173 | 'options' => $screen_options_settings, |
| 188 | 174 | 'default' => $this->get_default_field('screen_help_tab')['screen_help_data'], |
| 189 | 175 | 'dependency' => ['enable_for_screen', '==', 'true', 'true'] |
| 190 | 176 | ] |
| @@ -207,9 +193,9 @@ | ||
| 207 | 193 | 'fields' => [ |
| 208 | 194 | [ |
| 209 | 195 | 'id' => 'enable_folders', |
| 210 | 196 | 'type' => 'switcher', |
| 211 | - 'title' => '', | |
| 197 | + 'title' => __('', 'adminify'), | |
| 212 | 198 | 'class' => 'adminify-pl-0', |
| 213 | 199 | 'text_on' => __('Show', 'adminify'), |
| 214 | 200 | 'text_off' => __('Hide', 'adminify'), |
| 215 | 201 | 'text_width' => 80, |
| @@ -219,9 +205,9 @@ | ||
| 219 | 205 | 'id' => 'enable_for', |
| 220 | 206 | 'type' => 'checkbox', |
| 221 | 207 | 'title' => __('Enable for', 'adminify'), |
| 222 | 208 | 'subtitle' => __('Select Post Types for enabling Folders', 'adminify'), |
| 223 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 209 | + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 224 | 210 | 'default' => $this->get_default_field('folders')['enable_for'], |
| 225 | 211 | 'dependency' => ['enable_folders', '==', 'true', 'true'] |
| 226 | 212 | ], |
| 227 | 213 | [ |
| @@ -241,10 +227,9 @@ | ||
| 241 | 227 | |
| 242 | 228 | $fields[] = [ |
| 243 | 229 | 'id' => 'admin_pages', |
| 244 | 230 | 'type' => 'switcher', |
| 245 | - /* translators: %s: PRO badge label */ | |
| 246 | - 'title' => sprintf(__('Admin Pages %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 231 | + 'title' => sprintf(__('Admin Pages %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 247 | 232 | 'class' => 'adminify-pro-notice adminify-pro-fieldset', |
| 248 | 233 | 'text_on' => __('Yes', 'adminify'), |
| 249 | 234 | 'text_off' => __('No', 'adminify'), |
| 250 | 235 | 'text_width' => 80, |
| @@ -263,9 +248,9 @@ | ||
| 263 | 248 | $post_types_order_fieldset= []; |
| 264 | 249 | |
| 265 | 250 | $post_types_order_fieldset[] = [ |
| 266 | 251 | 'id' => 'enable_pto', |
| 267 | - 'title' => '', | |
| 252 | + 'title' => __('', 'adminify'), | |
| 268 | 253 | 'class' => 'adminify-pl-0', |
| 269 | 254 | 'type' => 'switcher', |
| 270 | 255 | 'text_on' => __('Show', 'adminify'), |
| 271 | 256 | 'text_off' => __('Hide', 'adminify'), |
| @@ -277,9 +262,9 @@ | ||
| 277 | 262 | 'id' => 'pto_posts', |
| 278 | 263 | 'type' => 'checkbox', |
| 279 | 264 | 'title' => __( 'Sortable Post Types', 'adminify' ), |
| 280 | 265 | 'subtitle' => __( 'Select Post Types for sorting', 'adminify' ), |
| 281 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 266 | + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 282 | 267 | 'default' => $this->get_default_field('post_types_order')['pto_posts'], |
| 283 | 268 | 'dependency' => ['enable_pto', '==', 'true', 'true'], |
| 284 | 269 | ]; |
| 285 | 270 | |
| @@ -297,12 +282,11 @@ | ||
| 297 | 282 | |
| 298 | 283 | $post_types_order_fieldset[] = [ |
| 299 | 284 | 'id' => 'pto_taxonomies', |
| 300 | 285 | 'type' => 'checkbox', |
| 301 | - /* translators: %s: PRO badge label */ | |
| 302 | - 'title' => sprintf(__('Sortable Taxonomies %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 286 | + 'title' => sprintf(__('Sortable Taxonomies %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 303 | 287 | 'subtitle' => __('Select for Sortable Taxonomies', 'adminify'), |
| 304 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_taxonomies', | |
| 288 | + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_taxonomies', | |
| 305 | 289 | 'query_args' => [ |
| 306 | 290 | 'orderby' => 'post_title', |
| 307 | 291 | 'order' => 'ASC', |
| 308 | 292 | ], |
| @@ -350,12 +334,12 @@ | ||
| 350 | 334 | if($post_type->name === 'post' || $post_type->name === 'page' ){ |
| 351 | 335 | $post_type_names[$post_type->name] = $post_type->label; |
| 352 | 336 | } else { |
| 353 | 337 | $is_pro = false; |
| 354 | - if(class_exists('\\PXLBSAdminify\\Pro\\Adminify_Pro')){ | |
| 355 | - $is_pro = \PXLBSAdminify\Pro\Adminify_Pro::is_premium(); | |
| 338 | + if(class_exists('\\WPAdminify\\Pro\\Adminify_Pro')){ | |
| 339 | + $is_pro = \WPAdminify\Pro\Adminify_Pro::is_premium(); | |
| 356 | 340 | } |
| 357 | - $pro_notice = empty($is_pro) ? Utils::upgrade_pro_class() : ''; | |
| 341 | + $pro_notice = empty($is_pro) ? Utils::adminify_upgrade_pro_class() : ''; | |
| 358 | 342 | $post_type_names[$post_type->name] = $post_type->label . $pro_notice; |
| 359 | 343 | } |
| 360 | 344 | } |
| 361 | 345 | return $post_type_names; |
| @@ -374,12 +358,12 @@ | ||
| 374 | 358 | continue; |
| 375 | 359 | } |
| 376 | 360 | |
| 377 | 361 | $is_pro = false; |
| 378 | - if (class_exists('\\PXLBSAdminify\\Pro\\Adminify_Pro')) { | |
| 379 | - $is_pro = \PXLBSAdminify\Pro\Adminify_Pro::is_premium(); | |
| 362 | + if (class_exists('\\WPAdminify\\Pro\\Adminify_Pro')) { | |
| 363 | + $is_pro = \WPAdminify\Pro\Adminify_Pro::is_premium(); | |
| 380 | 364 | } |
| 381 | - $pro_notice = empty($is_pro) ? Utils::upgrade_pro_class() : ''; | |
| 365 | + $pro_notice = empty($is_pro) ? Utils::adminify_upgrade_pro_class() : ''; | |
| 382 | 366 | $taxonomy_names[ $taxonomy->name ] = $taxonomy->label . $pro_notice; |
| 383 | 367 | |
| 384 | 368 | } |
| 385 | 369 | return $taxonomy_names; |
| @@ -412,9 +396,9 @@ | ||
| 412 | 396 | 'fields' => [ |
| 413 | 397 | [ |
| 414 | 398 | 'id' => 'enable_post_duplicator', |
| 415 | 399 | 'type' => 'switcher', |
| 416 | - 'title' => '', | |
| 400 | + 'title' => __('', 'adminify'), | |
| 417 | 401 | 'class' => 'adminify-pl-0', |
| 418 | 402 | 'text_on' => __('Show', 'adminify'), |
| 419 | 403 | 'text_off' => __('Hide', 'adminify'), |
| 420 | 404 | 'text_width' => 80, |
| @@ -424,9 +408,9 @@ | ||
| 424 | 408 | 'id' => 'post_types', |
| 425 | 409 | 'type' => 'checkbox', |
| 426 | 410 | 'title' => __('Enable for Post Types', 'adminify'), |
| 427 | 411 | 'subtitle' => __('Select Post Types for Enabling Duplicate feature', 'adminify'), |
| 428 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 412 | + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 429 | 413 | 'default' => $this->get_default_field('post_duplicator')['post_types'], |
| 430 | 414 | 'dependency' => ['enable_post_duplicator', '==', 'true', 'true'], |
| 431 | 415 | ], |
| 432 | 416 | [ |
| @@ -431,12 +415,11 @@ | ||
| 431 | 415 | ], |
| 432 | 416 | [ |
| 433 | 417 | 'id' => 'taxonomies', |
| 434 | 418 | 'type' => 'checkbox', |
| 435 | - /* translators: %s: PRO badge label */ | |
| 436 | - 'title' => sprintf(__('Enable for Taxonomies %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 419 | + 'title' => sprintf(__('Enable for Taxonomies %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 437 | 420 | 'subtitle' => __('Enable for Taxonomies', 'adminify'), |
| 438 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_taxonomies', | |
| 421 | + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_taxonomies', | |
| 439 | 422 | 'query_args' => [ |
| 440 | 423 | 'orderby' => 'post_title', |
| 441 | 424 | 'order' => 'ASC', |
| 442 | 425 | ], |
| @@ -465,9 +448,9 @@ | ||
| 465 | 448 | [ |
| 466 | 449 | 'id' => 'enable', |
| 467 | 450 | 'type' => 'switcher', |
| 468 | 451 | 'class' => 'adminify-pl-0', |
| 469 | - 'title' => '', | |
| 452 | + 'title' => __('', 'adminify'), | |
| 470 | 453 | 'text_on' => __('Show', 'adminify'), |
| 471 | 454 | 'text_off' => __('Hide', 'adminify'), |
| 472 | 455 | 'text_width' => 80, |
| 473 | 456 | 'default' => $this->get_default_field('custom_admin_columns')['enable'], |
| @@ -475,17 +458,14 @@ | ||
| 475 | 458 | [ |
| 476 | 459 | 'id' => 'columns_data', |
| 477 | 460 | 'type' => 'checkbox', |
| 478 | 461 | 'class' => 'adminify-one-col', |
| 479 | - 'title' => '', | |
| 462 | + 'title' => __('', 'adminify'), | |
| 480 | 463 | 'options' => [ |
| 481 | - /* translators: %s: PRO upgrade notice markup */ | |
| 482 | - 'post_thumb_column' => sprintf(__('Show Post Thumbnails Column? %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 483 | - /* translators: %s: PRO upgrade notice markup */ | |
| 484 | - 'post_page_id_column' => sprintf(__('Show Post/Page ID Column. Display "ID" column for post and page table lists. %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 464 | + 'post_thumb_column' => sprintf(__('Show Post Thumbnails Column? %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 465 | + 'post_page_id_column' => sprintf(__('Show Post/Page ID Column. Display "ID" column for post and page table lists. %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 485 | 466 | 'comment_id_column' => __('Show "Comment ID" Column for Comment, Also show "Parent ID"', 'adminify'), |
| 486 | - /* translators: %s: PRO upgrade notice markup */ | |
| 487 | - 'last_login_column' => sprintf(__('Show "Last Login" Column for Users %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 467 | + 'last_login_column' => sprintf(__('Show "Last Login" Column for Users %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 488 | 468 | 'taxonomy_id_column' => __('Show "Taxonomy ID" Column for all possible types of taxonomies', 'adminify'), |
| 489 | 469 | 'posts_slug_column' => __('Show "URL Path" Column for Post Types', 'adminify'), |
| 490 | 470 | ], |
| 491 | 471 | 'default' => $this->get_default_field('custom_admin_columns')['columns_data'], |
| @@ -507,9 +487,9 @@ | ||
| 507 | 487 | 'id' => 'slug_column_post_types', |
| 508 | 488 | 'type' => 'checkbox', |
| 509 | 489 | 'title' => __('"URL Path" Column for Post Types', 'adminify'), |
| 510 | 490 | 'subtitle' => __('Select Post Types for Enabling "URL Path" Column Slug', 'adminify'), |
| 511 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 491 | + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 512 | 492 | 'default' => $this->get_default_field('custom_admin_columns')['slug_column_post_types'], |
| 513 | 493 | 'dependency' => array('columns_data', 'any', 'posts_slug_column', 'true'), |
| 514 | 494 | ], |
| 515 | 495 | ] |
| @@ -544,9 +524,9 @@ | ||
| 544 | 524 | ], |
| 545 | 525 | [ |
| 546 | 526 | 'id' => 'disable_gutenberg_editor', |
| 547 | 527 | 'type' => 'switcher', |
| 548 | - 'label' => sprintf('<h4>%s</h4>', __('Disable Gutenberg Editor for Widgets', 'adminify')), | |
| 528 | + 'label' => sprintf(__('<h4>%s</h4>', 'adminify'), __('Disable Gutenberg Editor for Widgets', 'adminify')), | |
| 549 | 529 | 'class' => 'adminify-pl-0 adminify-col-fit', |
| 550 | 530 | 'text_on' => __('Yes', 'adminify'), |
| 551 | 531 | 'text_off' => __('No', 'adminify'), |
| 552 | 532 | 'text_width' => 80, |
| @@ -556,10 +536,10 @@ | ||
| 556 | 536 | [ |
| 557 | 537 | 'id' => 'sidebar_widgets_list', |
| 558 | 538 | 'type' => 'checkbox', |
| 559 | 539 | 'class' => 'adminify-one-col', |
| 560 | - 'title' => '', | |
| 561 | - 'options' => '\PXLBSAdminify\Inc\Classes\Sidebar_Widgets::render_sidebar_checkboxes', | |
| 540 | + 'title' => __('', 'adminify'), | |
| 541 | + 'options' => '\WPAdminify\Inc\Classes\Sidebar_Widgets::render_sidebar_checkboxes', | |
| 562 | 542 | 'default' => $this->get_default_field('remove_widgets')['sidebar_widgets_list'], |
| 563 | 543 | 'dependency' => ['remove_widgets_type|disable_gutenberg_editor', '==|==', 'sidebar|true', true], |
| 564 | 544 | ], |
| 565 | 545 | [ |
| @@ -565,10 +545,10 @@ | ||
| 565 | 545 | [ |
| 566 | 546 | 'id' => 'dashboard_widgets_list', |
| 567 | 547 | 'type' => 'checkbox', |
| 568 | 548 | 'class' => "adminify-one-col", |
| 569 | - 'title' => '', | |
| 570 | - 'options' => '\PXLBSAdminify\Inc\Classes\Remove_DashboardWidgets::render_dashboard_checkboxes', | |
| 549 | + 'title' => __('', 'adminify'), | |
| 550 | + 'options' => '\WPAdminify\Inc\Classes\Remove_DashboardWidgets::render_dashboard_checkboxes', | |
| 571 | 551 | 'default' => $this->get_default_field('remove_widgets')['dashboard_widgets_list'], |
| 572 | 552 | 'dependency' => ['remove_widgets_type', '==', 'dashboard', true], |
| 573 | 553 | ], |
| 574 | 554 | ] |
| @@ -584,16 +564,12 @@ | ||
| 584 | 564 | public function productivity_attachment_fields(&$attachment_fields) |
| 585 | 565 | { |
| 586 | 566 | |
| 587 | 567 | $allowed_upload_files_type = [ |
| 588 | - /* translators: %s: PRO upgrade notice markup */ | |
| 589 | - 'svg' => sprintf(__('SVG Files %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 590 | - /* translators: %s: PRO upgrade notice markup */ | |
| 591 | - 'avif' => sprintf(__('AVIF Files %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 592 | - /* translators: %s: PRO upgrade notice markup */ | |
| 593 | - 'ico' => sprintf(__('ICO Files %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 594 | - /* translators: %s: PRO upgrade notice markup */ | |
| 595 | - 'webp' => sprintf(__('WEBP Files %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 568 | + 'svg' => sprintf(__('SVG Files %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 569 | + 'avif' => sprintf(__('AVIF Files %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 570 | + 'ico' => sprintf(__('ICO Files %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 571 | + 'webp' => sprintf(__('WEBP Files %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 596 | 572 | ]; |
| 597 | 573 | |
| 598 | 574 | $attachment_fields_data = [ |
| 599 | 575 | [ |
| @@ -598,9 +574,9 @@ | ||
| 598 | 574 | $attachment_fields_data = [ |
| 599 | 575 | [ |
| 600 | 576 | 'id' => 'enable_media', |
| 601 | 577 | 'type' => 'switcher', |
| 602 | - 'title' => '', | |
| 578 | + 'title' => __('', 'adminify'), | |
| 603 | 579 | 'class' => 'adminify-pl-0', |
| 604 | 580 | 'text_on' => __('Show', 'adminify'), |
| 605 | 581 | 'text_off' => __('Hide', 'adminify'), |
| 606 | 582 | 'text_width' => 80, |
| @@ -605,49 +581,21 @@ | ||
| 605 | 581 | 'text_off' => __('Hide', 'adminify'), |
| 606 | 582 | 'text_width' => 80, |
| 607 | 583 | 'default' => $this->get_default_field('media_attachments')['enable_media'], |
| 608 | 584 | ], |
| 585 | + // [ | |
| 586 | + // 'id' => 'media_ininite_scroll', | |
| 587 | + // 'type' => 'switcher', | |
| 588 | + // 'title' => sprintf(__('Infinite Scroll for Media Library? %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 589 | + // 'class' => 'adminify-pl-0 adminify-pt-0 adminify-pro-fieldset adminify-pro-notice', | |
| 590 | + // 'text_on' => __('Yes', 'adminify'), | |
| 591 | + // 'text_off' => __('No', 'adminify'), | |
| 592 | + // 'text_width' => 80, | |
| 593 | + // 'subtitle' => __('Re-enable infinite scrolling in the media library\'s grid view to ease navigation through a large collection.', 'adminify'), | |
| 594 | + // 'default' => $this->get_default_field('media_attachments')['media_ininite_scroll'], | |
| 595 | + // 'dependency' => ['enable_media', '==', 'true', true], | |
| 596 | + // ], | |
| 609 | 597 | [ |
| 610 | - 'id' => 'media_ininite_scroll', | |
| 611 | - 'type' => 'switcher', | |
| 612 | - /* translators: %s: PRO badge label */ | |
| 613 | - 'title' => sprintf(__('Infinite Scroll for Media Library? %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 614 | - 'class' => 'adminify-pl-0 adminify-pt-0 adminify-pro-fieldset adminify-pro-notice', | |
| 615 | - 'text_on' => __('Yes', 'adminify'), | |
| 616 | - 'text_off' => __('No', 'adminify'), | |
| 617 | - 'text_width' => 80, | |
| 618 | - 'subtitle' => __('Re-enable infinite scrolling in the media library\'s grid view to ease navigation through a large collection.', 'adminify'), | |
| 619 | - 'default' => $this->get_default_field('media_attachments')['media_ininite_scroll'], | |
| 620 | - 'dependency' => ['enable_media', '==', 'true', true], | |
| 621 | - ], | |
| 622 | - [ | |
| 623 | - 'id' => 'media_replace', | |
| 624 | - 'type' => 'switcher', | |
| 625 | - /* translators: %s: PRO badge label */ | |
| 626 | - 'title' => sprintf(__('Media Replace %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 627 | - 'class' => 'adminify-pl-0 adminify-pt-0 adminify-pro-fieldset adminify-pro-notice', | |
| 628 | - 'text_on' => __('Yes', 'adminify'), | |
| 629 | - 'text_off' => __('No', 'adminify'), | |
| 630 | - 'text_width' => 80, | |
| 631 | - 'subtitle' => __('Swap any media file with new one. URL & metadata stay same. All existing links keep working.', 'adminify'), | |
| 632 | - 'default' => $this->get_default_field('media_attachments')['media_replace'], | |
| 633 | - 'dependency' => ['enable_media', '==', 'true', true], | |
| 634 | - ], | |
| 635 | - [ | |
| 636 | - 'id' => 'media_replace_backup_limit', | |
| 637 | - 'type' => 'number', | |
| 638 | - /* translators: %s: PRO badge label */ | |
| 639 | - 'title' => sprintf(__('Backup Restore Limit %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 640 | - 'class' => 'adminify-pl-0 adminify-pro-feature adminify-pro-notice', | |
| 641 | - 'subtitle' => __('Set how many backups to store per file. (Default: 1)', 'adminify'), | |
| 642 | - 'min' => 1, | |
| 643 | - 'default' => $this->get_default_field('media_attachments')['media_replace_backup_limit'], | |
| 644 | - 'dependency' => [ | |
| 645 | - ['enable_media', '==', 'true', true], | |
| 646 | - ['media_replace', '==', 'true', true], | |
| 647 | - ], | |
| 648 | - ], | |
| 649 | - [ | |
| 650 | 598 | 'id' => 'thumbnails_rss_feed', |
| 651 | 599 | 'type' => 'switcher', |
| 652 | 600 | 'title' => __('Post Thumbnails on RSS', 'adminify'), |
| 653 | 601 | 'class' => 'adminify-pl-0', |
| @@ -661,9 +609,9 @@ | ||
| 661 | 609 | // [ |
| 662 | 610 | // 'id' => 'allowed_upload_files', |
| 663 | 611 | // 'type' => 'checkbox', |
| 664 | 612 | // 'class' => 'adminify-pl-0', |
| 665 | - // 'title' => sprintf(__('Allowed Files Uploads %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 613 | + // 'title' => sprintf(__('Allowed Files Uploads %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 666 | 614 | // 'subtitle' => __('Allow SVG/JPEG/WEBP/ICO/AVIF Files Upload', 'adminify'), |
| 667 | 615 | // 'options' => $allowed_upload_files_type, |
| 668 | 616 | // 'default' => $this->get_default_field('media_attachments')['allowed_upload_files'], |
| 669 | 617 | // 'dependency' => ['enable_media', '==', 'true', true], |
| @@ -675,9 +623,9 @@ | ||
| 675 | 623 | // 'text_on' => __('Yes', 'adminify'), |
| 676 | 624 | // 'text_off' => __('No', 'adminify'), |
| 677 | 625 | // 'text_width' => 80, |
| 678 | 626 | // 'class' => 'adminify-pl-0', |
| 679 | - // 'title' => sprintf(__('Convert to WEBP %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 627 | + // 'title' => sprintf(__('Convert to WEBP %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 680 | 628 | // 'subtitle' => __('Convert Uploaded image to WEBP', 'adminify'), |
| 681 | 629 | // 'default' => $this->get_default_field('media_attachments')['convert_to_webp'], |
| 682 | 630 | // 'dependency' => ['enable_media', '==', 'true', true], |
| 683 | 631 | // ], |
| @@ -688,9 +636,9 @@ | ||
| 688 | 636 | // 'text_on' => __('Yes', 'adminify'), |
| 689 | 637 | // 'text_off' => __('No', 'adminify'), |
| 690 | 638 | // 'text_width' => 80, |
| 691 | 639 | // 'class' => 'adminify-pl-0', |
| 692 | - // 'title' => sprintf(__('Link Featured Images to Post %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 640 | + // 'title' => sprintf(__('Link Featured Images to Post %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 693 | 641 | // 'subtitle' => __('Wrap featured images in your theme in links to posts.', 'adminify'), |
| 694 | 642 | // 'default' => $this->get_default_field('media_attachments')['featured_to_post'], |
| 695 | 643 | // 'dependency' => ['enable_media', '==', 'true', true], |
| 696 | 644 | // ], |
| @@ -696,9 +644,9 @@ | ||
| 696 | 644 | // ], |
| 697 | 645 | // [ |
| 698 | 646 | // 'id' => 'media_lowercase', |
| 699 | 647 | // 'type' => 'switcher', |
| 700 | - // 'title' => sprintf(__('Lowercase Filenames for Uploads %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 648 | + // 'title' => sprintf(__('Lowercase Filenames for Uploads %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 701 | 649 | // 'subtitle' => __('Make all the filenames of new uploads to lowercase', 'adminify'), |
| 702 | 650 | // 'class' => 'adminify-pl-0', |
| 703 | 651 | // 'text_on' => __('Yes', 'adminify'), |
| 704 | 652 | // 'text_off' => __('No', 'adminify'), |
| @@ -708,24 +656,8 @@ | ||
| 708 | 656 | // 'dependency' => ['enable_media', '==', 'true', true], |
| 709 | 657 | // ], |
| 710 | 658 | ]; |
| 711 | 659 | |
| 712 | - // Infinite scroll became the Media Library default in WordPress 7.1, with a | |
| 713 | - // per-user opt-out under Profile > Personal Options. Offering the switch | |
| 714 | - // there would be worse than redundant: turning it on forces the | |
| 715 | - // `media_library_infinite_scrolling` filter, which core documents as | |
| 716 | - // taking precedence over that preference. | |
| 717 | - if ( ! Utils::is_wp_below_7_1() ) { | |
| 718 | - $attachment_fields_data = array_values( | |
| 719 | - array_filter( | |
| 720 | - $attachment_fields_data, | |
| 721 | - static function ( $field ) { | |
| 722 | - return ! isset( $field['id'] ) || 'media_ininite_scroll' !== $field['id']; | |
| 723 | - } | |
| 724 | - ) | |
| 725 | - ); | |
| 726 | - } | |
| 727 | - | |
| 728 | 660 | $attachment_fields[] = array( |
| 729 | 661 | 'id' => 'media_attachments', |
| 730 | 662 | 'type' => 'fieldset', |
| 731 | 663 | 'title' => __('Media Settings', 'adminify'), |
| @@ -769,9 +701,9 @@ | ||
| 769 | 701 | $this->productivity_attachment_fields($fields); |
| 770 | 702 | |
| 771 | 703 | $this->gutenberg_settings($fields); |
| 772 | 704 | |
| 773 | - $fields = apply_filters('pxlbsadminify_settings/productivity', $fields, $this); | |
| 705 | + $fields = apply_filters('adminify_settings/productivity', $fields, $this); | |
| 774 | 706 | |
| 775 | 707 | // Productivity Section |
| 776 | 708 | \ADMINIFY::createSection( |
| 777 | 709 | $this->prefix, |