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

Add extra shipping providers for vendor tracking numbers (copy)

$shipping_providers = array( ‘Australia’ => array( ‘Australia Post’ => ‘https://auspost.com.au/mypost/track/#/details/%1$s’, ‘FedEx’ => ‘https://www.fedex.com/apps/fedextrack/?tracknumbers=%1$s&cntry_code=au’, ‘Fastway Couriers’ => ‘https://www.fastway.com.au/tools/track/?l=%1$s’, ), ‘Austria’ => array( ‘post.at’ => ‘https://www.post.at/sv/sendungsdetails?snr=%1$s’, ‘dhl.at’ => ‘https://www.dhl.at/content/at/de/express/sendungsverfolgung.html?brand=DHL&AWB=%1$s’, ‘DPD.at’ => ‘https://tracking.dpd.de/parcelstatus?locale=de_AT&query=%1$s’, ), ‘Brazil’ => array( ‘Correios’ => ‘http://websro.correios.com.br/sro_bin/txect01$.QueryList?P_LINGUA=001&P_TIPO=001&P_COD_UNI=%1$s’, ), ‘Belgium’ =>…Continue reading

NoCache

/** * Disable caching ONLY for the margin calculator page. * Put this in its own WPCode PHP snippet set to Auto Insert -> Run Everywhere. */ add_action(‘send_headers’, function () { // Skip admin + ajax + REST if (is_admin()…Continue reading

Completely Disable Comments

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