View repeater field display
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 | |
if ( have_rows( 'repeater_field', $order_id ) ) : | |
while ( have_rows( 'repeater_field', $order_id ) ) : the_row(); | |
$type = get_sub_field( 'type', $order_id ); | |
if( $type === 'tekst' ): ?> | |
<div id="customerMessageTxt"> | |
<?php the_sub_field($type, $order_id); ?> | |
</div> | |
View gist:85628f1e90880c04f3fb
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 | |
$base_taxonomy = 'pays'; | |
$term_id = '1'; | |
$required_taxonomy = 'villes'; | |
$required_terms = array(); | |
$required_terms_id = array(); | |
$objects_in_tax = get_objects_in_term( $term_id, $taxonomy ); |
View google-sitelinks-search-box-json-ld
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 | |
add_action( 'wp_footer', 'rp_add_google_search_markup' ); | |
function rp_add_google_search_markup() { | |
if ( is_front_page() ) { | |
?> | |
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org", | |
"@type": "WebSite", | |
"url": "<?php echo esc_url( home_url( '/' ) ); ?>", |
View gist:e15d189bcf7cf444b413
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" } | |
] | |
},{ |
View gist:a5bb674e799bf49df16b
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; } |
View gist:b6e01263e1bbcdcca7f2
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"> |
View gist:ba5d8d9705342b480e4a
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 |
View gist:1b70c9c4b56cc9df217e
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' ) ); ?> |
View rocket-clean-cache-after-order.php
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. |
View disable-cache-admin.php
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 ); | |
} |
OlderNewer