Changeset 3762877
- Timestamp:
- 10/24/2026 07:54:44 AM (41 hours ago)
- Location:
- panelra-dashboard-builder/trunk
- Files:
-
- 6 added
- 8 edited
-
admin/class-pnlrdb-admin.php (modified) (2 diffs)
-
admin/css/pnlrdb-tab-menu.css (added)
-
admin/js/pnlrdb-tab-menu.js (added)
-
admin/partials/tab-menu.php (modified) (2 diffs)
-
admin/partials/tab-tutorials.php (modified) (1 diff)
-
includes/class-pnlrdb-loader.php (modified) (2 diffs)
-
modules/menu-manager/class-pnlrdb-menu-manager.php (modified) (2 diffs)
-
modules/review-manager (added)
-
modules/review-manager/class-pnlrdb-review-manager.php (added)
-
modules/review-manager/pnlrdb-review.css (added)
-
modules/review-manager/pnlrdb-review.js (added)
-
panelra-dashboard-builder.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
uninstall.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
panelra-dashboard-builder/trunk/admin/class-pnlrdb-admin.php
r3758637 r3762877 192 192 PNLRDB_VERSION 193 193 ); 194 195 // Isolated Menu tab enhancements; no changes to other settings screens. 196 $current_tab = isset( $_GET['tab'] ) ? sanitize_key( wp_unslash( $_GET['tab'] ) ) : 'colors'; // phpcs:ignore WordPress.Security.NonceVerification.Recommended 197 if ( 'menu' === $current_tab ) { 198 wp_enqueue_style( 199 'pnlrdb-tab-menu-css', 200 PNLRDB_PLUGIN_URL . 'admin/css/pnlrdb-tab-menu.css', 201 array( 'pnlrdb-css' ), 202 PNLRDB_VERSION 203 ); 204 wp_enqueue_script( 205 'pnlrdb-tab-menu-js', 206 PNLRDB_PLUGIN_URL . 'admin/js/pnlrdb-tab-menu.js', 207 array(), 208 PNLRDB_VERSION, 209 true 210 ); 211 } 194 212 195 213 wp_enqueue_style( … … 481 499 482 500 <?php if ( $use_form ) : ?> 483 <form method="post" action="options.php" class="ap773-form ">501 <form method="post" action="options.php" class="ap773-form<?php echo 'menu' === $tab ? ' ap773-form--menu' : ''; ?>"> 484 502 <?php settings_fields( $this->get_group_for_tab( $tab ) ); ?> 485 503 <?php $this->render_tab( $tab ); ?> -
panelra-dashboard-builder/trunk/admin/partials/tab-menu.php
r3497382 r3762877 5 5 */ 6 6 if ( ! defined( 'ABSPATH' ) ) { exit; } 7 $pnlrdb_menu_names = get_option( 'pnlrdb_menu_names', array() ); 7 $pnlrdb_menu_names = get_option( 'pnlrdb_menu_names', array() ); 8 $pnlrdb_original_names = class_exists( 'Pnlrdb_Menu_Manager' ) ? Pnlrdb_Menu_Manager::get_original_labels() : array(); 8 9 global $menu; 9 10 ?> 10 11 <h2 class="ap773-section-title"><?php esc_html_e( 'Menu', 'panelra-dashboard-builder' ); ?></h2> 11 <p class="ap773-section-desc"><?php esc_html_e( ' Rename main menu items. Leave blank to keep the original name.', 'panelra-dashboard-builder' ); ?></p>12 <p class="ap773-section-desc"><?php esc_html_e( 'Make WordPress menu labels clearer for your team or clients.', 'panelra-dashboard-builder' ); ?></p> 12 13 13 <div class="ap773-card"> 14 <div class="ap773-card-title"> 15 <svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="18" x2="21" y2="18"/></svg> 16 <?php esc_html_e( 'Rename menu items', 'panelra-dashboard-builder' ); ?> 14 <section class="pnlrdb-menu-guide" aria-label="<?php esc_attr_e( 'How menu renaming works', 'panelra-dashboard-builder' ); ?>"> 15 <div class="pnlrdb-menu-guide__intro"> 16 <div class="pnlrdb-menu-guide__icon" aria-hidden="true"> 17 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6h16M4 12h10M4 18h16"/><path d="m17 12 2 2 3-4"/></svg> 18 </div> 19 <div> 20 <h3><?php esc_html_e( 'Customize your menu labels', 'panelra-dashboard-builder' ); ?></h3> 21 <p><?php esc_html_e( 'Rename top-level WordPress admin items without changing their destinations, permissions, or functionality.', 'panelra-dashboard-builder' ); ?></p> 22 </div> 17 23 </div> 18 <table class="ap773-table"> 19 <thead> 20 <tr> 21 <th><?php esc_html_e( 'Original label', 'panelra-dashboard-builder' ); ?></th> 22 <th><?php esc_html_e( 'Custom label', 'panelra-dashboard-builder' ); ?></th> 23 </tr> 24 </thead> 24 <div class="pnlrdb-menu-guide__steps"> 25 <div class="pnlrdb-menu-guide__step"><span aria-hidden="true">1</span><div><strong><?php esc_html_e( 'Find an item', 'panelra-dashboard-builder' ); ?></strong><small><?php esc_html_e( 'Search by name or menu slug.', 'panelra-dashboard-builder' ); ?></small></div></div> 26 <div class="pnlrdb-menu-guide__step"><span aria-hidden="true">2</span><div><strong><?php esc_html_e( 'Choose a label', 'panelra-dashboard-builder' ); ?></strong><small><?php esc_html_e( 'Type a new name in the right column.', 'panelra-dashboard-builder' ); ?></small></div></div> 27 <div class="pnlrdb-menu-guide__step"><span aria-hidden="true">3</span><div><strong><?php esc_html_e( 'Save or restore', 'panelra-dashboard-builder' ); ?></strong><small><?php esc_html_e( 'Save your changes, or clear a name to restore its default.', 'panelra-dashboard-builder' ); ?></small></div></div> 28 </div> 29 </section> 30 31 <div class="ap773-card pnlrdb-menu-renamer" id="pnlrdb-menu-renamer"> 32 <div class="pnlrdb-menu-renamer__header"> 33 <div> 34 <div class="pnlrdb-menu-renamer__heading"> 35 <svg viewBox="0 0 24 24" width="17" height="17" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M4 6h16M4 12h16M4 18h16"/></svg> 36 <h3><?php esc_html_e( 'Rename menu items', 'panelra-dashboard-builder' ); ?></h3> 37 </div> 38 <p><?php esc_html_e( 'Changes are applied after you select Save Settings.', 'panelra-dashboard-builder' ); ?></p> 39 </div> 40 <div class="pnlrdb-menu-renamer__summary" aria-live="polite"><strong id="pnlrdb-menu-custom-count">0</strong> <?php esc_html_e( 'customized', 'panelra-dashboard-builder' ); ?></div> 41 </div> 42 <div class="pnlrdb-menu-renamer__toolbar"> 43 <div class="pnlrdb-menu-renamer__search-wrap"> 44 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><circle cx="10.8" cy="10.8" r="6.5"/><path d="m16 16 5 5"/></svg> 45 <input type="search" id="pnlrdb-menu-search" autocomplete="off" placeholder="<?php esc_attr_e( 'Search menu items or slugs…', 'panelra-dashboard-builder' ); ?>" aria-label="<?php esc_attr_e( 'Search menu items', 'panelra-dashboard-builder' ); ?>"> 46 </div> 47 <label class="pnlrdb-menu-renamer__filter"><input type="checkbox" id="pnlrdb-menu-modified-only"> <span><?php esc_html_e( 'Customized only', 'panelra-dashboard-builder' ); ?></span></label> 48 <span class="pnlrdb-menu-renamer__count" aria-live="polite"><strong id="pnlrdb-menu-visible-count">0</strong> / <span id="pnlrdb-menu-total-count">0</span> <?php esc_html_e( 'items', 'panelra-dashboard-builder' ); ?></span> 49 </div> 50 <table class="ap773-table pnlrdb-menu-renamer__table"> 51 <thead><tr> 52 <th scope="col"><?php esc_html_e( 'Original label', 'panelra-dashboard-builder' ); ?></th> 53 <th scope="col"><?php esc_html_e( 'Custom label', 'panelra-dashboard-builder' ); ?></th> 54 </tr></thead> 25 55 <tbody> 26 56 <?php if ( is_array( $menu ) ) : foreach ( $menu as $pnlrdb_item ) : 27 57 if ( empty( $pnlrdb_item[0] ) || empty( $pnlrdb_item[2] ) || false !== strpos( $pnlrdb_item[2], 'separator' ) ) { continue; } 28 58 $pnlrdb_slug = $pnlrdb_item[2]; 29 $pnlrdb_orig = wp_strip_all_tags( $pnlrdb_item[0] );59 $pnlrdb_orig = isset( $pnlrdb_original_names[ $pnlrdb_slug ] ) ? $pnlrdb_original_names[ $pnlrdb_slug ] : wp_strip_all_tags( $pnlrdb_item[0] ); 30 60 $pnlrdb_custom = isset( $pnlrdb_menu_names[ $pnlrdb_slug ] ) ? $pnlrdb_menu_names[ $pnlrdb_slug ] : ''; 31 61 ?> 32 <tr >62 <tr class="pnlrdb-menu-renamer__row" data-menu-search="<?php echo esc_attr( $pnlrdb_orig . ' ' . $pnlrdb_slug ); ?>"> 33 63 <td> 34 <?php echo esc_html( $pnlrdb_orig ); ?> 64 <div class="pnlrdb-menu-renamer__name"> 65 <span class="pnlrdb-menu-renamer__original"><?php echo esc_html( $pnlrdb_orig ); ?></span> 66 <span class="pnlrdb-menu-renamer__badge" <?php echo '' === $pnlrdb_custom ? 'hidden' : ''; ?>><?php esc_html_e( 'Customized', 'panelra-dashboard-builder' ); ?></span> 67 </div> 35 68 <span class="ap773-slug"><?php echo esc_html( $pnlrdb_slug ); ?></span> 36 69 </td> 37 70 <td> 38 <input type="text" class="ap773-input" 39 name="pnlrdb_menu_names[<?php echo esc_attr( $pnlrdb_slug ); ?>]" 40 value="<?php echo esc_attr( $pnlrdb_custom ); ?>" 41 placeholder="<?php echo esc_attr( $pnlrdb_orig ); ?>" 42 style="max-width:260px;"> 71 <div class="pnlrdb-menu-renamer__edit"> 72 <input type="text" class="ap773-input pnlrdb-menu-renamer__input" 73 name="pnlrdb_menu_names[<?php echo esc_attr( $pnlrdb_slug ); ?>]" 74 value="<?php echo esc_attr( $pnlrdb_custom ); ?>" 75 placeholder="<?php echo esc_attr( $pnlrdb_orig ); ?>" 76 aria-label="<?php echo esc_attr( sprintf( __( 'Custom label for %s', 'panelra-dashboard-builder' ), $pnlrdb_orig ) ); ?>"> 77 <button type="button" class="pnlrdb-menu-renamer__clear" <?php echo '' === $pnlrdb_custom ? 'hidden' : ''; ?> aria-label="<?php echo esc_attr( sprintf( __( 'Clear custom label for %s', 'panelra-dashboard-builder' ), $pnlrdb_orig ) ); ?>" title="<?php esc_attr_e( 'Clear custom label', 'panelra-dashboard-builder' ); ?>"> 78 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M18 6 6 18M6 6l12 12"/></svg> 79 </button> 80 </div> 43 81 </td> 44 82 </tr> 45 83 <?php endforeach; endif; ?> 84 <tr id="pnlrdb-menu-no-results" hidden><td colspan="2" class="pnlrdb-menu-renamer__empty"><?php esc_html_e( 'No matching menu items. Try a different search or turn off the filter.', 'panelra-dashboard-builder' ); ?></td></tr> 46 85 </tbody> 47 86 </table> … … 49 88 50 89 <?php 51 // Hook per il Pro (drag & drop, submenu rename)90 // Pro extends this tab with drag & drop and submenu settings. Fire once only. 52 91 do_action( 'pnlrdb_after_menu_settings' ); 53 do_action( 'pnlrdb_after_menu_settings' ); -
panelra-dashboard-builder/trunk/admin/partials/tab-tutorials.php
r3600729 r3762877 14 14 $pnlrdb_embed_html = wp_oembed_get( $pnlrdb_tutorial_url, array( 'width' => 960 ) ); 15 15 ?> 16 17 <?php if ( current_user_can( 'manage_options' ) && class_exists( 'Pnlrdb_Review_Manager' ) ) : ?> 18 <div class="pnlrdb-review-help"> 19 <div class="pnlrdb-review-help__icon" aria-hidden="true"> 20 <svg viewBox="0 0 24 24" width="30" height="30" fill="none" focusable="false"> 21 <path d="m12 2.8 2.82 5.72 6.31.92-4.56 4.44 1.08 6.28L12 17.2l-5.65 2.96 1.08-6.28L2.87 9.44l6.31-.92L12 2.8Z" fill="currentColor" /> 22 </svg> 23 </div> 24 <div class="pnlrdb-review-help__content"> 25 <span class="pnlrdb-review-help__eyebrow"><?php esc_html_e( 'SUPPORT PANELRA', 'panelra-dashboard-builder' ); ?></span> 26 <h3><?php esc_html_e( 'Enjoying Panelra? Help us grow!', 'panelra-dashboard-builder' ); ?></h3> 27 <p><?php esc_html_e( 'If Panelra makes managing WordPress easier, consider sharing an honest review. Your feedback helps us improve and reach more users.', 'panelra-dashboard-builder' ); ?></p> 28 </div> 29 <div class="pnlrdb-review-help__actions"> 30 <a class="button pnlrdb-review-help__cta" href="<?php echo esc_url( Pnlrdb_Review_Manager::review_link() ); ?>" target="_blank" rel="noopener noreferrer"> 31 <svg viewBox="0 0 24 24" width="17" height="17" fill="none" aria-hidden="true" focusable="false"><path d="m12 3 2.78 5.64 6.22.9-4.5 4.39 1.06 6.2L12 17.2l-5.56 2.93 1.06-6.2L3 9.54l6.22-.9L12 3Z" fill="currentColor" /></svg> 32 <?php esc_html_e( 'Leave a review', 'panelra-dashboard-builder' ); ?> <span aria-hidden="true">↗</span> 33 </a> 34 <div class="pnlrdb-review-help__secondary"> 35 <a class="button pnlrdb-review-help__secondary-link" href="<?php echo esc_url( Pnlrdb_Review_Manager::SUPPORT_URL ); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Get support', 'panelra-dashboard-builder' ); ?></a> 36 <span aria-hidden="true">·</span> 37 <a class="button pnlrdb-review-help__secondary-link" href="<?php echo esc_url( Pnlrdb_Review_Manager::SUPPORT_URL ); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Suggest a feature', 'panelra-dashboard-builder' ); ?></a> 38 </div> 39 </div> 40 </div> 41 <?php endif; ?> 16 42 17 43 <div class="ap773-card"> -
panelra-dashboard-builder/trunk/includes/class-pnlrdb-loader.php
r3758637 r3762877 49 49 'import-export/class-pnlrdb-template-adapter.php', 50 50 'import-export/class-pnlrdb-import-export.php', 51 'review-manager/class-pnlrdb-review-manager.php', 51 52 ); 52 53 … … 82 83 if ( class_exists( 'Pnlrdb_Dashboard_Builder' ) ) { new Pnlrdb_Dashboard_Builder(); } 83 84 if ( is_admin() && class_exists( 'Pnlrdb_Import_Export' ) ) { new Pnlrdb_Import_Export(); } 85 if ( is_admin() && class_exists( 'Pnlrdb_Review_Manager' ) ) { new Pnlrdb_Review_Manager(); } 84 86 85 87 /** -
panelra-dashboard-builder/trunk/modules/menu-manager/class-pnlrdb-menu-manager.php
r3497382 r3762877 19 19 */ 20 20 class Pnlrdb_Menu_Manager { 21 22 /** Original main-menu labels captured before Panelra applies its own renames. */ 23 private static $original_labels = array(); 24 25 /** 26 * Labels as provided by WordPress/plugins before Panelra customizes them. 27 * Used for accurate comparison in the Menu settings UI only. 28 * 29 * @return array 30 */ 31 public static function get_original_labels() { 32 return self::$original_labels; 33 } 21 34 22 35 /** … … 97 110 */ 98 111 private function apply_renames( &$menu ) { 112 // Capture the display labels *before* replacing them so the settings table 113 // continues to show a useful original-vs-custom comparison. 114 if ( is_array( $menu ) && empty( self::$original_labels ) ) { 115 foreach ( $menu as $item ) { 116 if ( isset( $item[0], $item[2] ) && is_string( $item[2] ) && '' !== $item[2] ) { 117 self::$original_labels[ $item[2] ] = wp_strip_all_tags( $item[0] ); 118 } 119 } 120 } 121 99 122 $names = get_option( 'pnlrdb_menu_names', array() ); 100 123 if ( empty( $names ) || ! is_array( $menu ) ) { -
panelra-dashboard-builder/trunk/panelra-dashboard-builder.php
r3758637 r3762877 3 3 * Plugin Name: Panelra – Custom Admin Dashboard Builder 4 4 * Description: Customize your WordPress admin dashboard: colors, fonts, menu layout, admin bar, notices, maintenance mode and more. 5 * Version: 2.1. 05 * Version: 2.1.1 6 6 * Requires at least: 6.0 7 7 * Tested up to: 7.1 … … 26 26 } 27 27 28 define( 'PNLRDB_VERSION', '2.1. 0' );28 define( 'PNLRDB_VERSION', '2.1.1' ); 29 29 define( 'PNLRDB_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 30 30 define( 'PNLRDB_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); -
panelra-dashboard-builder/trunk/readme.txt
r3758637 r3762877 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 2.1. 07 Stable tag: 2.1.1 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 211 211 212 212 == Changelog == 213 214 = 2.1.1 = 215 * Improved Menu customization with search, filtering, clearer guidance, and easier restoration of default labels. 216 * Refined Menu settings layout, responsive controls, and saving on long lists. 217 * Added optional review requests and feedback links with user-controlled reminders. 218 213 219 214 220 = 2.1.0 = -
panelra-dashboard-builder/trunk/uninstall.php
r3527069 r3762877 46 46 // --------------------------------------------------------------------------- 47 47 delete_metadata( 'user', 0, 'pnlrdb_dark_mode', '', true ); 48 // Review reminder preferences (introduced in 2.1.1). 49 delete_metadata( 'user', 0, 'pnlrdb_review_prompt_state', '', true );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)