PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 4.2.4
Adminify – White Label, Admin Menu Editor, Login Customizer v4.2.4
4.3.1 4.3.0 4.2.26 4.2.25 4.2.24 4.2.23 4.2.22 4.2.21 4.2.20 4.2.19 4.2.18 4.2.17 4.2.16 4.2.15 4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 4.1.17 All 164 releases
← All changes | class-wp-adminify.php +1 -65 4.3.04.2.4 View file →
@@ -4,9 +4,8 @@
4 4
5 5 use PXLBSAdminify\Libs\Featured;
6 6 use PXLBSAdminify\Inc\Admin\Admin;
7 7 use PXLBSAdminify\Inc\Classes\Assets;
8 -use PXLBSAdminify\Inc\Classes\IconPicker_Assets;
9 8 use PXLBSAdminify\Inc\Classes\Upgrade;
10 9 use PXLBSAdminify\Inc\Classes\Feedback;
11 10 use PXLBSAdminify\Inc\Admin\AdminSettings;
12 11 use PXLBSAdminify\Inc\Classes\Pro_Upgrade;
@@ -22,10 +21,8 @@
22 21 const VERSION = PXLBSADMINIFY_VER;
23 22
24 23 private static $instance = null;
25 24
26 - private $was_active_before_update = false;
27 -
28 25 public function __construct() {
29 26 add_action( 'plugins_loaded', array($this, 'maybe_run_upgrades'), -100 );
30 27 // This should run earlier
31 28 add_action( 'plugins_loaded', array($this, 'maybe_loaded_addons'), -200 );
@@ -31,21 +28,8 @@
31 28 add_action( 'plugins_loaded', array($this, 'maybe_loaded_addons'), -200 );
32 29 // add_action('plugins_loaded', array($this, 'pxlbsadminify_plugins_loaded'), 999);
33 30 add_filter( 'plugin_action_links_' . PXLBSADMINIFY_BASE, array($this, 'plugin_action_links') );
34 31 add_filter( 'network_admin_plugin_action_links_' . PXLBSADMINIFY_BASE, array($this, 'plugin_action_links') );
35 - // Freemius drops this plugin from `active_plugins` when it updates itself.
36 - add_filter(
37 - 'upgrader_pre_install',
38 - array($this, 'pxlbsadminify_remember_active_state'),
39 - 1,
40 - 2
41 - );
42 - add_filter(
43 - 'upgrader_post_install',
44 - array($this, 'pxlbsadminify_restore_active_state'),
45 - 20,
46 - 3
47 - );
48 32 add_filter( 'admin_body_class', array($this, 'pxlbsadminify_body_class'), 99 );
49 33 // Load textdomain and include files on init for WP 6.7+ compatibility
50 34 // Textdomain must be loaded before files that use translations
51 35 // Priority order: 0=textdomain, 1=include files (registers options), 5=framework setup
@@ -61,55 +45,8 @@
61 45 }
62 46 jltwp_adminify()->add_filter( 'pricing_url', [$this, 'pxlbsadminify_pricing_url'] );
63 47 }
64 48
65 - /**
66 - * Record whether this plugin was active when its own update starts.
67 - *
68 - * @param bool|\WP_Error $response Install response.
69 - * @param array $hook_extra Extra arguments passed to hooked filters.
70 - *
71 - * @return bool|\WP_Error
72 - */
73 - public function pxlbsadminify_remember_active_state( $response, $hook_extra ) {
74 - if ( !empty( $hook_extra['plugin'] ) && PXLBSADMINIFY_BASE === $hook_extra['plugin'] ) {
75 - $this->was_active_before_update = in_array( PXLBSADMINIFY_BASE, (array) get_option( 'active_plugins', array() ), true );
76 - }
77 - return $response;
78 - }
79 -
80 - /**
81 - * Put this plugin back into `active_plugins` after its own update.
82 - *
83 - * The Freemius SDK assumes the free and the premium build never run side by side,
84 - * so FS_Plugin_Updater::_maybe_update_folder_name() rewrites our `active_plugins`
85 - * entry to the premium basename once the free package is updated while Adminify Pro
86 - * is installed - which silently deactivates this plugin. Both packages have to stay
87 - * active here, so restore the entry the SDK removed.
88 - *
89 - * Network activations are unaffected: those live in `active_sitewide_plugins`, which
90 - * the SDK handler never touches.
91 - *
92 - * @param bool|\WP_Error $response Install response.
93 - * @param array $hook_extra Extra arguments passed to hooked filters.
94 - * @param array $result Installation result data.
95 - *
96 - * @return bool|\WP_Error
97 - */
98 - public function pxlbsadminify_restore_active_state( $response, $hook_extra, $result ) {
99 - if ( empty( $hook_extra['plugin'] ) || PXLBSADMINIFY_BASE !== $hook_extra['plugin'] || !$this->was_active_before_update ) {
100 - return $response;
101 - }
102 - $active_plugins = (array) get_option( 'active_plugins', array() );
103 - if ( !in_array( PXLBSADMINIFY_BASE, $active_plugins, true ) ) {
104 - $active_plugins[] = PXLBSADMINIFY_BASE;
105 - $active_plugins = array_values( array_unique( $active_plugins ) );
106 - sort( $active_plugins );
107 - update_option( 'active_plugins', $active_plugins );
108 - }
109 - return $response;
110 - }
111 -
112 49 function pxlbsadminify_pricing_url( $pricing_url ) {
113 50 $pricing_url = 'https://wpadminify.com/pricing';
114 51 return $pricing_url;
115 52 }
@@ -159,9 +96,9 @@
159 96
160 97 public function pxlbsadminify_plugin_row_meta( $plugin_meta, $plugin_file ) {
161 98 if ( PXLBSADMINIFY_BASE === $plugin_file ) {
162 99 $row_meta = array(
163 - 'docs' => sprintf( '<a href="%1$s" target="_blank">%2$s</a>', esc_url_raw( 'https://wpadminify.com/docs/adminify/getting-started' ), __( 'Docs', 'adminify' ) ),
100 + 'docs' => sprintf( '<a href="%1$s" target="_blank">%2$s</a>', esc_url_raw( 'https://wpadminify.com/kb' ), __( 'Docs', 'adminify' ) ),
164 101 'changelogs' => sprintf( '<a href="%1$s" target="_blank">%2$s</a>', esc_url_raw( 'https://wpadminify.com/changelogs/' ), __( 'Changelogs', 'adminify' ) ),
165 102 'tutorials' => '<a href="https://www.youtube.com/playlist?list=PLqpMw0NsHXV-EKj9Xm1DMGa6FGniHHly8" aria-label="' . esc_attr( __( 'View Adminify Video Tutorials', 'adminify' ) ) . '" target="_blank">' . __( 'Video Tutorials', 'adminify' ) . '</a>',
166 103 );
167 104 $plugin_meta = array_merge( $plugin_meta, $row_meta );
@@ -193,9 +130,8 @@
193 130 }
194 131
195 132 public function pxlbsadminify_include_files() {
196 133 new Assets();
197 - new IconPicker_Assets();
198 134 new Admin();
199 135 new Featured();
200 136 new Feedback();
201 137 new Notifications();