Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/02/2017 08:13:14 PM (7 years ago)
Author:
tw2113
Message:

Removes usage of create_function across various BuddyPress components.

See #7325.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/classes/class-bp-group-extension.php

    r11091 r11366  
    975975                $this->edit_screen_template = '/groups/single/home';
    976976            } else {
    977                 add_action( 'bp_template_content_header', create_function( '', 'echo "<ul class=\"content-header-nav\">"; bp_group_admin_tabs(); echo "</ul>";' ) );
     977                add_action( 'bp_template_content_header', function() {
     978                    echo '<ul class="content-header-nav">';
     979                    bp_group_admin_tabs();
     980                    echo '</ul>';
     981                } );
    978982                add_action( 'bp_template_content', array( &$this, 'call_edit_screen' ) );
    979983                $this->edit_screen_template = '/groups/single/plugins';
     
    16911695    // Register the group extension on the bp_init action so we have access
    16921696    // to all plugins.
    1693     add_action( 'bp_init', create_function( '', '
    1694         $extension = new ' . $group_extension_class . ';
    1695         add_action( "bp_actions", array( &$extension, "_register" ), 8 );
    1696         add_action( "admin_init", array( &$extension, "_register" ) );
    1697     ' ), 11 );
     1697    add_action( 'bp_init', function() use ( $group_extension_class ) {
     1698        $extension = new $group_extension_class;
     1699        add_action( 'bp_actions', array( &$extension, '_register' ), 8 );
     1700        add_action( 'admin_init', array( &$extension, '_register' ) );
     1701    }, 11 );
    16981702}
Note: See TracChangeset for help on using the changeset viewer.