Localizing Date Picker Strings (copy)

/** * Load the date picker locale strings. * * @link https://wpforms.com/developers/localize-the-date-picker-strings/ */ function wpf_dev_datepicker_locale( $forms ) { if ( true === wpforms_has_field_type( ‘date-time’, $forms, true )){ wp_enqueue_script( ‘wpforms-datepicker-locale’, ‘https://npmcdn.com/[email protected]/dist/l10n/es.js’, array( ‘wpforms-flatpickr’ ), null, true ); } } add_action( ‘wpforms_frontend_js’,…Continue reading

SEO ( Mihai )

const DEBUG_SKINGURU24_SEO=false; /* * Urmatoarea functie doar pentru benchmarking snippet ul in dev process ( unused in prod ) */ function my_woocommerce_log_message($message) { if (class_exists(‘WC_Logger’)) { $logger = wc_get_logger(); $caller_function=”UNKNOWN”; $backtrace = debug_backtrace(); if (isset($backtrace[1])) { // The caller is…Continue reading

Others PHP ( Mihai )

function custom_urls_preload ( $urls ){ try { $language_code = substr(get_locale(),0,2); $api_url = ‘https://app-hintz.bbbone.biz/server/skinguru24/permalink_variations/’.$language_code; // Fetch the JSON data from the remote API $response = wp_remote_get($api_url); // Check for errors in the response if (is_wp_error($response)) { throw new Exception(‘API request failed:…Continue reading