Skip to:
Content

BuddyPress.org

Changeset 13296


Ignore:
Timestamp:
07/06/2022 10:46:45 AM (2 years ago)
Author:
imath
Message:

Remove unnecessary 3rd argument when using has_action()

has_action() only accepts 2 arguments.

Props oztaser

Fixes #8635

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/bp-blogs-template.php

    r13184 r13296  
    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    }
  • trunk/src/bp-core/bp-core-rest-api.php

    r13140 r13296  
    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
  • trunk/src/bp-friends/bp-friends-blocks.php

    r13204 r13296  
    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' );
  • trunk/src/bp-groups/bp-groups-blocks.php

    r13204 r13296  
    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' );
  • trunk/src/bp-groups/bp-groups-template.php

    r13273 r13296  
    37903790function bp_group_backcompat_create_nav_item() {
    37913791    // Bail if the Groups nav item is already used by bp-legacy.
    3792     if ( has_action( 'bp_groups_directory_group_filter', 'bp_legacy_theme_group_create_nav', 999 ) ) {
     3792    if ( has_action( 'bp_groups_directory_group_filter', 'bp_legacy_theme_group_create_nav' ) ) {
    37933793        return;
    37943794    }
  • trunk/src/bp-members/bp-members-blocks.php

    r13204 r13296  
    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' );
Note: See TracChangeset for help on using the changeset viewer.