Using Conditional Logic to Change Date Picker Locale

/** * Conditionally apply the date picker locale strings, depending on what the * current locale is as defined by WPML. * * @link https://wpforms.com/developers/localize-the-date-picker-strings/ */ function wpf_dev_datepicker_apply_locale() { if ( defined( ‘ICL_LANGUAGE_CODE’ ) && ‘es’ == ICL_LANGUAGE_CODE ) {…Continue reading

Localizing Date Picker Strings

/** * 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

Disable All UpdraftPlus Email Notifications

/** * Comprehensive UpdraftPlus Email Notification Disabler * Add this code to your theme’s functions.php or WPCode * By: Empathy First Media */ // Master switches and initialization prevention add_filter(‘updraftplus_disable_all_mail_init’, ‘__return_true’); // Master switch to disable email initialization add_filter(‘updraftplus_email’, ‘__return_false’);…Continue reading

Disabilitazione wp v2 users rest api

// Disable /users rest routes add_filter(‘rest_endpoints’, function( $endpoints ) { if ( isset( $endpoints[‘/wp/v2/users’] ) ) { unset( $endpoints[‘/wp/v2/users’] ); } if ( isset( $endpoints[‘/wp/v2/users/(?P[\d]+)’] ) ) { unset( $endpoints[‘/wp/v2/users/(?P[\d]+)’] ); } return $endpoints; });Continue reading

Pagos

add_shortcode(‘mostrar_pagos_jugador’, ‘mostrar_pagos_jugador_func’); function setup_pagos_google_client() { // Configura el cliente de Google Sheets para Pagos $client = new Google_Client(); $client->setApplicationName(‘Club Aguilas – Pagos’); $client->setScopes(Google_Service_Sheets::SPREADSHEETS_READONLY); $client->setAuthConfig(ABSPATH . ‘clubaguilas-google.json’); // Archivo de credenciales de Club Aguilas $service = new Google_Service_Sheets($client); return $service; }…Continue reading