This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function remove_footer(){ | |
// Disable W3TC footer comment for everyone but Admins (single site & network mode) | |
if(!current_user_can('activate_plugins')){ | |
add_filter('w3tc_can_print_comment','__return_false',10,1); | |
} | |
// Disable W3TC footer comment for all users | |
//add_filter('w3tc_can_print_comment','__return_false',10,1); | |
} | |
add_action('plugins_loaded','remove_footer'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_enqueue_scripts', 'jk_disable_magnification' ); | |
function jk_disable_magnification() { | |
wp_dequeue_script( 'zoom' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
types { | |
application/atom+xml atom; | |
application/dart dart; | |
application/gzip gz; | |
application/java-archive jar war ear; | |
application/javascript js jsonp; | |
application/json json; | |
application/owl+xml owl owx; | |
application/pdf pdf; | |
application/postscript ai eps ps; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Use stale cache items while updating in the background | |
fastcgi_cache_use_stale updating error timeout invalid_header http_500; | |
fastcgi_cache_lock on; | |
fastcgi_cache_lock_timeout 5s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
optimizer_switch='mrr=on' | |
optimizer_switch='mrr_sort_keys=on' | |
optimizer_switch='mrr_cost_based=off' | |
mrr_buffer_size=32M | |
optimizer_switch='join_cache_incremental=on' | |
optimizer_switch='join_cache_hashed=on' | |
optimizer_switch='join_cache_bka=on' | |
join_cache_level=4 | |
join_buffer_size=32M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*-----------------------------------------------------------------------------------*/ | |
/* Table of Contents - Shortcode */ | |
/*-----------------------------------------------------------------------------------*/ | |
if ( ! function_exists( 'woo_shortcode_table_of_contents' ) ) { | |
function woo_shortcode_table_of_contents ( $atts, $content = null ) { | |
global $post; | |
$defaults = array(); | |
$atts = shortcode_atts( $defaults, $atts ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enable gzip compression. | |
# Default: off | |
gzip on; | |
# Enable compression both for HTTP/1.0 and HTTP/1.1. | |
gzip_http_version 1.1; | |
# Compression level (1-9). | |
# 5 is a perfect compromise between size and CPU usage, offering about | |
# 75% reduction for most ASCII files (almost identical to level 9). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function kill_gutenberg_post_type( $is_enabled, $post_type ) { | |
if ( ‘post’ === $post_type || ‘page’ === $post_type ) { | |
return false; //==> add_action( ‘admin_print_scripts-edit.php’,…) ==> gutenberg_replace_default_add_new_button is disabled | |
} | |
return $is_enabled; | |
} | |
add_filter( ‘gutenberg_can_edit_post_type’, ‘kill_gutenberg_post_type’, 10, 2 ); //gutenberg_add_edit_link_for_post_type | |
function kill_gutenberg_modify_add_new_button_url( $url, $path ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wp_update_privacy( $query ) { | |
unset($query['php']); | |
unset($query['mysql']); | |
unset($query['local_package']); | |
unset($query['blogs']); | |
unset($query['users']); | |
unset($query['multisite_enabled']); | |
unset($query['initial_db_version']); | |
return $query; | |
} |