diff --git src/bp-groups/classes/class-bp-group-extension.php src/bp-groups/classes/class-bp-group-extension.php
index 208e2ff..c51b9ed 100644
|
|
class BP_Group_Extension { (this hunk was shorter than expected) |
752 | 752 | |
753 | 753 | // When we are viewing the extension display page, set the title and options title. |
754 | 754 | if ( bp_is_current_action( $this->slug ) ) { |
| 755 | $name = $this->name; |
755 | 756 | add_filter( 'bp_group_user_has_access', array( $this, 'group_access_protection' ), 10, 2 ); |
756 | | add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); |
757 | | add_action( 'bp_template_title', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) ); |
| 757 | add_action( 'bp_template_content_header', function() use ( $name ) { echo esc_attr( $name ); } ); |
| 758 | add_action( 'bp_template_title', function() use ( $name ) { echo esc_attr( $name ); } ); |
758 | 759 | } |
759 | 760 | } |
… |
… |
class BP_Group_Extension { |
1184 | 1189 | public function _meta_box_display_callback() { |
1185 | 1190 | $group_id = isset( $_GET['gid'] ) ? (int) $_GET['gid'] : 0; |
1186 | 1191 | $screen = $this->screens['admin']; |
1187 | | |
| 1192 | $slug = $this->slug; |
1188 | 1193 | add_meta_box( |
1189 | 1194 | $screen['slug'], |
1190 | 1195 | $screen['name'], |
1191 | | create_function( '', 'do_action( "bp_groups_admin_meta_box_content_' . $this->slug . '", ' . $group_id . ' );' ), |
| 1196 | function() use ( $slug, $group_id ) { |
| 1197 | |
| 1198 | /** |
| 1199 | * Fires as part of the add_meta_box callback. |
| 1200 | * |
| 1201 | * Note this is a dynamic action that relies on the current extension slug. |
| 1202 | * |
| 1203 | * @since 1.7.0 |
| 1204 | * |
| 1205 | * @param int $group_id Current group ID. |
| 1206 | */ |
| 1207 | do_action( 'bp_groups_admin_meta_box_content_{$slug}', $group_id ); |
| 1208 | }, |
1192 | 1209 | get_current_screen()->id, |
1193 | 1210 | $screen['metabox_context'], |
1194 | 1211 | $screen['metabox_priority'] |