Changeset 2755 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
- Timestamp:
- 03/17/2016 05:39:02 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php
r2681 r2755 127 127 } 128 128 add_filter( 'body_class', 'wporg_themes_body_class' ); 129 130 /**131 * Prevent 404 responses when we've got a theme via the API.132 */133 function wporg_themes_prevent_404() {134 global $wp_query;135 if ( ! is_404() ) {136 return;137 }138 $themes = wporg_themes_get_themes_for_query();139 if ( $themes['total'] ) {140 $wp_query->is_404 = false;141 status_header( 200 );142 }143 }144 add_filter( 'template_redirect', 'wporg_themes_prevent_404' );145 129 146 130 /** … … 252 236 return $template; 253 237 } 254 add_filter( 'embed_template', 'wporg_themes_embed_template');255 238 add_filter( 'embed_template', 'wporg_themes_embed_template' ); 239
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)