Skip to content

Instantly share code, notes, and snippets.

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 gregoirenoyelle/3048711 to your computer and use it in GitHub Desktop.
Save gregoirenoyelle/3048711 to your computer and use it in GitHub Desktop.
WordPress Back office
<?php
/****
* New image size
* @gregoirenoyelle
****/
// Create a new image size
add_image_size('Vign Haut de Page', 266, 168, TRUE);
// add new image size in insert window
add_filter( 'image_size_names_choose', 'gn_image_sizes_choose' );
function gn_image_sizes_choose( $sizes ) {
$custom_sizes = array(
'Vign Haut de Page' => 'Vign Haut de Page' // add other size in array
);
return array_merge( $sizes, $custom_sizes );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment