if (!defined(‘ABSPATH’)) { exit; } add_action(‘init’, function () { $post_types = array(‘page’, ‘post’, ‘elementor_library’); foreach ($post_types as $pt) { register_post_meta($pt, ‘_elementor_data’, array( ‘show_in_rest’ => true, ‘single’ => true, ‘type’ => ‘string’, ‘auth_callback’ => function () { return current_user_can(‘edit_posts’); }, ));…Continue reading
// Disable auto-update emails. add_filter( ‘auto_core_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for plugins. add_filter( ‘auto_plugin_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for themes. add_filter( ‘auto_theme_update_send_email’, ‘__return_false’ );Continue reading
/** * 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
/** * External Links – Open in New Tab * Version: 1.2.0 * * Opens external links in a new tab across post/page content, CPTs, * ACF WYSIWYG fields, widgets, and nav menus. Skips internal links, * anchors, mailto, and…Continue reading
/** * 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
/** * AIOSEO Movie Poster Integration – TMDb & ACF Compatibility Fix * * This snippet overrides AIOSEO’s default image with the TMDb movie poster * stored in the ACF ‘poster_path’ field. Built as a compatibility fix for * the…Continue reading
add_action(‘pre_get_posts’, function($query) { if ($query->is_search() && !is_admin()) { $query->set(‘post__not_in’, array(74700)); } });Continue reading
/** * 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_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
/** * 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