Snippet senza titolo

/** * PROTEZIONE LIVE: Disabilita Archivi Data e Redirect 301 * Impedisce la visualizzazione di archivi per anno/mese/giorno. */ add_action(‘template_redirect’, ‘esperto_wp_blindatura_live_v2’); function esperto_wp_blindatura_live_v2() { // 1. Applichiamo il redirect solo nel front-end (is_admin esclude la bacheca) // 2. Verifichiamo se…Continue reading

Add a button to customer data

add_action( ‘woocommerce_admin_order_data_after_billing_address’, ‘custom_customer_history_search_button_blue’, 10, 1 ); function custom_customer_history_search_button_blue( $order ) { // Vásárló e-mail címének lekérése $customer_email = $order->get_billing_email(); if ( $customer_email ) { // A keresési URL összeállítása $search_url = admin_url( ‘edit.php?s=’ . urlencode( $customer_email ) . ‘&post_type=shop_order’ );…Continue reading

Organization ShortCode (net)

/** * Shortcode: [related_organizations] * Displays related organizations stored in post meta key: related_organizations * Expected meta format: comma-separated post IDs (e.g. “12,34,56”) */ /** * Only declare the function if it doesn’t already exist * (prevents “Cannot redeclare …”…Continue reading

envira-jetpack-fix.php

/*Adding a JetPack Lazy Load Filters * * @link https://enviragallery.com/docs/how-to-use-jetpack-lazy-load-and-enviras-lazy-load-together/ */ add_filter(‘envira_gallery_indexable_image_css’, ‘jp_envira_gallery_indexable_image_css’, 10, 2 ); function jp_envira_gallery_indexable_image_css( $css, $id ) { $css .= ‘skip-lazy’; return $css; } add_filter(‘jetpack_lazy_images_blacklisted_classes’, ‘envira_jetpack_lazy_images_blacklisted_classes’, 999, 1 ); function envira_jetpack_lazy_images_blacklisted_classes( $blacklisted_classes ) { $blacklisted_classes[] =…Continue reading

Snippet Switchboard

/** * Plugin Name: Snippets Switchboard (for Code Snippets) * Description: Full-width Dashboard widget + Tools page showing Code Snippets in a compact 3-column grid with dot toggles, hide/unhide, and per-snippet tags (read-only modal). Shows Edit (pencil), Tags (if present),…Continue reading

Cache Buster Multisite

/** * WPCode Snippet: Clear Cache After Import (Current Site Only) * * For Multisite Networks (180+ sites) * Clears cache ONLY for the specific site where the import ran. * Does NOT affect other sites in the network. *…Continue reading