Update WP and plugins
This commit is contained in:
parent
10a4713229
commit
1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Set this to error_reporting( -1 ) for debugging
|
||||
*/
|
||||
error_reporting(0);
|
||||
error_reporting( 0 );
|
||||
|
||||
/** Set ABSPATH for execution */
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
|
@ -25,15 +25,16 @@ if ( is_array( $load ) ) {
|
|||
$load = preg_replace( '/[^a-z0-9,_-]+/i', '', $load );
|
||||
$load = array_unique( explode( ',', $load ) );
|
||||
|
||||
if ( empty($load) )
|
||||
if ( empty( $load ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$rtl = ( isset($_GET['dir']) && 'rtl' == $_GET['dir'] );
|
||||
$rtl = ( isset( $_GET['dir'] ) && 'rtl' == $_GET['dir'] );
|
||||
$expires_offset = 31536000; // 1 year
|
||||
$out = '';
|
||||
$out = '';
|
||||
|
||||
$wp_styles = new WP_Styles();
|
||||
wp_default_styles($wp_styles);
|
||||
wp_default_styles( $wp_styles );
|
||||
|
||||
if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) === $wp_version ) {
|
||||
$protocol = $_SERVER['SERVER_PROTOCOL'];
|
||||
|
@ -45,10 +46,11 @@ if ( isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) && stripslashes( $_SERVER['HTTP_IF_
|
|||
}
|
||||
|
||||
foreach ( $load as $handle ) {
|
||||
if ( !array_key_exists($handle, $wp_styles->registered) )
|
||||
if ( ! array_key_exists( $handle, $wp_styles->registered ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$style = $wp_styles->registered[$handle];
|
||||
$style = $wp_styles->registered[ $handle ];
|
||||
|
||||
if ( empty( $style->src ) ) {
|
||||
continue;
|
||||
|
@ -67,16 +69,16 @@ foreach ( $load as $handle ) {
|
|||
$content = str_replace( '../images/', '../' . WPINC . '/images/', $content );
|
||||
$content = str_replace( '../js/tinymce/', '../' . WPINC . '/js/tinymce/', $content );
|
||||
$content = str_replace( '../fonts/', '../' . WPINC . '/fonts/', $content );
|
||||
$out .= $content;
|
||||
$out .= $content;
|
||||
} else {
|
||||
$out .= str_replace( '../images/', 'images/', $content );
|
||||
}
|
||||
}
|
||||
|
||||
header("Etag: $wp_version");
|
||||
header('Content-Type: text/css; charset=UTF-8');
|
||||
header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
|
||||
header("Cache-Control: public, max-age=$expires_offset");
|
||||
header( "Etag: $wp_version" );
|
||||
header( 'Content-Type: text/css; charset=UTF-8' );
|
||||
header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + $expires_offset ) . ' GMT' );
|
||||
header( "Cache-Control: public, max-age=$expires_offset" );
|
||||
|
||||
echo $out;
|
||||
exit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue