예제 #1
0
function yoimg_get_edit_image_anchor($id, $size = 'thumbnail', $styles = '', $classes = '')
{
    add_thickbox();
    $edit_crops_url = yoimg_get_edit_image_url($id, $size);
    return '<a class="yoimg-thickbox yoimg ' . $classes . '" style="' . $styles . '" href="' . $edit_crops_url . '" title="' . __('Edit crop formats', YOIMG_DOMAIN) . '">' . __('Edit crop formats', YOIMG_DOMAIN) . '</a>';
}
예제 #2
0
echo $full_image_attributes[2];
?>
)</h1></div>
				<div class="media-frame-router">
					<div class="media-router">
						<?php 
$sizes = yoimg_get_image_sizes();
foreach ($sizes as $size_key => $size_value) {
    if ($size_value['crop'] == 1) {
        $is_current_size = $size_key === $yoimg_image_size;
        if ($is_current_size) {
            $curr_size_width = $size_value['width'];
            $curr_size_height = $size_value['height'];
        }
        $anchor_class = $is_current_size ? 'active' : '';
        $anchor_href = yoimg_get_edit_image_url($yoimg_image_id, $size_key) . '&partial=1';
        ?>
								<a href="<?php 
        echo $anchor_href;
        ?>
" class="media-menu-item yoimg-thickbox yoimg-thickbox-partial <?php 
        echo $anchor_class;
        ?>
"><?php 
        _e(ucwords(str_replace('-', ' ', $size_key)));
        ?>
</a>
						<?php 
    }
}
?>