Changeset 4975 for trunk/includes/core/template-loader.php
- Timestamp:
- 05/30/2013 06:26:19 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/core/template-loader.php
r4579 r4975 109 109 endif; 110 110 111 // bbPress template file exists 111 // A bbPress template file was located, so override the WordPress template 112 // and use it to switch off bbPress's theme compatibility. 112 113 if ( !empty( $new_template ) ) { 113 114 // Override the WordPress template with a bbPress one 115 $template = $new_template; 116 117 // @see: bbp_template_include_theme_compat() 118 bbpress()->theme_compat->bbpress_template = true; 114 $template = bbp_set_template_included( $new_template ); 119 115 } 120 116 121 117 return apply_filters( 'bbp_template_include_theme_supports', $template ); 118 } 119 120 /** 121 * Set the included template 122 * 123 * @since bbPress (r4975) 124 * @param mixed $template Default false 125 * @return mixed False if empty. Template name if template included 126 */ 127 function bbp_set_template_included( $template = false ) { 128 bbpress()->theme_compat->bbpress_template = $template; 129 130 return bbpress()->theme_compat->bbpress_template; 131 } 132 133 /** 134 * Is a bbPress template being included? 135 * 136 * @since bbPress (r4975) 137 * @return bool True if yes, false if no 138 */ 139 function bbp_is_template_included() { 140 return ! empty( bbpress()->theme_compat->bbpress_template ); 122 141 } 123 142
Note: See TracChangeset
for help on using the changeset viewer.