Skip to content

Commit

Permalink
Merge pull request #152 from wp-media/branch-2.8.12
Browse files Browse the repository at this point in the history
2.8.12
  • Loading branch information
GeekPress authored Sep 8, 2016
2 parents 7f2af0d + 4abaeb9 commit cfe9db8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
12 changes: 7 additions & 5 deletions inc/admin/ui/meta-boxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,20 @@ function __rocket_cache_options_meta_boxes() {
function __rocket_display_cache_options_meta_boxes() {
/** This filter is documented in inc/admin-bar.php */
if ( current_user_can( apply_filters( 'rocket_capacity', 'manage_options' ) ) ) {
global $post;
global $post, $pagenow;
wp_nonce_field( 'rocket_box_option', '_rocketnonce', false, true );
?>

<div class="misc-pub-section">
<?php
$reject_current_uri = false;
$rejected_uris = array_flip( get_rocket_option( 'cache_reject_uri' ) );
$path = rocket_clean_exclude_file( get_permalink( $post->ID ) );
if ( $pagenow !== 'post-new.php' ) {
$rejected_uris = array_flip( get_rocket_option( 'cache_reject_uri' ) );
$path = rocket_clean_exclude_file( get_permalink( $post->ID ) );

if ( isset( $rejected_uris[ $path ] ) ) {
$reject_current_uri = true;
if ( isset( $rejected_uris[ $path ] ) ) {
$reject_current_uri = true;
}
} ?>
<input name="rocket_post_nocache" id="rocket_post_nocache" type="checkbox" title="<?php _e( 'Never cache this page', 'rocket' ); ?>" <?php checked( $reject_current_uri, true ); ?>><label for="rocket_post_nocache"><?php _e( 'Never cache this page', 'rocket' ); ?></label>
</div>
Expand Down
6 changes: 6 additions & 0 deletions inc/common/purge.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ function rocket_clean_post( $post_id ) {
if ( $post->post_status == 'auto-draft' || empty( $post->post_type ) || $post->post_type == 'nav_menu_item' ) {
return;
}

// Don't purge if post's post type is not public or not publicly queryable
$post_type = get_post_type_object( $post->post_type );
if ( $post_type->public !== 1 || $post_type->publicly_queryable !== 1 ) {
return;
}

// Get the post language
$lang = false;
Expand Down
3 changes: 3 additions & 0 deletions inc/front/minify.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ function __rocket_insert_minify_js_in_footer() {

$i = 0;
foreach( $files as $file ) {
/** This filter is documented in wp-includes/class.wp-scripts.php */
$file = apply_filters( 'script_loader_src', $file );
list( $file_host, $file_path ) = get_rocket_parse_url( $file );

// Check if its an external file
Expand Down Expand Up @@ -321,6 +323,7 @@ function rocket_minify_js( $buffer )
$excluded_tags = '';
$excluded_js = implode( '|', get_rocket_exclude_js() );
$excluded_js = str_replace( '//' . $home_host , '', $excluded_js );
$excluded_js = str_replace( '+', '\+', $excluded_js );
$js_in_footer = get_rocket_minify_js_in_footer();
$wp_content_dirname = ltrim( str_replace( home_url(), '', WP_CONTENT_URL ), '/' ) . '/';
$excluded_external_js = get_rocket_minify_excluded_external_js();
Expand Down
10 changes: 5 additions & 5 deletions wp-rocket.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
/*
Plugin Name: WP Rocket
Plugin URI: http://www.wp-rocket.me
Plugin URI: https://wp-rocket.me
Description: The best WordPress performance plugin.
Version: 2.8.11
Version: 2.8.12
Code Name: Ilum
Author: WP Rocket
Author: WP Media
Contributors: Jonathan Buttigieg, Julio Potier, Remy Perona
Author URI: http://www.wp-rocket.me
Author URI: http://wp-media.me
Licence: GPLv2
Text Domain: rocket
Expand All @@ -19,7 +19,7 @@
defined( 'ABSPATH' ) or die( 'Cheatin&#8217; uh?' );

// Rocket defines
define( 'WP_ROCKET_VERSION' , '2.8.11' );
define( 'WP_ROCKET_VERSION' , '2.8.12' );
define( 'WP_ROCKET_PRIVATE_KEY' , false );
define( 'WP_ROCKET_SLUG' , 'wp_rocket_settings' );
define( 'WP_ROCKET_WEB_MAIN' , 'http://support.wp-rocket.me/' );
Expand Down

0 comments on commit cfe9db8

Please sign in to comment.