Changeset 2656
- Timestamp:
- 02/10/2010 09:13:14 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity.php
r2644 r2656 84 84 do_action( 'bp_activity_setup_globals' ); 85 85 } 86 add_action( ' plugins_loaded', 'bp_activity_setup_globals', 5);86 add_action( 'bp_setup_globals', 'bp_activity_setup_globals' ); 87 87 add_action( 'admin_menu', 'bp_activity_setup_globals', 2 ); 88 88 … … 99 99 bp_core_add_root_component( BP_ACTIVITY_SLUG ); 100 100 } 101 add_action( ' plugins_loaded', 'bp_activity_setup_root_component', 2);101 add_action( 'bp_setup_root_components', 'bp_activity_setup_root_component' ); 102 102 103 103 function bp_activity_setup_nav() { … … 134 134 do_action( 'bp_activity_setup_nav' ); 135 135 } 136 add_action( ' plugins_loaded', 'bp_activity_setup_nav' );136 add_action( 'bp_setup_nav', 'bp_activity_setup_nav' ); 137 137 add_action( 'admin_menu', 'bp_activity_setup_nav' ); 138 138 … … 1092 1092 add_action( 'make_spam_user', 'bp_activity_remove_data' ); 1093 1093 1094 1095 /******************************************************************************** 1096 * Custom Actions 1097 * 1098 * Functions to set up custom BuddyPress actions that all other components can 1099 * hook in to. 1100 */ 1101 1102 /* Allow core components and dependent plugins to register activity actions */ 1103 function bp_register_activity_actions() { 1104 do_action( 'bp_register_activity_actions' ); 1105 } 1106 add_action( 'plugins_loaded', 'bp_register_activity_actions' ); 1107 1108 1094 1109 ?> -
trunk/bp-blogs.php
r2636 r2656 101 101 do_action( 'bp_blogs_setup_globals' ); 102 102 } 103 add_action( ' plugins_loaded', 'bp_blogs_setup_globals', 5);103 add_action( 'bp_setup_globals', 'bp_blogs_setup_globals' ); 104 104 add_action( 'admin_menu', 'bp_blogs_setup_globals', 2 ); 105 105 … … 108 108 bp_core_add_root_component( BP_BLOGS_SLUG ); 109 109 } 110 add_action( ' plugins_loaded', 'bp_blogs_setup_root_component', 2);110 add_action( 'bp_setup_root_components', 'bp_blogs_setup_root_component' ); 111 111 112 112 /** … … 152 152 do_action( 'bp_blogs_setup_nav' ); 153 153 } 154 add_action( ' plugins_loaded', 'bp_blogs_setup_nav' );154 add_action( 'bp_setup_nav', 'bp_blogs_setup_nav' ); 155 155 add_action( 'admin_menu', 'bp_blogs_setup_nav' ); 156 156 … … 231 231 do_action( 'bp_blogs_register_activity_actions' ); 232 232 } 233 add_action( ' plugins_loaded', 'bp_blogs_register_activity_actions' );233 add_action( 'bp_register_activity_actions', 'bp_blogs_register_activity_actions' ); 234 234 235 235 function bp_blogs_record_activity( $args = '' ) { … … 829 829 add_action( 'delete_user', 'bp_blogs_remove_data', 1 ); 830 830 831 832 /******************************************************************************** 833 * Caching 834 * 835 * Caching functions handle the clearing of cached objects and pages on specific 836 * actions throughout BuddyPress. 837 */ 838 831 839 function bp_blogs_clear_blog_object_cache( $blog_id, $user_id ) { 832 840 wp_cache_delete( 'bp_blogs_of_user_' . $user_id, 'bp' ); -
trunk/bp-core.php
r2653 r2656 182 182 do_action( 'bp_core_setup_globals' ); 183 183 } 184 add_action( ' plugins_loaded', 'bp_core_setup_globals', 5);184 add_action( 'bp_setup_globals', 'bp_core_setup_globals' ); 185 185 add_action( '_admin_menu', 'bp_core_setup_globals', 2 ); // must be _admin_menu hook. 186 186 … … 378 378 } 379 379 } 380 add_action( ' plugins_loaded', 'bp_core_setup_nav' );380 add_action( 'bp_setup_nav', 'bp_core_setup_nav' ); 381 381 add_action( 'admin_menu', 'bp_core_setup_nav' ); 382 382 … … 2063 2063 add_filter( 'login_redirect', 'bp_core_login_redirect' ); 2064 2064 2065 2066 /******************************************************************************** 2067 * Custom Actions 2068 * 2069 * Functions to set up custom BuddyPress actions that all other components can 2070 * hook in to. 2071 */ 2072 2073 /* Allow core components and dependent plugins to set globals */ 2074 function bp_setup_globals() { 2075 do_action( 'bp_setup_globals' ); 2076 } 2077 add_action( 'plugins_loaded', 'bp_setup_globals', 5 ); 2078 2079 /* Allow core components and dependent plugins to set root components */ 2080 function bp_setup_root_components() { 2081 do_action( 'bp_setup_root_components' ); 2082 } 2083 add_action( 'plugins_loaded', 'bp_setup_root_components', 2 ); 2084 2085 /* Allow core components and dependent plugins to set their nav */ 2086 function bp_setup_nav() { 2087 do_action( 'bp_setup_nav' ); 2088 } 2089 add_action( 'plugins_loaded', 'bp_setup_nav' ); 2090 2091 2092 /******************************************************************************** 2093 * Caching 2094 * 2095 * Caching functions handle the clearing of cached objects and pages on specific 2096 * actions throughout BuddyPress. 2097 */ 2098 2065 2099 /** 2066 2100 * bp_core_clear_user_object_cache() -
trunk/bp-core/bp-core-widgets.php
r2544 r2656 8 8 add_action('widgets_init', create_function('', 'return register_widget("BP_Core_Recently_Active_Widget");') ); 9 9 } 10 add_action( ' plugins_loaded', 'bp_core_register_widgets' );10 add_action( 'bp_register_widgets', 'bp_core_register_widgets' ); 11 11 12 12 /*** WELCOME WIDGET *****************/ -
trunk/bp-forums.php
r2641 r2656 29 29 do_action( 'bp_forums_setup' ); 30 30 } 31 add_action( ' plugins_loaded', 'bp_forums_setup', 5);31 add_action( 'bp_setup_globals', 'bp_forums_setup' ); 32 32 add_action( 'admin_head', 'bp_forums_setup', 2 ); 33 33 … … 45 45 bp_core_add_root_component( BP_FORUMS_SLUG ); 46 46 } 47 add_action( ' plugins_loaded', 'bp_forums_setup_root_component', 2);47 add_action( 'bp_setup_root_components', 'bp_forums_setup_root_component' ); 48 48 49 49 function bp_forums_directory_forums_setup() { … … 499 499 } 500 500 501 // List actions to clear super cached pages on, if super cache is installed502 add_action( 'bp_forums_new_forum', 'bp_core_clear_cache' );503 add_action( 'bp_forums_new_topic', 'bp_core_clear_cache' );504 add_action( 'bp_forums_new_post', 'bp_core_clear_cache' );505 501 506 502 function bp_forums_filter_caps( $allcaps ) { … … 536 532 add_action( 'init', 'bp_forums_filter_template_paths' ); 537 533 534 535 /******************************************************************************** 536 * Caching 537 * 538 * Caching functions handle the clearing of cached objects and pages on specific 539 * actions throughout BuddyPress. 540 */ 541 542 // List actions to clear super cached pages on, if super cache is installed 543 add_action( 'bp_forums_new_forum', 'bp_core_clear_cache' ); 544 add_action( 'bp_forums_new_topic', 'bp_core_clear_cache' ); 545 add_action( 'bp_forums_new_post', 'bp_core_clear_cache' ); 546 538 547 ?> -
trunk/bp-friends.php
r2618 r2656 48 48 do_action( 'friends_setup_globals' ); 49 49 } 50 add_action( ' plugins_loaded', 'friends_setup_globals', 5);50 add_action( 'bp_setup_globals', 'friends_setup_globals' ); 51 51 add_action( 'admin_menu', 'friends_setup_globals', 2 ); 52 52 … … 303 303 do_action( 'friends_register_activity_actions' ); 304 304 } 305 add_action( ' plugins_loaded', 'friends_register_activity_actions' );305 add_action( 'bp_register_activity_actions', 'friends_register_activity_actions' ); 306 306 307 307 function friends_format_notifications( $action, $item_id, $secondary_item_id, $total_items ) { … … 626 626 add_action( 'make_spam_user', 'friends_remove_data', 1 ); 627 627 628 629 /******************************************************************************** 630 * Caching 631 * 632 * Caching functions handle the clearing of cached objects and pages on specific 633 * actions throughout BuddyPress. 634 */ 635 628 636 function friends_clear_friend_object_cache( $friendship_id ) { 629 637 if ( !$friendship = new BP_Friends_Friendship( $friendship_id ) ) -
trunk/bp-groups.php
r2646 r2656 97 97 do_action( 'groups_setup_globals' ); 98 98 } 99 add_action( ' plugins_loaded', 'groups_setup_globals', 5);99 add_action( 'bp_setup_globals', 'groups_setup_globals' ); 100 100 add_action( 'admin_menu', 'groups_setup_globals', 2 ); 101 101 … … 104 104 bp_core_add_root_component( BP_GROUPS_SLUG ); 105 105 } 106 add_action( ' plugins_loaded', 'groups_setup_root_component', 2);106 add_action( 'bp_setup_root_components', 'groups_setup_root_component' ); 107 107 108 108 function groups_check_installed() { … … 217 217 do_action( 'groups_setup_nav', $bp->groups->current_group->user_has_access ); 218 218 } 219 add_action( ' plugins_loaded', 'groups_setup_nav' );219 add_action( 'bp_setup_nav', 'groups_setup_nav' ); 220 220 add_action( 'admin_menu', 'groups_setup_nav' ); 221 221 … … 1267 1267 do_action( 'groups_register_activity_actions' ); 1268 1268 } 1269 add_action( ' plugins_loaded', 'groups_register_activity_actions' );1269 add_action( 'bp_register_activity_actions', 'groups_register_activity_actions' ); 1270 1270 1271 1271 function groups_record_activity( $args = '' ) { … … 2555 2555 add_action( 'delete_user', 'groups_remove_data_for_user', 1 ); 2556 2556 add_action( 'make_spam_user', 'groups_remove_data_for_user', 1 ); 2557 2558 2559 /******************************************************************************** 2560 * Caching 2561 * 2562 * Caching functions handle the clearing of cached objects and pages on specific 2563 * actions throughout BuddyPress. 2564 */ 2557 2565 2558 2566 function groups_clear_group_object_cache( $group_id ) { -
trunk/bp-groups/bp-groups-widgets.php
r2444 r2656 5 5 add_action('widgets_init', create_function('', 'return register_widget("BP_Groups_Widget");') ); 6 6 } 7 add_action( ' plugins_loaded', 'groups_register_widgets' );7 add_action( 'bp_register_widgets', 'groups_register_widgets' ); 8 8 9 9 /*** GROUPS WIDGET *****************/ -
trunk/bp-messages.php
r2576 r2656 83 83 do_action( 'messages_setup_globals' ); 84 84 } 85 add_action( ' plugins_loaded', 'messages_setup_globals', 5);85 add_action( 'bp_setup_globals', 'messages_setup_globals' ); 86 86 add_action( 'admin_menu', 'messages_setup_globals', 2 ); 87 87 … … 130 130 do_action( 'messages_setup_nav' ); 131 131 } 132 add_action( ' plugins_loaded', 'messages_setup_nav' );132 add_action( 'bp_setup_nav', 'messages_setup_nav' ); 133 133 add_action( 'admin_menu', 'messages_setup_nav' ); 134 134 … … 592 592 593 593 594 /******************************************************************************** 595 * Caching 596 * 597 * Caching functions handle the clearing of cached objects and pages on specific 598 * actions throughout BuddyPress. 599 */ 600 594 601 // List actions to clear super cached pages on, if super cache is installed 595 602 add_action( 'messages_delete_thread', 'bp_core_clear_cache' ); -
trunk/bp-xprofile.php
r2645 r2656 125 125 do_action( 'xprofile_setup_globals' ); 126 126 } 127 add_action( ' plugins_loaded', 'xprofile_setup_globals', 5);127 add_action( 'bp_setup_globals', 'xprofile_setup_globals' ); 128 128 add_action( 'admin_menu', 'xprofile_setup_globals', 2 ); 129 129 … … 195 195 do_action( 'xprofile_setup_nav' ); 196 196 } 197 add_action( ' plugins_loaded', 'xprofile_setup_nav' );197 add_action( 'bp_setup_nav', 'xprofile_setup_nav' ); 198 198 add_action( 'admin_menu', 'xprofile_setup_nav' ); 199 199 … … 465 465 do_action( 'xprofile_register_activity_actions' ); 466 466 } 467 add_action( ' plugins_loaded', 'xprofile_register_activity_actions' );467 add_action( 'bp_register_activity_actions', 'xprofile_register_activity_actions' ); 468 468 469 469 /** … … 952 952 add_action( 'delete_user', 'xprofile_remove_data', 1 ); 953 953 954 955 /******************************************************************************** 956 * Caching 957 * 958 * Caching functions handle the clearing of cached objects and pages on specific 959 * actions throughout BuddyPress. 960 */ 961 954 962 function xprofile_clear_profile_groups_object_cache( $group_obj ) { 955 963 wp_cache_delete( 'xprofile_groups', 'bp' );
Note: See TracChangeset
for help on using the changeset viewer.