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
<?php | |
defined( 'ABSPATH' ) or die( 'Cheatin’ uh?' ); | |
/** | |
* Plugin Name: WP Rocket | Fix 404 error on cached page | |
* Description: Fix 404 error on cached page. | |
* Author: WP Rocket Support Team | |
* Author URI: http://wp-rocket.me/ | |
* License: GNU General Public License v3 or later | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html | |
*/ |
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
[{"id":1,"date":"2016-12-03T10:53:52","date_gmt":"2016-12-03T10:53:52","guid":{"rendered":"http:\/\/staging.keepcontrol.space\/wp-rocket\/?p=1"},"modified":"2016-12-03T11:13:59","modified_gmt":"2016-12-03T11:13:59","slug":"hello-world","type":"post","link":"https:\/\/staging.keepcontrol.space\/wp-rocket\/2016\/12\/03\/hello-world\/","title":{"rendered":"Hello world!"},"content":{"rendered":"<p>Welcome to <a href=\"http:\/\/staging.keepcontrol.space\/\">Staging<\/a>. This is your first post. Edit or delete it, then start blogging!<\/p>\n<p> <\/p>\n<p>G\u00e9nial quelle super id\u00e9e !<\/p>\n<p> <\/p>\n<p>Note: You can download a 65KB text file of the entire 189,819 letter word <a href=\"http:\/\/www.geekologie.com\/2012\/11\/20\/titin.txt\">HERE<\/a>.<\/p>\n<p>This is a video of some guy pronouncing<a href=\"http:\/\/www.underconsideration.com\/quipsologies\/archives\/november_2012\/arminvit_76.php\"> the longest word in the world<\/a>, which is the chemical name for titan (aka connectin), a human |
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
if ( current_user_can( 'administrator' ) ) { | |
define( 'DONOTCACHEPAGE', true ); | |
} |
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_filter( 'rocket_cache_reject_ua', 'wprocket_remove_fb_ua' ); | |
function wprocket_remove_fb_ua( $ua ) { | |
if ( in_array( 'facebookexternalhit', $ua ) ) { | |
$ua = array_flip( $ua ); | |
unset( $ua[ 'facebookexternalhit' ] ); | |
$ua = array_flip( $ua ); | |
} | |
return $ua; | |
} |
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
<?php | |
/** | |
* Plugin Name: WP Rocket clean post cache after WC order | |
* Description: Clean the cache for each product ordered after a completed WooCommerce order | |
* Author: WP Rocket team | |
* License: GNU General Public License v3 or later | |
* License URI: http://www.gnu.org/licenses/gpl-3.0.html | |
*/ | |
// Basic security, prevents file from being loaded directly. |
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
<h2 class="mw1140p center"><?php _e( 'Discover more posts around here', 'guide-japon' ); ?></h2> | |
<?php $single_coordinates = GeoMashup::post_coordinates(); | |
echo GeoMashup::map( array( 'map_content' => 'global', 'near_lat' => $single_coordinates['lat'], 'near_lng' => $single_coordinates['lng'], 'radius_km' => 10, 'center_lat' => $single_coordinates['lat'], 'center_lng' => $single_coordinates['lng'], 'height' => 400, 'marker_select_center' => 'true' ) ); ?> |
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
<?php | |
/** | |
* Variables in scope: | |
* $geo_mashup_search object The managing search object | |
* $search_text string The search text entered in the form | |
* $radius int The search radius | |
* $units string 'mi' or 'km' | |
* $object_name string 'post' or 'user' or 'comment' | |
* $near_location array The location searched, including 'lat' and 'lng' | |
* $distance_factor float The multiplier to convert the radius to kilometers |
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
<?php | |
// A potentially heavy-handed way to remove shortcode-like content | |
add_filter( 'the_excerpt', array( 'GeoMashupQuery', 'strip_brackets' ) ); | |
?> | |
<div class="locationinfo post-location-info"> | |
<?php if (have_posts()) : ?> | |
<?php while (have_posts()) : the_post(); ?> | |
<section class="line entry-content"> |
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
/* Maps fill the frame, makes percentage height maps a bit easier */ | |
html, body { height: 100%; overflow: hidden; margin: 0; } | |
/* Info window */ | |
.locationinfo { overflow:auto; width:600px; height:300px; } | |
.user-location-info { overflow:auto; width:150px; height:80px; } | |
.comment-location-info { overflow:auto; width:200px; height:140px; } | |
.info-window-max { overflow:auto; } |
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
GeoMashup.addAction( 'loadedMap', function( properties, map ) { | |
var gmap = map.getMap(); | |
var styles = [ | |
{ | |
"featureType": "water", | |
"elementType": "geometry.fill", | |
"stylers": [ | |
{ "color": "#8eade4" } | |
] | |
},{ |