Add Custom Post Selector Avada

/** * Curated Post Grid for Avada Builder * Version 1.3 * * WPCode: PHP Snippet > Auto Insert > Run Everywhere * No opening PHP tag required. */ if (!defined(‘ABSPATH’)) { return; } /** * Published posts for the…Continue reading

FI Portali eventi – ricerca, verifica e riconoscimento dei portali già collegati 19022

if(!defined(‘ABSPATH’))exit; if(!class_exists(‘FI_Portal_Sources_0001′)){ final class FI_Portal_Sources_0001{ const OPT=’fi_portal_sources_0001′;const REMOVED=’fi_portal_sources_removed_0001′;const DAILY=’fi_portal_sources_daily_0001′;const ONE=’fi_portal_source_scan_0001’; static function boot(){ add_action(‘init’,[__CLASS__,’schedule’]);add_action(self::DAILY,[__CLASS__,’daily’]);add_action(self::ONE,[__CLASS__,’scan’]); add_action(‘admin_post_fi_portal_preview’,[__CLASS__,’preview’]);add_action(‘admin_post_fi_portal_add’,[__CLASS__,’add’]);add_action(‘admin_post_fi_portal_check’,[__CLASS__,’check’]);add_action(‘admin_post_fi_portal_toggle’,[__CLASS__,’toggle’]);add_action(‘admin_post_fi_portal_delete’,[__CLASS__,’remove’]); add_action(‘admin_footer’,[__CLASS__,’panel’],10010);add_action(‘fi_issec_continue_0001′,[__CLASS__,’issec_continue’]);add_action(‘fi_bologna_continue_0001′,[__CLASS__,’bologna_continue’]);add_action(‘fi_email_import_tick_0001′,[__CLASS__,’issec_repair_pending’],35);add_action(‘fi_ical_continue_0001′,[__CLASS__,’bologna_continue’]); } static function all(){return (array)get_option(self::OPT,[]);} static function put($id,$r){if(isset(((array)get_option(self::REMOVED,[]))[$id]))return;$s=self::all();$s[$id]=$r;update_option(self::OPT,$s,false);} static function guard(){if(!class_exists(‘FI_Gmail_Connect_0001’)||!FI_Gmail_Connect_0001::owner())wp_die(‘Accesso riservato.’,403);} static function back(){wp_safe_redirect(admin_url(‘admin.php?page=fi-eventi-email-0001#fi-portal-sources’));exit;} static function valid($u){return class_exists(‘FI_Web_Events_0001’)&&FI_Web_Events_0001::valid($u)&&!wp_parse_url($u,PHP_URL_PASS);} static function schedule(){ if(class_exists(‘FI_Web_Events_0001’)&&get_option(self::OPT,null)===null){ $rows=[];$s=get_option(FI_Web_Events_0001::OPT,[]);foreach($s[‘sources’]??FI_Web_Events_0001::defaults()…Continue reading

CCT overrides CPT slug (copy)

// 1. Zachytíme dáta tesne pred zápisom do DB add_filter( ‘wp_insert_post_data’, function( $data, $postarr ) { // Overíme, či ide o CPT, ktoré má prepojenie na CCT (Has Single Page) // JetEngine posiela v $_POST dáta z CCT pri ukladaní…Continue reading

CCT overrides CPT slug (copy)

// 1. Zachytíme dáta tesne pred zápisom do DB add_filter( ‘wp_insert_post_data’, function( $data, $postarr ) { // Overíme, či ide o CPT, ktoré má prepojenie na CCT (Has Single Page) // JetEngine posiela v $_POST dáta z CCT pri ukladaní…Continue reading

Baart GA4 Tracking

/** * WPCode snippet: Baart GA4 Tracking (all Baart sites – baartgroup.com and every brand site) * Version 3.1 * * Page groups and HubSpot form names come from the content group rules snippet on baartgroup.com. * Each site refreshes…Continue reading

lokalstolz | Rolle Kunde

/* * WPCode-Snippet “lokalstolz | Rolle Kunde” (Typ php, Location everywhere, Auto-Insert an) * Legt die Benutzerrolle “Kunde” (ls_kunde) an: Rechte eines Redakteurs plus Pakete und Einzelrechte nach Wahl. * Einstellungen unter Benutzer > Rolle Kunde (nur Administratoren): sichtbare Menuepunkte…Continue reading

lokalstolz | Backend

/* lokalstolz | Backend: Backend und Anmeldung im lokalstolz-Look (Schwarz #1d1d1b, Weiss, gerade Ecken), Logo statt WordPress-Logo. Nur CSS und offizielle Hooks. */ if ( ! defined( ‘ABSPATH’ ) ) { return; } if ( ! function_exists( ‘ls_be_icon’ ) )…Continue reading

lokalstolz | Pferdeverkauf

/** * lokalstolz | Pferdeverkauf * Allgemeines Modul fuer Verkaufsseiten (Pferdezucht- und andere Verbaende). Liegt privat in der WPCode-Bibliothek. * Nichts Kundenspezifisches in diesem Snippet: Namen, Farben und Formular-IDs kommen aus der Option ls_pferdeverkauf * (Backend: Pferde > Einstellungen) bzw.…Continue reading

CCT repeater tree callback

// Callback pre JetEngine Dynamic Field – vykreslí vnorený repeater ako strom add_filter( ‘jet-engine/listings/allowed-callbacks’, function ( $callbacks ) { $callbacks[‘gruppa_render_terms_tree’] = ‘Render terms tree’; return $callbacks; } ); function gruppa_render_terms_tree( $items, $child_key = ‘terms’ ) { $items = maybe_unserialize( $items…Continue reading

PHP Runtime Diagnostic

add_filter( ‘debug_information’, function ( $info ) { if ( ! current_user_can( ‘manage_options’ ) ) { return $info; } $settings = ini_get_all( null, true ); $memory = $settings[‘memory_limit’] ?? []; $values = [ ‘PHP version’ => PHP_VERSION, ‘PHP handler’ => PHP_SAPI,…Continue reading