How to Set the Language for Google reCAPTCHA

/** * Set the language for Google reCAPTCHA. * * @link https://wpforms.com/developers/how-to-set-the-language-for-google-recaptcha/ */ function wpf_dev_recaptcha_language( $url ) { // Set the language code to FR (French) return esc_url_raw( add_query_arg( array( ‘hl’ => ‘fr ‘), $url ) ); } add_filter( ‘wpforms_frontend_recaptcha_url’,…Continue reading

How to Get the URL from the File Upload Form Field

/** * Get and use the File Upload field URL * * @link https://wpforms.com/developers/how-to-get-the-url-from-the-file-upload-form-field/ */ function wpf_dev_frontend_confirmation_message( $message, $form_data, $fields, $entry_id ) { // Only run on my form with ID = 1000 if ( absint( $form_data[ ‘id’ ] )…Continue reading

(cloud) r2c on Call Param

add_action(‘wp_head’, function() { $complete_url = (isset($_SERVER[‘HTTPS’]) && $_SERVER[‘HTTPS’] === ‘on’ ? “https” : “http”) . “://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]”; if (strpos($complete_url, ‘?call=’) !== false || strpos($complete_url, ‘&call=’) !== false) { $userAgent = $_SERVER[‘HTTP_USER_AGENT’] ?? ”; $searchEngines = [‘google’, ‘bing’, ‘msn’, ‘yandex’, ‘baidu’, ‘duckduck’,…Continue reading

Disable some Top WP Admin Bar

add_action(‘admin_bar_menu’, ‘remove_admin_bar_items’, 100); function remove_admin_bar_items($wp_admin_bar) { // Example: Remove the WordPress logo $wp_admin_bar->remove_node(‘wp-logo’); // Example: Remove the “Comments” menu $wp_admin_bar->remove_node(‘comments’); // Example: Remove the “Comments” menu $wp_admin_bar->remove_node(‘updates’); // Add more nodes as needed }Continue reading

RingBa: PHP Hide For Bots

//global $js_tag_id; //$js_tag_id = “CA365bab17031a47acab84c70a32d28015″; if (!defined(‘ABSPATH’)) exit; function is_search_engine_bot() { $userAgent = $_SERVER[‘HTTP_USER_AGENT’] ?? ”; if (stripos($userAgent, ‘google’) !== false || stripos($userAgent, ‘bing’) !== false || stripos($userAgent, ‘msn’) !== false || stripos($userAgent, ‘yandex’) !== false || stripos($userAgent, ‘baidu’) !==…Continue reading