Skip to content

Instantly share code, notes, and snippets.

@blogjunkie
Last active September 2, 2020 03:02
Show Gist options
  • Save blogjunkie/c220b4f50b06a5d52bb4f2f4cb477908 to your computer and use it in GitHub Desktop.
Save blogjunkie/c220b4f50b06a5d52bb4f2f4cb477908 to your computer and use it in GitHub Desktop.
Add image size to media select
<?php
// Register an image sizes for use in Add Media modal
add_filter( 'image_size_names_choose', 'child_custom_sizes' );
function child_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
'row-background' => __( 'Row Background' ),
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment