Ticket #1901: plugins_reloaded.patch
File plugins_reloaded.patch, 9.4 KB (added by , 15 years ago) |
---|
-
bp-activity.php
83 83 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 89 89 function bp_activity_check_installed() { … … 98 98 /* Register 'activity' as a root component (for RSS feed use) */ 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_component', 'bp_activity_setup_root_component' ); 102 102 103 103 function bp_activity_setup_nav() { 104 104 global $bp; … … 133 133 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 139 139 function bp_activity_directory_activity_setup() { -
bp-blogs.php
100 100 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 106 106 function bp_blogs_setup_root_component() { 107 107 /* Register 'blogs' as a root component */ 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_component', 'bp_blogs_setup_root_component' ); 111 111 112 112 /** 113 113 * bp_blogs_setup_nav() … … 151 151 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 157 157 function bp_blogs_directory_blogs_setup() { … … 230 230 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 = '' ) { 236 236 global $bp; -
bp-core.php
181 181 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 187 187 … … 377 377 } 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 383 383 -
bp-core/bp-core-widgets.php
7 7 add_action('widgets_init', create_function('', 'return register_widget("BP_Core_Whos_Online_Widget");') ); 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 *****************/ 13 13 -
bp-forums.php
28 28 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 34 34 function bp_forums_is_installed_correctly() { … … 44 44 /* Register 'forums' as a root component */ 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_component', 'bp_forums_setup_root_component' ); 48 48 49 49 function bp_forums_directory_forums_setup() { 50 50 global $bp; -
bp-friends.php
47 47 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 53 53 function friends_check_installed() { … … 302 302 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 ) { 308 308 global $bp; -
bp-groups.php
96 96 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 102 102 function groups_setup_root_component() { 103 103 /* Register 'groups' as a root component */ 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_component', 'groups_setup_root_component' ); 107 107 108 108 function groups_check_installed() { 109 109 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ … … 216 216 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 222 222 function groups_directory_groups_setup() { … … 1266 1266 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 = '' ) { 1272 1272 global $bp; -
bp-groups/bp-groups-widgets.php
4 4 function groups_register_widgets() { 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 *****************/ 10 10 -
bp-loader.php
55 55 } 56 56 add_action( 'plugins_loaded', 'bp_loaded' ); 57 57 58 /* Allow dependent plugins to set their globals in a safe way */ 59 function bp_setup_globals() { 60 do_action( 'bp_setup_globals' ); 61 } 62 add_action( 'plugins_loaded', 'bp_setup_globals', 5 ); 63 64 /* Allow dependent plugins to set their root components in a safe way */ 65 function bp_setup_root_components() { 66 do_action( 'bp_setup_root_components' ); 67 } 68 add_action( 'plugins_loaded', 'bp_setup_root_components', 2 ); 69 70 /* Allow dependent plugins to set their root components in a safe way */ 71 function bp_setup_nav() { 72 do_action( 'bp_setup_nav' ); 73 } 74 add_action( 'plugins_loaded', 'bp_setup_nav' ); 75 58 76 /* Activation Function */ 59 77 function bp_loader_activate() { 60 78 /* Force refresh theme roots. */ -
bp-messages.php
82 82 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 88 88 function messages_check_installed() { … … 129 129 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 135 135 -
bp-xprofile.php
124 124 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', 5 ); 128 128 add_action( 'admin_menu', 'xprofile_setup_globals', 2 ); 129 129 130 130 /** … … 194 194 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 200 200 … … 464 464 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 /** 470 470 * xprofile_record_activity()