Skip to:
Content

BuddyPress.org

Ticket #9052: 9052.01.patch

File 9052.01.patch, 1.0 KB (added by emaralive, 3 years ago)

Revised Patch

  • src/bp-core/bp-core-filters.php

    diff --git src/bp-core/bp-core-filters.php src/bp-core/bp-core-filters.php
    index 0ef025a97..cccc84d5b 100644
    add_filter( 'customize_nav_menu_available_item_types', 'bp_customizer_nav_menus_  
    951951 *
    952952 * @since 12.0.0
    953953 *
    954  * @param WP_Post[] $pages Array of page objects.
    955  * @param array     $args  Array of get_pages() arguments.
    956  * @return WP_Post[]       Array of page objects, potentially including BP directories.
     954 * @param WP_Post[]  $pages Array of page objects.
     955 * @param array      $args  Array of get_pages() arguments.
     956 * @return WP_Post[] $pages Array of page objects, potentially including BP directories.
    957957 */
    958958function bp_core_include_directory_on_front( $pages = array(), $args = array() ) {
     959        // Prevent duplicate "page on front" option values when the 'legacy' BuddyPress URL Parser is in use.
     960        if ( 'rewrites' !== bp_core_get_query_parser() ) {
     961                return $pages;
     962        }
     963
    959964        $is_page_on_front_dropdown = false;
    960965
    961966        if ( isset( $args['name'] ) ) {