Skip to:
Content

BuddyPress.org

Ticket #8635: 8635.4.diff

File 8635.4.diff, 3.5 KB (added by oztaser, 2 years ago)

has_action expecting 2 arguments, not 3.

  • src/bp-blogs/bp-blogs-template.php

    diff --git src/bp-blogs/bp-blogs-template.php src/bp-blogs/bp-blogs-template.php
    index cf6b7ddfe..c2d6ad32f 100644
    function bp_blog_create_nav_item() { 
    15261526 */
    15271527function bp_blog_backcompat_create_nav_item() {
    15281528        // Bail if Blogs nav item is already used by bp-legacy.
    1529         if ( has_action( 'bp_blogs_directory_blog_types', 'bp_legacy_theme_blog_create_nav', 999 ) ) {
     1529        if ( has_action( 'bp_blogs_directory_blog_types', 'bp_legacy_theme_blog_create_nav' ) ) {
    15301530                return;
    15311531        }
    15321532
  • src/bp-core/bp-core-rest-api.php

    diff --git src/bp-core/bp-core-rest-api.php src/bp-core/bp-core-rest-api.php
    index 0f61d0463..2071068f1 100644
    defined( 'ABSPATH' ) || exit; 
    1818 * @return boolean True if the BP REST plugin is active. False otherwise.
    1919 */
    2020function bp_rest_is_plugin_active() {
    21         return (bool) has_action( 'bp_rest_api_init', 'bp_rest', 5 );
     21        return (bool) has_action( 'bp_rest_api_init', 'bp_rest' );
    2222}
    2323
    2424/**
  • src/bp-friends/bp-friends-blocks.php

    diff --git src/bp-friends/bp-friends-blocks.php src/bp-friends/bp-friends-blocks.php
    index 9bdc0d0e4..47655efa0 100644
    function bp_friends_render_friends_block( $attributes = array() ) { 
    233233                );
    234234
    235235                // Only enqueue common/specific scripts and data once per page load.
    236                 if ( ! has_action( 'wp_footer', 'bp_friends_blocks_add_script_data', 1 ) ) {
     236                if ( ! has_action( 'wp_footer', 'bp_friends_blocks_add_script_data' ) ) {
    237237                        wp_set_script_translations( 'bp-friends-script', 'buddypress' );
    238238                        wp_enqueue_script( 'bp-friends-script' );
    239239
  • src/bp-groups/bp-groups-blocks.php

    diff --git src/bp-groups/bp-groups-blocks.php src/bp-groups/bp-groups-blocks.php
    index d61ca4ea7..bc5201a78 100644
    function bp_groups_render_dynamic_groups_block( $attributes = array() ) { 
    509509                );
    510510
    511511                // Only enqueue common/specific scripts and data once per page load.
    512                 if ( ! has_action( 'wp_footer', 'bp_groups_blocks_add_script_data', 1 ) ) {
     512                if ( ! has_action( 'wp_footer', 'bp_groups_blocks_add_script_data' ) ) {
    513513                        wp_set_script_translations( 'bp-dynamic-groups-script', 'buddypress' );
    514514                        wp_enqueue_script( 'bp-dynamic-groups-script' );
    515515
  • src/bp-groups/bp-groups-template.php

    diff --git src/bp-groups/bp-groups-template.php src/bp-groups/bp-groups-template.php
    index 15c70e865..246d9ba36 100644
    function bp_group_create_nav_item() { 
    37773777 */
    37783778function bp_group_backcompat_create_nav_item() {
    37793779        // Bail if the Groups nav item is already used by bp-legacy.
    3780         if ( has_action( 'bp_groups_directory_group_filter', 'bp_legacy_theme_group_create_nav', 999 ) ) {
     3780        if ( has_action( 'bp_groups_directory_group_filter', 'bp_legacy_theme_group_create_nav' ) ) {
    37813781                return;
    37823782        }
    37833783
  • src/bp-members/bp-members-blocks.php

    diff --git src/bp-members/bp-members-blocks.php src/bp-members/bp-members-blocks.php
    index 7ccfc5b66..d84530640 100644
    function bp_members_render_dynamic_members_block( $attributes = array() ) { 
    526526                );
    527527
    528528                // Only enqueue common/specific scripts and data once per page load.
    529                 if ( ! has_action( 'wp_footer', 'bp_members_blocks_add_script_data', 1 ) ) {
     529                if ( ! has_action( 'wp_footer', 'bp_members_blocks_add_script_data' ) ) {
    530530                        wp_set_script_translations( 'bp-dynamic-members-script', 'buddypress' );
    531531                        wp_enqueue_script( 'bp-dynamic-members-script' );
    532532