| @@ -1,13 +1,12 @@ | ||
| 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\Utils; | |
| 6 | +use WPAdminify\Inc\Admin\Options\Productivity\Duplicate_Post; | |
| 7 | +use WPAdminify\Inc\Admin\Options\Productivity\PostTypesOrder; | |
| 8 | +use WPAdminify\Inc\Admin\AdminSettingsModel; | |
| 10 | 9 | |
| 11 | 10 | |
| 12 | 11 | if (!defined('ABSPATH')) { |
| 13 | 12 | die; |
| @@ -34,11 +33,9 @@ | ||
| 34 | 33 | ], |
| 35 | 34 | |
| 36 | 35 | 'media_attachments' => [ |
| 37 | 36 | 'enable_media' => false, |
| 38 | - 'media_ininite_scroll' => false, | |
| 39 | - 'media_replace' => false, | |
| 40 | - 'media_replace_backup_limit' => 1, | |
| 37 | + // 'media_ininite_scroll' => false, | |
| 41 | 38 | 'thumbnails_rss_feed' => false, |
| 42 | 39 | // 'allowed_upload_files' => [], |
| 43 | 40 | // 'convert_to_webp' => false, |
| 44 | 41 | // 'featured_to_post' => false, |
| @@ -49,9 +46,8 @@ | ||
| 49 | 46 | 'enable_for' => [ 'post', 'page' ], |
| 50 | 47 | 'media' => false, |
| 51 | 48 | ], |
| 52 | 49 | 'admin_pages' => false, |
| 53 | - 'dashboard_widgets' => false, | |
| 54 | 50 | 'post_types_order' => [ |
| 55 | 51 | 'enable_pto' => false, |
| 56 | 52 | 'pto_taxonomies' => [], |
| 57 | 53 | 'pto_posts' => [ 'page' ], |
| @@ -66,10 +62,9 @@ | ||
| 66 | 62 | // Post Columns |
| 67 | 63 | 'custom_admin_columns' => [ |
| 68 | 64 | 'enable' => false, |
| 69 | 65 | 'post_page_column_thumb_image' => [], |
| 70 | - 'columns_data' => [], | |
| 71 | - 'slug_column_post_types' => [], | |
| 66 | + 'columns_data' => [] | |
| 72 | 67 | ], |
| 73 | 68 | |
| 74 | 69 | // Sidebar Widgets |
| 75 | 70 | 'remove_widgets' => [ |
| @@ -90,14 +85,14 @@ | ||
| 90 | 85 | { |
| 91 | 86 | $fields[] = [ |
| 92 | 87 | 'id' => 'productivity_sub_heading', |
| 93 | 88 | 'type' => 'subheading', |
| 94 | - 'content' => Utils::help_urls( | |
| 95 | - '<span></span>', | |
| 96 | - 'https://wpadminify.com/docs/adminify/productivity/hide-admin-notices', | |
| 97 | - 'https://www.youtube.com/watch?v=49Cd3dYzYHs', | |
| 89 | + 'content' => Utils::adminfiy_help_urls( | |
| 90 | + __('<span></span>', 'adminify'), | |
| 91 | + 'https://wpadminify.com/kb/productivity/', | |
| 92 | + '', | |
| 98 | 93 | 'https://www.facebook.com/groups/jeweltheme', |
| 99 | - \PXLBSAdminify\Inc\Admin\AdminSettings::support_url() | |
| 94 | + 'https://wpadminify.com/support/' | |
| 100 | 95 | ), |
| 101 | 96 | ]; |
| 102 | 97 | |
| 103 | 98 | $fields[] = [ |
| @@ -102,10 +97,9 @@ | ||
| 102 | 97 | |
| 103 | 98 | $fields[] = [ |
| 104 | 99 | 'id' => 'hide_notices', |
| 105 | 100 | 'type' => 'switcher', |
| 106 | - /* translators: %s: PRO badge label */ | |
| 107 | - 'title' => sprintf(__('Hide "Admin Notices"? %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 101 | + 'title' => sprintf(__('Hide "Admin Notices"? %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 108 | 102 | 'subtitle' => __('Hide Admin Notices to make your Dashboard Clean. ', 'adminify'), |
| 109 | 103 | 'class' => 'adminify-pro-fieldset adminify-pro-notice', |
| 110 | 104 | 'text_on' => __('Yes', 'adminify'), |
| 111 | 105 | 'text_off' => __('No', 'adminify'), |
| @@ -114,10 +108,9 @@ | ||
| 114 | 108 | ]; |
| 115 | 109 | $fields[] = [ |
| 116 | 110 | 'id' => 'hide_notices_non_admin', |
| 117 | 111 | 'type' => 'checkbox', |
| 118 | - /* translators: %s: PRO upgrade notice markup */ | |
| 119 | - 'label' => sprintf(__('Also, Hide for Non-Admin Users? %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 112 | + 'label' => sprintf(__('Also, Hide for Non-Admin Users? %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 120 | 113 | 'title' => ' ', |
| 121 | 114 | 'default' => $this->get_default_field('hide_notices_non_admin'), |
| 122 | 115 | 'dependency' => ['hide_notices', '==', 'true', 'true'], |
| 123 | 116 | ]; |
| @@ -122,27 +115,20 @@ | ||
| 122 | 115 | 'dependency' => ['hide_notices', '==', 'true', 'true'], |
| 123 | 116 | ]; |
| 124 | 117 | |
| 125 | 118 | $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()), | |
| 119 | + 'welcome_panel' => sprintf(__('Remove Welcome Panel %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 120 | + 'php_nag' => sprintf(__('Remove "PHP Update Required" Notice %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 121 | + 'core_update_notice' => sprintf(__('Hide Core Update Notice %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 122 | + 'plugin_update_notice' => sprintf(__('Hide Plugin Update Notice %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 123 | + 'theme_update_notice' => sprintf(__('Hide Theme Update Notice %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 124 | + 'site_health' => sprintf(__('Disable Site Health checks %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 138 | 125 | ]; |
| 139 | 126 | |
| 140 | 127 | $fields[] = [ |
| 141 | 128 | 'id' => 'other_notices', |
| 142 | 129 | 'type' => 'checkbox', |
| 143 | - /* translators: %s: PRO badge label */ | |
| 144 | - 'title' => sprintf(__('Other Notices %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 130 | + 'title' => sprintf(__('Other Notices %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 145 | 131 | 'subtitle' => __('Show/Remove Dashboard Welcome Panel, Hide WordPress Themes,Plugins,Core Update Notices', 'adminify'), |
| 146 | 132 | 'options' => $other_notices_data, |
| 147 | 133 | 'default' => $this->get_default_field('other_notices'), |
| 148 | 134 | 'dependency' => ['hide_notices', '==', 'true', 'true'], |
| @@ -155,18 +141,15 @@ | ||
| 155 | 141 | */ |
| 156 | 142 | public function screen_options(&$fields) |
| 157 | 143 | { |
| 158 | 144 | $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()), | |
| 145 | + 'hide_screen_options' => sprintf(__('Hide Screen Options %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 146 | + 'hide_help_tab' => sprintf(__('Hide Help Tab %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 163 | 147 | ]; |
| 164 | 148 | |
| 165 | 149 | $fields[] = [ |
| 166 | 150 | 'id' => 'screen_help_tab', |
| 167 | - /* translators: %s: PRO badge label */ | |
| 168 | - 'title' => sprintf(__('Screen Options and Help Tab %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 151 | + 'title' => sprintf(__('Screen Options and Help Tab %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 169 | 152 | 'subtitle' => __('Screen Options and Help Tab', 'adminify'), |
| 170 | 153 | 'type' => 'fieldset', |
| 171 | 154 | 'fields' => [ |
| 172 | 155 | [ |
| @@ -171,9 +154,9 @@ | ||
| 171 | 154 | 'fields' => [ |
| 172 | 155 | [ |
| 173 | 156 | 'id' => 'enable_for_screen', |
| 174 | 157 | 'type' => 'switcher', |
| 175 | - 'title' => '', | |
| 158 | + 'title' => __('', 'adminify'), | |
| 176 | 159 | 'class' => 'adminify-pl-0 adminify-pt-0 adminify-pro-feature', |
| 177 | 160 | 'text_on' => __('Show', 'adminify'), |
| 178 | 161 | 'text_off' => __('Hide', 'adminify'), |
| 179 | 162 | 'text_width' => 80, |
| @@ -182,9 +165,9 @@ | ||
| 182 | 165 | [ |
| 183 | 166 | 'id' => 'screen_help_data', |
| 184 | 167 | 'type' => 'checkbox', |
| 185 | 168 | 'class' => 'adminify-one-col', |
| 186 | - 'title' => '', | |
| 169 | + 'title' => __('', 'adminify'), | |
| 187 | 170 | 'options' => $screen_options_settings, |
| 188 | 171 | 'default' => $this->get_default_field('screen_help_tab')['screen_help_data'], |
| 189 | 172 | 'dependency' => ['enable_for_screen', '==', 'true', 'true'] |
| 190 | 173 | ] |
| @@ -207,9 +190,9 @@ | ||
| 207 | 190 | 'fields' => [ |
| 208 | 191 | [ |
| 209 | 192 | 'id' => 'enable_folders', |
| 210 | 193 | 'type' => 'switcher', |
| 211 | - 'title' => '', | |
| 194 | + 'title' => __('', 'adminify'), | |
| 212 | 195 | 'class' => 'adminify-pl-0', |
| 213 | 196 | 'text_on' => __('Show', 'adminify'), |
| 214 | 197 | 'text_off' => __('Hide', 'adminify'), |
| 215 | 198 | 'text_width' => 80, |
| @@ -219,9 +202,9 @@ | ||
| 219 | 202 | 'id' => 'enable_for', |
| 220 | 203 | 'type' => 'checkbox', |
| 221 | 204 | 'title' => __('Enable for', 'adminify'), |
| 222 | 205 | 'subtitle' => __('Select Post Types for enabling Folders', 'adminify'), |
| 223 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 206 | + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 224 | 207 | 'default' => $this->get_default_field('folders')['enable_for'], |
| 225 | 208 | 'dependency' => ['enable_folders', '==', 'true', 'true'] |
| 226 | 209 | ], |
| 227 | 210 | [ |
| @@ -241,10 +224,9 @@ | ||
| 241 | 224 | |
| 242 | 225 | $fields[] = [ |
| 243 | 226 | 'id' => 'admin_pages', |
| 244 | 227 | 'type' => 'switcher', |
| 245 | - /* translators: %s: PRO badge label */ | |
| 246 | - 'title' => sprintf(__('Admin Pages %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 228 | + 'title' => sprintf(__('Admin Pages %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 247 | 229 | 'class' => 'adminify-pro-notice adminify-pro-fieldset', |
| 248 | 230 | 'text_on' => __('Yes', 'adminify'), |
| 249 | 231 | 'text_off' => __('No', 'adminify'), |
| 250 | 232 | 'text_width' => 80, |
| @@ -260,12 +242,11 @@ | ||
| 260 | 242 | */ |
| 261 | 243 | public function post_types_order_options( &$fields ) { |
| 262 | 244 | |
| 263 | 245 | $post_types_order_fieldset= []; |
| 264 | - | |
| 265 | 246 | $post_types_order_fieldset[] = [ |
| 266 | 247 | 'id' => 'enable_pto', |
| 267 | - 'title' => '', | |
| 248 | + 'title' => __('', 'adminify'), | |
| 268 | 249 | 'class' => 'adminify-pl-0', |
| 269 | 250 | 'type' => 'switcher', |
| 270 | 251 | 'text_on' => __('Show', 'adminify'), |
| 271 | 252 | 'text_off' => __('Hide', 'adminify'), |
| @@ -277,9 +258,9 @@ | ||
| 277 | 258 | 'id' => 'pto_posts', |
| 278 | 259 | 'type' => 'checkbox', |
| 279 | 260 | 'title' => __( 'Sortable Post Types', 'adminify' ), |
| 280 | 261 | 'subtitle' => __( 'Select Post Types for sorting', 'adminify' ), |
| 281 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 262 | + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 282 | 263 | 'default' => $this->get_default_field('post_types_order')['pto_posts'], |
| 283 | 264 | 'dependency' => ['enable_pto', '==', 'true', 'true'], |
| 284 | 265 | ]; |
| 285 | 266 | |
| @@ -297,12 +278,11 @@ | ||
| 297 | 278 | |
| 298 | 279 | $post_types_order_fieldset[] = [ |
| 299 | 280 | 'id' => 'pto_taxonomies', |
| 300 | 281 | 'type' => 'checkbox', |
| 301 | - /* translators: %s: PRO badge label */ | |
| 302 | - 'title' => sprintf(__('Sortable Taxonomies %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 282 | + 'title' => sprintf(__('Sortable Taxonomies %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 303 | 283 | 'subtitle' => __('Select for Sortable Taxonomies', 'adminify'), |
| 304 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_taxonomies', | |
| 284 | + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_taxonomies', | |
| 305 | 285 | 'query_args' => [ |
| 306 | 286 | 'orderby' => 'post_title', |
| 307 | 287 | 'order' => 'ASC', |
| 308 | 288 | ], |
| @@ -310,21 +290,9 @@ | ||
| 310 | 290 | 'dependency' => ['enable_pto', '==', 'true', 'true'], |
| 311 | 291 | ]; |
| 312 | 292 | |
| 313 | 293 | |
| 314 | - // Dashboard Widgets Added | |
| 315 | 294 | $fields[] = [ |
| 316 | - 'id' => 'dashboard_widgets', | |
| 317 | - 'type' => 'switcher', | |
| 318 | - 'title' => __('Dashboard & Welcome Widget', 'adminify'), | |
| 319 | - 'subtitle' => __('Create Custom Dashboard & Sidebar Widgets', 'adminify'), | |
| 320 | - 'text_on' => __('Yes', 'adminify'), | |
| 321 | - 'text_off' => __('No', 'adminify'), | |
| 322 | - 'text_width' => 80, | |
| 323 | - 'default' => $this->get_default_field('dashboard_widgets'), | |
| 324 | - ]; | |
| 325 | - | |
| 326 | - $fields[] = [ | |
| 327 | 295 | 'id' => 'post_types_order', |
| 328 | 296 | 'title' => __('Post Types Order', 'adminify'), |
| 329 | 297 | 'subtitle' => __('Enable/Disable Post Types Orders to increase your productivity.', 'adminify'), |
| 330 | 298 | 'type' => 'fieldset', |
| @@ -350,12 +318,12 @@ | ||
| 350 | 318 | if($post_type->name === 'post' || $post_type->name === 'page' ){ |
| 351 | 319 | $post_type_names[$post_type->name] = $post_type->label; |
| 352 | 320 | } else { |
| 353 | 321 | $is_pro = false; |
| 354 | - if(class_exists('\\PXLBSAdminify\\Pro\\Adminify_Pro')){ | |
| 355 | - $is_pro = \PXLBSAdminify\Pro\Adminify_Pro::is_premium(); | |
| 322 | + if(class_exists('\\WPAdminify\\Pro\\Adminify_Pro')){ | |
| 323 | + $is_pro = \WPAdminify\Pro\Adminify_Pro::is_premium(); | |
| 356 | 324 | } |
| 357 | - $pro_notice = empty($is_pro) ? Utils::upgrade_pro_class() : ''; | |
| 325 | + $pro_notice = empty($is_pro) ? Utils::adminify_upgrade_pro_class() : ''; | |
| 358 | 326 | $post_type_names[$post_type->name] = $post_type->label . $pro_notice; |
| 359 | 327 | } |
| 360 | 328 | } |
| 361 | 329 | return $post_type_names; |
| @@ -374,12 +342,12 @@ | ||
| 374 | 342 | continue; |
| 375 | 343 | } |
| 376 | 344 | |
| 377 | 345 | $is_pro = false; |
| 378 | - if (class_exists('\\PXLBSAdminify\\Pro\\Adminify_Pro')) { | |
| 379 | - $is_pro = \PXLBSAdminify\Pro\Adminify_Pro::is_premium(); | |
| 346 | + if (class_exists('\\WPAdminify\\Pro\\Adminify_Pro')) { | |
| 347 | + $is_pro = \WPAdminify\Pro\Adminify_Pro::is_premium(); | |
| 380 | 348 | } |
| 381 | - $pro_notice = empty($is_pro) ? Utils::upgrade_pro_class() : ''; | |
| 349 | + $pro_notice = empty($is_pro) ? Utils::adminify_upgrade_pro_class() : ''; | |
| 382 | 350 | $taxonomy_names[ $taxonomy->name ] = $taxonomy->label . $pro_notice; |
| 383 | 351 | |
| 384 | 352 | } |
| 385 | 353 | return $taxonomy_names; |
| @@ -412,9 +380,9 @@ | ||
| 412 | 380 | 'fields' => [ |
| 413 | 381 | [ |
| 414 | 382 | 'id' => 'enable_post_duplicator', |
| 415 | 383 | 'type' => 'switcher', |
| 416 | - 'title' => '', | |
| 384 | + 'title' => __('', 'adminify'), | |
| 417 | 385 | 'class' => 'adminify-pl-0', |
| 418 | 386 | 'text_on' => __('Show', 'adminify'), |
| 419 | 387 | 'text_off' => __('Hide', 'adminify'), |
| 420 | 388 | 'text_width' => 80, |
| @@ -424,9 +392,9 @@ | ||
| 424 | 392 | 'id' => 'post_types', |
| 425 | 393 | 'type' => 'checkbox', |
| 426 | 394 | 'title' => __('Enable for Post Types', 'adminify'), |
| 427 | 395 | 'subtitle' => __('Select Post Types for Enabling Duplicate feature', 'adminify'), |
| 428 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 396 | + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 429 | 397 | 'default' => $this->get_default_field('post_duplicator')['post_types'], |
| 430 | 398 | 'dependency' => ['enable_post_duplicator', '==', 'true', 'true'], |
| 431 | 399 | ], |
| 432 | 400 | [ |
| @@ -431,12 +399,11 @@ | ||
| 431 | 399 | ], |
| 432 | 400 | [ |
| 433 | 401 | 'id' => 'taxonomies', |
| 434 | 402 | 'type' => 'checkbox', |
| 435 | - /* translators: %s: PRO badge label */ | |
| 436 | - 'title' => sprintf(__('Enable for Taxonomies %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 403 | + 'title' => sprintf(__('Enable for Taxonomies %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 437 | 404 | 'subtitle' => __('Enable for Taxonomies', 'adminify'), |
| 438 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_taxonomies', | |
| 405 | + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_taxonomies', | |
| 439 | 406 | 'query_args' => [ |
| 440 | 407 | 'orderby' => 'post_title', |
| 441 | 408 | 'order' => 'ASC', |
| 442 | 409 | ], |
| @@ -465,9 +432,9 @@ | ||
| 465 | 432 | [ |
| 466 | 433 | 'id' => 'enable', |
| 467 | 434 | 'type' => 'switcher', |
| 468 | 435 | 'class' => 'adminify-pl-0', |
| 469 | - 'title' => '', | |
| 436 | + 'title' => __('', 'adminify'), | |
| 470 | 437 | 'text_on' => __('Show', 'adminify'), |
| 471 | 438 | 'text_off' => __('Hide', 'adminify'), |
| 472 | 439 | 'text_width' => 80, |
| 473 | 440 | 'default' => $this->get_default_field('custom_admin_columns')['enable'], |
| @@ -475,19 +442,15 @@ | ||
| 475 | 442 | [ |
| 476 | 443 | 'id' => 'columns_data', |
| 477 | 444 | 'type' => 'checkbox', |
| 478 | 445 | 'class' => 'adminify-one-col', |
| 479 | - 'title' => '', | |
| 446 | + 'title' => __('', 'adminify'), | |
| 480 | 447 | '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()), | |
| 448 | + 'post_thumb_column' => sprintf(__('Show Post Thumbnails Column? %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 449 | + '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 | 450 | '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()), | |
| 451 | + 'last_login_column' => sprintf(__('Show "Last Login" Column for Users %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 488 | 452 | 'taxonomy_id_column' => __('Show "Taxonomy ID" Column for all possible types of taxonomies', 'adminify'), |
| 489 | - 'posts_slug_column' => __('Show "URL Path" Column for Post Types', 'adminify'), | |
| 490 | 453 | ], |
| 491 | 454 | 'default' => $this->get_default_field('custom_admin_columns')['columns_data'], |
| 492 | 455 | 'dependency' => ['enable', '==', 'true', true], |
| 493 | 456 | ], |
| @@ -501,18 +464,9 @@ | ||
| 501 | 464 | 'button_title' => __('Add Thumbnail Image', 'adminify'), |
| 502 | 465 | 'remove_title' => __('Remove Thumbnail Image', 'adminify'), |
| 503 | 466 | 'default' => $this->get_default_field('custom_admin_columns')['post_page_column_thumb_image'], |
| 504 | 467 | 'dependency' => array('columns_data', 'any', 'post_thumb_column', 'true'), |
| 505 | - ], | |
| 506 | - [ | |
| 507 | - 'id' => 'slug_column_post_types', | |
| 508 | - 'type' => 'checkbox', | |
| 509 | - 'title' => __('"URL Path" Column for Post Types', 'adminify'), | |
| 510 | - 'subtitle' => __('Select Post Types for Enabling "URL Path" Column Slug', 'adminify'), | |
| 511 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 512 | - 'default' => $this->get_default_field('custom_admin_columns')['slug_column_post_types'], | |
| 513 | - 'dependency' => array('columns_data', 'any', 'posts_slug_column', 'true'), | |
| 514 | - ], | |
| 468 | + ] | |
| 515 | 469 | ] |
| 516 | 470 | ]; |
| 517 | 471 | } |
| 518 | 472 | |
| @@ -544,9 +498,9 @@ | ||
| 544 | 498 | ], |
| 545 | 499 | [ |
| 546 | 500 | 'id' => 'disable_gutenberg_editor', |
| 547 | 501 | 'type' => 'switcher', |
| 548 | - 'label' => sprintf('<h4>%s</h4>', __('Disable Gutenberg Editor for Widgets', 'adminify')), | |
| 502 | + 'label' => sprintf(__('<h4>%s</h4>', 'adminify'), __('Disable Gutenberg Editor for Widgets', 'adminify')), | |
| 549 | 503 | 'class' => 'adminify-pl-0 adminify-col-fit', |
| 550 | 504 | 'text_on' => __('Yes', 'adminify'), |
| 551 | 505 | 'text_off' => __('No', 'adminify'), |
| 552 | 506 | 'text_width' => 80, |
| @@ -556,10 +510,10 @@ | ||
| 556 | 510 | [ |
| 557 | 511 | 'id' => 'sidebar_widgets_list', |
| 558 | 512 | 'type' => 'checkbox', |
| 559 | 513 | 'class' => 'adminify-one-col', |
| 560 | - 'title' => '', | |
| 561 | - 'options' => '\PXLBSAdminify\Inc\Classes\Sidebar_Widgets::render_sidebar_checkboxes', | |
| 514 | + 'title' => __('', 'adminify'), | |
| 515 | + 'options' => '\WPAdminify\Inc\Classes\Sidebar_Widgets::render_sidebar_checkboxes', | |
| 562 | 516 | 'default' => $this->get_default_field('remove_widgets')['sidebar_widgets_list'], |
| 563 | 517 | 'dependency' => ['remove_widgets_type|disable_gutenberg_editor', '==|==', 'sidebar|true', true], |
| 564 | 518 | ], |
| 565 | 519 | [ |
| @@ -565,10 +519,10 @@ | ||
| 565 | 519 | [ |
| 566 | 520 | 'id' => 'dashboard_widgets_list', |
| 567 | 521 | 'type' => 'checkbox', |
| 568 | 522 | 'class' => "adminify-one-col", |
| 569 | - 'title' => '', | |
| 570 | - 'options' => '\PXLBSAdminify\Inc\Classes\Remove_DashboardWidgets::render_dashboard_checkboxes', | |
| 523 | + 'title' => __('', 'adminify'), | |
| 524 | + 'options' => '\WPAdminify\Inc\Classes\DashboardWidgets::render_dashboard_checkboxes', | |
| 571 | 525 | 'default' => $this->get_default_field('remove_widgets')['dashboard_widgets_list'], |
| 572 | 526 | 'dependency' => ['remove_widgets_type', '==', 'dashboard', true], |
| 573 | 527 | ], |
| 574 | 528 | ] |
| @@ -584,16 +538,12 @@ | ||
| 584 | 538 | public function productivity_attachment_fields(&$attachment_fields) |
| 585 | 539 | { |
| 586 | 540 | |
| 587 | 541 | $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()), | |
| 542 | + 'svg' => sprintf(__('SVG Files %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 543 | + 'avif' => sprintf(__('AVIF Files %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 544 | + 'ico' => sprintf(__('ICO Files %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 545 | + 'webp' => sprintf(__('WEBP Files %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 596 | 546 | ]; |
| 597 | 547 | |
| 598 | 548 | $attachment_fields_data = [ |
| 599 | 549 | [ |
| @@ -598,9 +548,9 @@ | ||
| 598 | 548 | $attachment_fields_data = [ |
| 599 | 549 | [ |
| 600 | 550 | 'id' => 'enable_media', |
| 601 | 551 | 'type' => 'switcher', |
| 602 | - 'title' => '', | |
| 552 | + 'title' => __('', 'adminify'), | |
| 603 | 553 | 'class' => 'adminify-pl-0', |
| 604 | 554 | 'text_on' => __('Show', 'adminify'), |
| 605 | 555 | 'text_off' => __('Hide', 'adminify'), |
| 606 | 556 | 'text_width' => 80, |
| @@ -605,49 +555,21 @@ | ||
| 605 | 555 | 'text_off' => __('Hide', 'adminify'), |
| 606 | 556 | 'text_width' => 80, |
| 607 | 557 | 'default' => $this->get_default_field('media_attachments')['enable_media'], |
| 608 | 558 | ], |
| 559 | + // [ | |
| 560 | + // 'id' => 'media_ininite_scroll', | |
| 561 | + // 'type' => 'switcher', | |
| 562 | + // 'title' => sprintf(__('Infinite Scroll for Media Library? %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 563 | + // 'class' => 'adminify-pl-0 adminify-pt-0 adminify-pro-fieldset adminify-pro-notice', | |
| 564 | + // 'text_on' => __('Yes', 'adminify'), | |
| 565 | + // 'text_off' => __('No', 'adminify'), | |
| 566 | + // 'text_width' => 80, | |
| 567 | + // 'subtitle' => __('Re-enable infinite scrolling in the media library\'s grid view to ease navigation through a large collection.', 'adminify'), | |
| 568 | + // 'default' => $this->get_default_field('media_attachments')['media_ininite_scroll'], | |
| 569 | + // 'dependency' => ['enable_media', '==', 'true', true], | |
| 570 | + // ], | |
| 609 | 571 | [ |
| 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 | 572 | 'id' => 'thumbnails_rss_feed', |
| 651 | 573 | 'type' => 'switcher', |
| 652 | 574 | 'title' => __('Post Thumbnails on RSS', 'adminify'), |
| 653 | 575 | 'class' => 'adminify-pl-0', |
| @@ -661,9 +583,9 @@ | ||
| 661 | 583 | // [ |
| 662 | 584 | // 'id' => 'allowed_upload_files', |
| 663 | 585 | // 'type' => 'checkbox', |
| 664 | 586 | // 'class' => 'adminify-pl-0', |
| 665 | - // 'title' => sprintf(__('Allowed Files Uploads %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 587 | + // 'title' => sprintf(__('Allowed Files Uploads %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 666 | 588 | // 'subtitle' => __('Allow SVG/JPEG/WEBP/ICO/AVIF Files Upload', 'adminify'), |
| 667 | 589 | // 'options' => $allowed_upload_files_type, |
| 668 | 590 | // 'default' => $this->get_default_field('media_attachments')['allowed_upload_files'], |
| 669 | 591 | // 'dependency' => ['enable_media', '==', 'true', true], |
| @@ -675,9 +597,9 @@ | ||
| 675 | 597 | // 'text_on' => __('Yes', 'adminify'), |
| 676 | 598 | // 'text_off' => __('No', 'adminify'), |
| 677 | 599 | // 'text_width' => 80, |
| 678 | 600 | // 'class' => 'adminify-pl-0', |
| 679 | - // 'title' => sprintf(__('Convert to WEBP %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 601 | + // 'title' => sprintf(__('Convert to WEBP %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 680 | 602 | // 'subtitle' => __('Convert Uploaded image to WEBP', 'adminify'), |
| 681 | 603 | // 'default' => $this->get_default_field('media_attachments')['convert_to_webp'], |
| 682 | 604 | // 'dependency' => ['enable_media', '==', 'true', true], |
| 683 | 605 | // ], |
| @@ -688,9 +610,9 @@ | ||
| 688 | 610 | // 'text_on' => __('Yes', 'adminify'), |
| 689 | 611 | // 'text_off' => __('No', 'adminify'), |
| 690 | 612 | // 'text_width' => 80, |
| 691 | 613 | // 'class' => 'adminify-pl-0', |
| 692 | - // 'title' => sprintf(__('Link Featured Images to Post %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 614 | + // 'title' => sprintf(__('Link Featured Images to Post %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 693 | 615 | // 'subtitle' => __('Wrap featured images in your theme in links to posts.', 'adminify'), |
| 694 | 616 | // 'default' => $this->get_default_field('media_attachments')['featured_to_post'], |
| 695 | 617 | // 'dependency' => ['enable_media', '==', 'true', true], |
| 696 | 618 | // ], |
| @@ -696,9 +618,9 @@ | ||
| 696 | 618 | // ], |
| 697 | 619 | // [ |
| 698 | 620 | // 'id' => 'media_lowercase', |
| 699 | 621 | // 'type' => 'switcher', |
| 700 | - // 'title' => sprintf(__('Lowercase Filenames for Uploads %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 622 | + // 'title' => sprintf(__('Lowercase Filenames for Uploads %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 701 | 623 | // 'subtitle' => __('Make all the filenames of new uploads to lowercase', 'adminify'), |
| 702 | 624 | // 'class' => 'adminify-pl-0', |
| 703 | 625 | // 'text_on' => __('Yes', 'adminify'), |
| 704 | 626 | // 'text_off' => __('No', 'adminify'), |
| @@ -753,9 +675,9 @@ | ||
| 753 | 675 | $this->productivity_attachment_fields($fields); |
| 754 | 676 | |
| 755 | 677 | $this->gutenberg_settings($fields); |
| 756 | 678 | |
| 757 | - $fields = apply_filters('pxlbsadminify_settings/productivity', $fields, $this); | |
| 679 | + $fields = apply_filters('adminify_settings/productivity', $fields, $this); | |
| 758 | 680 | |
| 759 | 681 | // Productivity Section |
| 760 | 682 | \ADMINIFY::createSection( |
| 761 | 683 | $this->prefix, |