Created
November 22, 2016 23:04
-
-
Save bUxEE/4726d99242d398e50cd64012e4eb495e to your computer and use it in GitHub Desktop.
Add images size Wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////////////////////////////////////////////////////////////// | |
///////// ADD CUSTOM IMAGE SIZES TO WP EDITOR | |
////////////////////////////////////////////////////////////// | |
add_image_size( 'icon100', '100', '100', false ); | |
function my_editor_image_sizes( $sizes ) { | |
$sizes = array_merge( $sizes, array( | |
'icon100' => __( 'icon 100px' ) | |
)); | |
return $sizes; | |
} | |
add_filter( 'image_size_names_choose', 'my_editor_image_sizes' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment