/** * Gravity Wiz // Gravity Forms // Unrequire Required Fields for Testing * * When bugs pop up on your forms, it can be really annoying to have to fill out all the required fields for every test *…Continue reading
/** * Credit Card Expiration Field on Cambridge Caregivers Engagement Form year dropdown set to current year and +10 years from now */ add_filter(‘gform_date_min_year’, function ($min_year, $form, $field) { return $form[‘id’] == 1 && $field->id == 172 ? date(‘Y’) :…Continue reading
/** * Wrap the thumbnail in a link to the post. * Only use this if your theme doesn’t already wrap thumbnails in a link. * * @param string $html The thumbnail HTML to wrap in an anchor. * @param…Continue reading
add_filter( ‘wpcode_smart_tags’, function( $tags ) { $tags[‘custom’] = array( ‘label’ => ‘Custom’, ‘tags’ => array( ‘custom_field_tag’ => array( ‘label’ => ‘Custom Field Tag’, ‘function’ => ‘wpcode_custom_field_tag’, ), ), ); return $tags; } ); function wpcode_custom_field_tag() { // Replace custom_field_tag below…Continue reading
// Disable auto-update emails. add_filter( ‘auto_core_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for plugins. add_filter( ‘auto_plugin_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for themes. add_filter( ‘auto_theme_update_send_email’, ‘__return_false’ );Continue reading
/* * Hide the price from notifications * * @link https://wpforms.com/developers/how-to-hide-the-item-price-value-in-the-email-notifications */ function wpf_email_field_value( $value, $field, $form_data, $context) { if ( ’email-html’ === $context ) { // If the form ID is 364 AND the field ID is 19 remove…Continue reading
add_action(‘frm_after_create_entry’, ‘copy_into_my_table’, 20, 2); function copy_into_my_table($entry_id, $form_id){ if($form_id == 17){ //change 4 to the form id of the form to copy global $wpdb; $values = array(‘title’ => $_POST[‘item_meta’][513], ‘user’ => $_POST[‘item_meta’][517], ‘OT’ => $_POST[‘item_meta’][518], ‘comptoir’ => $_POST[‘item_meta’][523], ‘date’ => $_POST[‘item_meta’][527],…Continue reading
add_action( ‘template_redirect’, function () { global $post; if ( ! is_attachment() || ! isset( $post->post_parent ) || ! is_numeric( $post->post_parent ) ) { return; } // Does the attachment have a parent post? // If the post is trashed, fallback…Continue reading