/** * TECNOFOTO – Restringir páginas por curso/promoción * * Campo ACF del usuario: * curso_academico * * Ejemplo: * /anuario/ => solo curso 26-27 */ add_action( ‘template_redirect’, function() { /* ================================================ * CONFIGURACIÓN * ================================================ */ $restricciones = […Continue reading
/** * ============================================================ * TECNOFOTO – ÁREA PERSONAL / INICIO * ============================================================ * * Shortcode: * [tecnofoto_inicio] * * Versión: 2.7 * * ============================================================ */ if ( ! defined( ‘ABSPATH’ ) ) { exit; } /* ============================================================ * 1. CONFIGURACIÓN…Continue reading
/** * SHORTCODE: [ficha_usuario] * * Reglas: * – Sin producto comprado completed: NO ve foto_orla ni foto_birrete. * – paquete-2 / paquete_2 completed: ve foto_orla. * – paquete-3 / paquete_3 completed: ve foto_orla y foto_birrete. * – archivo-1 /…Continue reading
add_action(‘wp_enqueue_scripts’, function () { if (!is_page(2029)) { return; } wp_enqueue_style( ‘leaflet-css’, ‘https://unpkg.com/[email protected]/dist/leaflet.css’, array(), ‘1.9.4’ ); wp_enqueue_script( ‘leaflet-js’, ‘https://unpkg.com/[email protected]/dist/leaflet.js’, array(), ‘1.9.4’, true ); wp_add_inline_script(‘leaflet-js’, ” document.addEventListener(‘DOMContentLoaded’, function () { const mapElement = document.getElementById(‘treasure-map’); if (!mapElement || typeof L === ‘undefined’) return;…Continue reading
/** * Plugin Name: Wholesale Payments — send $0-today plan orders to Processing * Description: Temporary workaround. Moves a Wholesale Payments order from On Hold * to Processing when the hold was caused only by “no payment is due *…Continue reading
add_filter(‘wp_mail’, ‘add_cc_to_wp_mail’, 10, 1); function add_cc_to_wp_mail($args) { // Specify the CC email address $cc_email = ‘[email protected]’; // Check if headers are an array or string if (is_array($args[‘headers’])) { $args[‘headers’][] = ‘Cc: ‘ . $cc_email; } else { $args[‘headers’] .= ‘Cc:…Continue reading
// Council Minutes Search – shortcode: [minutes_search] function foliot_minutes_search_shortcode( $atts ) { // Defense-in-depth: even though the containing Page is set to // “Private” (Editor/Admin only) and WPCode’s own Conditional Logic // will also gate this snippet, we check again…Continue reading
add_shortcode( ‘term_count’, function( $atts ) { $atts = shortcode_atts( array( ‘taxonomy’ => ”, ‘hide_empty’ => ‘false’, ), $atts, ‘term_count’ ); $taxonomy = sanitize_key( $atts[‘taxonomy’] ); if ( ! $taxonomy || ! taxonomy_exists( $taxonomy ) ) { return ‘0’; } $terms…Continue reading