| @@ -1,17 +1,18 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -namespace PXLBSAdminify\Inc\Classes; | |
| 3 | +namespace WPAdminify\Inc\Classes; | |
| 4 | 4 | |
| 5 | -use PXLBSAdminify\Inc\Admin\AdminSettings; | |
| 6 | -use PXLBSAdminify\Inc\Admin\AdminSettingsModel; | |
| 5 | +use WPAdminify\Inc\Admin\AdminSettings; | |
| 6 | +use WPAdminify\Inc\Admin\AdminSettingsModel; | |
| 7 | 7 | |
| 8 | +use WPAdminify\Inc\Utils; | |
| 8 | 9 | // no direct access allowed |
| 9 | 10 | if (!defined('ABSPATH')) { |
| 10 | 11 | exit; |
| 11 | 12 | } |
| 12 | 13 | /** |
| 13 | - * PXLBSAdminify | |
| 14 | + * WPAdminify | |
| 14 | 15 | * Dashboard Widgets |
| 15 | 16 | * |
| 16 | 17 | * @author Jewel Theme <support@jeweltheme.com> |
| 17 | 18 | */ |
| @@ -24,14 +25,14 @@ | ||
| 24 | 25 | $this->widget_list = (array) AdminSettings::get_instance()->get('remove_widgets')['dashboard_widgets_list']; |
| 25 | 26 | // $this->restrict_for = (array) AdminSettings::get_instance()->get('dashboard_widgets_user_roles'); |
| 26 | 27 | |
| 27 | 28 | // Dashboard widgets by WP Adminify |
| 28 | - add_action('admin_init', [$this, 'add_hooks']); | |
| 29 | + add_action('admin_init', [$this, 'jltwp_adminify_add_hooks']); | |
| 29 | 30 | |
| 30 | 31 | // add_action('admin_enqueue_scripts', [$this, 'dashboard_styles'], 100); |
| 31 | 32 | } |
| 32 | 33 | |
| 33 | - public function add_hooks() | |
| 34 | + public function jltwp_adminify_add_hooks() | |
| 34 | 35 | { |
| 35 | 36 | add_action('wp_dashboard_setup', [$this, 'disable_dashboard_widgets'], 100); |
| 36 | 37 | // add_action('wp_network_dashboard_setup', [$this, 'disable_dashboard_widgets'], 100); |
| 37 | 38 | } |
| @@ -103,9 +104,9 @@ | ||
| 103 | 104 | * Filters the available dashboard widgets. |
| 104 | 105 | * |
| 105 | 106 | * @param array $widgets The globally available dashboard widgets. |
| 106 | 107 | */ |
| 107 | - return apply_filters('pxlbsadminify_dashboard_widgets', $widgets); | |
| 108 | + return apply_filters('wp_adminify_dashboard_widgets', $widgets); | |
| 108 | 109 | } |
| 109 | 110 | |
| 110 | 111 | public function disable_dashboard_widgets() |
| 111 | 112 | { |