Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/29/2019 04:38:37 AM (6 years ago)
Author:
johnjamesjacoby
Message:

Upgrades: append upgrade count to "Tools" if there are pending upgrades

  • Add function and method to tweak the $menu global
  • Add styling for count in nav-tab-wrapper UI

This change adds a span.awaiting-mod wrapper around the pending upgrade count in a few strategic locations around the WordPress Admin UI.

See #3244.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/tools.php

    r6896 r6897  
    481481            $tab_class  = $is_current ? $active_class : $idle_class;
    482482            $tab_url    = add_query_arg( array( 'page' => $tab['page'] ), admin_url( 'tools.php' ) );
    483             $tabs_html .= '<a href="' . esc_url( $tab_url ) . '" class="' . esc_attr( $tab_class ) . '">' . esc_html( $tab['name'] ) . '</a>';
     483
     484            // Tab name is not escaped - may contain HTML
     485            $tabs_html .= '<a href="' . esc_url( $tab_url ) . '" class="' . esc_attr( $tab_class ) . '">' . $tab['name'] . '</a>';
    484486        }
    485487
     
    515517            'func' => 'bbp_admin_upgrade_page',
    516518            'cap'  => 'bbp_tools_upgrade_page',
    517             'name' => esc_html__( 'Upgrade Forums', 'bbpress' ),
     519            'name' => bbp_maybe_append_pending_upgrade_count( esc_html__( 'Upgrade Forums', 'bbpress' ) ),
    518520
    519521            // Deprecated 2.6.0
Note: See TracChangeset for help on using the changeset viewer.