Disable Emojis

/** * Disable the emojis in WordPress. */ add_action( ‘init’, function () { remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 ); remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ ); remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ ); remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ ); remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ ); remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ ); remove_filter( ‘wp_mail’,…Continue reading

Open External Links in a New Tab

/** * Plugin Name: External Links – Open in New Tab * Description: Automatically opens external links in a new tab across content, * ACF WYSIWYG fields, widgets, and nav menus. Skips internal links, * anchors, mailto, and tel links.…Continue reading

Insert matching JP people group link

/** * Shortcode to generate Joshua Project link * based on ACF field PGID matching ArcGIS service * Outputs nothing if no match */ function jp_people_group_link_shortcode() { global $post; if ( ! $post || get_post_type( $post ) !== ‘people_groups’ )…Continue reading

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