Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/04/2020 11:42:49 AM (5 years ago)
Author:
imath
Message:

Administration: improve how BP Member Nav Menu items are managed

Since WordPress 5.3, the WP nav menu meta boxes had their output modified to improve a11y. The most visible improvement was to use a checkbox to select all box's current panel menu items instead of a link. This change also modified the JavaScript causing the BP Member nav menu meta box to fail at selecting all menu items.

As we support WordPress versions that are older than 5.3, we had to review the way we were extending the Accordion Menu box so that we can enjoy WP 5.3 improvements and keeps on being back compatible with previous versions of WordPress.

As this new way does not need the BP_Walker_Nav_Menu_Checklist class anymore, we are deprecating the class's corresponding file without removing the class from our Classes Autoloader in case some plugin developers are using it directly.

Once we will be sure no plugin developers are using it directly, we will need to delete the class's file and remove the class from our Classes Autoloader.

Props vapvarun

Fixes #8291

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-walker-nav-menu-checklist.php

    r10417 r12678  
    66 * @subpackage Core
    77 * @since 1.9.0
     8 * @deprecated 7.0.0 This file is no longer used as of the improved way to generate BuddyPress Member's nav menu items in #8291.
     9 * @todo Remove this file as it is no longer used.
    810 */
    911
    1012// Exit if accessed directly.
    1113defined( 'ABSPATH' ) || exit;
     14
     15_deprecated_file( basename( __FILE__ ), '7.0.0' );
    1216
    1317/**
     
    1822 *
    1923 * @since 1.9.0
     24 * @deprecated 7.0.0 This class is no longer used as of the improved way to generate BuddyPress Member's nav menu items in #8291.
    2025 */
    2126class BP_Walker_Nav_Menu_Checklist extends Walker_Nav_Menu {
     
    2429     * Constructor.
    2530     *
     31     * @deprecated 7.0.0
     32     *
    2633     * @see Walker_Nav_Menu::__construct() for a description of parameters.
    2734     *
     
    2936     */
    3037    public function __construct( $fields = false ) {
     38        _deprecated_function( __METHOD__, '7.0.0' );
    3139        if ( $fields ) {
    3240            $this->db_fields = $fields;
     
    3745     * Create the markup to start a tree level.
    3846     *
     47     * @deprecated 7.0.0
     48     *
    3949     * @see Walker_Nav_Menu::start_lvl() for description of parameters.
    4050     *
     
    4454     */
    4555    public function start_lvl( &$output, $depth = 0, $args = array() ) {
     56        _deprecated_function( __METHOD__, '7.0.0' );
    4657        $indent = str_repeat( "\t", $depth );
    4758        $output .= "\n$indent<ul class='children'>\n";
     
    5061    /**
    5162     * Create the markup to end a tree level.
     63     *
     64     * @deprecated 7.0.0
    5265     *
    5366     * @see Walker_Nav_Menu::end_lvl() for description of parameters.
     
    5871     */
    5972    public function end_lvl( &$output, $depth = 0, $args = array() ) {
     73        _deprecated_function( __METHOD__, '7.0.0' );
    6074        $indent = str_repeat( "\t", $depth );
    6175        $output .= "\n$indent</ul>";
     
    6478    /**
    6579     * Create the markup to start an element.
     80     *
     81     * @deprecated 7.0.0
    6682     *
    6783     * @see Walker::start_el() for description of parameters.
     
    7591     */
    7692    function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
     93        _deprecated_function( __METHOD__, '7.0.0' );
    7794        global $_nav_menu_placeholder;
    7895
Note: See TracChangeset for help on using the changeset viewer.