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

Hide Elementor Update Notifications

/** * Disable Elementor’s post-update notifications */ function disable_elementor_update_notification() { if (class_exists(‘\Elementor\Core\Admin\Admin_Notices’)) { // Remove upgrade completion notice remove_action(‘admin_notices’, [\Elementor\Core\Admin\Admin_Notices::class, ‘admin_notice_upgrade_completion’]); // Remove update success notice add_action(‘admin_init’, function() { if (isset($_GET[‘action’]) && $_GET[‘action’] === ‘upgrade-plugin’ && isset($_GET[‘plugin’]) && strpos($_GET[‘plugin’], ‘elementor’)…Continue reading

ACF custom variables

// ACF custom variables $knowsabout = get_field( ‘author_knowsabout’, ‘user_’.get_the_author_meta( ‘ID’ ) ); $knowsabout2 = get_field( ‘author_knowsabout_2’, ‘user_’.get_the_author_meta( ‘ID’ ) ); $knowsabout3 = get_field( ‘author_knowsabout_3’, ‘user_’.get_the_author_meta( ‘ID’ ) ); $knowsabout4 = get_field( ‘author_knowsabout_4’, ‘user_’.get_the_author_meta( ‘ID’ ) ); $knowsabout5 = get_field( ‘author_knowsabout_5’,…Continue reading

Hide Elementor AI Nag

/* * Loads on Elementor’s frontend editor * Added by kishorchand * Use child theme’s function.php or code snippets plugin for better code management. */ function remove_elementor_nag() { ?>Continue reading

Hide Elementor AI Image

/* * Hide Elementor image optimization ads when choosing the post’s featured image on the backend * UPDATE: 20/06/24 Hide Elementor image optimization ads on Media Library, if closing the “x” is not enough. */ function hide_elementor_nag_admin() { ?>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

Banner Publicitario

// Código para obtener y mostrar los datos de Google Sheets $API = ‘AIzaSyC-Q_KOO2J2C6r3E8ehvcnIhrcH4BHhJMI’; $google_spreadsheet_ID = ‘1SOBpT1j_xkQxC2ESBNBQVsuh2O4ODl20F5k42SPnjvE’; $api_key = esc_attr($API); // Rango de celdas de la hoja de cálculo $location = ‘BANNER!A2:B’; // Asegúrate de ajustar el rango según tu…Continue reading