Changeset 7212 for trunk/bp-blogs/bp-blogs-screens.php
- Timestamp:
- 06/13/2013 01:27:01 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-screens.php
r6419 r7212 87 87 do_action( 'bp_blogs_screen_index' ); 88 88 89 add_filter( 'bp_get_buddypress_template', array( $this, 'directory_template_hierarchy' ) ); 89 90 add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'directory_dummy_post' ) ); 90 91 add_filter( 'bp_replace_the_content', array( $this, 'directory_content' ) ); … … 92 93 // Create blog 93 94 } elseif ( is_user_logged_in() && bp_blog_signup_enabled() ) { 95 add_filter( 'bp_get_buddypress_template', array( $this, 'create_template_hierarchy' ) ); 94 96 add_action( 'bp_template_include_reset_dummy_post_data', array( $this, 'create_dummy_post' ) ); 95 97 add_filter( 'bp_replace_the_content', array( $this, 'create_content' ) ); … … 98 100 99 101 /** Directory *************************************************************/ 102 103 /** 104 * Add template hierarchy to theme compat for the blog directory page. 105 * 106 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}. 107 * 108 * @since BuddyPress (1.8) 109 * 110 * @param string $templates The templates from bp_get_theme_compat_templates() 111 * @return array $templates Array of custom templates to look for. 112 */ 113 public function directory_template_hierarchy( $templates ) { 114 // Setup our templates based on priority 115 $new_templates = apply_filters( 'bp_template_hierarchy_blogs_create', array( 116 'blogs/index-directory.php' 117 ) ); 118 119 // Merge new templates with existing stack 120 // @see bp_get_theme_compat_templates() 121 $templates = array_merge( (array) $new_templates, $templates ); 122 123 return $templates; 124 } 100 125 101 126 /** … … 138 163 139 164 /** 165 * Add custom template hierarchy to theme compat for the blog create page. 166 * 167 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}. 168 * 169 * @since BuddyPress (1.8) 170 * 171 * @param string $templates The templates from bp_get_theme_compat_templates() 172 * @return array $templates Array of custom templates to look for. 173 */ 174 public function create_template_hierarchy( $templates ) { 175 // Setup our templates based on priority 176 $new_templates = apply_filters( 'bp_template_hierarchy_blogs_create', array( 177 'blogs/index-create.php' 178 ) ); 179 180 // Merge new templates with existing stack 181 // @see bp_get_theme_compat_templates() 182 $templates = array_merge( (array) $new_templates, $templates ); 183 184 return $templates; 185 } 186 187 /** 140 188 * Update the global $post with create screen data 141 189 *
Note: See TracChangeset
for help on using the changeset viewer.