Skip to content

Instantly share code, notes, and snippets.

@bjork
Created April 26, 2015 10:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjork/6567a1781de063ea7486 to your computer and use it in GitHub Desktop.
Save bjork/6567a1781de063ea7486 to your computer and use it in GitHub Desktop.
Prevent users from using full size images on WordPress
/*
How to prevent users from using full size images by removing
the full image size option from WordPress image dialog.
*/
function h1_remove_full_image_size( $sizes ) {
unset( $sizes['full'] );
return $sizes;
}
add_filter( 'image_size_names_choose',
'h1_remove_full_image_size' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment