From a72732e25f6f2f1795204cdc59eca2069310aa5d Mon Sep 17 00:00:00 2001 From: Shelby DeNike Date: Fri, 21 Sep 2018 09:19:10 -0400 Subject: [PATCH] Updated ValetPress.php plugin --- plugins/valetpress/valetpress.php | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/plugins/valetpress/valetpress.php b/plugins/valetpress/valetpress.php index de6459a..6eb39bb 100644 --- a/plugins/valetpress/valetpress.php +++ b/plugins/valetpress/valetpress.php @@ -1,17 +1,17 @@ @@ -23,10 +23,10 @@ function sdenike_header_function() { '; } -add_action('wp_head','sdenike_header_function'); +add_action('wp_head','vp_header_function'); //* Enable GZIP compression function -function wp_http_compression() { +function vp_http_compression() { // Dont use on Admin HTML editor if (stripos($uri, '/js/tinymce') !== false) return false; @@ -39,22 +39,22 @@ function wp_http_compression() { if (extension_loaded('zlib')) if(!ob_start("ob_gzhandler")) ob_start(); } -add_action('init', 'wp_http_compression'); +add_action('init', 'vp_http_compression'); //* Remove JS/CSS versions -function remove_cssjs_ver( $src ) { +function vp_remove_cssjs_ver( $src ) { if( strpos( $src, '?ver=' ) ) $src = remove_query_arg( 'ver', $src ); return $src; } -add_filter( 'style_loader_src', 'remove_cssjs_ver', 1000 ); -add_filter( 'script_loader_src', 'remove_cssjs_ver', 1000 ); +add_filter( 'style_loader_src', 'vp_remove_cssjs_ver', 1000 ); +add_filter( 'script_loader_src', 'vp_remove_cssjs_ver', 1000 ); //* Remove WP Version from header and feed -function sdenike_remove_version() { +function vp_remove_version() { return ''; } -add_filter('the_generator', 'sdenike_remove_version'); +add_filter('the_generator', 'vp_remove_version'); //* Reduce image resolution add_filter('jpeg_quality', function($arg){return 80;}); @@ -62,7 +62,7 @@ function sdenike_remove_version() { // Sharpen resized jpeg images // http://wpsnipp.com/index.php/functions-php/sharpen-resized-wordpress-uploaded-images-jpg/# -function wps_sharpen_resized_file( $resized_file ) { +function vp_sharpen_resized_file( $resized_file ) { $image = wp_load_image( $resized_file ); if ( !is_resource( $image ) ) return new WP_Error( 'error_loading_image', $image, $file ); @@ -89,7 +89,7 @@ function wps_sharpen_resized_file( $resized_file ) { } return $resized_file; } -add_filter('image_make_intermediate_size', 'wps_sharpen_resized_file',900); +add_filter('image_make_intermediate_size', 'vp_sharpen_resized_file',900); /** * Plugin Name: PJ Transient Cleaner @@ -154,12 +154,12 @@ public static function cleaner() { Pj_Transient_Cleaner::load(); // Add Livereload.js to header function -function livereload_add() { +function vp_livereload_add() { ?>