Remove JQuery Migrate Script

function remove_jquery_migrate($scripts) { if (!is_admin() && isset($scripts->registered[‘jquery’])) { $script = $scripts->registered[‘jquery’]; if ($script->deps) { // Check whether the script has any dependencies $script->deps = array_diff($script->deps, array(‘jquery-migrate’)); } } } add_action(‘wp_default_scripts’, ‘remove_jquery_migrate’);Continue reading

Disable Enter Key in WPForms

/** * Disable the Enter key for WPForms forms * * @link https://wpforms.com/developers/how-to-stop-the-enter-key-from-submitting-the-form/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_disable_enter_all_wpforms( ) { ?>Continue reading

function – Disable Comments Completely

add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading