Disable Gravatar Avatars
add_filter( ‘get_avatar’, function( $avatar, $id_or_email, $size, $default, $alt ) { return ”; // Return an empty string to disable the gravatar }, 10, 5 );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘get_avatar’, function( $avatar, $id_or_email, $size, $default, $alt ) { return ”; // Return an empty string to disable the gravatar }, 10, 5 );Continue reading
add_action( ‘after_setup_theme’, function() { remove_theme_support( ‘post-formats’ ); }, 11 );Continue reading
add_action(‘init’, function() { unregister_taxonomy_for_object_type(‘category’, ‘post’); unregister_taxonomy_for_object_type(‘post_tag’, ‘post’); });Continue reading
add_action( ‘customize_register’, ‘__return_true’ );Continue reading
add_filter( ‘big_image_size_threshold’, ‘__return_false’ );Continue reading
add_filter( ‘rest_authentication_errors’, function( $result ) { if ( ! empty( $result ) ) { return $result; } if ( ! is_user_logged_in() ) { return new WP_Error( ‘rest_disabled’, __( ‘The WordPress REST API has been disabled.’ ), array( ‘status’ => 401…Continue reading
/* * Process non-critical tasks after an order has been completed. * * This runs ~30 seconds after a purchase is completed via WP_Cron. * * @param int $order_id The Order ID that was marked as completed. * @param \EDD\Orders\Order…Continue reading
function mepr_pass_phone_number_to_stripe( $args, $user ) { $phone = get_user_meta( $user->ID, ‘mepr_phone’, true ); if ( ! empty( $phone ) ) { $args[‘phone’] = $phone; } return $args; } add_filter( ‘mepr_stripe_create_customer_args’, ‘mepr_pass_phone_number_to_stripe’, 10, 2 );Continue reading
add_filter( ‘aioseo_public_taxonomies’, ‘aioseo_filter_public_taxonomies’ ); function aioseo_filter_public_taxonomies( $taxonomies ) { $filteredTaxonomies = []; foreach ( $taxonomies as $taxonomiesObject ) { if ( ‘genre’ === $taxonomiesObject[‘name’] ) { continue; } $filteredTaxonomies[] = $taxonomiesObject; } return $filteredTaxonomies; }Continue reading