PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 4.0.5.4
Adminify – White Label, Admin Menu Editor, Login Customizer v4.0.5.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 | Inc/utils.php +28 -82 4.1.174.0.5.4 View file →
@@ -43,9 +43,9 @@
43 43 }
44 44
45 45
46 46 /**
47 - * Check hidden for roles or not
47 + * Check hidden for rules or not
48 48 *
49 49 * @param [type] $value
50 50 *
51 51 * @return bool
@@ -55,15 +55,10 @@
55 55 if (empty($disabled_for)) {
56 56 return false;
57 57 }
58 58
59 - // wp_get_current_user() lives in wp-includes/pluggable.php and is
60 - // always available in normal plugin execution. If it is somehow
61 - // unavailable (e.g. very early bootstrap), bail out instead of
62 - // manually loading core files, which is disallowed by the
63 - // WordPress.org plugin guidelines.
64 59 if (!function_exists('wp_get_current_user')) {
65 - return false;
60 + include ABSPATH . 'wp-includes/pluggable.php';
66 61 }
67 62
68 63 $restrict_for = array();
69 64
@@ -162,12 +157,10 @@
162 157 if (!is_array($disabled_for)) {
163 158 return false;
164 159 }
165 160
166 - // wp_get_current_user() is provided by wp-includes/pluggable.php and
167 - // is loaded by core early in normal plugin execution. Manually
168 - // loading core files is disallowed by the plugin guidelines, so we
169 - // simply bail out if it is unavailable for any reason.
161 + require_once ABSPATH . '/wp-includes/pluggable.php';
162 +
170 163 if (!function_exists('wp_get_current_user')) {
171 164 return false;
172 165 }
173 166
@@ -253,9 +246,9 @@
253 246 echo esc_html($title);
254 247
255 248 if (is_multisite()) {
256 249 $text = ' | ' . esc_html__('Current Blog ID', 'adminify') . ': ' . get_current_blog_id(); ?>
257 - <?php echo self::wp_kses_custom(self::admin_page_subtitle($text)); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- wp_kses_custom() is a wp_kses() wrapper; output already escaped. ?>
250 + <?php echo self::wp_kses_custom(self::admin_page_subtitle($text)); ?>
258 251 <?php } ?>
259 252 <?php
260 253 }
261 254
@@ -358,11 +351,9 @@
358 351 * @return boolean
359 352 */
360 353 public static function is_plugin_active( $plugin_path )
361 354 {
362 - if (!function_exists('is_plugin_active')) {
363 - require_once ABSPATH . 'wp-admin/includes/plugin.php';
364 - }
355 + include_once ABSPATH . 'wp-admin/includes/plugin.php';
365 356 return is_plugin_active( $plugin_path );
366 357 }
367 358
368 359 /**
@@ -474,13 +465,13 @@
474 465 foreach ($values as $index => $in) {
475 466 if (is_array($in)) {
476 467 $values[$index] = self::clean_ajax_input($in);
477 468 } else {
478 - $values[$index] = wp_strip_all_tags($in);
469 + $values[$index] = strip_tags($in);
479 470 }
480 471 }
481 472 } else {
482 - $values = wp_strip_all_tags($values);
473 + $values = strip_tags($values);
483 474 }
484 475
485 476 return $values;
486 477 }
@@ -584,9 +575,9 @@
584 575 public static function adminify_upgrade_pro($custom_message = '', $style='')
585 576 {
586 577
587 578 if (empty($custom_message)) {
588 - $pro_content = '<strong>' . __('(Upgrade to Pro)', 'adminify') . '</strong>';
579 + $pro_content = sprintf(__('<strong>(Upgrade to Pro)</strong>', 'adminify'));
589 580 } else {
590 581 $pro_content = $custom_message;
591 582 }
592 583
@@ -594,9 +585,9 @@
594 585 return '<strong style="font-size:16px;">' . $pro_content . '</strong>';
595 586 }
596 587
597 588 $upgrade_notice_msg = sprintf(
598 - '<div class="adminify-pro-notice adminify-missing-addons"> %1$s %2$s </div>',
589 + __('<div class="adminify-pro-notice adminify-missing-addons"> %1$s %2$s </div>', 'adminify'),
599 590 self::jltwp_adminify_upgrade_pro_icon(),
600 591 self::wp_kses_custom($pro_content)
601 592 );
602 593 return self::wp_kses_custom($upgrade_notice_msg);
@@ -651,14 +642,13 @@
651 642 <div class="wp-adminify-white-label-notice-logo">
652 643 <img src="<?php echo esc_url(WP_ADMINIFY_ASSETS_IMAGE) . 'logos/logo-text-light.svg'; ?>" alt="<?php echo esc_attr(WP_ADMINIFY); ?>">
653 644 </div>
654 645 <h2>
655 - <?php echo wp_kses_post( sprintf(__('Upgrade <span>Pro</span> for White Labeling', 'adminify')) ); ?>
646 + <?php echo sprintf(__('Upgrade <span>Pro</span> for White Labeling', 'adminify')); ?>
656 647 </h2>
657 648 <p>
658 649 <?php
659 - /* translators: %s: Plugin name */
660 - echo wp_kses_post( sprintf(__('<strong>%1$s</strong> can be completely re-branded with your own brand Logo, Name and Author Details. Your clients will never know what tools you are using to build their website and will think that this is your own tool set. White-labeling works as long as your license is active. ', 'adminify'), esc_html(WP_ADMINIFY)) );
650 + echo sprintf(__('<strong>%1$s</strong> can be completely re-branded with your own brand Logo, Name and Author Details. Your clients will never know what tools you are using to build their website and will think that this is your own tool set. White-labeling works as long as your license is active. ', 'adminify'), esc_html(WP_ADMINIFY));
661 651 ?>
662 652 <br>
663 653 <em><?php esc_html_e('Note: Agency or Higher Plans Only', 'adminify'); ?></em>
664 654 </p>
@@ -723,22 +713,14 @@
723 713
724 714 return $options;
725 715 }
726 716
727 - /**
728 - * Common preset CSS variables (padding / sizing / typography
729 - * defaults) shared by every theme preset and by the Pro
730 - * custom-color preset path. Extracted so the Pro filter
731 - * (Pro/Classes/OutputCSS_Body_Pro::build_custom_color_preset())
732 - * can reuse the same defaults instead of re-declaring them.
733 - *
734 - * @return array<string,string>
735 - */
736 - public static function get_common_preset_vars()
717 + public static function get_theme_presets($theme = null)
737 718 {
738 - return [
719 +
720 + $common_var = [
739 721 '--adminify-menu-vertical-padding' => '10px',
740 - '--adminify-menu-horizontal-padding' => '8px',
722 + '--adminify-menu-horizontal-padding' => '8px',
741 723 '--adminify-menu-wrapper-padding-top' => '16px',
742 724 '--adminify-menu-wrapper-padding-right' => '8px',
743 725 '--adminify-menu-wrapper-padding-bottom' => '16px',
744 726 '--adminify-menu-wrapper-padding-left' => '8px',
@@ -746,20 +728,17 @@
746 728 '--adminify-submenu-wrapper-padding-top' => '8px',
747 729 '--adminify-submenu-wrapper-padding-right' => '0px',
748 730 '--adminify-submenu-wrapper-padding-bottom' => '8px',
749 731 '--adminify-submenu-wrapper-padding-left' => '28px',
750 - '--adminify-menu-font-size' => '13px',
751 - '--adminify-menu-line-height' => '20px',
752 - '--adminify-menu-letter-spacing' => '',
753 - '--adminify-menu-width' => '260px',
732 + // '--adminify-menu-text-align' => 'left',
733 + // '--adminify-menu-text-transform' => '',
734 + // '--adminify-menu-text-decoration' => 'none',
735 + '--adminify-menu-font-size' => '13px',
736 + '--adminify-menu-line-height' => '20px',
737 + '--adminify-menu-letter-spacing' => '',
738 + '--adminify-menu-width' => '260px'
754 739 ];
755 - }
756 740
757 - public static function get_theme_presets($theme = null)
758 - {
759 -
760 - $common_var = self::get_common_preset_vars();
761 -
762 741 $presets = [
763 742
764 743 // Base/ Default Preset
765 744 'preset1' => [
@@ -941,10 +920,10 @@
941 920 * @return void
942 921 */
943 922 public static function missing_plugin_notice( $plugin_name = '' )
944 923 {
924 + /* translators: %s: Plugin Name */
945 925 $missing_plugin_notice = sprintf(
946 - /* translators: 1: Plugin name, 2: Addons/plugins admin page URL, 3: "Install Now" link text */
947 926 __('<strong>"%1$s"</strong> plugin is not Activated! Please install and activate <strong>%1$s</strong> Plugin <p> <a class="adminify-missing-addons" href="%2$s">%3$s</a></p>', 'adminify'),
948 927 esc_html($plugin_name),
949 928 admin_url('admin.php?page=wp-adminify-addons-plugins'),
950 929 __('Install Now', 'adminify')
@@ -1154,52 +1133,19 @@
1154 1133
1155 1134 return array_merge_recursive($old_db, $result);
1156 1135 }
1157 1136
1158 - /**
1159 - * Inline "Upgrade to Pro" marker rendered next to a checkbox option
1160 - * label in the free build.
1161 - *
1162 - * Returns the rocket-icon + (Upgrade to Pro) span the settings UI
1163 - * has rendered historically. The
1164 - * Inc/Admin/AdminSettings::adminify_render_pro_locked_field() handler
1165 - * detects this span inside a checkbox <li> and strips name= + sets
1166 - * disabled on the enclosed input so the locked option cannot submit
1167 - * a value.
1168 - *
1169 - * Returns an empty string when the Pro plugin is active so the Pro
1170 - * UI is unchanged.
1171 - */
1172 - public static function adminify_upgrade_pro_class($inline_badge = false){
1173 - if (function_exists('jltwp_adminify') && jltwp_adminify()->can_use_premium_code__premium_only()) {
1174 - return '';
1175 - }
1176 - if (!empty($inline_badge)){
1137 + public static function adminify_upgrade_pro_class($inline_badge=false){
1138 + if(!empty($inline_badge)){
1177 1139 return '<span class="adminify-pro-checkbox adminify-pro-badge adminify-pro-notice">Pro</span>';
1178 1140 }
1179 1141 return '<span class="adminify-pro-checkbox">' . self::jltwp_adminify_upgrade_pro_icon() . ' <strong>(Upgrade to Pro)</strong>' . '</span>';
1180 1142 }
1181 1143
1182 - /**
1183 - * Inline "Pro" badge rendered next to a field title in the free
1184 - * build.
1185 - *
1186 - * Returns the legacy <span class="adminify-pro-badge">Pro</span>
1187 - * markup. The render handler detects fields whose class list
1188 - * contains adminify-pro-fieldset / -feature / -notice (the
1189 - * Pro-style classes used alongside this badge) and neutralises
1190 - * the inputs at render time.
1191 - *
1192 - * Returns an empty string when the Pro plugin is active.
1193 - */
1194 1144 public static function adminify_upgrade_pro_badge($badge_text = 'Pro'){
1195 - if (function_exists('jltwp_adminify') && jltwp_adminify()->can_use_premium_code__premium_only()) {
1196 - return '';
1145 + if(!empty($badge_text)){
1146 + return '<span class="adminify-pro-badge">' . $badge_text . '</span>';
1197 1147 }
1198 - if (!empty($badge_text)){
1199 - return '<span class="adminify-pro-badge">' . esc_html($badge_text) . '</span>';
1200 - }
1201 - return '';
1202 1148 }
1203 1149
1204 1150 /*
1205 1151 * Compares the version of WordPress running to the $version specified.