PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 4.0
Adminify – White Label, Admin Menu Editor, Login Customizer v4.0
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 +14 -45 4.1.174.0 View file →
@@ -9,9 +9,8 @@
9 9 use WPAdminify\Inc\Classes\Feedback;
10 10 use WPAdminify\Inc\Admin\AdminSettings;
11 11 use WPAdminify\Inc\Classes\Pro_Upgrade;
12 12 use WPAdminify\Inc\Classes\Addons_Plugins;
13 -use WPAdminify\Inc\Classes\GoogleFontsLocal;
14 13 use WPAdminify\Inc\Classes\Notifications\Notifications;
15 14 // No, Direct access Sir !!!
16 15 if ( !defined( 'ABSPATH' ) ) {
17 16 exit;
@@ -29,16 +28,12 @@
29 28 // add_action('plugins_loaded', array($this, 'jltwp_adminify_plugins_loaded'), 999);
30 29 add_filter( 'plugin_action_links_' . WP_ADMINIFY_BASE, array($this, 'plugin_action_links') );
31 30 add_filter( 'network_admin_plugin_action_links_' . WP_ADMINIFY_BASE, array($this, 'plugin_action_links') );
32 31 add_filter( 'admin_body_class', array($this, 'jltwp_adminify_body_class'), 99 );
33 - // Load textdomain and include files on init for WP 6.7+ compatibility
34 - // Textdomain must be loaded before files that use translations
35 - // Priority order: 0=textdomain, 1=include files (registers options), 5=framework setup
36 - add_action( 'init', array($this, 'jltwp_adminify_load_textdomain'), 0 );
37 - add_action( 'init', array($this, 'jltwp_adminify_include_files'), 1 );
38 - add_action( 'init', array($this, 'jltwp_is_plugin_row_meta'), 1 );
32 + add_action( 'plugins_loaded', array($this, 'jltwp_is_plugin_row_meta') );
33 + add_action( 'plugins_loaded', array($this, 'jltwp_adminify_include_files') );
39 34 $is_finished = get_option( 'jltwp_adminify_setup_wizard_ran' );
40 - if ( $is_finished !== '1' ) {
35 + if ( !empty( $is_finished ) || $is_finished != '1' ) {
41 36 if ( apply_filters( 'jltwp_adminify_show_setup_wizard', true ) ) {
42 37 new \WPAdminify\Inc\Classes\Wizard\Setup_Wizard();
43 38 set_transient( '_adminify_activation_redirect', 1, 30 );
44 39 }
@@ -46,9 +41,9 @@
46 41 jltwp_adminify()->add_filter( 'pricing_url', [$this, 'jltwp_adminify_pricing_url'] );
47 42 }
48 43
49 44 function jltwp_adminify_pricing_url( $pricing_url ) {
50 - $pricing_url = 'https://wpadminify.com/pricing';
45 + $pricing_url = 'https://jeweltheme.com';
51 46 return $pricing_url;
52 47 }
53 48
54 49 public function jltwp_is_plugin_row_meta() {
@@ -88,11 +83,11 @@
88 83 *
89 84 * @return array
90 85 */
91 86 public function plugin_action_links( $links ) {
92 - $links['settings'] = apply_filters( 'adminify_settings_link', sprintf( '<a class="adminify-plugin-settings" href="%1$s">%2$s</a>', admin_url( 'admin.php?page=wp-adminify-settings' ), __( 'Settings', 'adminify' ) ) );
93 - $links['pricing'] = apply_filters( 'adminify_upgrade_now_link', sprintf( '<a href="%1$s" class="adminify-upgrade-pro" target="_blank" style="color: orangered;font-weight: bold;">%2$s</a>', 'https://wpadminify.com/pricing', __( 'Upgrade Now', 'adminify' ) ) );
94 - return apply_filters( 'adminify_plugin_row_links', $links );
87 + $links['settings'] = sprintf( '<a class="adminify-plugin-settings" href="%1$s">%2$s</a>', admin_url( 'admin.php?page=wp-adminify-settings' ), __( 'Settings', 'adminify' ) );
88 + $links['pricing'] = sprintf( '<a href="%1$s" class="adminify-upgrade-pro" target="_blank" style="color: orangered;font-weight: bold;">%2$s</a>', 'https://wpadminify.com/pricing', __( 'Go Pro', 'adminify' ) );
89 + return $links;
95 90 }
96 91
97 92 public function jltwp_adminify_plugin_row_meta( $plugin_meta, $plugin_file ) {
98 93 if ( WP_ADMINIFY_BASE === $plugin_file ) {
@@ -98,9 +93,9 @@
98 93 if ( WP_ADMINIFY_BASE === $plugin_file ) {
99 94 $row_meta = array(
100 95 'docs' => sprintf( '<a href="%1$s" target="_blank">%2$s</a>', esc_url_raw( 'https://wpadminify.com/kb' ), __( 'Docs', 'adminify' ) ),
101 96 'changelogs' => sprintf( '<a href="%1$s" target="_blank">%2$s</a>', esc_url_raw( 'https://wpadminify.com/changelogs/' ), __( 'Changelogs', 'adminify' ) ),
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>',
97 + 'tutorials' => '<a href="https://www.youtube.com/playlist?list=PLqpMw0NsHXV-EKj9Xm1DMGa6FGniHHly8" aria-label="' . esc_attr( __( 'View WP Adminify Video Tutorials', 'adminify' ) ) . '" target="_blank">' . __( 'Video Tutorials', 'adminify' ) . '</a>',
103 98 );
104 99 $plugin_meta = array_merge( $plugin_meta, $row_meta );
105 100 }
106 101 return $plugin_meta;
@@ -136,37 +131,20 @@
136 131 new Feedback();
137 132 new Notifications();
138 133 new Pro_Upgrade();
139 134 new Addons_Plugins();
140 - // Initialize Google Fonts Local early to catch option updates
141 - GoogleFontsLocal::get_instance();
142 135 }
143 136
144 137 public function jltwp_adminify_init() {
145 - // Backup for OLD Database
146 - $current_version = get_option( 'wp_adminify_version' );
147 - $is_backup = $old_data = get_option( '_wpadminify_backup' );
148 - if ( version_compare( $current_version, WP_ADMINIFY_VER, '<' ) && empty( $is_backup ) ) {
149 - $old_data = get_option( '_wpadminify' );
150 - update_option( '_wpadminify_backup', $old_data );
151 - }
138 + $this->jltwp_adminify_load_textdomain();
152 139 }
153 140
154 - /**
155 - * Loads the text domain for localization.
156 - *
157 - * This function sets up the text domain for the WP Adminify plugin,
158 - * allowing it to load translation files for the specified locale.
159 - * It first attempts to load a custom translation file from the WordPress
160 - * languages directory and then loads the default translation file from
161 - * the plugin's languages directory.
162 - *
163 - * @return void
164 - */
141 + // Text Domains
165 142 public function jltwp_adminify_load_textdomain() {
166 - $locale = apply_filters( 'plugin_locale', get_locale(), 'adminify' );
167 - load_textdomain( 'adminify', WP_LANG_DIR . '/adminify/adminify-' . $locale . '.mo' );
168 - load_plugin_textdomain( 'adminify', false, dirname( WP_ADMINIFY_BASE ) . '/languages/' );
143 + $domain = 'adminify';
144 + $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
145 + load_textdomain( $domain, WP_LANG_DIR . '/' . $domain . '/' . $domain . '-' . $locale . '.mo' );
146 + load_plugin_textdomain( $domain, false, dirname( WP_ADMINIFY_BASE ) . '/languages/' );
169 147 }
170 148
171 149 // Activation Hook
172 150 public static function jltwp_adminify_activation_hook() {
@@ -173,11 +151,8 @@
173 151 $current_adminify_version = get_option( 'wp_adminify_version', null );
174 152 if ( get_option( 'jltwp_adminify_activation_time' ) === false ) {
175 153 update_option( 'jltwp_adminify_activation_time', strtotime( 'now' ) );
176 154 }
177 - if ( "dismissed" === get_option( '_wpadminify_plugin_update_info_notice', true ) ) {
178 - update_option( '_wpadminify_plugin_update_info_notice', '' );
179 - }
180 155 if ( is_null( $current_adminify_version ) ) {
181 156 update_option( 'wp_adminify_version', self::VERSION );
182 157 }
183 158 //database upgrade logic here
@@ -182,14 +157,8 @@
182 157 }
183 158 //database upgrade logic here
184 159 $old_data = get_option( '_wpadminify' );
185 160 update_option( '_wpadminify_backup', $old_data );
186 - // Create term_order collumn in terms table, to support post type order
187 - global $wpdb;
188 - $check_term_order_column = $wpdb->query( "SHOW COLUMNS FROM {$wpdb->terms} LIKE 'term_order'" );
189 - if ( $check_term_order_column == 0 ) {
190 - $wpdb->query( "ALTER TABLE {$wpdb->terms} ADD term_order INT( 4 ) NULL DEFAULT '0'" );
191 - }
192 161 }
193 162
194 163 // Deactivation Hook
195 164 public static function jltwp_adminify_deactivation_hook() {