Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<?php
add_action( 'after_setup_theme', 'my_square_size' );
function my_square_size() {
add_image_size( 'square', 320, 320, true );
}
add_filter( 'embed_thumbnail_image_size', '__return_square' );
add_filter( 'embed_thumbnail_image_shape', '__return_square' );
function __return_square() {
return 'square';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment