• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP genesis_get_additional_image_sizes函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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');
        ?>
开发者ID:nmrugg,项目名称:studiopress-premum-wp-themes,代码行数:67,代码来源:delicious-slider-widget.php


示例2: form

    /**
     * Creates Widget Form
     *
     * @author Nick Croft
     * @since 0.1
     * @version 0.5
     * @param array $instance Values set in widget isntance
     */
    function form($instance)
    {
        /** Merge with defaults */
        $instance = wp_parse_args((array) $instance, $this->defaults);
        $sizes = genesis_get_additional_image_sizes();
        $imageSize_opt['thumbnail'] = 'thumbnail (' . get_option('thumbnail_size_w') . 'x' . get_option('thumbnail_size_h') . ')';
        foreach ((array) $sizes as $name => $size) {
            $imageSize_opt[$name] = esc_html($name) . ' (' . $size['width'] . 'x' . $size['height'] . ')';
        }
        $columns = array('col1' => array(array('post_type' => array('label' => __('Post Type', 'gfwa'), 'description' => '', 'type' => 'post_type_select', 'save' => true, 'requires' => ''), 'page_id' => array('label' => __('Page', 'gfwa'), 'description' => '', 'type' => 'page_select', 'save' => true, 'requires' => array('post_type', 'page', false)), 'posts_term' => array('label' => __('Taxonomy and Terms', 'gfwa'), 'description' => '', 'type' => 'select_taxonomy', 'save' => false, 'requires' => array('post_type', 'page', true)), 'exclude_terms' => array('label' => sprintf(__('Exclude Terms by ID %s (comma separated list)', 'gfwa'), '<br />'), 'description' => '', 'type' => 'text', 'save' => false, 'requires' => array('post_type', 'page', true)), 'include_exclude' => array('label' => '', 'description' => '', 'type' => 'select', 'options' => array('' => __('Select', 'gfwa'), 'include' => __('Include', 'gfwa'), 'exclude' => __('Exclude', 'gfwa')), 'save' => true, 'requires' => array('page_id', '', false)), 'post_id' => array('label' => $instance['post_type'] . ' ' . __('ID', 'gfwa'), 'description' => '', 'type' => 'text', 'save' => false, 'requires' => array('include_exclude', '', true)), 'posts_num' => array('label' => __('Number of Posts to Show', 'gfwa'), 'description' => '', 'type' => 'text_small', 'save' => false, 'requires' => array('page_id', '', false)), 'posts_offset' => array('label' => __('Number of Posts to Offset', 'gfwa'), 'description' => '', 'type' => 'text_small', 'save' => false, 'requires' => array('page_id', '', false)), 'orderby' => array('label' => __('Order By', 'gfwa'), 'description' => '', 'type' => 'select', 'options' => array('date' => __('Date', 'gfwa'), 'title' => __('Title', 'gfwa'), 'parent' => __('Parent', 'gfwa'), 'ID' => __('ID', 'gfwa'), 'comment_count' => __('Comment Count', 'gfwa'), 'rand' => __('Random', 'gfwa'), 'meta_value' => __('Meta Value', 'gfwa'), 'meta_value_num' => __('Numeric Meta Value', 'gfwa')), 'save' => false, 'requires' => array('page_id', '', false)), 'order' => array('label' => __('Sort Order', 'gfwa'), 'description' => '', 'type' => 'select', 'options' => array('DESC' => __('Descending (3, 2, 1)', 'gfwa'), 'ASC' => __('Ascending (1, 2, 3)', 'gfwa')), 'save' => false, 'requires' => array('page_id', '', false)), 'meta_key' => array('label' => __('Meta Key', 'gfwa'), 'description' => '', 'type' => 'text', 'save' => false, 'requires' => array('page_id', '', false)), 'paged' => array('label' => __('Work with Pagination', 'gfwa'), 'description' => '', 'type' => 'checkbox', 'save' => false, 'requires' => array('post_type', 'page', true)), 'show_paged' => array('label' => __('Show Page Navigation', 'gfwa'), 'description' => '', 'type' => 'checkbox', 'save' => false, 'requires' => array('post_type', 'page', true))), array('show_gravatar' => array('label' => __('Show Author Gravatar', 'gfwa'), 'description' => '', 'type' => 'checkbox', 'save' => true, 'requires' => ''), 'gravatar_size' => array('label' => __('Gravatar Size', 'gfwa'), 'description' => '', 'type' => 'select', 'options' => array('45' => __('Small (45px)', 'gfwa'), '65' => __('Medium (65px)', 'gfwa'), '85' => __('Large (85px)', 'gfwa'), '125' => __('Extra Large (125px)', 'gfwa')), 'save' => false, 'requires' => array('show_gravatar', '', true)), 'link_gravatar' => array('label' => '', 'description' => '', 'type' => 'select', 'options' => array('' => __('Do not link gravatar', 'gfwa'), 'archive' => __('Link to author archive', 'gfwa'), 'website' => __('Link to author website', 'gfwa')), 'save' => false, 'requires' => array('show_gravatar', '', true)), 'gravatar_alignment' => array('label' => __('Gravatar Alignment', 'gfwa'), 'description' => '', 'type' => 'select', 'options' => array('' => __('None', 'gfwa'), 'alignleft' => __('Left', 'gfwa'), 'alignright' => __('Right', 'gfwa')), 'save' => false, 'requires' => array('show_gravatar', '', true)))), 'col2' => array(array('show_image' => array('label' => __('Show Featured Image', 'gfwa'), 'description' => '', 'type' => 'checkbox', 'save' => true, 'requires' => ''), 'link_image' => array('label' => '', 'description' => '', 'type' => 'select', 'options' => array('1' => __('Link Image to Post', 'gfwa'), '2' => __('Don\'t Link Image', 'gfwa')), 'save' => true, 'requires' => array('show_image', '', true)), 'link_image_field' => array('label' => __('Custom Field for Link ( Defaults to Permalink )'), 'description' => '', 'type' => 'text', 'save' => false, 'requires' => array('link_image', '1', false)), 'image_size' => array('label' => '', 'description' => '', 'type' => 'select', 'options' => $imageSize_opt, 'save' => false, 'requires' => array('show_image', '', true)), 'image_position' => array('label' => __('Image Placement', 'gfwa'), 'description' => '', 'type' => 'select', 'options' => array('before-title' => __('Before Title', 'gfwa'), 'after-title' => __('After Title', 'gfwa'), 'after-content' => __('After Content', 'gfwa')), 'save' => false, 'requires' => array('show_image', '', true)), 'image_alignment' => array('label' => '', 'description' => '', 'type' => 'select', 'options' => array('' => __('None', 'gfwa'), 'alignleft' => __('Left', 'gfwa'), 'alignright' => __('Right', 'gfwa'), 'aligncenter' => __('Center', 'gfwa')), 'save' => false, 'requires' => array('show_image', '', true))), array('show_title' => array('label' => __('Show Post Title', 'gfwa'), 'description' => '', 'type' => 'checkbox', 'save' => true, 'requires' => ''), 'title_limit' => array('label' => __('Limit title to', 'gfwa'), 'description' => __('characters', 'gfwa'), 'type' => 'text_small', 'save' => false, 'requires' => array('show_title', '', true)), 'title_cutoff' => array('label' => __('Title Cutoff Symbol', 'gfwa'), 'description' => '', 'type' => 'text_small', 'save' => false, 'requires' => array('show_title', '', true)), 'link_title' => array('label' => '', 'description' => '', 'type' => 'select', 'options' => array('1' => __('Link Title to Post', 'gfwa'), '2' => __('Don\'t Link Title', 'gfwa')), 'save' => true, 'requires' => array('show_title', '', true)), 'link_title_field' => array('label' => __('Custom Field for Link ( Defaults to Permalink )'), 'description' => '', 'type' => 'text', 'save' => false, 'requires' => array('link_title', '1', false)), 'show_byline' => array('label' => __('Show Post Info', 'gfwa'), 'description' => '', 'type' => 'checkbox', 'save' => true, 'requires' => ''), 'post_info' => array('label' => '', 'description' => '', 'type' => 'text', 'save' => false, 'requires' => array('show_byline', '', true)), 'show_content' => array('label' => __('Content Type', 'gfwa'), 'description' => '', 'type' => 'select', 'options' => array('content' => __('Show Content', 'gfwa'), 'excerpt' => __('Show Excerpt', 'gfwa'), 'content-limit' => __('Show Content Limit', 'gfwa'), '' => __('No Content', 'gfwa')), 'save' => true, 'requires' => ''), 'content_limit' => array('label' => __('Limit content to', 'gfwa'), 'description' => __('characters', 'gfwa'), 'type' => 'text_small', 'save' => false, 'requires' => array('show_content', 'content-limit', false)), 'show_archive_line' => array('label' => __('Show Post Meta', 'gfwa'), 'description' => '', 'type' => 'checkbox', 'save' => true, 'requires' => array('post_type', 'page', true)), 'post_meta' => array('label' => '', 'description' => '', 'type' => 'text', 'save' => false, 'requires' => array('show_archive_line', '', true)), 'more_text' => array('label' => __('More Text (if applicable)', 'gfwa'), 'description' => '', 'type' => 'text', 'save' => false, 'requires' => '')), array('extra_posts' => array('label' => __('Display List of Additional Posts', 'gfwa'), 'description' => '', 'type' => 'checkbox', 'save' => true, 'requires' => array('post_type', 'page', true)), 'extra_title' => array('label' => __('Title', 'gfwa'), 'description' => '', 'type' => 'text', 'save' => false, 'requires' => array('extra_posts', '', true)), 'extra_num' => array('label' => __('Number of Posts to Show', 'gfwa'), 'description' => '', 'type' => 'text_small', 'save' => false, 'requires' => array('extra_posts', '', true)), 'extra_format' => array('label' => __('Extra Post Format', 'gfwa'), 'description' => '', 'type' => 'select', 'options' => array('ul' => __('Unordered List', 'gfwa'), 'ol' => __('Ordered List', 'gfwa'), 'drop_down' => __('Drop Down', 'gfwa')), 'save' => false, 'requires' => array('extra_posts', '', true))), array('more_from_category' => array('label' => __('Show Category Archive Link', 'gfwa'), 'description' => '', 'type' => 'checkbox', 'save' => true, 'requires' => array('post_type', 'page', true)), 'more_from_category_text' => array('label' => __('Link Text', 'gfwa'), 'description' => '', 'type' => 'text', 'save' => false, 'requires' => array('more_from_category', '', true)), 'archive_link' => array('label' => __('Fill in this value with a URL if you wish to display an archive link when showing all terms or to override the normal archive link to another URL', 'gfwa'), 'description' => '', 'type' => 'text', 'save' => false, 'requires' => array('more_from_category', '', true))), array('custom_field' => array('label' => __('Instance Identification Field', 'gfwa'), 'description' => __('Fill in this field if you need to test against an $instance value not included in the form', 'gfwa'), 'type' => 'text', 'save' => false, 'requires' => ''))));
        echo '<p><label for="' . $this->get_field_id('title') . '">' . __('Title', 'gfwa') . ':</label>
            <input type="text" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" value="' . esc_attr($instance['title']) . '" style="width:99%;" /></p>';
        foreach ($columns as $column => $boxes) {
            if ('col1' == $column) {
                echo '<div style="float: left; width: 250px;">';
            } else {
                echo '<div style="float: right; width: 250px;">';
            }
            foreach ($boxes as $box) {
                echo '<div style="background: #f1f1f1; border: 1px solid #DDD; padding: 10px 10px 0px 10px; margin-bottom: 5px;">';
                foreach ($box as $fieldID => $args) {
                    $class = $args['save'] ? 'class="widget-control-save" ' : '';
                    $style = $args['requires'] ? ' style="' . gfwa_get_display_option($instance, $args['requires'][0], $args['requires'][1], $args['requires'][2]) . '"' : '';
                    switch ($args['type']) {
                        case 'post_type_select':
                            echo '<p><label for="' . $this->get_field_id($fieldID) . '">' . $args['label'] . ':</label>
								<select ' . $class . 'id="' . $this->get_field_id($fieldID) . '" name="' . $this->get_field_name($fieldID) . '">';
                            $args = array('public' => true);
                            $output = 'names';
                            $operator = 'and';
                            $post_types = get_post_types($args, $output, $operator);
                            $post_types = array_filter($post_types, 'gfwa_exclude_post_types');
                            foreach ($post_types as $post_type) {
                                echo '<option style="padding-right:10px;" value="' . esc_attr($post_type) . '" ' . selected(esc_attr($post_type), $instance['post_type'], false) . '>' . esc_attr($post_type) . '</option>';
                            }
                            echo '<option style="padding-right:10px;" value="any" ' . selected('any', $instance['post_type'], false) . '>' . __('any', 'gfwa') . '</option>';
                            echo '</select></p>';
                            break;
                        case 'page_select':
                            echo '<p' . $style . '><label for="' . $this->get_field_id($fieldID) . '">' . $args['label'] . ':</label>
								<select ' . $class . ' id="' . $this->get_field_id($fieldID) . '" name="' . $this->get_field_name($fieldID) . '">
									<option value="" ' . selected('', $instance['page_id'], false) . '>' . attribute_escape(__('Select page', 'gfwa')) . '</option>';
                            $pages = get_pages();
                            foreach ($pages as $page) {
                                echo '<option style="padding-right:10px;" value="' . esc_attr($page->ID) . '" ' . selected(esc_attr($page->ID), $instance['page_id'], false) . '>' . esc_attr($page->post_title) . '</option>';
                            }
                            echo '</select>
							</p>';
                            break;
                        case 'select_taxonomy':
                            echo '<p' . $style . '"><label for="' . $this->get_field_id($fieldID) . '">' . $args['label'] . ':</label>

								<select id="' . $this->get_field_id($fieldID) . '" name="' . $this->get_field_name($fieldID) . '">
									<option style="padding-right:10px;" value="" ' . selected('', $instance['posts_term'], false) . '>' . __('All Taxonomies and Terms', 'gfwa') . '</option>';
                            $taxonomies = get_taxonomies(array('public' => true), 'objects');
                            $taxonomies = array_filter($taxonomies, 'gfwa_exclude_taxonomies');
                            $test = get_taxonomies(array('public' => true), 'objects');
                            foreach ($taxonomies as $taxonomy) {
                                $query_label = '';
                                if (!empty($taxonomy->query_var)) {
                                    $query_label = $taxonomy->query_var;
                                } else {
                                    $query_label = $taxonomy->name;
                                }
                                echo '<optgroup label="' . esc_attr($taxonomy->labels->name) . '">
											<option style="margin-left: 5px; padding-right:10px;" value="' . esc_attr($query_label) . '" ' . selected(esc_attr($query_label), $instance['posts_term'], false) . '>' . $taxonomy->labels->all_items . '</option>';
                                $terms = get_terms($taxonomy->name, 'orderby=name&hide_empty=1');
                                foreach ($terms as $term) {
                                    echo '<option style="margin-left: 8px; padding-right:10px;" value="' . esc_attr($query_label) . ',' . $term->slug . '" ' . selected(esc_attr($query_label) . ',' . $term->slug, $instance['posts_term'], false) . '>-' . esc_attr($term->name) . '</option>';
                                }
                                echo '</optgroup>';
                            }
                            echo '</select></p>';
                            break;
                        case 'text':
                            echo $args['description'] ? '<p>' . $args['description'] . '</p>' : '';
                            echo '<p' . $style . '><label for="' . $this->get_field_id($fieldID) . '">' . $args['label'] . ':</label>
									<input type="text" id="' . $this->get_field_id($fieldID) . '" name="' . $this->get_field_name($fieldID) . '" value="' . esc_attr($instance[$fieldID]) . '" style="width:95%;" /></p>';
                            break;
                        case 'text_small':
                            echo '<p' . $style . '><label for="' . $this->get_field_id($fieldID) . '">' . $args['label'] . ':</label>
									<input type="text" id="' . $this->get_field_id($fieldID) . '" name="' . $this->get_field_name($fieldID) . '" value="' . esc_attr($instance[$fieldID]) . '" size="2" />' . $args['description'] . '</p>';
                            break;
                        case 'select':
                            echo '<p' . $style . '"><label for="' . $this->get_field_id($fieldID) . '">' . $args['label'] . ' </label>
								<select ' . $class . 'id="' . $this->get_field_id($fieldID) . '" name="' . $this->get_field_name($fieldID) . '">';
                            foreach ($args['options'] as $value => $label) {
                                echo '<option style="padding-right:10px;" value="' . $value . '" ' . selected($value, $instance[$fieldID], false) . '>' . $label . '</option>';
                            }
                            echo '</select></p>';
                            break;
                        case 'checkbox':
//.........这里部分代码省略.........
开发者ID:hscale,项目名称:webento,代码行数:101,代码来源:widget.php


示例3: 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');
        ?>
开发者ID:badabingbreda,项目名称:badabing-essentials,代码行数:67,代码来源:badabing.featuredposts.php


示例4: 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');
        ?>
开发者ID:hscale,项目名称:webento,代码行数:67,代码来源:plugin.php


示例5: 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>
//.........这里部分代码省略.........
开发者ID:FrankM1,项目名称:Genesis-Author-Pro,代码行数:101,代码来源:class.Genesis_Author_Pro_Widget_Admin.php


示例6: 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');
//.........这里部分代码省略.........
开发者ID:Weissenberger13,项目名称:web.portugalrentalcottages,代码行数:101,代码来源:featured-page-widget.php


示例7: 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;
 }
开发者ID:ryanhellyer,项目名称:thememix-pro-genesis,代码行数:14,代码来源:widget.php


示例8: 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');
//.........这里部分代码省略.........
开发者ID:Weissenberger13,项目名称:web.portugalrentalcottages,代码行数:101,代码来源:theme_settings.php


示例9: 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');
开发者ID:jdelia,项目名称:genesis-communities-cpt,代码行数:67,代码来源:featured-awp-communities-widget.php


示例10: form


//.........这里部分代码省略.........
        ?>
&#x000D7;<?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'));
        ?>
&#x000D7;<?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'));
        ?>
&#x000D7;<?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;
        ?>
开发者ID:Friends-School-Atlanta,项目名称:Deployable-WordPress,代码行数:67,代码来源:wpstudio-widget-class.php


示例11: 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


示例12: 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>
开发者ID:Genesis-Simple,项目名称:Genesis-Simple-Plugin,代码行数:67,代码来源:widget.php


示例13: form


//.........这里部分代码省略.........
        ?>
&#x000D7;<?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'));
        ?>
&#x000D7;<?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'));
        ?>
&#x000D7;<?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 
     

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP genesis_get_cpt_option函数代码示例发布时间:2022-05-15
下一篇:
PHP genesis_code函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap