Untitled Snippet

body { font-family: Arial, sans-serif; text-align: center; margin: 20px; background-color: #f9f9f9; color: #333; } h1 { color: #4a90e2; } #controls { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 20px; } #controls input, #controls button { padding: 10px; font-size:…Continue reading

Untitled Snippet

Đồ Thị Hàm Số Đồ Thị Hàm Số Thêm Đồ Thị Reset Màu Đồ Thị: Hiển Thị Lưới: Lưu Kết Quả Hướng Dẫn Nhập Phép Toán Ký Hiệu Mũ ** Nhân * Chia / Cộng + Trừ – Sin sin(x)…Continue reading

Sending Multiple File Uploads to Google Drive through Zapier

/** * Send multiple files to Google Drive with Zapier addon * * @link https://wpforms.com/developers/how-to-send-multiple-files-to-google-drive-with-zapier/ */ function wpf_dev_add_zapier_file_upload_filter($data, $entry_id, $form_data) { $fields = wpforms_get_form_fields( $form_data ); foreach ( $fields as $field_id => $field ) { if ( $field[‘type’] === ‘file-upload’…Continue reading

Setting a Default Featured Image for Post Submissions

/** * Assign default featured image * * @link https://wpforms.com/developers/how-to-set-a-default-featured-image-for-post-submissions/ */ function wpf_dev_post_submissions_process( $post_id, $fields, $form_data ) { // If form ID is 463, run code below if ( 463 !== absint( $form_data[ ‘id’ ] ) ) { return; }…Continue reading

Sending Form Fields as Smart Tags to Square

/** * Send the email address to Square * * @link https://wpforms.com/developers/how-to-send-the-email-address-to-square-with-wpfoms/ */ function wpf_dev_process_smart_tags_in_payment_description( $args, $process ) { if ( isset( $args[ ‘note’ ] ) ) { $note = apply_filters( ‘wpforms_process_smart_tags’, $args[ ‘note’ ], $process->form_data, $process->fields, 0 ); //…Continue reading

Storing User’s Uncached IP Address in Hidden Field

/** * Do not store the cached IP address in a hidden field * * @link https://wpforms.com/developers/how-to-store-the-non-cached-ip-address-into-a-hidden-field/ */ function wpf_hidden_ip_avoid_cache( $fields, $entry, $form_data ){ // Only run on the form with ID 727 if( $form_data[ ‘id’ ] == 727 )…Continue reading

Unattached Media Cleanup

// Schedule the event if it is not already scheduled function schedule_unattached_media_cleanup() { if (!wp_next_scheduled(‘delete_unattached_media_event’)) { wp_schedule_event(time(), ‘daily’, ‘delete_unattached_media_event’); } } add_action(‘wp’, ‘schedule_unattached_media_cleanup’); // Hook the function to the scheduled event add_action(‘delete_unattached_media_event’, ‘delete_unattached_media’); // Function to delete unattached media function…Continue reading

Sending Numerical Values Through Webhooks

/** * Send the numerical values through webhooks. * * @link https://wpforms.com/developers/how-to-send-the-numerical-values-through-webhooks/ */ function wpf_dev_webhooks_numeric_value( $filled_params, $params, $process ) { // Request Body params which values should be numeric. // List each variable that you want as a number and…Continue reading