proxy_buffer_size 128k; proxy_buffers 32 128k; proxy_busy_buffers_size 128k;
<?php function wp_send_json_gzip( $response, $status_code = null ) { if(!isset($_SERVER['HTTP_ACCEPT_ENCODING']) || strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') === false || !function_exists('gzencode')){ //如果瀏覽器不支持gzip壓縮或者沒有gzencode函數,fallback return wp_send_json($response, $status_code); } @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) ); if ( null !== $status_code ) { status_header( $status_code ); } header('Content-Encoding: gzip'); header('X-By-Falcon: gzip on the fly', false); ob_start(); echo wp_json_encode( $response ); $buffer = ob_get_contents(); ob_end_clean(); echo gzencode($buffer, 9); if ( wp_doing_ajax() ) { wp_die( '', '', array( 'response' => null, ) ); } else { die; } }
// functions.php add_action('login_enqueue_scripts', function(){ wp_enqueue_style('login-styles', get_stylesheet_directory_uri().'/login.css'); }); //login.css, place in (child) theme folder body .login h1 a { background-image: url('path/to/custom-logo.png'); }