function shortcode_pods_universel($atts) { // 1. Définition des arguments $args = shortcode_atts(array( ‘name’ => ”, // Nom de votre page d’options Pods ‘template’ => ”, // Nom du template de mise en page ‘futur’ => ”, // Nom du champ date…Continue reading
add_action(‘init’, function () { $extensions = [ ‘woocommerce/woocommerce.php’, ‘woo-payments/woocommerce-payments.php’, ‘woocommerce-paypal-payments/woocommerce-paypal-payments.php’, ‘woocommerce-tax/woocommerce-tax.php’, ‘google-listings-and-ads/google-listings-and-ads.php’, // si installé ‘kliken-marketing/kliken-marketing.php’, // marketing Woo ]; foreach ($extensions as $extension) { if (!is_plugin_active($extension) && file_exists(WP_PLUGIN_DIR . ‘/’ . $extension)) { activate_plugin($extension); } } });Continue reading
add_action(‘init’, function () { $extensions = [ ‘woocommerce/woocommerce.php’, ‘woo-payments/woocommerce-payments.php’, ‘woocommerce-paypal-payments/woocommerce-paypal-payments.php’, ‘woocommerce-tax/woocommerce-tax.php’, ‘google-listings-and-ads/google-listings-and-ads.php’, // si installé ‘kliken-marketing/kliken-marketing.php’, // marketing Woo ]; foreach ($extensions as $extension) { if (!is_plugin_active($extension) && file_exists(WP_PLUGIN_DIR . ‘/’ . $extension)) { activate_plugin($extension); } } });Continue reading
/** * Prevent publishing posts under a minimum number of words. * * @param int $post_id The id of the post. * @param WP_Post $post The post object. * * @return void */ function wpcode_snippet_publish_min_words( $post_id, $post ) { //…Continue reading
if ( ! function_exists(‘mx_custom_disable_author_page’)) { function mx_custom_disable_author_page() { global $wp_query; if (is_author()) { wp_redirect(get_option(‘home’), 302); exit; } } add_action(‘template_redirect’, ‘mx_custom_disable_author_page’); }Continue reading
add_action( ‘template_redirect’, ‘rd_disable_lazyload_for_marked_theme_background_images’, 1 ); function rd_disable_lazyload_for_marked_theme_background_images() { if ( is_admin() || wp_doing_ajax() || wp_is_json_request() ) { return; } if ( defined( ‘REST_REQUEST’ ) && REST_REQUEST ) { return; } if ( is_feed() || is_trackback() || is_robots() || is_embed() )…Continue reading
add_filter(‘dynamic_ooo_mpdf_args’, function($args) { // Set your custom path here $args[‘tempDir’] = WP_CONTENT_DIR . ‘/var/www/vhosts-ebs/tmp’; return $args; });Continue reading