Location: everywhere
Activer automatiquement WooCommerce et les paiements (copy) (copy)
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
Activer automatiquement WooCommerce et les paiements (copy)
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
Untitled Snippet
Set a Minimum Word Count for Posts (copy)
/** * 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
WP · Disable Author Pages
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
dynamic temp directory
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
Completely Disable Comments (copy)
add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading
SPDL – Speedy Atelier Registre Broches
/** * Snippet: SPDL – Speedy Atelier Registre Broches * * Version: V3-I * * Correction V3-I: * – utilise le vrai picto fourni sur WordPress: /wp-content/uploads/2026/06/Design-sans-titre-2-scaled.png * – le picto est rendu en canvas noir/blanc, sans texte SPDL, à…Continue reading
Exclude Common Inline Scripts from SiteGround Speed Optimizer JavaScript File Combination
add_filter( ‘sgo_javascript_combine_excluded_inline_content’, ‘js_combine_exclude_inline_script’ ); function js_combine_exclude_inline_script( $exclude_list ) { $exclude_list[] = ‘window.OneSignalDeferred = window.OneSignalDeferred’; $exclude_list[] = ‘fbq(‘; $exclude_list[] = ‘document.currentScript?.remove’; // Part of Formidable Honeypot $exclude_list[] = “const style = document.createElement( ‘style’ )”; // Part of Formidable Honeypot return $exclude_list;…Continue reading