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
/** * 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
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
add_filter(‘pre_get_document_title’, function($title) { if (is_front_page()) return ‘Brooklyn Insurance Agency | Max J. Pollack & Sons’; return $title; });Continue reading
add_action( ‘gform_after_submission_5’, ‘wcv_dynamic_bol_capture’, 10, 2 ); function wcv_dynamic_bol_capture( $entry, $form ) { $order_id = null; $bol_file_url = null; foreach ( $form[‘fields’] as $field ) { $label = strtolower( trim( $field->adminLabel ?: $field->label ) ); if ( in_array( $label, array( ‘order…Continue reading
add_filter( ‘woocommerce_coupon_is_valid’, function( $valid, $coupon, $discount ) { $excluded_channels = $coupon->get_meta( ‘_excluded_og_channels’, true ); if ( empty( $excluded_channels ) ) { return $valid; } // Handle both a single stored string and a serialized array if ( ! is_array( $excluded_channels…Continue reading
function convert_to_webp($file) { $file_path = $file[‘file’]; $file_type = $file[‘type’]; // Only for JPEG, PNG, and GIF images if (in_array($file_type, [‘image/jpeg’, ‘image/png’, ‘image/gif’, ‘image/jpg’])) { $webp_path = preg_replace(‘/.(jpe?g|png|gif)$/i’, ‘.webp’, $file_path); // Check if the GD library is available if (!function_exists(‘gd_info’)) {…Continue reading