add_filter( ‘charitable_default_donation_fields’, ‘charitable_filter_countries_donation_form’, 10, 1 ); function charitable_filter_countries_donation_form( $donation_fields = array() ) { if ( empty( $donation_fields[‘country’][‘donation_form’][‘options’] ) ) { return $donation_fields; } $countries_for_donation_form = $donation_fields[‘country’][‘donation_form’][‘options’]; // you can remove a country. unset( $countries_for_donation_form[‘CA’] ); // ..or you can create…Continue reading
/** * Conditionally show the submit button * * @link https://wpforms.com/developers/how-to-conditionally-show-the-submit-button/ */ add_action( ‘wp_head’, function () { ?>Continue reading
function custom_default_avatar($avatar_defaults) { $myavatar = ‘https://pharmacyneeds.gr/wp-content/uploads/2024/06/PharamcyNeeds-Logo-User.png.png’; $avatar_defaults[$myavatar] = “Default Avatar”; return $avatar_defaults; } add_filter(‘avatar_defaults’, ‘custom_default_avatar’); function set_custom_avatar( $avatar, $id_or_email, $size, $default, $alt ) { $custom_avatar_url = ‘https://pharmacyneeds.gr/wp-content/uploads/2024/06/PharamcyNeeds-Logo-User.png.png’; // Check if the user has a gravatar $user_avatar = get_avatar_data($id_or_email); // If…Continue reading
function check_disposable_email_domains($user_id) { // Λήψη του email του χρήστη με το user ID $user_info = get_userdata($user_id); $user_email = $user_info->user_email; // Extensive list of temporary email domains it wants you to block $blocked_domains = array( ‘secmail.pro’, ‘secmail.net’, ‘secmail.org’, ‘secmail.com’, ‘tempmail.com’,’1secmail.com’, ’10minutemail.com’,…Continue reading
function add_custom_message_to_username_field() { ?>Continue reading
/** * Increment total entry number on each submission * * @link https://wpforms.com/developers/how-to-increment-a-count-on-each-form-submission */ function wpf_dev_update_total_field( $fields, $entry, $form_data ) { $my_form_id = 1000; // Form ID to track if( $form_data[ ‘id’ ] != $my_form_id ) { return $fields; }…Continue reading