Changeset 1250 for trunk/bp-blogs.php
- Timestamp:
- 03/25/2009 04:01:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs.php
r1247 r1250 26 26 require ( 'bp-blogs/bp-blogs-widgets.php' ); 27 27 require ( 'bp-blogs/bp-blogs-ajax.php' ); 28 require ( 'bp-blogs/directories/bp-blogs-directory-blogs.php' );29 28 30 29 … … 148 147 $bp->version_numbers->blogs = BP_BLOGS_VERSION; 149 148 } 150 add_action( ' wp', 'bp_blogs_setup_globals', 1);149 add_action( 'plugins_loaded', 'bp_blogs_setup_globals', 5 ); 151 150 add_action( 'admin_menu', 'bp_blogs_setup_globals', 1 ); 152 151 … … 155 154 bp_core_add_root_component( BP_BLOGS_SLUG ); 156 155 } 157 add_action( 'plugins_loaded', 'bp_blogs_setup_root_component' );156 add_action( 'plugins_loaded', 'bp_blogs_setup_root_component', 1 ); 158 157 159 158 /** … … 198 197 add_action( 'wp', 'bp_blogs_setup_nav', 2 ); 199 198 add_action( 'admin_menu', 'bp_blogs_setup_nav', 2 ); 199 200 function bp_blogs_directory_blogs_setup() { 201 global $bp; 202 203 if ( $bp->current_component == $bp->blogs->slug && empty( $bp->current_action ) ) { 204 $bp->is_directory = true; 205 206 wp_enqueue_script( 'bp-blogs-directory-blogs', WPMU_PLUGIN_URL . '/bp-blogs/js/directory-blogs.js', array( 'jquery', 'jquery-livequery-pack' ) ); 207 bp_core_load_template( 'directories/blogs/index' ); 208 } 209 } 210 add_action( 'wp', 'bp_blogs_directory_blogs_setup', 5 ); 200 211 201 212 function bp_blogs_screen_my_blogs() { … … 826 837 } 827 838 839 function bp_blogs_force_buddypress_theme( $template ) { 840 global $bp; 841 842 if ( $bp->current_component == $bp->blogs->slug && empty( $bp->current_action ) ) { 843 $member_theme = get_site_option( 'active-member-theme' ); 844 845 if ( empty( $member_theme ) ) 846 $member_theme = 'buddypress-member'; 847 848 add_filter( 'theme_root', 'bp_core_set_member_theme_root' ); 849 add_filter( 'theme_root_uri', 'bp_core_set_member_theme_root_uri' ); 850 851 return $member_theme; 852 } else { 853 return $template; 854 } 855 } 856 add_filter( 'template', 'bp_blogs_force_buddypress_theme', 1, 1 ); 857 858 function bp_blogs_force_buddypress_stylesheet( $stylesheet ) { 859 global $bp; 860 861 if ( $bp->current_component == $bp->blogs->slug && empty( $bp->current_action ) ) { 862 $member_theme = get_site_option( 'active-member-theme' ); 863 864 if ( empty( $member_theme ) ) 865 $member_theme = 'buddypress-member'; 866 867 add_filter( 'theme_root', 'bp_core_set_member_theme_root' ); 868 add_filter( 'theme_root_uri', 'bp_core_set_member_theme_root_uri' ); 869 870 return $member_theme; 871 } else { 872 return $stylesheet; 873 } 874 } 875 add_filter( 'stylesheet', 'bp_blogs_force_buddypress_stylesheet', 1, 1 ); 876 877 878 828 879 function bp_blogs_remove_data( $user_id ) { 829 880 /* If this is regular blog, delete all data for that blog. */ … … 839 890 840 891 function bp_blogs_clear_blog_object_cache( $blog_id, $user_id ) { 841 wp_cache_delete( 'bp_user_blogs_' . $user_id, 'bp' ); 892 wp_cache_delete( 'bp_blogs_of_user_' . $user_id, 'bp' ); 893 wp_cache_delete( 'bp_blogs_for_user_' . $user_id, 'bp' ); 842 894 } 843 895
Note: See TracChangeset
for help on using the changeset viewer.