WP Custom Imagem Size available on Media Size selector

<?php $__cis = array(); function custom_image_size( $id, $name, $width, $height, $crop = false ){ global $__cis; $__cis[ $id ] = __( $name ); add_image_size( $id, $width, $height, $crop ); } add_filter( 'image_size_names_choose', function( $sizes ){ global $__cis; $newsizes = array_merge( $sizes, $__cis ); return $newsizes; }
Add WP custom image size and show this new size on Media Insert size selector.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.