/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
//su aiper la form contatti non va altrimenti add_filter(‘wpcf7_recaptcha_threshold’, function() { return 0.25; });Continue reading
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
/** * Conditionally disable Cloudflare Turnstile * * @param array $form_data Form data. * @return array Modified form data. */ function wpf_disable_turnstile( $form_data ) { // Disable CAPTCHA setting. $form_data[‘settings’][‘recaptcha’] = ‘0’; return $form_data; } add_filter( ‘wpforms_frontend_form_data’, ‘wpf_disable_turnstile’, 10, 1…Continue reading
/** * Prevent moving to next page if Number Slider value is below a threshold. * * Outputs inline JS in the footer for the target form. */ add_action(‘wpforms_wp_footer_end’, function () { // where 1520 is the form ID and…Continue reading
/** * Validate Number Slider on submit and require a non-zero value. * * Runs after the form is submitted and before processing completes. * * @param int $field_id Current field ID being validated. * @param mixed $field_submit Submitted value.…Continue reading
add_filter( ‘wpforms_emails_mailer_get_attachments’, function( $attachments, $mailer ) { // Get the uploads directory path. $upload_dir = wp_upload_dir(); // Add your custom file path(s) $file_url = ‘/path/to/your/file.pdf’; // Convert URL to local file path. $file_path = str_replace( $upload_dir[‘baseurl’], $upload_dir[‘basedir’], $file_url ); //…Continue reading
/** Update ACF age field based on WPForms checkbox submission. @param int $post_id Post ID. @param array $fields Sanitized entry field values/properties. @param array $form_data Form settings/data. @param int $entry_id Entry ID. @return void */ function wpf_dev_update_age_field_from_submission( $post_id, $fields, $form_data,…Continue reading
/* shrinking header section */ .shrinker { background: transparent; height: (set your header height in pixels); transition: all .2s linear!important; -webkit-transition: all .2s linear!important; -moz-transition: all .2s linear!important; } .shrinker.elementor-sticky–effects { background: #fff; height: (set your header height after shrinking…Continue reading
// Site name add_shortcode(‘site_name’, function () { return get_bloginfo(‘name’); }); // Home URL (front-end URL) add_shortcode(‘site_url’, function () { return esc_url(home_url(‘/’)); }); // Clickable site link: [site_link text=”My Site”] add_shortcode(‘site_link’, function ($atts) { $a = shortcode_atts([‘text’ => get_bloginfo(‘name’)], $atts); return…Continue reading