[Advision Publisher] Sportsbook Field Dynamic Tag

// —————————————————————————– // Helpers (safe across sites) // —————————————————————————– if (!function_exists(‘adv_collect_sportsbook_fields’)) { /** * Collect ACF fields for the sportsbook CPT. * @param null|string $type_filter e.g., ‘image’, ‘color_picker’; null = all * @param bool $exclude_images set true to exclude images…Continue reading

[Advision Publisher] Short Code Field Dynamic Tag

if ( class_exists( ‘\Elementor\Core\DynamicTags\Tag’ ) && function_exists( ‘get_field’ ) ) { class SC_Get_Tag extends \Elementor\Core\DynamicTags\Tag { public function get_name() { return ‘sc_get_tag’; } public function get_title() { return __( ‘Short Code Field’, ‘textdomain’ ); } public function get_group() { return…Continue reading

Homepage

/** * Native Innovation — Homepage via shortcode (fixed syntax) * Usage: Add as a WPCode PHP Snippet (Frontend), then place [native_homepage] on your Home page. */ if ( ! function_exists(‘ni_homepage_shortcode’) ) { function ni_homepage_shortcode($atts = []) { $contact_url =…Continue reading

Home

/** * Native Innovation — Homepage via shortcode * Usage: Add as a WPCode PHP Snippet (Frontend), then place [native_homepage] on your Home page. */ if (!function_exists(‘ni_enqueue_home_styles’)) { function ni_enqueue_home_styles() { // Base CSS for the homepage sections (scoped by…Continue reading

Add Invoice PDF as Attachment to Catering Form Emails

// Add view as PDF attachment // add_filter( ‘frm_pdfs_email_attachment_args’, ‘add_view_to_attached_pdf’, 10, 2 ); function add_view_to_attached_pdf( $pdf_args, $args ) { if($args[‘form’]->id ==5) { //change 5 to the ID of the form $pdf_args[‘view’] = 10; // ID of view. $pdf_args[‘id’] = $args[‘entry’]->id;…Continue reading

Woo Commerce Zip Gate

/** * ZIP gate for ALL products — works with Classic Checkout and the Block Checkout (Store API). * Blocks checkout unless billing OR shipping ZIP is in the allowed list. */ add_action(‘init’, function () { // —————– SETTINGS —————–…Continue reading

404 Logger

/** * Log 404 requests for pages/posts/assets, excluding admin or login areas. */ function log_public_404_requests() { // Only proceed if this is a 404 page on the front end if ( is_404() && ! is_admin() ) { $request_uri = $_SERVER[‘REQUEST_URI’]…Continue reading