Disable XML-RPC
add_filter( ‘xmlrpc_enabled’, ‘__return_false’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘xmlrpc_enabled’, ‘__return_false’ );Continue reading
/* Disable WordPress Admin Bar for all users */ add_filter( ‘show_admin_bar’, ‘__return_false’ );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
/** * Custom shortcode to display WPForms form entries in non-table view. * * Basic usage: [wpforms_entries_table id=”FORMID”]. * * Possible shortcode attributes: * id (required) Form ID of which to show entries. * user User ID, or “current” to…Continue reading
if ( ! function_exists( ‘cmx65_contacts’ ) ) : function cmx65_contacts( $contactmethods ) { $contactmethods[‘cmx65_facebook’] = __( ‘Facebook’ ); $contactmethods[‘cmx65_instagram’] = __( ‘Instagram’ ); $contactmethods[‘cmx65_twitter’] = __( ‘Twitter’ ); return $contactmethods; } add_filter(‘user_contactmethods’,’cmx65_contacts’, 10, 1); endif;Continue reading
// Disable core auto-updates add_filter( ‘auto_update_core’, ‘__return_false’ ); // Disable auto-updates for plugins. add_filter( ‘auto_update_plugin’, ‘__return_false’ ); // Disable auto-updates for themes. add_filter( ‘auto_update_theme’, ‘__return_false’ );Continue reading
add_action( ‘login_enqueue_scripts’, ‘cmx65_login’ ); function cmx65_login() { $login = array( ‘color’ => ‘#15adcb’, ‘focus’ => ‘#8d44ac’, ); ?> .language-switcher, .privacy-policy-page-link { display:none; } .forgetmenot { position:relative; top:5px; } .login #nav { text-align:right; } .login form, #loginform { position: relative; margin-left:…Continue reading
/** * Custom shortcode to display WPForms form entries in table view. * * Basic usage: [wpforms_entries_table id=”FORMID”]. * * Possible shortcode attributes: * id (required) Form ID of which to show entries. * user User ID, or “current” to…Continue reading
function affwp_custom_set_role_on_registration( $affiliate_id = 0 ) { $user_id = affwp_get_affiliate_user_id( $affiliate_id ); $user = new WP_User( $user_id ); $user->add_role( ‘affiliate’ ); } add_action( ‘affwp_insert_affiliate’, ‘affwp_custom_set_role_on_registration’ );Continue reading