/** * This code adds a video repeater field to specific Gravity Forms (IDs 3 and 10), pre-populates it with data from * ACF fields related to vendors or venues, and saves the submitted video gallery data back to the…Continue reading
/** * * Retrieve post ID by user ID and post type (either ‘vendor’ or ‘venue’). * * @param int $user_id The current user’s ID. * @param string $post_type The post type to search for (‘vendor’ or ‘venue’). * @return…Continue reading
/** * * Retrieve post ID by user ID and post type (either ‘vendor’ or ‘venue’). * * @param int $user_id The current user’s ID. * @param string $post_type The post type to search for (‘vendor’ or ‘venue’). * @return…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
remove_action(‘woocommerce_single_product_summary’,’woocommerce_template_single_meta’,40);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