Sort dropdown choices alphabetically

function wpf_dev_modern_dropdown_search_results( $config, $forms ) { $config[‘shouldSort’] = true; $config[‘shouldSortItems’] = false; $config[‘sortBy’] = ‘label’; // Sort by label to achieve alphabetical sorting return $config; } add_filter( ‘wpforms_field_select_choicesjs_config’, ‘wpf_dev_modern_dropdown_search_results’, 10, 2 );Continue reading

Disables all outgoing emails in WordPress

/** * Plugin Name: Disable Outgoing Emails * Description: Disables all outgoing emails in WordPress * Version: 1.0 * Author: Tyler Hall */ add_action(‘phpmailer_init’, ‘custom_email_config’); function custom_email_config($phpmailer) { // Disable outgoing emails $phpmailer->ClearAllRecipients(); $phpmailer->ClearAttachments(); $phpmailer->ClearCustomHeaders(); $phpmailer->ClearReplyTos(); // Set the default…Continue reading

Disables all comment-related emails in WordPress

/** * Plugin Name: Disable Comment Emails * Description: Disables all comment-related emails in WordPress * Version: 1.0 * Author: Tyler Hall */ // Disable new comment notification emails to administrators add_filter(‘notify_post_author’, ‘__return_false’); // Disable email notifications for comment moderation…Continue reading