示例#1
0
function pte_get_all_alternate_size_information($id)
{
    $sizes = pte_get_alternate_sizes();
    foreach ($sizes as $size => &$info) {
        if ($info['crop']) {
            $info['crop'] = true;
        } else {
            $info['crop'] = false;
        }
        $info['current'] = pte_get_image_data($id, $size, $info);
    }
    return $sizes;
}
示例#2
0
文件: options.php 项目: phupx/genco
function pte_sizes_display()
{
    require_once 'functions.php';
    $options = pte_get_options();
    // Table Header
    ?>
	<table><tr><th><?php 
    _e("Post Thumbnail", PTE_DOMAIN);
    ?>
</th>
		<th><?php 
    _e("Hidden", PTE_DOMAIN);
    ?>
</th>
		</tr>
<?php 
    // End table header
    $sizes = pte_get_alternate_sizes(false);
    foreach ($sizes as $size => $size_data) {
        $hidden = in_array($size, $options['pte_hidden_sizes']) ? "checked" : "";
        $name = isset($size_data['display_name']) ? $size_data['display_name'] : $size;
        print "<tr><td><label for='{$size}'>{$name}</label></td>" . "<td><input type='checkbox' id='{$size}' name='pte-site-options[pte_hidden_sizes][]'" . " value='{$size}' {$hidden}></td>" . "</tr>";
    }
    print '</table>';
}