Changeset 9267
- Timestamp:
- 12/24/2014 02:28:15 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-admin.php
r9227 r9267 553 553 $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 554 554 $css = $this->css_url . "admin{$min}.css"; 555 556 /** 557 * Filters the CSS URL to enqueue in the Members admin area. 558 * 559 * @since BuddyPress (2.0.0) 560 * 561 * @param string $css URL to the CSS admin file to load. 562 */ 555 563 $css = apply_filters( 'bp_members_admin_css', $css ); 556 564 … … 562 570 } 563 571 564 // Only load javascript for BuddyPress profile572 // Only load JavaScript for BuddyPress profile 565 573 if ( get_current_screen()->id == $this->user_page ) { 566 574 $js = $this->js_url . "admin{$min}.js"; 575 576 /** 577 * Filters the JS URL to enqueue in the Members admin area. 578 * 579 * @since BuddyPress (2.0.0) 580 * 581 * @param string $js URL to the JavaScript admin file to load. 582 */ 567 583 $js = apply_filters( 'bp_members_admin_js', $js ); 568 584 wp_enqueue_script( 'bp-members-js', $js, array( 'jquery' ), bp_get_version(), true ); 569 585 } 570 586 571 // Plugins may want to hook here to load some css/js 587 /** 588 * Fires after all of the members JavaScript and CSS is enqueued. 589 * 590 * @since BuddyPress (2.0.0) 591 * 592 * @param string $id ID of the current screen. 593 * @param array $screen_id Array of allowed screens to add scripts and styles to. 594 */ 572 595 do_action( 'bp_members_admin_enqueue_scripts', get_current_screen()->id, $this->screen_id ); 573 596 } … … 660 683 } 661 684 662 // Call an action for plugins to hook in early 685 /** 686 * Fires at the start of the signups admin load. 687 * 688 * @since BuddyPress (2.0.0) 689 * 690 * @param string $doaction Current bulk action being processed. 691 * @param array $_REQUEST Current $_REQUEST global. 692 */ 663 693 do_action_ref_array( 'bp_members_admin_load', array( $doaction, $_REQUEST ) ); 664 694 665 // Allowed actions 695 /** 696 * Filters the allowed actions for use in the user admin page. 697 * 698 * @since BuddyPress (2.0.0) 699 * 700 * @param array $value Array of allowed actions to use. 701 */ 666 702 $allowed_actions = apply_filters( 'bp_members_admin_allowed_actions', array( 'update', 'delete_avatar', 'spam', 'ham' ) ); 667 703 … … 701 737 702 738 /** 703 * xProfile Hooks to load the profile fields if component is active 704 * Plugins should not use this hook, please use 'bp_members_admin_user_metaboxes' instead 739 * Fires before loading the profile fields if component is active. 740 * 741 * Plugins should not use this hook, please use 'bp_members_admin_user_metaboxes' instead. 742 * 743 * @since BuddyPress (2.0.0) 744 * 745 * @param int $user_id Current user ID for the screen. 746 * @param string $id Current screen ID. 747 * @param object $stats_metabox Object holding position data for use with the stats metabox. 705 748 */ 706 749 do_action_ref_array( 'bp_members_admin_xprofile_metabox', array( $user_id, get_current_screen()->id, $this->stats_metabox ) ); … … 737 780 738 781 /** 739 * Custom metabox ? 740 * Plugins can restrict metabox to "bp_moderate" admins checking 741 * the first argument ($this->is_self_profile) is false in their hook 742 * They can also restruct their metabox to self profile editing 743 * by cheking it set to true. 782 * Fires at the end of the Community Profile screen. 783 * 784 * Plugins can restrict metabox to "bp_moderate" admins by checking if 785 * the first argument ($this->is_self_profile) is false in their callback. 786 * They can also restrict their metabox to self profile editing 787 * by setting it to true. 788 * 789 * @since BuddyPress (2.0.0) 790 * 791 * @param bool $is_self_profile Whether or not it is the current user's profile. 792 * @param int $user_id Current user ID. 744 793 */ 745 794 do_action( 'bp_members_admin_user_metaboxes', $this->is_self_profile, $user_id ); … … 766 815 $this->redirect = $redirect_to; 767 816 817 /** 818 * Fires at end of user profile admin load if doaction does not match any available actions. 819 * 820 * @since BuddyPress (2.0.0) 821 * 822 * @param string $doaction Current bulk action being processed. 823 * @param int $user_id Current user ID. 824 * @param array $_REQUEST Current $_REQUEST global. 825 * @param string $redirect Determined redirect url to send user to. 826 */ 768 827 do_action_ref_array( 'bp_members_admin_update_user', array( $doaction, $user_id, $_REQUEST, $this->redirect ) ); 769 828 … … 1006 1065 // Loading other stats only if user has activated their account 1007 1066 if ( empty( $user->user_status ) ) { 1067 1068 /** 1069 * Fires in the user stats metabox if the user has activated their account. 1070 * 1071 * @since BuddyPress (2.0.0) 1072 * 1073 * @param array $value Array holding the user ID. 1074 * @param object $user Current displayed user object. 1075 */ 1008 1076 do_action( 'bp_members_admin_user_stats', array( 'user_id' => $user->ID ), $user ); 1009 1077 } … … 1313 1381 $doaction = bp_admin_list_table_current_bulk_action(); 1314 1382 1315 // Call an action for plugins to hook in early 1383 /** 1384 * Fires at the start of the signups admin load. 1385 * 1386 * @since BuddyPress (2.0.0) 1387 * 1388 * @param string $doaction Current bulk action being processed. 1389 * @param array $_REQUEST Current $_REQUEST global. 1390 */ 1316 1391 do_action( 'bp_signups_admin_load', $doaction, $_REQUEST ); 1317 1392 1318 // Allowed actions 1393 /** 1394 * Filters the allowed actions for use in the user signups admin page. 1395 * 1396 * @since BuddyPress (2.0.0) 1397 * 1398 * @param array $value Array of allowed actions to use. 1399 */ 1319 1400 $allowed_actions = apply_filters( 'bp_signups_admin_allowed_actions', array( 'do_delete', 'do_activate', 'do_resend' ) ); 1320 1401 … … 1447 1528 $this->redirect = $redirect_to; 1448 1529 1530 /** 1531 * Fires at end of signups admin load if doaction does not match any actions. 1532 * 1533 * @since BuddyPress (2.0.0) 1534 * 1535 * @param string $doaction Current bulk action being processed. 1536 * @param array $_REQUEST Current $_REQUEST global. 1537 * @param string $redirect Determined redirect url to send user to. 1538 */ 1449 1539 do_action( 'bp_members_admin_update_signups', $doaction, $_REQUEST, $this->redirect ); 1450 1540
Note: See TracChangeset
for help on using the changeset viewer.