本文整理汇总了PHP中genesis_get_additional_image_sizes函数的典型用法代码示例。如果您正苦于以下问题:PHP genesis_get_additional_image_sizes函数的具体用法?PHP genesis_get_additional_image_sizes怎么用?PHP genesis_get_additional_image_sizes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了genesis_get_additional_image_sizes函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: form
//.........这里部分代码省略.........
><?php
_e('Ascending (1, 2, 3)', 'genesis');
?>
</option>
</select></p>
<hr class="div" />
<p><input id="<?php
echo $this->get_field_id('show_image');
?>
" type="checkbox" name="<?php
echo $this->get_field_name('show_image');
?>
" value="1" <?php
checked(1, $instance['show_image']);
?>
/> <label for="<?php
echo $this->get_field_id('show_image');
?>
"><?php
_e('Show Post Image', 'genesis');
?>
</label></p>
<p><label for="<?php
echo $this->get_field_id('image_size');
?>
"><?php
_e('Image Size', 'genesis');
?>
:</label>
<?php
$sizes = genesis_get_additional_image_sizes();
?>
<select id="<?php
echo $this->get_field_id('image_size');
?>
" name="<?php
echo $this->get_field_name('image_size');
?>
">
<option style="padding-right:10px;" value="thumbnail">thumbnail (<?php
echo get_option('thumbnail_size_w');
?>
x<?php
echo get_option('thumbnail_size_h');
?>
)</option>
<?php
foreach ((array) $sizes as $name => $size) {
echo '<option style="padding-right: 10px;" value="' . esc_attr($name) . '" ' . selected($name, $instance['image_size'], FALSE) . '>' . esc_html($name) . ' (' . $size['width'] . 'x' . $size['height'] . ')</option>';
}
?>
</select></p>
<p><label for="<?php
echo $this->get_field_id('image_alignment');
?>
"><?php
_e('Image Alignment', 'genesis');
?>
:</label>
<select id="<?php
echo $this->get_field_id('image_alignment');
?>
示例2: form
//.........这里部分代码省略.........
?>
">
<option value="thumbnail" <?php
echo selected('thumbnail', $instance['image_size'], FALSE);
?>
>thumbnail (<?php
echo get_option('thumbnail_size_w');
?>
x<?php
echo get_option('thumbnail_size_h');
?>
)</option>
<option value="medium" <?php
echo selected('medium', $instance['image_size'], FALSE);
?>
>medium (<?php
echo get_option('medium_size_w');
?>
x<?php
echo get_option('medium_size_h');
?>
)</option>
<option value="large" <?php
echo selected('large', $instance['image_size'], FALSE);
?>
>large (<?php
echo get_option('large_size_w');
?>
x<?php
echo get_option('large_size_h');
?>
)</option>
<?php
$sizes = genesis_get_additional_image_sizes();
foreach ((array) $sizes as $name => $size) {
echo '<option value="' . esc_attr($name) . '" ' . selected($name, $instance['image_size'], FALSE) . '>' . esc_html($name) . ' ( ' . $size['width'] . 'x' . $size['height'] . ' )</option>';
}
?>
</select>
</p>
<p>
<label for="<?php
echo $this->get_field_id('image_alignment');
?>
"><?php
_e('Image Alignment', 'genesis');
?>
:</label>
<select id="<?php
echo $this->get_field_id('image_alignment');
?>
" name="<?php
echo $this->get_field_name('image_alignment');
?>
">
<option value="alignnone">- <?php
_e('None', 'genesis');
?>
-</option>
<option value="alignleft" <?php
selected('alignleft', $instance['image_alignment']);
?>
><?php
_e('Left', 'genesis');
?>
示例3: form
//.........这里部分代码省略.........
</div>
</div>
<div class="genesis-widget-column genesis-widget-column-right">
<div class="genesis-widget-column-box genesis-widget-column-box-top">
<p><input id="<?php
echo $this->get_field_id('show_image');
?>
" type="checkbox" name="<?php
echo $this->get_field_name('show_image');
?>
" value="1" <?php
checked(1, $instance['show_image']);
?>
/> <label for="<?php
echo $this->get_field_id('show_image');
?>
"><?php
_e('Show Featured Image', 'genesis');
?>
</label></p>
<p><label for="<?php
echo $this->get_field_id('image_size');
?>
"><?php
_e('Image Size', 'genesis');
?>
:</label>
<?php
$sizes = genesis_get_additional_image_sizes();
?>
<select id="<?php
echo $this->get_field_id('image_size');
?>
" name="<?php
echo $this->get_field_name('image_size');
?>
">
<option value="thumbnail">thumbnail (<?php
echo get_option('thumbnail_size_w');
?>
x<?php
echo get_option('thumbnail_size_h');
?>
)</option>
<?php
foreach ((array) $sizes as $name => $size) {
echo '<option value="' . esc_attr($name) . '" ' . selected($name, $instance['image_size'], FALSE) . '>' . esc_html($name) . ' (' . $size['width'] . 'x' . $size['height'] . ')</option>';
}
?>
</select></p>
<p><label for="<?php
echo $this->get_field_id('image_alignment');
?>
"><?php
_e('Image Alignment', 'genesis');
?>
:</label>
<select id="<?php
echo $this->get_field_id('image_alignment');
?>
示例4: image_options
/**
* Outputs the image settings.
*
* @access public
* @return void
*/
public function image_options()
{
?>
<p>
<input id="<?php
echo $this->_widget_object->get_field_id('show_image');
?>
" type="checkbox" name="<?php
echo esc_attr($this->_widget_object->get_field_name('show_image'));
?>
" value="1"<?php
checked($this->_instance['show_image']);
?>
/>
<label for="<?php
echo esc_attr($this->_widget_object->get_field_id('show_image'));
?>
"><?php
_e('Show Featured Image', 'genesis');
?>
</label>
</p>
<p>
<label for="<?php
echo esc_attr($this->_widget_object->get_field_id('image_size'));
?>
"><?php
_e('Image Size', 'genesis-author-pro');
?>
:</label>
<select id="<?php
echo esc_attr($this->_widget_object->get_field_id('image_size'));
?>
" class="genesis-image-size-selector" name="<?php
echo esc_attr($this->_widget_object->get_field_name('image_size'));
?>
">
<option value="thumbnail">thumbnail (<?php
echo absint(get_option('thumbnail_size_w'));
?>
x<?php
echo absint(get_option('thumbnail_size_h'));
?>
)</option>
<?php
$sizes = genesis_get_additional_image_sizes();
foreach ((array) $sizes as $name => $size) {
echo '<option value="' . esc_attr($name) . '" ' . selected($name, $this->_instance['image_size'], FALSE) . '>' . esc_html($name) . ' (' . absint($size['width']) . 'x' . absint($size['height']) . ')</option>';
}
?>
</select>
</p>
<p>
<label for="<?php
echo esc_attr($this->_widget_object->get_field_id('image_alignment'));
?>
"><?php
_e('Image Alignment', 'genesis-author-pro');
?>
:</label>
<select id="<?php
echo esc_attr($this->_widget_object->get_field_id('image_alignment'));
?>
" name="<?php
echo esc_attr($this->_widget_object->get_field_name('image_alignment'));
?>
">
<option value="alignnone">- <?php
_e('None', 'genesis-author-pro');
?>
-</option>
<option value="alignleft" <?php
selected('alignleft', $this->_instance['image_alignment']);
?>
><?php
_e('Left', 'genesis-author-pro');
?>
</option>
<option value="alignright" <?php
selected('alignright', $this->_instance['image_alignment']);
?>
><?php
_e('Right', 'genesis-author-pro');
?>
</option>
<option value="aligncenter" <?php
selected('aligncenter', $this->_instance['image_alignment']);
?>
><?php
_e('Center', 'genesis-author-pro');
?>
</option>
//.........这里部分代码省略.........
示例5: form
function form($instance)
{
$instance = wp_parse_args((array) $instance, array('title' => '', 'page_id' => '', 'show_image' => 0, 'image_alignment' => '', 'image_size' => '', 'show_title' => 0, 'show_byline' => 0, 'show_content' => 0, 'content_limit' => '', 'more_text' => __('[Read More...]', 'genesis')));
?>
<p><label for="<?php
echo $this->get_field_id('title');
?>
"><?php
_e('Title', 'genesis');
?>
:</label>
<input type="text" id="<?php
echo $this->get_field_id('title');
?>
" name="<?php
echo $this->get_field_name('title');
?>
" value="<?php
echo esc_attr($instance['title']);
?>
" style="width:95%;" /></p>
<p><label for="<?php
echo $this->get_field_id('page_id');
?>
"><?php
_e('Page', 'genesis');
?>
:</label>
<?php
wp_dropdown_pages(array('name' => $this->get_field_name('page_id'), 'selected' => $instance['page_id']));
?>
</p>
<hr class="div" />
<p><input id="<?php
echo $this->get_field_id('show_image');
?>
" type="checkbox" name="<?php
echo $this->get_field_name('show_image');
?>
" value="1" <?php
checked(1, $instance['show_image']);
?>
/> <label for="<?php
echo $this->get_field_id('show_image');
?>
"><?php
_e('Show Featured Image', 'genesis');
?>
</label></p>
<p><label for="<?php
echo $this->get_field_id('image_size');
?>
"><?php
_e('Image Size', 'genesis');
?>
:</label>
<?php
$sizes = genesis_get_additional_image_sizes();
?>
<select id="<?php
echo $this->get_field_id('image_size');
?>
" name="<?php
echo $this->get_field_name('image_size');
?>
">
<option style="padding-right:10px;" value="thumbnail">thumbnail (<?php
echo get_option('thumbnail_size_w');
?>
x<?php
echo get_option('thumbnail_size_h');
?>
)</option>
<?php
foreach ((array) $sizes as $name => $size) {
echo '<option style="padding-right: 10px;" value="' . $name . '" ' . selected($name, $instance['image_size'], FALSE) . '>' . $name . ' (' . $size['width'] . 'x' . $size['height'] . ')</option>';
}
?>
</select></p>
<p><label for="<?php
echo $this->get_field_id('image_alignment');
?>
"><?php
_e('Image Alignment', 'genesis');
?>
:</label>
<select id="<?php
echo $this->get_field_id('image_alignment');
?>
" name="<?php
echo $this->get_field_name('image_alignment');
?>
">
<option style="padding-right:10px;" value="">- <?php
_e('None', 'genesis');
//.........这里部分代码省略.........
示例6: get_image_size_options
/**
* Get image size options.
*
* @return array Array of image size options.
*/
public static function get_image_size_options()
{
$sizes = genesis_get_additional_image_sizes();
$image_size_opt['thumbnail'] = 'thumbnail (' . get_option('thumbnail_size_w') . 'x' . get_option('thumbnail_size_h') . ')';
foreach ((array) $sizes as $name => $size) {
$image_size_opt[$name] = esc_html($name) . ' (' . $size['width'] . 'x' . $size['height'] . ')';
}
return $image_size_opt;
}
示例7: genesis_theme_settings_posts_box
function genesis_theme_settings_posts_box()
{
?>
<p><?php
_e("Select one of the following:", 'genesis');
?>
<select name="<?php
echo GENESIS_SETTINGS_FIELD;
?>
[content_archive]">
<option style="padding-right:10px;" value="full" <?php
selected('full', genesis_get_option('content_archive'));
?>
><?php
_e("Display full posts", 'genesis');
?>
</option>
<option style="padding-right:10px;" value="excerpts" <?php
selected('excerpts', genesis_get_option('content_archive'));
?>
><?php
_e("Display post excerpts", 'genesis');
?>
</option>
</select></p>
<p><input type="checkbox" name="<?php
echo GENESIS_SETTINGS_FIELD;
?>
[thumbnail]" id="<?php
echo GENESIS_SETTINGS_FIELD;
?>
[thumbnail]" value="1" <?php
checked(1, genesis_get_option('thumbnail'));
?>
/> <label for="<?php
echo GENESIS_SETTINGS_FIELD;
?>
[thumbnail]"><?php
_e("Include the post image with excerpts?", 'genesis');
?>
</label>
</p>
<p><?php
_e("Image Size", 'genesis');
?>
:
<?php
$sizes = genesis_get_additional_image_sizes();
?>
<select name="<?php
echo GENESIS_SETTINGS_FIELD;
?>
[image_size]">
<option style="padding-right:10px;" value="thumbnail">thumbnail (<?php
echo get_option('thumbnail_size_w');
?>
x<?php
echo get_option('thumbnail_size_h');
?>
)</option>
<?php
foreach ((array) $sizes as $name => $size) {
echo '<option style="padding-right: 10px;" value="' . $name . '" ' . selected($name, genesis_get_option('image_size'), FALSE) . '>' . $name . ' (' . $size['width'] . 'x' . $size['height'] . ')</option>';
}
?>
</select></p>
<p><?php
_e("Select Post Navigation Technique:", 'genesis');
?>
<select name="<?php
echo GENESIS_SETTINGS_FIELD;
?>
[posts_nav]">
<option style="padding-right:10px;" value="older-newer" <?php
selected('older-newer', genesis_get_option('posts_nav'));
?>
><?php
_e("Older / Newer", 'genesis');
?>
</option>
<option style="padding-right:10px;" value="prev-next" <?php
selected('prev-next', genesis_get_option('posts_nav'));
?>
><?php
_e("Previous / Next", 'genesis');
?>
</option>
<option style="padding-right:10px;" value="numeric" <?php
selected('numeric', genesis_get_option('posts_nav'));
?>
><?php
_e("Numeric", 'genesis');
?>
</option>
</select></p>
<p><span class="description"><strong><?php
_e("Note: ", 'genesis');
//.........这里部分代码省略.........
示例8: form
//.........这里部分代码省略.........
/>
<label for="<?php
echo $this->get_field_id('show_image');
?>
"><?php
_e('Show Featured Image', 'genesis');
?>
</label>
</p>
<p>
<label for="<?php
echo $this->get_field_id('image_size');
?>
"><?php
_e('Image Size', 'genesis');
?>
:</label>
<select id="<?php
echo $this->get_field_id('image_size');
?>
" class="genesis-image-size-selector" name="<?php
echo $this->get_field_name('image_size');
?>
">
<option value="thumbnail">thumbnail (<?php
echo get_option('thumbnail_size_w');
?>
x<?php
echo get_option('thumbnail_size_h');
?>
)</option>
<?php
$sizes = genesis_get_additional_image_sizes();
foreach ((array) $sizes as $name => $size) {
echo '<option value="' . esc_attr($name) . '" ' . selected($name, $instance['image_size'], FALSE) . '>' . esc_html($name) . ' ( ' . $size['width'] . 'x' . $size['height'] . ' )</option>';
}
?>
</select>
</p>
<hr class="div" />
<p>
<input id="<?php
echo $this->get_field_id('show_title');
?>
" type="checkbox" name="<?php
echo $this->get_field_name('show_title');
?>
" value="1" <?php
checked($instance['show_title']);
?>
/>
<label for="<?php
echo $this->get_field_id('show_title');
?>
"><?php
_e('Show Post Title', 'genesis');
?>
</label>
</p>
<p>
<label for="<?php
echo $this->get_field_id('show_content');
示例9: form
//.........这里部分代码省略.........
?>
×<?php
echo absint(get_option('thumbnail_size_h'));
?>
)</option>
<option value="medium" <?php
selected('medium', $instance['image_size']);
?>
>Medium (<?php
echo absint(get_option('medium_size_w'));
?>
×<?php
echo absint(get_option('medium_size_h'));
?>
)</option>
<option value="large" <?php
selected('large', $instance['image_size']);
?>
>Large (<?php
echo absint(get_option('large_size_w'));
?>
×<?php
echo absint(get_option('large_size_h'));
?>
)</option>
<option value="full" <?php
selected('full', $instance['image_size']);
?>
>Full (<?php
_e('Original Image Size', 'genesis-widget-background');
?>
)</option>
<?php
$sizes = genesis_get_additional_image_sizes();
foreach ((array) $sizes as $name => $size) {
echo '<option value="' . esc_attr($name) . '" ' . selected($name, $instance['image_size'], FALSE) . '>' . esc_html($name) . ' (' . absint($size['width']) . 'x' . absint($size['height']) . ')</option>';
}
?>
</select>
</div>
<!--Show Custom Image-->
<div class="<?php
if ($instance['show_image'] != 3) {
echo 'hidden';
}
?>
" id="<?php
echo $this->get_field_id('toggle_uploader');
?>
" >
<input type="submit" class="button fpa-uploader-button" name="<?php
echo $this->get_field_name('uploader_button');
?>
" id="<?php
echo $this->get_field_id('uploader_button');
?>
" value="<?php
_e('Select an Image', 'genesis-widget-background');
?>
" onclick="fpa_imageUpload.uploader( '<?php
echo $this->id;
?>
', '<?php
echo $id_prefix;
?>
示例10: form
//.........这里部分代码省略.........
/>
<label for="<?php
echo $this->get_field_id('show_image');
?>
"><?php
_e('Show Featured Image', 'genesis-featured-custom-post-type-widget');
?>
</label>
</p>
<p>
<label for="<?php
echo $this->get_field_id('image_size');
?>
"><?php
_e('Image Size', 'genesis-featured-custom-post-type-widget');
?>
:</label>
<select id="<?php
echo $this->get_field_id('image_size');
?>
" class="genesis-image-size-selector" name="<?php
echo $this->get_field_name('image_size');
?>
">
<option value="thumbnail">thumbnail (<?php
echo get_option('thumbnail_size_w');
?>
x<?php
echo get_option('thumbnail_size_h');
?>
)</option>
<?php
$sizes = genesis_get_additional_image_sizes();
foreach ((array) $sizes as $name => $size) {
echo '<option value="' . esc_attr($name) . '" ' . selected($name, $instance['image_size'], FALSE) . '>' . esc_html($name) . ' ( ' . $size['width'] . 'x' . $size['height'] . ' )</option>';
}
?>
</select>
</p>
<p>
<label for="<?php
echo $this->get_field_id('image_alignment');
?>
"><?php
_e('Image Alignment', 'genesis-featured-custom-post-type-widget');
?>
:</label>
<select id="<?php
echo $this->get_field_id('image_alignment');
?>
" name="<?php
echo $this->get_field_name('image_alignment');
?>
">
<option value="alignnone">- <?php
_e('None', 'genesis-featured-custom-post-type-widget');
?>
-</option>
<option value="alignleft" <?php
selected('alignleft', $instance['image_alignment']);
?>
><?php
_e('Left', 'genesis-featured-custom-post-type-widget');
?>
开发者ID:graphicdesignbyemily,项目名称:featured-custom-post-type-widget-for-genesis,代码行数:67,代码来源:class-featured-custom-post-type-widget-registrations.php
示例11: form
//.........这里部分代码省略.........
</label></p>
<p style="<?php
gfwa_display_option($instance, 'show_image');
?>
"><input id="<?php
echo $this->get_field_id('link_image');
?>
" type="checkbox" name="<?php
echo $this->get_field_name('link_image');
?>
" value="1" <?php
checked(1, $instance['link_image']);
?>
/> <label for="<?php
echo $this->get_field_id('link_image');
?>
"><?php
_e('Link Image to Post', 'gfwa');
?>
</label></p>
<p style="<?php
gfwa_display_option($instance, 'show_image');
?>
"><label for="<?php
echo $this->get_field_id('image_size');
?>
"><?php
_e('Image Size', 'gfwa');
?>
:</label>
<?php
$sizes = genesis_get_additional_image_sizes();
?>
<select id="<?php
echo $this->get_field_id('image_size');
?>
" name="<?php
echo $this->get_field_name('image_size');
?>
">
<option style="padding-right:10px;" value="thumbnail">thumbnail (<?php
echo get_option('thumbnail_size_w');
?>
x<?php
echo get_option('thumbnail_size_h');
?>
)</option>
<?php
foreach ((array) $sizes as $name => $size) {
echo '<option style="padding-right: 10px;" value="' . esc_attr($name) . '" ' . selected($name, $instance['image_size'], FALSE) . '>' . esc_html($name) . ' (' . $size['width'] . 'x' . $size['height'] . ')</option>';
}
?>
</select></p>
<p style="<?php
gfwa_display_option($instance, 'show_image');
?>
"><label for="<?php
echo $this->get_field_id('image_position');
?>
"><?php
_e('Image Placement', 'gfwa');
?>
:</label>
示例12: form
//.........这里部分代码省略.........
?>
×<?php
echo absint(get_option('thumbnail_size_h'));
?>
)</option>
<option value="medium" <?php
selected('medium', $instance['image_size']);
?>
>Medium (<?php
echo absint(get_option('medium_size_w'));
?>
×<?php
echo absint(get_option('medium_size_h'));
?>
)</option>
<option value="large" <?php
selected('large', $instance['image_size']);
?>
>Large (<?php
echo absint(get_option('large_size_w'));
?>
×<?php
echo absint(get_option('large_size_h'));
?>
)</option>
<option value="full" <?php
selected('full', $instance['image_size']);
?>
>Full (<?php
_e('Original Image Size', 'genesis-featured-page-advanced');
?>
)</option>
<?php
$sizes = genesis_get_additional_image_sizes();
foreach ((array) $sizes as $name => $size) {
echo '<option value="' . esc_attr($name) . '" ' . selected($name, $instance['image_size'], FALSE) . '>' . esc_html($name) . ' (' . absint($size['width']) . 'x' . absint($size['height']) . ')</option>';
}
?>
</select>
</div>
<!--Show Custom Image-->
<div class="<?php
if ($instance['show_image'] != 3) {
echo 'hidden';
}
?>
" id="<?php
echo $this->get_field_id('toggle_uploader');
?>
" >
<input type="submit" class="button fpa-uploader-button" name="<?php
echo $this->get_field_name('uploader_button');
?>
" id="<?php
echo $this->get_field_id('uploader_button');
?>
" value="<?php
_e('Select an Image', 'genesis');
?>
" onclick="fpa_imageUpload.uploader( '<?php
echo $this->id;
?>
', '<?php
echo $id_prefix;
?>
示例13: form
/**
* Echo the settings update form.
*
* @since 0.1.8
*
* @param array $instance Current settings
*/
function form($instance)
{
$text = esc_textarea($instance['custom_text']);
//* Merge with defaults
$instance = wp_parse_args((array) $instance, $this->defaults);
?>
<p>
<label for="<?php
echo $this->get_field_id('title');
?>
"><?php
_e('Title', 'genesis');
?>
:</label>
<input type="text" id="<?php
echo $this->get_field_id('title');
?>
" name="<?php
echo $this->get_field_name('title');
?>
" value="<?php
echo esc_attr($instance['title']);
?>
" class="widefat" />
</p>
<p>
<label for="<?php
echo $this->get_field_id('page_id');
?>
"><?php
_e('Page', 'genesis');
?>
:</label>
<?php
wp_dropdown_pages(array('name' => $this->get_field_name('page_id'), 'selected' => $instance['page_id']));
?>
</p>
<hr class="div" />
<p>
<input id="<?php
echo $this->get_field_id('show_image');
?>
" type="checkbox" name="<?php
echo $this->get_field_name('show_image');
?>
" value="1"<?php
checked($instance['show_image']);
?>
/>
<label for="<?php
echo $this->get_field_id('show_image');
?>
"><?php
_e('Show Featured Image', 'genesis');
?>
</label>
</p>
<p>
<label for="<?php
echo $this->get_field_id('image_size');
?>
"><?php
_e('Image Size', 'genesis');
?>
:</label>
<select id="<?php
echo $this->get_field_id('image_size');
?>
" class="genesis-image-size-selector" name="<?php
echo $this->get_field_name('image_size');
?>
">
<option value="thumbnail">thumbnail (<?php
echo absint(get_option('thumbnail_size_w'));
?>
x<?php
echo absint(get_option('thumbnail_size_h'));
?>
)</option>
<?php
$sizes = genesis_get_additional_image_sizes();
foreach ((array) $sizes as $name => $size) {
echo '<option value="' . esc_attr($name) . '" ' . selected($name, $instance['image_size'], FALSE) . '>' . esc_html($name) . ' (' . absint($size['width']) . 'x' . absint($size['height']) . ')</option>';
}
?>
</select>
</p>
<p>
//.........这里部分代码省略.........
示例14: form
//.........这里部分代码省略.........
_e('Right', 'genesis');
?>
</option>
</select></p>
</div>
<div style="background: #f1f1f1; border: 1px solid #DDD; padding: 10px 10px 0px 10px; margin-top: 10px;">
<p><input id="<?php
echo $this->get_field_id('show_image');
?>
" type="checkbox" name="<?php
echo $this->get_field_name('show_image');
?>
" value="1" <?php
checked(1, $instance['show_image']);
?>
/> <label for="<?php
echo $this->get_field_id('show_image');
?>
"><?php
_e('Show Featured Image', 'genesis');
?>
</label></p>
<p><label for="<?php
echo $this->get_field_id('image_size');
?>
"><?php
_e('Image Size', 'genesis');
?>
:</label>
<?php
$sizes = genesis_get_additional_image_sizes();
?>
<select id="<?php
echo $this->get_field_id('image_size');
?>
" name="<?php
echo $this->get_field_name('image_size');
?>
">
<option style="padding-right:10px;" value="thumbnail">thumbnail (<?php
echo get_option('thumbnail_size_w');
?>
x<?php
echo get_option('thumbnail_size_h');
?>
)</option>
<?php
foreach ((array) $sizes as $name => $size) {
echo '<option style="padding-right: 10px;" value="' . esc_attr($name) . '" ' . selected($name, $instance['image_size'], FALSE) . '>' . esc_html($name) . ' (' . $size['width'] . 'x' . $size['height'] . ')</option>';
}
?>
</select></p>
<p><label for="<?php
echo $this->get_field_id('image_alignment');
?>
"><?php
_e('Image Alignment', 'genesis');
?>
:</label>
<select id="<?php
echo $this->get_field_id('image_alignment');
?>
示例15: genesis_get_image_sizes
/**
* Return all registered image sizes arrays, including the standard sizes.
*
* Return a two-dimensional array of standard and additionally registered image sizes, with width, height and crop sub-keys.
*
* Here, the standard sizes have their sub-keys populated by pulling from the options saved in the database.
*
* @since 1.0.2
*
* @uses genesis_get_additional_image_sizes() Return registered image sizes.
*
* @return array Two-dimensional, with width, height and crop sub-keys.
*/
function genesis_get_image_sizes()
{
$builtin_sizes = array('large' => array('width' => get_option('large_size_w'), 'height' => get_option('large_size_h')), 'medium' => array('width' => get_option('medium_size_w'), 'height' => get_option('medium_size_h')), 'thumbnail' => array('width' => get_option('thumbnail_size_w'), 'height' => get_option('thumbnail_size_h'), 'crop' => get_option('thumbnail_crop')));
$additional_sizes = genesis_get_additional_image_sizes();
return array_merge($builtin_sizes, $additional_sizes);
}