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_filter('seopress_schemas_mapping_select', 'sp_schemas_mapping_select'); | |
function sp_schemas_mapping_select($select) { | |
// Add the new group option + option to the list | |
$select['Custom variables'] = [ | |
'my_custom_var_key' => __('My super custom var', 'wp-seopress-pro'), | |
'my_repeater_field' => __('ACF Repeater Field', 'wp-seopress-pro'), | |
]; | |
// Get the ACF repeater field data |
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
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR] | |
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$ | |
RewriteCond %{REMOTE_ADDR} !^10\.110\.20\.220$ | |
RewriteCond %{REMOTE_ADDR} !^20\.220\.30\.330$ | |
RewriteRule ^(.*)$ - [R=403,L] | |
</IfModule> |
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 ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} | |
function chut_search_filter( $query ) { | |
if ( ! $query->is_admin && $query->is_search && $query->is_main_query() ) { | |
$query->set( 'post__not_in', array( 1,10,110 ) ); | |
} |
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
### Begin Custom Post Type UI Debug Info ### | |
Multisite: No | |
SITE_URL: https://xxx.tld | |
HOME_URL: https://xxx.tld | |
WordPress Version: 5.4 | |
Permalink Structure: /index.php/%year%/%monthnum%/%day%/%postname%/ |
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
eyJsaXRlc3BlZWQtY2FjaGUtY29uZiI6eyJ2ZXJzaW9uIjoiMi45LjkuMiIsInJhZGlvX3NlbGVjdCI6MSwiYXV0b191cGdyYWRlIjpmYWxzZSwibmV3cyI6ZmFsc2UsInB1cmdlX3VwZ3JhZGUiOnRydWUsImNhY2hlX3ByaXYiOmZhbHNlLCJjYWNoZV9jb21tZW50ZXIiOnRydWUsImNhY2hlX3Jlc3QiOnRydWUsImNhY2hlX3BhZ2VfbG9naW4iOnRydWUsInRpbWVkX3VybHMiOiIiLCJ0aW1lZF91cmxzX3RpbWUiOiIiLCJjYWNoZV9mYXZpY29uIjp0cnVlLCJjYWNoZV9yZXNvdXJjZXMiOnRydWUsIm1vYmlsZXZpZXdfZW5hYmxlZCI6ZmFsc2UsIm1vYmlsZXZpZXdfcnVsZXMiOiJNb2JpbGV8QW5kcm9pZHxTaWxrXC98S2luZGxlfEJsYWNrQmVycnl8T3BlcmFcXCBNaW5pfE9wZXJhXFwgTW9iaSIsImNhY2hlX29iamVjdCI6dHJ1ZSwiY2FjaGVfb2JqZWN0X2tpbmQiOnRydWUsImNhY2hlX29iamVjdF9ob3N0IjoiMTI3LjAuMC4xIiwiY2FjaGVfb2JqZWN0X3BvcnQiOiI2Mzc5IiwiY2FjaGVfb2JqZWN0X2xpZmUiOiIzNjAiLCJjYWNoZV9vYmplY3RfcGVyc2lzdGVudCI6dHJ1ZSwiY2FjaGVfb2JqZWN0X2FkbWluIjp0cnVlLCJjYWNoZV9vYmplY3RfdHJhbnNpZW50cyI6dHJ1ZSwiY2FjaGVfb2JqZWN0X2RiX2lkIjoiMCIsImNhY2hlX29iamVjdF91c2VyIjoiIiwiY2FjaGVfb2JqZWN0X3Bzd2QiOiIiLCJjYWNoZV9icm93c2VyIjp0cnVlLCJjYWNoZV9icm93c2VyX3R0bCI6MjU5MjAwMCwibG9naW5fY29va2llIjoiIiwiY2hlY2tfYWR2YW5jZWRj |
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 | |
/** | |
* @snippet Shortcode pour exclure les produits hors stock - WooCommerce | |
* @author-url https://webplus.agency | |
* @author Agence WebPlus | |
* @compatible WooCommerce 3.8 | |
* @usage [in_stock_products] | |
* @wc-shortcodes https://github.com/woocommerce/woocommerce/blob/dc7aa3069466f1b7e23fd7ef468760a6a9ddd241/includes/class-wc-shortcodes.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 | |
/** | |
* @snippet Conditional plugin load. | |
* @author Agence WebPlus | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed 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
<?php | |
// securiser l'accès au fichier | |
if ( ! defined( 'ABSPATH' ) ) exit; | |
// Chargement TAC | |
add_action( 'wp_enqueue_scripts', 'webplus_tac_load' ); | |
function webplus_tac_load() { | |
wp_enqueue_script( 'tarteaucitron', 'https://cdn.jsdelivr.net/gh/AmauriC/tarteaucitron.js@1.3/tarteaucitron.min.js' ); |
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 | |
/** Disable Ajax Call from WooCommerce on front page and posts*/ | |
add_action( 'wp_enqueue_scripts', 'dequeue_woocommerce_cart_fragments', 11); | |
function dequeue_woocommerce_cart_fragments() { | |
if (is_front_page() || is_single() ) wp_dequeue_script('wc-cart-fragments'); | |
} |
NewerOlder