Changeset 4762
- Timestamp:
- 02/10/2013 11:53:07 PM (13 years ago)
- Location:
- trunk/includes/core
- Files:
-
- 2 edited
-
filters.php (modified) (2 diffs)
-
template-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/core/filters.php
r4750 r4762 77 77 * bbp_template_include() works and do something similar. :) 78 78 */ 79 add_filter( 'bbp_template_include', 'bbp_template_include_theme_supports', 2, 1 ); 80 add_filter( 'bbp_template_include', 'bbp_template_include_theme_compat', 4, 2 ); 79 add_filter( 'bbp_template_include', 'bbp_template_include_theme_supports', 2, 1 ); 80 add_filter( 'bbp_template_include', 'bbp_template_include_theme_compat', 4, 2 ); 81 82 // Filter bbPress template locations 83 add_filter( 'bbp_get_template_stack', 'bbp_add_template_stack_locations' ); 81 84 82 85 // Links … … 182 185 add_filter( 'bbp_get_reply_author_link', 'bbp_suppress_private_author_link', 10, 2 ); 183 186 184 // Filter bbPress template locations185 add_filter( 'bbp_get_template_part', 'bbp_add_template_locations' );186 add_filter( 'bbp_get_profile_template', 'bbp_add_template_locations' );187 add_filter( 'bbp_get_profileedit_template', 'bbp_add_template_locations' );188 add_filter( 'bbp_get_singleview_template', 'bbp_add_template_locations' );189 add_filter( 'bbp_get_forumedit_template', 'bbp_add_template_locations' );190 add_filter( 'bbp_get_topicedit_template', 'bbp_add_template_locations' );191 add_filter( 'bbp_get_topicsplit_template', 'bbp_add_template_locations' );192 add_filter( 'bbp_get_topicmerge_template', 'bbp_add_template_locations' );193 add_filter( 'bbp_get_topictag_template', 'bbp_add_template_locations' );194 add_filter( 'bbp_get_topictagedit_template', 'bbp_add_template_locations' );195 add_filter( 'bbp_get_replymove_template', 'bbp_add_template_locations' );196 197 187 // Topic and reply author display names 198 188 add_filter( 'bbp_get_topic_author_display_name', 'wptexturize' ); -
trunk/includes/core/template-functions.php
r4670 r4762 248 248 * @return array() 249 249 */ 250 function bbp_add_template_ locations( $templates = array() ) {250 function bbp_add_template_stack_locations( $stacks = array() ) { 251 251 $retval = array(); 252 252 253 253 // Get alternate locations 254 $locations = bbp_get_template_locations( $templates);255 256 // Loop through locations and templates and combine257 foreach ( (array) $ locations as $location)258 foreach ( (array) $ templates as $template)259 $retval[] = ltrim( trailingslashit( $location ) . $template, '/');260 261 return apply_filters( 'bbp_add_template_ locations', array_unique( $retval ), $templates );254 $locations = bbp_get_template_locations(); 255 256 // Loop through locations and stacks and combine 257 foreach ( (array) $stacks as $stack ) 258 foreach ( (array) $locations as $custom_location ) 259 $retval[] = untrailingslashit( trailingslashit( $stack ) . $custom_location ); 260 261 return apply_filters( 'bbp_add_template_stack_locations', array_unique( $locations ), $stacks ); 262 262 } 263 263
Note: See TracChangeset
for help on using the changeset viewer.