Changeset 6282
- Timestamp:
- 08/31/2012 03:44:52 AM (12 years ago)
- Location:
- trunk/bp-groups
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-admin.php
r6280 r6282 116 116 add_meta_box( 'bp_group_add_members', _x( 'Add New Members', 'group admin edit screen', 'buddypress' ), 'bp_groups_admin_edit_metabox_add_new_members', get_current_screen()->id, 'normal', 'core' ); 117 117 add_meta_box( 'bp_group_members', _x( 'Manage Members', 'group admin edit screen', 'buddypress' ), 'bp_groups_admin_edit_metabox_members', get_current_screen()->id, 'normal', 'core' ); 118 119 do_action( 'bp_groups_admin_meta_boxes' ); 118 120 119 121 // Enqueue javascripts … … 319 321 320 322 // Call actions for plugins to do something before we redirect 321 do_action _ref_array( 'bp_group_admin_edit_after', array( &$group, $error, $error_new, $success_new, $error_modified, $success_modified ));323 do_action( 'bp_group_admin_edit_after', $group_id ); 322 324 323 325 // Create the redirect URL -
trunk/bp-groups/bp-groups-classes.php
r6276 r6282 1295 1295 var $enable_nav_item = true; 1296 1296 var $enable_edit_item = true; 1297 var $enable_admin_item = true; 1297 1298 1298 1299 var $nav_item_name = false; … … 1314 1315 1315 1316 function create_screen_save() {} 1317 1318 function admin_screen( $group_id ) {} 1319 1320 function admin_screen_save( $group_id ) {} 1316 1321 1317 1322 // Private Methods … … 1388 1393 } 1389 1394 } 1395 1396 // Construct the admin metabox 1397 if ( ! empty( $this->enable_admin_item ) ) { 1398 // Hook the admin screen markup function to the content hook 1399 add_action( 'bp_groups_admin_meta_box_content_' . $this->slug, array( $this, 'admin_screen' ) ); 1400 1401 // Initialize the metabox 1402 add_action( 'bp_groups_admin_meta_boxes', array( $this, '_meta_box_display_callback' ) ); 1403 1404 // Catch the metabox save 1405 add_action( 'bp_group_admin_edit_after', array( $this, 'admin_screen_save' ), 10 ); 1406 } 1390 1407 } 1391 1408 … … 1394 1411 bp_core_load_template( apply_filters( 'bp_core_template_plugin', $this->template_file ) ); 1395 1412 } 1413 1414 /** 1415 * Create the Dashboard meta box for this extension 1416 * 1417 * @since BuddyPress (1.7) 1418 */ 1419 function _meta_box_display_callback() { 1420 $group_id = isset( $_GET['gid'] ) ? (int) $_GET['gid'] : 0; 1421 1422 add_meta_box( 1423 $this->slug, 1424 $this->name, 1425 create_function( '', 'do_action( "bp_groups_admin_meta_box_content_' . $this->slug . '", ' . $group_id . ' );' ), 1426 get_current_screen()->id, 1427 'normal', 1428 'core' 1429 ); 1430 } 1396 1431 } 1397 1432 … … 1403 1438 // Register the group extension on the bp_init action so we have access 1404 1439 // to all plugins. 1405 add_action( 'bp_init', create_function( '', '$extension = new ' . $group_extension_class . '; add_action( "bp_actions", array( &$extension, "_register" ), 8 );' ), 11 ); 1440 add_action( 'bp_init', create_function( '', ' 1441 $extension = new ' . $group_extension_class . '; 1442 add_action( "bp_actions", array( &$extension, "_register" ), 8 ); 1443 add_action( "admin_init", array( &$extension, "_register" ) ); 1444 ' ), 11 ); 1406 1445 } 1407 1446
Note: See TracChangeset
for help on using the changeset viewer.