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

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

Enable Admin Email after Formidable Forms Entry Saved as Spam

add_action( ‘frm_after_create_entry’, ‘rd_email_admin_on_spam_entry’, 30, 2 ); function rd_email_admin_on_spam_entry( $entry_id, $form_id ) { $entry = FrmEntry::getOne( $entry_id ); if ( ! $entry || ! FrmSpamEntriesHelper::is_spam( $entry ) ) { return; } $recipient = ‘[email protected]’; $url = admin_url( ‘admin.php?page=formidable-entries&frm_action=show&id=’ . $entry_id );…Continue reading

CCT ID display as name

function gt_id_label_map() { return array( // CCT slug => [ field => target ] ‘cct’ => array( // ‘articles’ => array( ‘type’ => ‘term:article-types’ ), ), // CPT slug => [ meta_key => target ] (adds a new admin column)…Continue reading

CCT select field width 100%

add_action( ‘admin_head’, function () { $page = isset( $_GET[‘page’] ) ? sanitize_key( $_GET[‘page’] ) : ”; if ( strpos( $page, ‘jet-cct-‘ ) !== 0 ) { return; } ?>Continue reading

Logout without confirmation

add_action(‘check_admin_referer’, ‘logout_without_confirm’, 10, 2); function logout_without_confirm($action, $result) { if ($action == “log-out” && !isset($_GET[‘_wpnonce’])) { $redirect_to = isset($_REQUEST[‘redirect_to’]) ? $_REQUEST[‘redirect_to’] : ‘https://gruppa.cloud’; /* https://gruppa.cloud/wp-login.php?action=logout */ $location = str_replace(‘&’, ‘&’, wp_logout_url($redirect_to)); header(“Location: $location”); die; } }Continue reading

CCT SEO post relations

/** * ========================================= * Gruppa CCT SEO * Relation: post_id -> WP Post ID * ========================================= */ /** * ========================================= * SAFE GET * ========================================= */ function gt_safe($obj, $key, $default = ”) { if (is_object($obj) && isset($obj->$key)) { return trim((string)…Continue reading