Increasing Image Size in Notification Emails

/** * How to Increase Image Size in Notification Emails * * @link https://wpforms.com/developers/how-to-increase-image-size-in-notification-emails */ function wpf_custom_wpforms_email_notification_message_thumbnail($message) { // Define the new width and height $new_width = ‘auto’; $new_height = 200; // Use preg_replace to modify the width and height…Continue reading

Donation Form Email Check

add_filter(‘charitable_validate_donation_form_submission_email_check’, ‘charitable_test_for_email’, 10, 2 ); function charitable_test_for_email( $valid, $submitted ) { $email = $submitted->get_submitted_value( ’email’ ); // Add your logic here to see if the email is valid or not. // Return false if not valid, otherwise let the validation…Continue reading

Add the Buy on Kindle button near Add to Cart in WooCommerce PDP.

/** * Snippet Name: Add the Buy on Kindle button near Add to Cart in WooCommerce PDP. */ add_action(‘woocommerce_after_add_to_cart_button’,’add_kindle_button’); function add_kindle_button() { $kindle_button_url = get_post_meta( get_the_ID(),’kindle_button_url’,true); if ( isset($kindle_button_url) && filter_var($kindle_button_url, FILTER_VALIDATE_URL)) { $style = ‘style=”background-color: #ff9900; color: #fff;’; $button…Continue reading

Hide Elementor AI Image

/* * Hide Elementor image optimization ads when choosing the post’s featured image on the backend * UPDATE: 20/06/24 Hide Elementor image optimization ads on Media Library, if closing the “x” is not enough. */ function hide_elementor_nag_admin() { ?>Continue reading

Displaying the Total Number of Entries on Your Site

/** * Custom shortcode to display the total number of entries for a form. * * Basic usage: [wpf_entries_count id=”FORMID” type=”TYPE”] * * Realtime counts could be delayed due to any caching setup on the site * * @link https://wpforms.com/developers/how-to-display-the-total-number-of-entries/…Continue reading

Adding French Time Format for the Date / Time field

/** * Add additional formats for the Time field Format dropdown using French time format. * * @link https://wpforms.com/developers/how-to-create-additional-formats-for-the-date-time-field-time-picker/ */ function wpf_dev_date_field_time_formats_french( $time_formats ) { $time_formats[ ‘G\\\hi\\\m’ ] = ‘French Format’; return $time_formats; } add_filter( ‘wpforms_datetime_time_formats’, ‘wpf_dev_date_field_time_formats_french’, 10, 1 );Continue reading

Creating Additional Format for the Date / Time field

/** * Add additional formats for the Time field Format dropdown. * * @link https://wpforms.com/developers/how-to-create-additional-formats-for-the-date-time-field-time-picker/ */ function wpf_dev_date_field_time_formats1 ( $time_formats ) { // Displays 2-digit hour, 2-digit minute, and 2-digit seconds $time_formats[ ‘H:i:s’ ] = ‘HH:MM:SS’; return $time_formats; } add_filter(…Continue reading