<?php // === TEMPORARY DEBUG v2 === register_shutdown_function(function() { $e = error_get_last(); if ($e) { file_put_contents(WP_CONTENT_DIR . "/uploads/debug-error.json", json_encode($e)); } }); // === END DEBUG === add_action("admin_notices", function() { $e = get_option("_capannam_last_fatal"); if($e) echo "<div class=\"notice notice-error\"><b>FATAL:</b><pre>" . esc_html(json_encode($e)) . "</pre></div>"; }); /** * Setup tripgo Child Theme's textdomain. * * Declare textdomain for this child theme. * Translations can be filed in the /languages/ directory. */ function tripgo_child_theme_setup() { load_child_theme_textdomain( 'tripgo-child', get_stylesheet_directory() . '/languages' ); } add_action( 'after_setup_theme', 'tripgo_child_theme_setup' ); add_action( 'wp_enqueue_scripts', 'tripgo_enqueue_styles' ); function tripgo_enqueue_styles() { $parenthandle = 'tripgo-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme. $theme = wp_get_theme(); wp_enqueue_style( $parenthandle, get_template_directory_uri() . '/style.css', array(), // if the parent theme code has a dependency, copy it to here $theme->parent()->get('Version') ); wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( $parenthandle ), $theme->get('Version') // this only works if you have Version in the style header ); } add_filter( 'wp_mail_smtp_core_wp_mail_function_incorrect_location_notice', '__return_false' ); // Export Custom Taxonomy and Custom Checkout Fields add_action( 'rss2_head', function() { if ( is_admin() ) { // Custom Taxonomies $custom_taxonomies = recursive_array_replace( '\\', '', get_option( 'ovabrw_custom_taxonomy', [] ) ); if ( ! empty( $custom_taxonomies ) && is_array( $custom_taxonomies ) ) { foreach ( $custom_taxonomies as $slug => $items ) { echo "<ovabrw_custom_taxonomies>\n"; if ( $slug ) echo "\t<slug>".$slug."</slug>\n"; if ( $items['name'] ) echo "\t<name>".$items['name']."</name>\n"; if ( $items['singular_name'] ) echo "\t<singular_name>".$items['singular_name']."</singular_name>\n"; if ( $items['label_frontend'] ) echo "\t<label_frontend>".$items['label_frontend']."</label_frontend>\n"; if ( $items['enabled'] ) echo "\t<enabled>".$items['enabled']."</enabled>\n"; if ( $items['show_listing'] ) echo "\t<show_listing>".$items['show_listing']."</show_listing>\n"; echo "</ovabrw_custom_taxonomies>\n"; } } // Custom Checkout Fields $checkout_fields = recursive_array_replace( '\\', '', get_option( 'ovabrw_booking_form', [] ) ); if ( ! empty( $checkout_fields ) && is_array( $checkout_fields ) ) { foreach ( $checkout_fields as $slug => $items ) { // Select $options_key = isset( $items['ova_options_key'] ) && $items['ova_options_key'] ? $items['ova_options_key'] : ''; $options_text = isset( $items['ova_options_text'] ) && $items['ova_options_text'] ? $items['ova_options_text'] : ''; $options_price = isset( $items['ova_options_price'] ) && $items['ova_options_price'] ? $items['ova_options_price'] : ''; // Radio $radio_values = isset( $items['ova_radio_values'] ) && $items['ova_radio_values'] ? $items['ova_radio_values'] : ''; $radio_prices = isset( $items['ova_radio_prices'] ) && $items['ova_radio_prices'] ? $items['ova_radio_prices'] : ''; // Checkbox $checkbox_key = isset( $items['ova_checkbox_key'] ) && $items['ova_checkbox_key'] ? $items['ova_checkbox_key'] : ''; $checkbox_text = isset( $items['ova_checkbox_text'] ) && $items['ova_checkbox_text'] ? $items['ova_checkbox_text'] : ''; $checkbox_price = isset( $items['ova_checkbox_price'] ) && $items['ova_checkbox_price'] ? $items['ova_checkbox_price'] : ''; // File $max_file_size = isset( $items['max_file_size'] ) && $items['max_file_size'] ? $items['max_file_size'] : ''; echo "<ovabrw_custom_checkout_fields>\n"; if ( $slug ) echo "\t<slug>".$slug."</slug>\n"; if ( $items['type'] ) echo "\t<type>".$items['type']."</type>\n"; if ( $items['label'] ) echo "\t<label>".$items['label']."</label>\n"; if ( $items['default'] ) echo "\t<default>".$items['default']."</default>\n"; if ( $items['placeholder'] ) echo "\t<placeholder>".$items['placeholder']."</placeholder>\n"; if ( $items['class'] ) echo "\t<class>".$items['class']."</class>\n"; if ( $items['required'] ) echo "\t<required>".$items['required']."</required>\n"; if ( $items['enabled'] ) echo "\t<enabled>".$items['enabled']."</enabled>\n"; // Select Keys if ( ! empty( $options_key ) && is_array( $options_key ) ) { echo "\t<select_keys>".implode( '|', $options_key )."</select_keys>\n"; } // Select Texts if ( ! empty( $options_text ) && is_array( $options_text ) ) { echo "\t<select_texts>".implode( '|', $options_text )."</select_texts>\n"; } // Select Prices if ( ! empty( $options_price ) && is_array( $options_price ) ) { echo "\t<select_prices>".implode( '|', $options_price )."</select_prices>\n"; } // Radio Values if ( ! empty( $radio_values ) && is_array( $radio_values ) ) { echo "\t<radio_values>".implode( '|', $radio_values )."</radio_values>\n"; } // Radio Prices if ( ! empty( $radio_prices ) && is_array( $radio_prices ) ) { echo "\t<radio_prices>".implode( '|', $radio_prices )."</radio_prices>\n"; } // Checkbox Keys if ( ! empty( $checkbox_key ) && is_array( $checkbox_key ) ) { echo "\t<checkbox_keys>".implode( '|', $checkbox_key )."</checkbox_keys>\n"; } // Checkbox Texts if ( ! empty( $checkbox_text ) && is_array( $checkbox_text ) ) { echo "\t<checkbox_texts>".implode( '|', $checkbox_text )."</checkbox_texts>\n"; } // Checkbox Prices if ( ! empty( $checkbox_price ) && is_array( $checkbox_price ) ) { echo "\t<checkbox_prices>".implode( '|', $checkbox_price )."</checkbox_prices>\n"; } // Max File Size if ( $max_file_size ) { echo "\t<max_file_size>".$max_file_size."</max_file_size>\n"; } echo "</ovabrw_custom_checkout_fields>\n"; } } } }); https://capannam.com/post-sitemap.xml 2026-05-24T15:19:36+00:00 https://capannam.com/page-sitemap.xml 2026-05-25T22:35:16+00:00 https://capannam.com/product-sitemap.xml 2026-05-24T14:06:52+00:00 https://capannam.com/author-sitemap.xml 2026-05-25T22:38:31+00:00 https://capannam.com/local-sitemap.xml 2026-05-25T22:43:56+00:00