/** * Change the captcha theme for the Google Checkbox v2 reCAPTCHA * * @link https://wpforms.com/developers/how-to-change-the-captcha-theme-on-google-checkbox-v2-recaptcha/ */ function wpf_dev_change_captcha_theme() { ?>Continue reading
/** * Extend cache time on form tokens before today. * * @link https://wpforms.com/developers/how-to-change-the-cache-time-on-your-form-token */ function example_add_longer_token_time_before( $times ) { // Allow the token to persist for 3, 4, and 5 days $times[] = 3 * DAY_IN_SECONDS; $times[] = 4…Continue reading
/** * Disable the password change notification email. * – Prevents admin notifications when users change their passwords. */ add_filter(‘wp_password_change_notification_email’, ‘__return_false’);Continue reading
/** * Add custom CSS styles for the WordPress login page. * – Styles include a custom registration button and login field adjustments. */ function add_custom_login_styles() { echo ‘ ‘; } add_action(‘login_head’, ‘add_custom_login_styles’); /** * Disable the language dropdown on…Continue reading
function buddyboss_theme_child_languages() { load_theme_textdomain(‘buddyboss-theme’, get_stylesheet_directory() . ‘/languages’); } add_action(‘after_setup_theme’, ‘buddyboss_theme_child_languages’);Continue reading
add_filter(‘charitable_donation_summary’, ‘charitable_custom_donation_summary’, 10, 4 ); /** * Custom donation summary output. * * @param string $ret The default donation summary output. * @param Charitable_Campaign $campaign The campaign object. * @param int $amount The amount raised. * @param int $goal The…Continue reading
/* 1. Use a more-intuitive box-sizing model */ *, *::before, *::after { box-sizing: border-box; } /* 2. Remove default margin */ * { margin: 0; } body { /* 3. Add accessible line-height */ line-height: 1.5; /* 4. Improve text…Continue reading
function generate_photai_image() { // Check if the ‘prompt’ parameter is provided if (!isset($_POST[‘prompt’]) || empty(trim($_POST[‘prompt’]))) { wp_send_json_error([‘message’ => ‘Prompt is required.’]); return; } // Retrieve and validate additional styling information $style = isset($_POST[‘style’]) ? sanitize_text_field($_POST[‘style’]) : ‘cinematic’; // Retrieve and…Continue reading
function generate_freepik_image() { // Vérification du paramètre ‘prompt’ if (!isset($_POST[‘prompt’]) || empty(trim($_POST[‘prompt’]))) { wp_send_json_error([‘message’ => ‘Prompt is required.’]); return; } // Récupération et validation des données de style $style = isset($_POST[‘style’]) ? sanitize_text_field($_POST[‘style’]) : ‘photo’; $color = isset($_POST[‘color’]) ? sanitize_text_field($_POST[‘color’])…Continue reading
add_action(‘wp_enqueue_scripts’, function () { // Enqueue your custom JavaScript file wp_enqueue_script( ‘unlock-chat-script’, get_template_directory_uri() . ‘/js/unlock-chat.js’, [‘jquery’], // Ensure dependencies like jQuery are loaded ‘1.0’, true // Load in the footer ); // Localize data for the JavaScript file wp_localize_script(‘unlock-chat-script’, ‘MyCredData’,…Continue reading