예제 #1
0
 public function get_options()
 {
     global $ThemifyBuilder;
     $image_sizes = themify_get_image_sizes_list(false);
     $taxonomies = $ThemifyBuilder->get_public_taxonomies();
     $term_options = array();
     foreach ($taxonomies as $key => $label) {
         $term_options[] = array('id' => "{$key}_post", 'label' => $label, 'type' => 'query_category', 'options' => array('taxonomy' => $key), 'wrap_with_class' => "tf-group-element tf-group-element-{$key}");
     }
     /* allow query posts by slug */
     $taxonomies['post_slug'] = __('Slug', 'themify');
     $options = array(array('id' => 'mod_title_post', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_post', 'type' => 'layout', 'label' => __('Post Layout', 'themify'), 'options' => array(array('img' => 'list-post.png', 'value' => 'list-post', 'label' => __('List Post', 'themify')), array('img' => 'grid3.png', 'value' => 'grid3', 'label' => __('Grid 3', 'themify')), array('img' => 'grid2.png', 'value' => 'grid2', 'label' => __('Grid 2', 'themify')), array('img' => 'grid4.png', 'value' => 'grid4', 'label' => __('Grid 4', 'themify')), array('img' => 'list-thumb-image.png', 'value' => 'list-thumb-image', 'label' => __('List Thumb Image', 'themify')), array('img' => 'grid2-thumb.png', 'value' => 'grid2-thumb', 'label' => __('Grid 2 Thumb', 'themify')))), array('id' => 'post_type_post', 'type' => 'select', 'label' => __('Post Type', 'themify'), 'options' => $ThemifyBuilder->get_public_post_types()), array('id' => 'type_query_post', 'type' => 'radio', 'label' => __('Query by', 'themify'), 'options' => $taxonomies, 'default' => 'category', 'option_js' => true), array('type' => 'group', 'fields' => $term_options), array('id' => 'query_slug_post', 'type' => 'text', 'label' => __('Post Slugs', 'themify'), 'class' => 'large', 'wrap_with_class' => 'tf-group-element tf-group-element-post_slug', 'help' => '<br/>' . __('Insert post slug. Multiple slug should be separated by comma (,)', 'themify')), array('id' => 'post_per_page_post', 'type' => 'text', 'label' => __('Limit', 'themify'), 'class' => 'xsmall', 'help' => __('number of posts to show', 'themify')), array('id' => 'offset_post', 'type' => 'text', 'label' => __('Offset', 'themify'), 'class' => 'xsmall', 'help' => __('number of post to displace or pass over', 'themify')), array('id' => 'order_post', 'type' => 'select', 'label' => __('Order', 'themify'), 'help' => __('Descending = show newer posts first', 'themify'), 'options' => array('desc' => __('Descending', 'themify'), 'asc' => __('Ascending', 'themify'))), array('id' => 'orderby_post', 'type' => 'select', 'label' => __('Order By', 'themify'), 'options' => array('date' => __('Date', 'themify'), 'id' => __('Id', 'themify'), 'author' => __('Author', 'themify'), 'title' => __('Title', 'themify'), 'name' => __('Name', 'themify'), 'modified' => __('Modified', 'themify'), 'rand' => __('Random', 'themify'), 'comment_count' => __('Comment Count', 'themify'))), array('id' => 'display_post', 'type' => 'select', 'label' => __('Display', 'themify'), 'options' => array('content' => __('Content', 'themify'), 'excerpt' => __('Excerpt', 'themify'), 'none' => __('None', 'themify'))), array('id' => 'hide_feat_img_post', 'type' => 'select', 'label' => __('Hide Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'image_size_post', 'type' => 'select', 'label' => Themify_Builder_Model::is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => Themify_Builder_Model::is_img_php_disabled() ? false : true, 'options' => $image_sizes), array('id' => 'img_width_post', 'type' => 'text', 'label' => __('Image Width', 'themify'), 'class' => 'xsmall'), array('id' => 'img_height_post', 'type' => 'text', 'label' => __('Image Height', 'themify'), 'class' => 'xsmall'), array('id' => 'unlink_feat_img_post', 'type' => 'select', 'label' => __('Unlink Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_post_title_post', 'type' => 'select', 'label' => __('Hide Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'unlink_post_title_post', 'type' => 'select', 'label' => __('Unlink Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_post_date_post', 'type' => 'select', 'label' => __('Hide Post Date', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_post_meta_post', 'type' => 'select', 'label' => __('Hide Post Meta', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_page_nav_post', 'type' => 'select', 'label' => __('Hide Page Navigation', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')), 'default' => 'Yes'));
     return $options;
 }
예제 #2
0
 public function get_options()
 {
     global $ThemifyBuilder;
     $visible_opt = array(1 => 1, 2, 3, 4, 5, 6, 7);
     $auto_scroll_opt = array('off' => __('Off', 'themify'), 1 => __('1 sec', 'themify'), 2 => __('2 sec', 'themify'), 3 => __('3 sec', 'themify'), 4 => __('4 sec', 'themify'), 5 => __('5 sec', 'themify'), 6 => __('6 sec', 'themify'), 7 => __('7 sec', 'themify'), 8 => __('8 sec', 'themify'), 9 => __('9 sec', 'themify'), 10 => __('10 sec', 'themify'));
     $image_sizes = themify_get_image_sizes_list(false);
     $display = array('blog' => __('Blog Posts', 'themify'), 'image' => __('Images', 'themify'), 'video' => __('Videos', 'themify'), 'text' => __('Text', 'themify'));
     if ($ThemifyBuilder->is_cpt_active('slider')) {
         $display['slider'] = __('Slider Posts', 'themify');
     }
     if ($ThemifyBuilder->is_cpt_active('portfolio')) {
         $display['portfolio'] = __('Portfolio', 'themify');
     }
     if ($ThemifyBuilder->is_cpt_active('testimonial')) {
         $display['testimonial'] = __('Testimonial', 'themify');
     }
     $options = array(array('id' => 'mod_title_slider', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_display_slider', 'type' => 'radio', 'label' => __('Display', 'themify'), 'options' => $display, 'default' => 'blog', 'option_js' => true), array('id' => 'blog_category_slider', 'type' => 'query_category', 'label' => __('Category', 'themify'), 'options' => array(), 'help' => sprintf(__('Add more <a href="%s" target="_blank">blog posts</a>', 'themify'), admin_url('post-new.php')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog'), array('id' => 'slider_category_slider', 'type' => 'query_category', 'label' => __('Category', 'themify'), 'options' => array('taxonomy' => 'slider-category'), 'help' => sprintf(__('Add more <a href="%s" target="_blank">slider posts</a>', 'themify'), admin_url('post-new.php?post_type=slider')), 'wrap_with_class' => 'tf-group-element tf-group-element-slider'), array('id' => 'portfolio_category_slider', 'type' => 'query_category', 'label' => __('Category', 'themify'), 'options' => array('taxonomy' => 'portfolio-category'), 'help' => sprintf(__('Add more <a href="%s" target="_blank">portfolio posts</a>', 'themify'), admin_url('post-new.php?post_type=portfolio')), 'wrap_with_class' => 'tf-group-element tf-group-element-portfolio'), array('id' => 'testimonial_category_slider', 'type' => 'query_category', 'label' => __('Category', 'themify'), 'options' => array('taxonomy' => 'testimonial-category'), 'help' => sprintf(__('Add more <a href="%s" target="_blank">testimonial posts</a>', 'themify'), admin_url('post-new.php?post_type=testimonial')), 'wrap_with_class' => 'tf-group-element tf-group-element-testimonial'), array('id' => 'posts_per_page_slider', 'type' => 'text', 'label' => __('Query', 'themify'), 'class' => 'xsmall', 'help' => __('number of posts to query', 'themify'), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-portfolio tf-group-element-slider tf-group-element-testimonial'), array('id' => 'offset_slider', 'type' => 'text', 'label' => __('Offset', 'themify'), 'class' => 'xsmall', 'help' => __('number of post to displace or pass over', 'themify'), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-portfolio tf-group-element-slider tf-group-element-testimonial'), array('id' => 'order_slider', 'type' => 'select', 'label' => __('Order', 'themify'), 'help' => __('Descending = show newer posts first', 'themify'), 'options' => array('desc' => __('Descending', 'themify'), 'asc' => __('Ascending', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-testimonial'), array('id' => 'orderby_slider', 'type' => 'select', 'label' => __('Order By', 'themify'), 'options' => array('date' => __('Date', 'themify'), 'id' => __('Id', 'themify'), 'author' => __('Author', 'themify'), 'title' => __('Title', 'themify'), 'name' => __('Name', 'themify'), 'modified' => __('Modified', 'themify'), 'rand' => __('Random', 'themify'), 'comment_count' => __('Comment Count', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-testimonial'), array('id' => 'display_slider', 'type' => 'select', 'label' => __('Display', 'themify'), 'options' => array('content' => __('Content', 'themify'), 'excerpt' => __('Excerpt', 'themify'), 'none' => __('None', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-testimonial'), array('id' => 'hide_post_title_slider', 'type' => 'select', 'label' => __('Hide Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-testimonial'), array('id' => 'unlink_post_title_slider', 'type' => 'select', 'label' => __('Unlink Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio'), array('id' => 'hide_feat_img_slider', 'type' => 'select', 'label' => __('Hide Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-testimonial'), array('id' => 'unlink_feat_img_slider', 'type' => 'select', 'label' => __('Unlink Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio'), array('id' => 'open_link_new_tab_slider', 'type' => 'select', 'label' => __('Open link in a new tab', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')), 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-testimonial'), array('id' => 'img_content_slider', 'type' => 'builder', 'options' => array(array('id' => 'img_url_slider', 'type' => 'image', 'label' => __('Image URL', 'themify'), 'class' => 'xlarge'), array('id' => 'img_title_slider', 'type' => 'text', 'label' => __('Image Title', 'themify'), 'class' => 'fullwidth'), array('id' => 'img_link_slider', 'type' => 'text', 'label' => __('Image Link', 'themify'), 'class' => 'fullwidth'), array('id' => 'img_link_params', 'type' => 'select', 'label' => '&nbsp;', 'options' => array('' => '', 'lightbox' => __('Open link in lightbox', 'themify'), 'newtab' => __('Open link in new tab', 'themify'))), array('id' => 'img_caption_slider', 'type' => 'textarea', 'label' => __('Image Caption', 'themify'), 'class' => 'fullwidth', 'rows' => 6)), 'wrap_with_class' => 'tf-group-element tf-group-element-image'), array('id' => 'video_content_slider', 'type' => 'builder', 'options' => array(array('id' => 'video_url_slider', 'type' => 'text', 'label' => __('Video URL', 'themify'), 'class' => 'xlarge', 'help' => array('new_line' => true, 'text' => __('YouTube, Vimeo, etc', 'themify'))), array('id' => 'video_title_slider', 'type' => 'text', 'label' => __('Video Title', 'themify'), 'class' => 'fullwidth'), array('id' => 'video_title_link_slider', 'type' => 'text', 'label' => __('Video Title Link', 'themify'), 'class' => 'fullwidth'), array('id' => 'video_caption_slider', 'type' => 'textarea', 'label' => __('Video Caption', 'themify'), 'class' => 'fullwidth', 'rows' => 6), array('id' => 'video_width_slider', 'type' => 'text', 'label' => __('Video Width', 'themify'), 'class' => 'xsmall')), 'wrap_with_class' => 'tf-group-element tf-group-element-video'), array('id' => 'text_content_slider', 'type' => 'builder', 'options' => array(array('id' => 'text_caption_slider', 'type' => 'wp_editor', 'label' => false, 'class' => 'fullwidth builder-field', 'rows' => 6)), 'wrap_with_class' => 'tf-group-element tf-group-element-text'), array('id' => 'layout_slider', 'type' => 'layout', 'label' => __('Slider Layout', 'themify'), 'separated' => 'top', 'options' => array(array('img' => 'slider-default.png', 'value' => 'slider-default', 'label' => __('Slider Default', 'themify')), array('img' => 'slider-image-top.png', 'value' => 'slider-overlay', 'label' => __('Slider Overlay', 'themify')), array('img' => 'slider-caption-overlay.png', 'value' => 'slider-caption-overlay', 'label' => __('Slider Caption Overlay', 'themify')), array('img' => 'slider-agency.png', 'value' => 'slider-agency', 'label' => __('Agency', 'themify')))), array('id' => 'image_size_slider', 'type' => 'select', 'label' => Themify_Builder_Model::is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => Themify_Builder_Model::is_img_php_disabled() ? false : true, 'options' => $image_sizes, 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-image'), array('id' => 'img_w_slider', 'type' => 'text', 'label' => __('Image Width', 'themify'), 'class' => 'xsmall', 'help' => 'px', 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-image'), array('id' => 'img_h_slider', 'type' => 'text', 'label' => __('Image Height', 'themify'), 'class' => 'xsmall', 'help' => 'px', 'wrap_with_class' => 'tf-group-element tf-group-element-blog tf-group-element-slider tf-group-element-portfolio tf-group-element-image'), array('id' => 'slider_option_slider', 'type' => 'slider', 'label' => __('Slider Options', 'themify'), 'options' => array(array('id' => 'visible_opt_slider', 'type' => 'select', 'default' => 1, 'options' => $visible_opt, 'help' => __('Visible', 'themify')), array('id' => 'auto_scroll_opt_slider', 'type' => 'select', 'default' => 4, 'options' => $auto_scroll_opt, 'help' => __('Auto Scroll', 'themify')), array('id' => 'scroll_opt_slider', 'type' => 'select', 'options' => $visible_opt, 'help' => __('Scroll', 'themify')), array('id' => 'speed_opt_slider', 'type' => 'select', 'options' => array('normal' => __('Normal', 'themify'), 'fast' => __('Fast', 'themify'), 'slow' => __('Slow', 'themify')), 'help' => __('Speed', 'themify')), array('id' => 'effect_slider', 'type' => 'select', 'options' => array('scroll' => __('Slide', 'themify'), 'fade' => __('Fade', 'themify'), 'crossfade' => __('Cross Fade', 'themify'), 'cover' => __('Cover', 'themify'), 'cover-fade' => __('Cover Fade', 'themify'), 'uncover' => __('Uncover', 'themify'), 'uncover-fade' => __('Uncover Fade', 'themify'), 'continuously' => __('Continuously', 'themify')), 'help' => __('Effect', 'themify')), array('id' => 'pause_on_hover_slider', 'type' => 'select', 'options' => array('resume' => __('Yes', 'themify'), 'false' => __('No', 'themify')), 'help' => __('Pause On Hover', 'themify')), array('id' => 'wrap_slider', 'type' => 'select', 'help' => __('Wrap', 'themify'), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'show_nav_slider', 'type' => 'select', 'help' => __('Show slider pagination', 'themify'), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'show_arrow_slider', 'type' => 'select', 'help' => __('Show slider arrow buttons', 'themify'), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'left_margin_slider', 'type' => 'text', 'class' => 'xsmall', 'unit' => 'px', 'help' => __('Left margin space between slides', 'themify')), array('id' => 'right_margin_slider', 'type' => 'text', 'class' => 'xsmall', 'unit' => 'px', 'help' => __('Right margin space between slides', 'themify')), array('id' => 'height_slider', 'type' => 'select', 'options' => array('variable' => __('Variable', 'themify'), 'auto' => __('Auto', 'themify')), 'help' => __('Height <small class="description">"Auto" measures the highest slide and all other slides will be set to that size. "Variable" makes every slide has it\'s own height.</small>', 'themify')))));
     return $options;
 }
예제 #3
0
 public function get_options()
 {
     $options = array(array('id' => 'mod_title_gallery', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_gallery', 'type' => 'radio', 'label' => __('Gallery Layout', 'themify'), 'options' => array('grid' => __('Grid', 'themify'), 'showcase' => __('Showcase', 'themify'), 'lightboxed' => __('Lightboxed', 'themify')), 'default' => 'grid', 'option_js' => true), array('id' => 'thumbnail_gallery', 'type' => 'image', 'label' => __('Thumbnail', 'themify'), 'class' => 'large', 'wrap_with_class' => 'tf-group-element tf-group-element-lightboxed'), array('id' => 'shortcode_gallery', 'type' => 'textarea', 'class' => 'fullwidth tf-shortcode-input', 'label' => __('Insert Gallery Shortcode', 'themify'), 'help' => sprintf('<a href="#" class="builder_button tf-gallery-btn">%s</a>', __('Insert Gallery', 'themify'))), array('id' => 'thumb_w_gallery', 'type' => 'text', 'label' => __('Thumbnail Width', 'themify'), 'class' => 'xsmall', 'hide' => Themify_Builder_Model::is_img_php_disabled() ? true : false, 'help' => 'px'), array('id' => 'thumb_h_gallery', 'type' => 'text', 'label' => __('Thumbnail Height', 'themify'), 'class' => 'xsmall', 'hide' => Themify_Builder_Model::is_img_php_disabled() ? true : false, 'help' => 'px'), array('id' => 'image_size_gallery', 'type' => 'select', 'label' => Themify_Builder_Model::is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => Themify_Builder_Model::is_img_php_disabled() ? false : true, 'options' => themify_get_image_sizes_list(false)), array('id' => 'appearance_gallery', 'type' => 'checkbox', 'label' => __('Image Appearance', 'themify'), 'options' => array(array('name' => 'rounded', 'value' => __('Rounded', 'themify')), array('name' => 'drop-shadow', 'value' => __('Drop Shadow', 'themify')), array('name' => 'bordered', 'value' => __('Bordered', 'themify')), array('name' => 'circle', 'value' => __('Circle', 'themify'), 'help' => __('(square format image only)', 'themify')))));
     return $options;
 }
예제 #4
0
/**
 * Outputs Image Script module in theme settings.
 */
function themify_img_settings($data = array())
{
    $feature_sizes = themify_get_image_sizes_list();
    $checked_use = '';
    if (themify_check('setting-img_settings_use')) {
        $checked_use = "checked='checked'";
    }
    $output = '
		<div class="module">
			<div class="themify-info-link">' . sprintf(__('The image script is used to generate images dynamically in any dimension. For more info about the image script, refer to the <a href="%s">Image Script</a> documentation.', 'themify'), 'http://themify.me/docs/image-script') . '
			</div>
			<fieldset>
			<div class="label">' . __('Disable', 'themify') . '</div> 
			<div class="row">
				<label for="setting-img_settings_use"><input type="checkbox" id="setting-img_settings_use" name="setting-img_settings_use" class="disable_img_php" ' . $checked_use . '/> ' . __('Disable image script globally', 'themify') . '</label><br/>
				<small>' . __('Default WordPress image sizes or original images will be used.', 'themify') . '</small>
				<br/>
			</div>
			<div class="show_if_disabled_img_php">
				<div class="label">' . __('Default Featured Image Size', 'themify') . '</div>
				<div class="show_if_disabled_img_php row">
					<select name="setting-global_feature_size">';
    foreach ($feature_sizes as $option) {
        if ($option['value'] == themify_get('setting-global_feature_size')) {
            $output .= '<option value="' . $option['value'] . '" selected="selected">';
            $output .= $option['name'];
            $output .= '</option>';
        } else {
            $output .= '<option value="' . $option['value'] . '">' . $option['name'] . '</option>';
        }
    }
    $output .= '
					</select>
				</div>
			</div>
			</fieldset>
			<!-- BEGIN Show if image script is enabled -->
			<div class="show_if_enabled_img_php">
				<fieldset>
					<span class="label">' . __('Retina Images', 'themify') . '</span>
					<div class="row">
						<label for="setting-enable_retina_desktop"><input type="checkbox" id="setting-enable_retina_desktop" name="setting-enable_retina_desktop" ' . checked(themify_check('setting-enable_retina_desktop'), 1, false) . '/> ' . __('Enable Retina Image on desktop devices.', 'themify') . '</label><br/>
						<br/>
						<label for="setting-enable_retina_mobile" class="pushlabel"><input type="checkbox" id="setting-enable_retina_mobile" name="setting-enable_retina_mobile" ' . checked(themify_check('setting-enable_retina_mobile'), 1, false) . '/> ' . __('Enable Retina Image on mobile devices.', 'themify') . '</label><br/>
						<span class="pushlabel"><small>' . __('When Retina Image is enabled, it will display 2-times resolution images to the devices that have retina display (eg. if the image is 200x200px, retina image would be 400x400px).', 'themify') . '</small></span>
					</div>
				</fieldset>
			</div>
			<!-- END Show if image script is enabled -->
		</div>';
    return $output;
}
예제 #5
0
/**
 * Display select element with featured image sizes + blank slot
 * @param String $key setting name
 * @return String
 * @since 1.1.5
 */
function themify_feature_image_sizes_select($key = '')
{
    /** Define WP Featured Image sizes + blank + Themify's image script
     * @var array */
    $themify_layout_feature_sizes = themify_get_image_sizes_list();
    $output = '<p class="show_if_disabled_img_php">
				<span class="label">' . __('Featured Image Size', 'themify') . '</span>
				<select name="' . esc_attr('setting-' . $key) . '">';
    foreach ($themify_layout_feature_sizes as $option) {
        if ($option['value'] == themify_get('setting-' . $key . '')) {
            $output .= '<option value="' . esc_attr($option['value']) . '" selected="selected">';
            $output .= esc_html($option['name']);
            $output .= '</option>';
        } else {
            $output .= '<option value="' . esc_attr($option['value']) . '">' . esc_html($option['name']) . '</option>';
        }
    }
    $output .= '</select></p>';
    return $output;
}
예제 #6
0
<?php

if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
/**
 * Module Name: Gallery
 * Description: Display WP Gallery Images
 */
class TB_Gallery_Module extends Themify_Builder_Module
{
    function __construct()
    {
        parent::__construct(array('name' => __('Gallery', 'themify'), 'slug' => 'gallery'));
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
Themify_Builder_Model::register_module('TB_Gallery_Module', apply_filters('themify_builder_module_gallery', array('options' => array(array('id' => 'mod_title_gallery', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_gallery', 'type' => 'layout', 'label' => __('Gallery Layout', 'themify'), 'options' => array(array('img' => 'grid4.png', 'value' => 'grid', 'label' => __('Grid', 'themify')), array('img' => 'showcase.png', 'value' => 'showcase', 'label' => __('Showcase', 'themify')))), array('id' => 'shortcode_gallery', 'type' => 'textarea', 'class' => 'fullwidth tf-shortcode-input', 'label' => __('Insert Gallery Shortcode', 'themify'), 'help' => sprintf('<a href="#" class="builder_button tf-gallery-btn">%s</a>', __('Insert Gallery', 'themify'))), array('id' => 'thumb_w_gallery', 'type' => 'text', 'label' => __('Thumbnail Width', 'themify'), 'class' => 'xsmall', 'hide' => $this->is_img_php_disabled() ? true : false, 'help' => 'px'), array('id' => 'thumb_h_gallery', 'type' => 'text', 'label' => __('Thumbnail Height', 'themify'), 'class' => 'xsmall', 'hide' => $this->is_img_php_disabled() ? true : false, 'help' => 'px'), array('id' => 'image_size_gallery', 'type' => 'select', 'label' => $this->is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => $this->is_img_php_disabled() ? false : true, 'options' => themify_get_image_sizes_list(false)), array('id' => 'appearance_gallery', 'type' => 'checkbox', 'label' => __('Image Appearance', 'themify'), 'default' => 'rounded', 'options' => array(array('name' => 'rounded', 'value' => __('Rounded', 'themify')), array('name' => 'drop-shadow', 'value' => __('Drop Shadow', 'themify')), array('name' => 'bordered', 'value' => __('Bordered', 'themify')), array('name' => 'circle', 'value' => __('Circle', 'themify'), 'help' => __('(square format image only)', 'themify'))))), 'styling' => array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify'), 'class' => ''), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_gallery', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')))), 'styling_selector' => array('.module-gallery' => array('background_color', 'font_family', 'font_size', 'line_height', 'text_align', 'padding', 'margin', 'border_top', 'border_right', 'border_bottom', 'border_left'), '.module-gallery a' => array('link_color', 'text_decoration')))));
예제 #7
0
            }
            if ($position = get_post_meta($post->ID, '_testimonial_position', true)) {
                $out .= '<em class="testimonial-title">' . $position;
            }
            if ($link = get_post_meta($post->ID, '_testimonial_link', true)) {
                if ($position) {
                    $out .= ', ';
                } else {
                    $out .= '<em class="testimonial-title">';
                }
                $out .= '<a href="' . esc_url($link) . '">';
            }
            if ($company = get_post_meta($post->ID, '_testimonial_company', true)) {
                $out .= $company;
            } else {
                $out .= $link;
            }
            if ($link) {
                $out .= '</a>';
            }
            $out .= '</em>';
            return $out;
        }
        return '';
    }
}
///////////////////////////////////////
// Module Options
///////////////////////////////////////
$image_sizes = themify_get_image_sizes_list(false);
Themify_Builder_Model::register_module('TB_Testimonial_Module', apply_filters('themify_builder_module_testimonial', array('options' => array(array('id' => 'mod_title_testimonial', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_testimonial', 'type' => 'layout', 'label' => __('Testimonial Layout', 'themify'), 'options' => array(array('img' => 'grid4.png', 'value' => 'grid4', 'label' => __('Grid 4', 'themify')), array('img' => 'grid3.png', 'value' => 'grid3', 'label' => __('Grid 3', 'themify')), array('img' => 'grid2.png', 'value' => 'grid2', 'label' => __('Grid 2', 'themify')), array('img' => 'fullwidth.png', 'value' => 'fullwidth', 'label' => __('fullwidth', 'themify')))), array('id' => 'category_testimonial', 'type' => 'query_category', 'label' => __('Category', 'themify'), 'options' => array('taxonomy' => 'testimonial-category'), 'help' => sprintf(__('Add more <a href="%s" target="_blank">testimonials</a>', 'themify'), admin_url('post-new.php?post_type=testimonial'))), array('id' => 'post_per_page_testimonial', 'type' => 'text', 'label' => __('Limit', 'themify'), 'class' => 'xsmall', 'help' => __('number of posts to show', 'themify')), array('id' => 'offset_testimonial', 'type' => 'text', 'label' => __('Offset', 'themify'), 'class' => 'xsmall', 'help' => __('number of post to displace or pass over', 'themify')), array('id' => 'order_testimonial', 'type' => 'select', 'label' => __('Order', 'themify'), 'help' => __('Descending = show newer posts first', 'themify'), 'options' => array('desc' => __('Descending', 'themify'), 'asc' => __('Ascending', 'themify'))), array('id' => 'orderby_testimonial', 'type' => 'select', 'label' => __('Order By', 'themify'), 'options' => array('date' => __('Date', 'themify'), 'id' => __('Id', 'themify'), 'author' => __('Author', 'themify'), 'title' => __('Title', 'themify'), 'name' => __('Name', 'themify'), 'modified' => __('Modified', 'themify'), 'rand' => __('Rand', 'themify'), 'comment_count' => __('Comment Count', 'themify'))), array('id' => 'display_testimonial', 'type' => 'select', 'label' => __('Display', 'themify'), 'options' => array('content' => __('Content', 'themify'), 'excerpt' => __('Excerpt', 'themify'), 'none' => __('None', 'themify'))), array('id' => 'hide_feat_img_testimonial', 'type' => 'select', 'label' => __('Hide Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'image_size_testimonial', 'type' => 'select', 'label' => $this->is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => $this->is_img_php_disabled() ? false : true, 'options' => $image_sizes), array('id' => 'img_width_testimonial', 'type' => 'text', 'label' => __('Image Width', 'themify'), 'class' => 'xsmall'), array('id' => 'img_height_testimonial', 'type' => 'text', 'label' => __('Image Height', 'themify'), 'class' => 'xsmall'), array('id' => 'hide_post_title_testimonial', 'type' => 'select', 'label' => __('Hide Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_page_nav_testimonial', 'type' => 'select', 'label' => __('Hide Page Navigation', 'themify'), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify')))), 'styling' => array(array('id' => 'separator_animation', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Animation', 'themify') . '</h4>')), array('id' => 'animation_effect', 'type' => 'animation_select', 'label' => __('Effect', 'themify')), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_image_background', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Background', 'themify') . '</h4>')), array('id' => 'background_color', 'type' => 'color', 'label' => __('Background Color', 'themify'), 'class' => 'small'), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_font', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Font', 'themify') . '</h4>')), array('id' => 'font_family', 'type' => 'font_select', 'label' => __('Font Family', 'themify'), 'class' => 'font-family-select'), array('id' => 'font_color', 'type' => 'color', 'label' => __('Font Color', 'themify'), 'class' => 'small'), array('id' => 'multi_font_size', 'type' => 'multi', 'label' => __('Font Size', 'themify'), 'fields' => array(array('id' => 'font_size', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'font_size_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')))))), array('id' => 'multi_line_height', 'type' => 'multi', 'label' => __('Line Height', 'themify'), 'fields' => array(array('id' => 'line_height', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'line_height_unit', 'type' => 'select', 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'px', 'name' => __('px', 'themify')), array('value' => 'em', 'name' => __('em', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'text_align', 'label' => __('Text Align', 'themify'), 'type' => 'radio', 'meta' => array(array('value' => '', 'name' => __('Default', 'themify'), 'selected' => true), array('value' => 'left', 'name' => __('Left', 'themify')), array('value' => 'center', 'name' => __('Center', 'themify')), array('value' => 'right', 'name' => __('Right', 'themify')), array('value' => 'justify', 'name' => __('Justify', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_link', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Link', 'themify') . '</h4>')), array('id' => 'link_color', 'type' => 'color', 'label' => __('Color', 'themify'), 'class' => 'small'), array('id' => 'text_decoration', 'type' => 'select', 'label' => __('Text Decoration', 'themify'), 'meta' => array(array('value' => '', 'name' => '', 'selected' => true), array('value' => 'underline', 'name' => __('Underline', 'themify')), array('value' => 'overline', 'name' => __('Overline', 'themify')), array('value' => 'line-through', 'name' => __('Line through', 'themify')), array('value' => 'none', 'name' => __('None', 'themify')))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_padding', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Padding', 'themify') . '</h4>')), array('id' => 'multi_padding_top', 'type' => 'multi', 'label' => __('Padding', 'themify'), 'fields' => array(array('id' => 'padding_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_padding_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'padding_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'padding_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_margin', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Margin', 'themify') . '</h4>')), array('id' => 'multi_margin_top', 'type' => 'multi', 'label' => __('Margin', 'themify'), 'fields' => array(array('id' => 'margin_top', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_top_unit', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_right', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_right_unit', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_bottom', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_bottom_unit', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('id' => 'multi_margin_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'margin_left', 'type' => 'text', 'class' => 'xsmall'), array('id' => 'margin_left_unit', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify')), array('value' => '%', 'name' => __('%', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr />')), array('id' => 'separator_border', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Border', 'themify') . '</h4>')), array('id' => 'multi_border_top', 'type' => 'multi', 'label' => __('Border', 'themify'), 'fields' => array(array('id' => 'border_top_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_top_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_top_style', 'type' => 'select', 'description' => __('top', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_right', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_right_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_right_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_right_style', 'type' => 'select', 'description' => __('right', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_bottom', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_bottom_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_bottom_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_bottom_style', 'type' => 'select', 'description' => __('bottom', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('id' => 'multi_border_left', 'type' => 'multi', 'label' => '', 'fields' => array(array('id' => 'border_left_color', 'type' => 'color', 'class' => 'small'), array('id' => 'border_left_width', 'type' => 'text', 'description' => 'px', 'class' => 'xsmall'), array('id' => 'border_left_style', 'type' => 'select', 'description' => __('left', 'themify'), 'meta' => array(array('value' => '', 'name' => ''), array('value' => 'solid', 'name' => __('Solid', 'themify')), array('value' => 'dashed', 'name' => __('Dashed', 'themify')), array('value' => 'dotted', 'name' => __('Dotted', 'themify')), array('value' => 'double', 'name' => __('Double', 'themify')))))), array('type' => 'separator', 'meta' => array('html' => '<hr/>')), array('id' => 'css_testimonial', 'type' => 'text', 'label' => __('Additional CSS Class', 'themify'), 'class' => 'large exclude-from-reset-field', 'description' => sprintf('<br/><small>%s</small>', __('Add additional CSS class(es) for custom styling', 'themify')))), 'styling_selector' => array('.module-testimonial .post' => array('background_color', 'font_family', 'font_size', 'line_height', 'text_align', 'color', 'padding', 'margin', 'border_top', 'border_right', 'border_bottom', 'border_left'), '.module-testimonial a' => array('link_color', 'text_decoration'), '.module-testimonial .post-title' => array('font_family', 'color'), '.module-testimonial .post-title a' => array('font_family', 'color')))));
예제 #8
0
 public function get_options()
 {
     $image_sizes = themify_get_image_sizes_list(false);
     $options = array(array('id' => 'mod_title_image', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'style_image', 'type' => 'layout', 'label' => __('Image Style', 'themify'), 'options' => array(array('img' => 'image-top.png', 'value' => 'image-top', 'label' => __('Image Top', 'themify')), array('img' => 'image-left.png', 'value' => 'image-left', 'label' => __('Image Left', 'themify')), array('img' => 'image-right.png', 'value' => 'image-right', 'label' => __('Image Right', 'themify')), array('img' => 'image-overlay.png', 'value' => 'image-overlay', 'label' => __('Image Overlay', 'themify')), array('img' => 'image-center.png', 'value' => 'image-center', 'label' => __('Centered Image', 'themify')))), array('id' => 'url_image', 'type' => 'image', 'label' => __('Image URL', 'themify'), 'class' => 'xlarge'), array('id' => 'appearance_image', 'type' => 'checkbox', 'label' => __('Image Appearance', 'themify'), 'options' => array(array('name' => 'rounded', 'value' => __('Rounded', 'themify')), array('name' => 'drop-shadow', 'value' => __('Drop Shadow', 'themify')), array('name' => 'bordered', 'value' => __('Bordered', 'themify')), array('name' => 'circle', 'value' => __('Circle', 'themify'), 'help' => __('(square format image only)', 'themify')))), array('id' => 'image_size_image', 'type' => 'select', 'label' => Themify_Builder_Model::is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => Themify_Builder_Model::is_img_php_disabled() ? false : true, 'options' => $image_sizes), array('id' => 'width_image', 'type' => 'text', 'label' => __('Width', 'themify'), 'class' => 'xsmall', 'help' => 'px', 'value' => ''), array('id' => 'auto_fullwidth', 'type' => 'checkbox', 'pushed' => 'pushed', 'options' => array(array('name' => '1', 'value' => __('Auto fullwidth image', 'themify')))), array('id' => 'height_image', 'type' => 'text', 'label' => __('Height', 'themify'), 'class' => 'xsmall', 'help' => 'px', 'value' => ''), array('id' => 'title_image', 'type' => 'text', 'label' => __('Image Title', 'themify'), 'class' => 'fullwidth'), array('id' => 'link_image', 'type' => 'text', 'label' => __('Image Link', 'themify'), 'class' => 'fullwidth'), array('id' => 'param_image', 'type' => 'checkbox', 'label' => false, 'pushed' => 'pushed', 'options' => array(array('name' => 'lightbox', 'value' => __('Open link in lightbox', 'themify')), array('name' => 'zoom', 'value' => __('Show zoom icon', 'themify')), array('name' => 'newtab', 'value' => __('Open link in new tab', 'themify'))), 'new_line' => false), array('id' => 'alt_image', 'type' => 'text', 'label' => __('Image Alt', 'themify'), 'class' => 'fullwidth'), array('id' => 'caption_image', 'type' => 'textarea', 'label' => __('Image Caption', 'themify'), 'class' => 'fullwidth'));
     return $options;
 }
 public function get_options()
 {
     $image_sizes = themify_get_image_sizes_list(false);
     $options = array(array('id' => 'mod_title_highlight', 'type' => 'text', 'label' => __('Module Title', 'themify'), 'class' => 'large'), array('id' => 'layout_highlight', 'type' => 'layout', 'label' => __('Highlight Layout', 'themify'), 'options' => array(array('img' => 'grid4.png', 'value' => 'grid4', 'label' => __('Grid 4', 'themify')), array('img' => 'grid3.png', 'value' => 'grid3', 'label' => __('Grid 3', 'themify')), array('img' => 'grid2.png', 'value' => 'grid2', 'label' => __('Grid 2', 'themify')), array('img' => 'fullwidth.png', 'value' => 'fullwidth', 'label' => __('fullwidth', 'themify')))), array('id' => 'type_query_highlight', 'type' => 'radio', 'label' => __('Query by', 'themify'), 'options' => array('category' => __('Category', 'themify'), 'post_slug' => __('Slug', 'themify')), 'default' => 'category', 'option_js' => true), array('id' => 'category_highlight', 'type' => 'query_category', 'label' => __('Category', 'themify'), 'options' => array('taxonomy' => 'highlight-category'), 'help' => sprintf(__('Add more <a href="%s" target="_blank">highlight posts</a>', 'themify'), admin_url('post-new.php?post_type=highlight')), 'wrap_with_class' => 'tf-group-element tf-group-element-category'), array('id' => 'query_slug_highlight', 'type' => 'text', 'label' => __('Highlight Slugs', 'themify'), 'class' => 'large', 'wrap_with_class' => 'tf-group-element tf-group-element-post_slug', 'help' => '<br/>' . __('Insert Highlight slug. Multiple slug should be separated by comma (,)', 'themify')), array('id' => 'post_per_page_highlight', 'type' => 'text', 'label' => __('Limit', 'themify'), 'class' => 'xsmall', 'help' => __('number of posts to show', 'themify')), array('id' => 'offset_highlight', 'type' => 'text', 'label' => __('Offset', 'themify'), 'class' => 'xsmall', 'help' => __('number of post to displace or pass over', 'themify')), array('id' => 'order_highlight', 'type' => 'select', 'label' => __('Order', 'themify'), 'help' => __('Descending = show newer posts first', 'themify'), 'options' => array('desc' => __('Descending', 'themify'), 'asc' => __('Ascending', 'themify'))), array('id' => 'orderby_highlight', 'type' => 'select', 'label' => __('Order By', 'themify'), 'options' => array('date' => __('Date', 'themify'), 'id' => __('Id', 'themify'), 'author' => __('Author', 'themify'), 'title' => __('Title', 'themify'), 'name' => __('Name', 'themify'), 'modified' => __('Modified', 'themify'), 'rand' => __('Rand', 'themify'), 'comment_count' => __('Comment Count', 'themify'))), array('id' => 'display_highlight', 'type' => 'select', 'label' => __('Display', 'themify'), 'options' => array('content' => __('Content', 'themify'), 'excerpt' => __('Excerpt', 'themify'), 'none' => __('None', 'themify'))), array('id' => 'hide_feat_img_highlight', 'type' => 'select', 'label' => __('Hide Featured Image', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'image_size_highlight', 'type' => 'select', 'label' => Themify_Builder_Model::is_img_php_disabled() ? __('Image Size', 'themify') : false, 'empty' => array('val' => '', 'label' => ''), 'hide' => Themify_Builder_Model::is_img_php_disabled() ? false : true, 'options' => $image_sizes), array('id' => 'img_width_highlight', 'type' => 'text', 'label' => __('Image Width', 'themify'), 'class' => 'xsmall'), array('id' => 'img_height_highlight', 'type' => 'text', 'label' => __('Image Height', 'themify'), 'class' => 'xsmall'), array('id' => 'hide_post_title_highlight', 'type' => 'select', 'label' => __('Hide Post Title', 'themify'), 'empty' => array('val' => '', 'label' => ''), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))), array('id' => 'hide_page_nav_highlight', 'type' => 'select', 'label' => __('Hide Page Navigation', 'themify'), 'options' => array('yes' => __('Yes', 'themify'), 'no' => __('No', 'themify'))));
     return $options;
 }
예제 #10
0
/**
 * Outputs Image Script module in theme settings.
 */
function themify_img_settings($data = array())
{
    $feature_sizes = themify_get_image_sizes_list();
    $checked_use = '';
    if (themify_check('setting-img_settings_use')) {
        $checked_use = "checked='checked'";
    }
    $output = '
		<div class="module">
			<div class="themify-info-link">' . sprintf(__('The image script is used to generate featured images dynamically in any dimension. If your images are cropped manually, disable it for faster performance. For more info about the image script, refer to the <a href="%s">Image Script</a> documentation.', 'themify'), 'http://themify.me/docs/image-script') . '
			</div>
			<fieldset>
			<div class="label">' . __('Disable', 'themify') . '</div> 
			<div class="row">
				<label for="setting-img_settings_use"><input type="checkbox" id="setting-img_settings_use" name="setting-img_settings_use" class="disable_img_php" ' . $checked_use . '/> ' . __('Disable image script globally', 'themify') . '</label><br/>
				<small class="pushlabel">' . __('Default WordPress image sizes or original images will be used.', 'themify') . '</small>
				<br/>
			</div>
			<div class="show_if_disabled_img_php">
				<div class="label">' . __('Default Featured Image Size', 'themify') . '</div>
				<div class="show_if_disabled_img_php row">
					<select name="setting-global_feature_size">';
    foreach ($feature_sizes as $option) {
        if ($option['value'] == themify_get('setting-global_feature_size')) {
            $output .= '<option value="' . esc_attr($option['value']) . '" selected="selected">';
            $output .= $option['name'];
            $output .= '</option>';
        } else {
            $output .= '<option value="' . esc_attr($option['value']) . '">' . $option['name'] . '</option>';
        }
    }
    $output .= '
					</select>
				</div>
			</div>
			</fieldset>
			
		</div>';
    return $output;
}