__('Thumbnail', 'canto'), 'medium' => __('Medium', 'canto'), 'large' => __('Large', 'canto'), 'full' => __('Full Size', 'canto'), ) ); $thesizes = get_image_sizes(); if (!in_array('full', $thesizes)) { $thesizes['full'] = array(); } foreach ($thesizes as $k => $v) { $dimensions = (isset($v['width'])) ? ' - ' . $v['width'] . ' x ' . $v['height'] : ''; $thesizes[$k]['name'] = $sizes[$k] . $dimensions; } $html = ''; wp_send_json_success($html); } add_action('wp_ajax_canto_sizes', 'canto_handle_sizes');