public function add_image_sizes_meta_to_media($form_meta, $post = null)
    {
        if (wp_attachment_is_image($post->ID) && current_user_can('manage_options')) {
            $meta = wp_get_attachment_metadata($post->ID);

            $form_meta .= '<strong>Available sizes: </strong>' . \count($meta['sizes']);
        }

        return $form_meta;
    }
public function add_image_sizes_meta_to_media($form_meta, $post = null)
    {
        if (wp_attachment_is_image($post->ID) && current_user_can('manage_options')) {
            $meta = wp_get_attachment_metadata($post->ID);

            $form_meta .= '<strong>Available sizes: </strong>' . \count($meta['sizes']);
        }

        return $form_meta;
    }
public function add_image_sizes_meta_to_media ( $ form_meta , $ post = null ) { if ( wp_attachment_is_image ( $ post -> ID ) && current_user_can ( 'manage_options' ) ) { $ meta = wp_get_attachment_metadata ( $ post -> ID ) ; $ form_meta .= '<strong>Available sizes: </strong>' . \ count ( $ meta [ 'sizes' ] ) ; } return $ form_meta ; }
Adds the additional meta to all images within the admin media view.

Only visible to roles with 'manage_options' cap.

@since  1.0.0

@param string   $form_meta The form meta html.
@param \WP_Post $post The current attachment post object.
@return string
Adds the additional meta to all images within the admin media view .