Plugin Directory

Changeset 3242959


Ignore:
Timestamp:
02/19/2025 04:28:23 AM (11 months ago)
Author:
dashify
Message:

1.3.11

Location:
dashify
Files:
82 added
5 edited

Legend:

Unmodified
Added
Removed
  • dashify/trunk/admin/css/dashify-table-styles.css

    r3146619 r3242959  
    11391139    }
    11401140}
     1141
     1142/* Compatibility fix for Admin Columns Pro by AdminColumns.com */
     1143.acp-hts-wrapper .wp-list-table .order-view {
     1144    /* Admin Columns Pro hides .order-view, but Dashify unhides it, so here
     1145    we hide it again. */
     1146    display: none !important;
     1147}
  • dashify/trunk/dashify.php

    r3219356 r3242959  
    33 * Plugin Name: Dashify
    44 * Description: A modern design and UI for the WooCommerce admin. Manage, search, and navigate orders faster. Make the WordPress admin dashboard ecommerce-focused.
    5  * Version: 1.3.10
     5 * Version: 1.3.11
    66 * Author: Dashify
    77 * License: GPLv2 or later
     
    2121class Dashify_Base
    2222{
    23     const VERSION = '1.3.10';
     23    const VERSION = '1.3.11';
    2424
    2525    // HPOS
     
    516516                    'heading' => 'Improvements',
    517517                    'content' => array(
    518                         'Setting to expand search and filter by default',
    519                         'Compatibility with Order Tags by 99w',
    520                         'Custom admin menu icons for several plugins'
    521                     )
    522                 ),
    523                 array(
    524                     'heading' => 'Bug fixes',
    525                     'content' => array(
    526                         'Admin menu overlap and icons for Smash Balloon Social Photo Feed',
     518                        'More compatibility for Admin Menu Editor',
     519                        'Compatibility for Ultimate Dashboard',
    527520                    )
    528521                ),
  • dashify/trunk/features/navigation/navigation.css

    r3219356 r3242959  
    44}
    55#adminmenuback {
    6     background-color: #ebebeb;
     6    background-color: #ebebeb !important;
    77    width: 240px;
    88}
    99#adminmenuwrap {
    10     background-color: #ebebeb;
     10    background-color: #ebebeb !important;
    1111    width: 240px;
    1212}
     
    112112}
    113113#dashify-navigation li:where(
    114     :not(.admin-menu-editor-active):not(#toplevel_page_woocommerce),
    115     .admin-menu-editor-active
     114    :not(.dashify-has-admin-menu-editor-plugin):not(#toplevel_page_woocommerce),
     115    .dashify-has-admin-menu-editor-plugin
    116116) {
    117117    padding: 0.4rem 0.5rem;
     
    124124#dashify-navigation .wp-submenu:where(
    125125    :not(#toplevel_page_woocommerce ul),
    126     #toplevel_page_woocommerce.admin-menu-editor-active ul
     126    #toplevel_page_woocommerce.dashify-has-admin-menu-editor-plugin ul
    127127) li {
    128128    margin-left: -0.5rem;
     
    131131#dashify-navigation .wp-submenu.wp-submenu:where(
    132132    :not(#toplevel_page_woocommerce ul),
    133     #toplevel_page_woocommerce.admin-menu-editor-active ul
     133    #toplevel_page_woocommerce.dashify-has-admin-menu-editor-plugin ul
    134134) li a {
    135135    padding-left: 1.5rem;
     
    158158#dashify-navigation li:hover:not(.dashify-current):not(.dashify-has-open-submenu):not(.wp-menu-separator):where(
    159159    :not(#toplevel_page_woocommerce),
    160     #toplevel_page_woocommerce.admin-menu-editor-active
     160    #toplevel_page_woocommerce.dashify-has-admin-menu-editor-plugin
    161161) {
    162162    background-color: #f1f1f1;
     
    225225    cursor: pointer;
    226226}
    227 .dashify-menu-heading {
     227.dashify-menu-heading,
     228.ame-menu-heading-item {
    228229    font-size: 0.75rem;
    229230    font-weight: normal;
     
    264265
    265266/* Compatibility: Admin Menu Editor */
     267
    266268li#toplevel_page_woocommerce .wp-menu-image {
    267269    background-image: none !important;
     
    270272}
    271273
     274@media screen and (min-width: 783px) {
     275    #wpadminbar {
     276        margin-left: 0 !important;
     277        width: 100% !important;
     278    }
     279}
     280
     281#dashify-navigation #ame_ms_admin_menu_logo {
     282    background-size: contain;
     283    background-repeat: no-repeat;
     284    background-position: 41%;
     285    background-origin: content-box;
     286    min-height: 10px;
     287    position: relative;
     288    display: block;
     289    box-sizing: content-box;
     290    background-color: #1e1e1e !important;
     291    height: 48px;
     292    padding-left: 7px;
     293    padding-top: 6px;
     294    padding-bottom: 6px;
     295    margin-bottom: 10px;
     296    cursor: auto;
     297}
     298
     299.ame-menu-heading-item {
     300    margin-top: 1rem;
     301    margin-bottom: 0.25rem;
     302}
     303
     304.ame-menu-heading-item:hover {
     305    background-color: inherit !important;
     306    cursor: auto;
     307}
     308
     309.ame-menu-heading-item .wp-menu-image {
     310    display: none;
     311}
     312
    272313/* Compatibility: WPFactory */
    273314#toplevel_page_wpfactory .wp-menu-image {
    274315    background-size: contain;
    275316}
     317
     318/* Compatibility: Ultimate Dashboard (https://wordpress.org/plugins/ultimate-dashboard/) */
     319@media screen and (min-width: 961px) {
     320    .udb-admin-logo-wrapper {
     321        position: inherit !important;
     322    }
     323
     324    .udb-admin-logo-wrapper a {
     325        box-sizing: content-box;
     326        position: absolute;
     327        height: 60px;
     328        top: 0;
     329        left: 0;
     330        width: 160px;
     331        margin-top: -32px;
     332        padding: 10px 30px;
     333        display: flex;
     334        justify-content: center !important;
     335        align-items: center;
     336        border-radius: 0 !important;
     337    }
     338
     339    .udb-admin-logo-wrapper .udb-admin-logo {
     340        max-width: 100%;
     341        max-height: 100%;
     342    }
     343}
  • dashify/trunk/features/navigation/navigation.php

    r3219356 r3242959  
    6565                    });
    6666                }
     67
     68                // Compatibility: Ultimate Dashboard (https://wordpress.org/plugins/ultimate-dashboard/)
     69                const udbLogo = document.querySelector('.udb-admin-logo-wrapper');
     70                if (udbLogo) {
     71                    document.querySelector('#dashify-navigation > ul').appendChild(udbLogo);
     72                }
     73
     74                // Compatibility: Admin Menu Editor (https://wordpress.org/plugins/admin-menu-editor/)
     75                const ameLogo = document.querySelector('#ame_ms_admin_menu_logo')
     76                const ameLogoImageURL = window.getComputedStyle(ameLogo).getPropertyValue('background-image');
     77                if (ameLogo) {
     78                    document.querySelector('#dashify-navigation > ul').prepend(ameLogo);
     79                    ameLogo.style.backgroundImage = ameLogoImageURL;
     80                }
     81                const ameMenuHeadingLinks = document.querySelectorAll('a.ame-menu-heading-item');
     82                if (ameMenuHeadingLinks) {
     83                    for (const a of ameMenuHeadingLinks) {
     84                        a.removeAttribute('href');
     85                    }
     86                }
    6787            </script>
    6888HTML;
     
    80100        global $menu, $submenu, $self, $parent_file, $submenu_file, $plugin_page, $typenow;
    81101
    82         if ( is_plugin_active( 'admin-menu-editor/menu-editor.php' ) ) {
     102        if ( is_plugin_active( 'admin-menu-editor/menu-editor.php' ) || is_plugin_active( 'admin-menu-editor-pro/menu-editor.php' ) ) {
    83103            global $wp_menu_editor;
    84104            if ( isset( $wp_menu_editor ) && $wp_menu_editor->load_custom_menu() ) {
     
    87107        }
    88108
     109        if ( is_plugin_active( 'ultimate-dashboard-pro/ultimate-dashboard-pro.php' ) ) {
     110            if ( $this->udb_admin_menu_editor_enabled() && class_exists( '\UdbPro\AdminMenu\Admin_Menu_Output' ) ) {
     111                $UbdPro_Admin_Menu_Output = \UdbPro\AdminMenu\Admin_Menu_Output::get_instance();
     112                $UbdPro_Admin_Menu_Output::init();
     113                $UbdPro_Admin_Menu_Output->menu_output();
     114            }
     115        }
     116
     117        $has_admin_menu_editor_plugin = $this->has_admin_menu_editor_plugin();
    89118        $html = '';
    90119
    91         if ( ! is_plugin_active( 'admin-menu-editor/menu-editor.php' ) ) {
     120        if ( ! $has_admin_menu_editor_plugin ) {
    92121            $menu[] = array(
    93122                'More',
     
    229258
    230259                // We moved this item out of the WooCommerce submenu and into the top level menu.
     260                // We’re rendering the Settings menu item (or possibly the Payments menu item), and the user is on any settings page.
    231261                if ( strpos( $item[2], 'wc-settings' ) !== false && isset( $_GET['page'] ) && $_GET['page'] === 'wc-settings' ) {
    232                     // If we’re rendering the Payments menu item that links to the payment gateway settings
    233                     // and the user is in the payment gateway settings.
    234262                    if ( strpos( $item[2], 'tab=checkout' ) !== false && isset( $_GET['tab'] ) && $_GET['tab'] === 'checkout' ) {
     263                        // If we’re rendering the Payments menu item that links to the payment gateway settings
     264                        // and the user is in the payment gateway settings, we want to highlight the Payments menu item.
    235265                        $class[] = 'dashify-current';
    236266                    } else if ( strpos( $item[2], 'tab=checkout' ) === false && isset( $_GET['tab'] ) && $_GET['tab'] !== 'checkout' ) {
     267                        // If we’re rending any menu item other than Payments and the user is on a tab other
     268                        // than the payment methods settings, we want to highlight the Settings menu item.
     269                        $class[] = 'dashify-current';
     270                    } else if ( strpos( $item[2], 'tab=checkout' ) === false && ! isset( $_GET['tab'] ) ) {
     271                        // If we’re rendering any menu item other than Payments and there is no tab set in the URL,
     272                        // which means they clicked directly on the Settings menu item and are viewing the General settings,
     273                        // we want to highlight the Settings menu item.
    237274                        $class[] = 'dashify-current';
    238275                    }
     
    248285            }
    249286
    250             if ( is_plugin_active( 'admin-menu-editor/menu-editor.php' ) ) {
    251                 $class[] = 'admin-menu-editor-active';
     287            if ( $has_admin_menu_editor_plugin ) {
     288                $class[] = 'dashify-has-admin-menu-editor-plugin';
    252289            }
    253290
     
    265302
    266303            if ( str_contains( $class, 'wp-menu-separator' ) ) {
    267                 if ( is_plugin_active( 'admin-menu-editor/menu-editor.php' ) ) {
     304                if ( $has_admin_menu_editor_plugin ) {
    268305                    $is_separator = true;
    269306                } else {
     
    303340            // index.php = Dashboard menu item
    304341            $heading = '';
    305             if ( ! is_plugin_active( 'admin-menu-editor/menu-editor.php' ) ) {
     342            if ( ! $has_admin_menu_editor_plugin ) {
    306343                $heading = $item[2] === 'index.php' ? '<span class="dashify-menu-heading">Site management</span>' : '';
    307344            }
     
    369406                ) {
    370407                    $admin_is_parent = true;
    371                     if ( $item[2] !== 'woocommerce' || is_plugin_active( 'admin-menu-editor/menu-editor.php' ) ) {
     408                    if ( $item[2] !== 'woocommerce' || $has_admin_menu_editor_plugin ) {
    372409                        $style = $item[2] === 'meowapps-main-menu' ? 'style="padding-left: 24px;"' : '';
    373410                        $html .= "
     
    392429                    ";
    393430                }
    394                 if ( ! empty( $submenu_items ) && ( $item[2] !== 'woocommerce' || is_plugin_active( 'admin-menu-editor/menu-editor.php' ) ) ) {
     431                if ( ! empty( $submenu_items ) && ( $item[2] !== 'woocommerce' || $has_admin_menu_editor_plugin ) ) {
    395432                    $html .= '
    396433                            <img
     
    440477
    441478            if ( ! empty( $submenu_items ) ) {
    442                 if ( $item[2] === 'woocommerce' && ! is_plugin_active( 'admin-menu-editor/menu-editor.php' ) ) {
     479                if ( $item[2] === 'woocommerce' && ! $has_admin_menu_editor_plugin ) {
    443480                    $html .= "\n\t<ul class='wp-submenu wp-submenu-wrap'>";
    444481                } else {
     
    457494                    // We’ll skip these so they are not rendered.
    458495                    $moved_submenu_items = array( 'wc-reports', 'wc-settings', 'wc-status', 'wc-admin&path=/extensions' );
    459                     if ( in_array( $sub_item[2], $moved_submenu_items ) && ! is_plugin_active( 'admin-menu-editor/menu-editor.php' ) ) {
     496                    if ( in_array( $sub_item[2], $moved_submenu_items ) && ! $has_admin_menu_editor_plugin ) {
    460497                        continue;
    461498                    }
     
    627664                        }
    628665                    }
    629                     if ( is_plugin_active( 'admin-menu-editor/menu-editor.php' ) ) {
     666                    if ( $has_admin_menu_editor_plugin ) {
    630667                        $icon = '';
    631668                    }
     
    674711        }
    675712
    676         if ( is_plugin_active( 'admin-menu-editor/menu-editor.php' ) ) {
     713        if ( is_plugin_active( 'admin-menu-editor/menu-editor.php' ) || is_plugin_active( 'admin-menu-editor-pro/menu-editor.php' ) ) {
    677714            // $wp_menu_editor is a global from the beginning of this function.
    678715            if ( isset( $wp_menu_editor ) && $wp_menu_editor->load_custom_menu() ) {
     
    685722
    686723    public function move_woocommerce_to_top( $menu_order ) {
    687         if ( is_plugin_active( 'admin-menu-editor/menu-editor.php' ) ) {
     724        if ( $this->has_admin_menu_editor_plugin() ) {
    688725            return $menu_order;
    689726        }
     
    719756
    720757        return $menu_order;
     758    }
     759
     760    private function has_admin_menu_editor_plugin() {
     761        return
     762            is_plugin_active( 'admin-menu-editor/menu-editor.php' ) ||
     763            is_plugin_active( 'admin-menu-editor-pro/menu-editor.php' ) ||
     764            (
     765                is_plugin_active( 'ultimate-dashboard-pro/ultimate-dashboard-pro.php' ) &&
     766                $this->udb_admin_menu_editor_enabled()
     767            );
     768    }
     769
     770    private function udb_admin_menu_editor_enabled() {
     771        $udb_saved_modules = get_option( 'udb_modules' );
     772        return $udb_saved_modules && isset( $udb_saved_modules['admin_menu_editor'] ) && 'true' === $udb_saved_modules['admin_menu_editor'];
    721773    }
    722774
  • dashify/trunk/readme.txt

    r3219356 r3242959  
    44Requires at least: 4.7
    55Tested up to: 6.7
    6 Stable tag: 1.3.10
     6Stable tag: 1.3.11
    77Requires PHP: 7.0
    88License: GPLv2 or later
     
    8484- Smash Balloon Social Photo Feed — Smash Balloon
    8585- FiboSearch — FiboSearch Team
     86- Ultimate Dashboard — David Vongries
    8687
    8788If you find a plugin that’s not compatible, leave a message in the [WordPress.org support forum](https://wordpress.org/support/plugin/dashify/) or contact us through the [Dashify Help Desk](https://forms.gle/pRezSbdUcZmvZdX27), and we'll gladly add compatibility for it.
     
    126127== Changelog ==
    127128
    128 ### 1.3.10 (2025-01-04)
     129### 1.3.11 (2025-02-18)
     130
     131#### Improvements
     132- Added compatibility for Admin Menu Editor by Janis Elsts: custom logo option and menu headings.
     133- Added compatibility for Ultimate Dashboard by David Vongries: custom logo option and admin menu editor module.
     134
     135#### Bug fixes
     136- Fixed Admin Menu Editor compatibility not working for Admin Menu Editor Pro.
     137- Fixed other plugins potentially changing Dashify’s admin menu background color which made the text unreadable.
     138- Fixed a random “a” appearing in the order list when Admin Columns Pro by Codepress is enabled.
     139- Fixed the Settings menu item not being highlighted after clicking on it.
     140
     141### 1.3.10 (2025-01-08)
    129142
    130143#### Improvements
Note: See TracChangeset for help on using the changeset viewer.