/**
 * Portfolio Meta Box Options
 * @param array $args
 * @return array
 * @since 1.0.7
 */
function themify_theme_portfolio_meta_box($args = array())
{
    extract($args);
    return array(array('name' => 'content_width', 'title' => __('Content Width', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => array(array('value' => 'default_width', 'img' => 'themify/img/default.png', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'full_width', 'img' => 'themify/img/fullwidth.png', 'title' => __('Fullwidth', 'themify')))), array('name' => 'post_image', 'title' => __('Featured Image', 'themify'), 'description' => '', 'type' => 'image', 'meta' => array()), array('name' => 'gallery_shortcode', 'title' => __('Slider Gallery', 'themify'), 'description' => '', 'type' => 'gallery_shortcode'), array('name' => 'media_type', 'title' => __('Show Media', 'themify'), 'description' => __('Show whether the featured image or gallery slider on the index view.', 'themify'), 'type' => 'dropdown', 'meta' => array(array('value' => 'slider', 'name' => __('Slider', 'themify'), 'selected' => true), array('value' => 'image', 'name' => __('Image', 'themify')))), array('name' => 'feature_size', 'title' => __('Image Size', 'themify'), 'description' => sprintf(__('Image sizes can be set at <a href="%s">Media Settings</a> and <a href="%s">Regenerated</a>', 'themify'), 'options-media.php', 'admin.php?page=themify_regenerate-thumbnails'), 'type' => 'featimgdropdown'), themify_image_dimensions_field(), array("name" => "hide_post_title", "title" => __('Hide Post Title', 'themify'), "description" => '', "type" => 'dropdown', "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "unlink_post_title", "title" => __('Unlink Post Title', 'themify'), "description" => __('Unlink post title (it will display the post title without link)', 'themify'), "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "hide_post_date", "title" => __('Hide Post Date', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "hide_post_meta", "title" => __('Hide Post Meta', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "hide_post_image", "title" => __('Hide Featured Image', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "unlink_post_image", "title" => __('Unlink Featured Image', 'themify'), "description" => __('Display the Featured Image without link', 'themify'), "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array('name' => 'external_link', 'title' => __('External Link', 'themify'), 'description' => __('Link Featured Image to external URL', 'themify'), 'type' => 'textbox', 'meta' => array()), themify_lightbox_link_field(), array('name' => 'post_id_info', 'title' => __('Shortcode ID', 'themify'), 'description' => __('To show this use [portfolio id="%s"]', 'themify'), 'type' => 'post_id_info'));
}
/**
 * Post Meta Box Options
 * @param array $args
 * @return array
 * @since 1.0.0
 */
function themify_theme_post_meta_box($args = array())
{
    return array(array('name' => 'layout', 'title' => __('Sidebar Option', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => array(array('value' => 'default', 'img' => 'images/layout-icons/default.png', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'sidebar1', 'img' => 'images/layout-icons/sidebar1.png', 'title' => __('Sidebar Right', 'themify')), array('value' => 'sidebar1 sidebar-left', 'img' => 'images/layout-icons/sidebar1-left.png', 'title' => __('Sidebar Left', 'themify')), array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'title' => __('No Sidebar ', 'themify')))), array('name' => 'content_width', 'title' => __('Content Width', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => array(array('value' => 'default_width', 'img' => 'themify/img/default.png', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'full_width', 'img' => 'themify/img/fullwidth.png', 'title' => __('Fullwidth', 'themify')))), array('name' => 'post_image', 'title' => __('Featured Image', 'themify'), 'description' => '', 'type' => 'image', 'meta' => array()), array('name' => 'feature_size', 'title' => __('Image Size', 'themify'), 'description' => sprintf(__('Image sizes can be set at <a href="%s">Media Settings</a> and <a href="%s">Regenerated</a>', 'themify'), 'options-media.php', 'admin.php?page=regenerate-thumbnails'), 'type' => 'featimgdropdown'), themify_image_dimensions_field(), array('name' => 'imagefilter_options', 'title' => __('Image Filter', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('name' => '', 'value' => 'initial'), array('name' => __('None', 'themify'), 'value' => 'none'), array('name' => __('Grayscale', 'themify'), 'value' => 'grayscale'), array('name' => __('Sepia', 'themify'), 'value' => 'sepia'), array('name' => __('Blur', 'themify'), 'value' => 'blur'))), array('name' => 'imagefilter_options_hover', 'title' => __('Image Hover Filter', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('name' => '', 'value' => 'initial'), array('name' => __('None', 'themify'), 'value' => 'none'), array('name' => __('Grayscale', 'themify'), 'value' => 'grayscale'), array('name' => __('Sepia', 'themify'), 'value' => 'sepia'), array('name' => __('Blur', 'themify'), 'value' => 'blur'))), array('name' => 'imagefilter_applyto', 'title' => __('Apply to', 'themify'), 'description' => sprintf(__('Theme Default = can be set in <a href="%s" target="_blank">Themify > Settings > Theme Settings</a>', 'themify'), admin_url('admin.php?page=themify#setting-theme_settings')), 'type' => 'radio', 'meta' => array(array('value' => 'initial', 'name' => __('Theme Default', 'themify'), 'selected' => true), array('value' => 'featured-only', 'name' => __('Featured Images Only', 'themify')), array('value' => 'all', 'name' => __('All Images', 'themify')))), array('name' => 'hide_post_title', 'title' => __('Hide Post Title', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'unlink_post_title', 'title' => __('Unlink Post Title', 'themify'), 'description' => __('Unlink post title (it will display the post title without link)', 'themify'), 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), themify_multi_meta_field(), array('name' => 'hide_post_date', 'title' => __('Hide Post Date', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'hide_post_image', 'title' => __('Hide Featured Image', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'unlink_post_image', 'title' => __('Unlink Featured Image', 'themify'), 'description' => __('Display the Featured Image without link', 'themify'), 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'video_url', 'title' => __('Video URL', 'themify'), 'description' => __('Replace Featured Image with a video embed URL such as YouTube or Vimeo video url (<a href="http://themify.me/docs/video-embeds">details</a>).', 'themify'), 'type' => 'textbox', 'meta' => array()), array('name' => 'external_link', 'title' => __('External Link', 'themify'), 'description' => __('Link Featured Image and Post Title to external URL', 'themify'), 'type' => 'textbox', 'meta' => array()), themify_lightbox_link_field(), array('name' => 'custom_menu', 'title' => __('Custom Menu', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => $args['nav_menus']));
}
Пример #3
0
/**
 * Post Meta Box Options
 * @param array $args
 * @return array
 * @since 1.0.7
 */
function themify_theme_post_meta_box($args = array())
{
    extract($args);
    return array(array('name' => 'layout', 'title' => __('Sidebar Option', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => array(array('value' => 'default', 'img' => 'images/layout-icons/default.png', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'sidebar1', 'img' => 'images/layout-icons/sidebar1.png', 'title' => __('Sidebar Right', 'themify')), array('value' => 'sidebar1 sidebar-left', 'img' => 'images/layout-icons/sidebar1-left.png', 'title' => __('Sidebar Left', 'themify')), array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'title' => __('No Sidebar ', 'themify')))), array('name' => 'content_width', 'title' => __('Content Width', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => array(array('value' => 'default_width', 'img' => 'themify/img/default.png', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'full_width', 'img' => 'themify/img/fullwidth.png', 'title' => __('Fullwidth', 'themify')))), array('name' => 'post_image', 'title' => __('Featured Image', 'themify'), 'description' => '', 'type' => 'image', 'meta' => array()), array('name' => 'feature_size', 'title' => __('Image Size', 'themify'), 'description' => sprintf(__('Image sizes can be set at <a href="%s">Media Settings</a> and <a href="%s">Regenerated</a>', 'themify'), 'options-media.php', 'admin.php?page=themify_regenerate-thumbnails'), 'type' => 'featimgdropdown'), themify_image_dimensions_field(), array('name' => 'hide_post_title', 'title' => __('Hide Post Title', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'unlink_post_title', 'title' => __('Unlink Post Title', 'themify'), 'description' => __('Unlink post title (it will display the post title without link)', 'themify'), 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), themify_multi_meta_field(), array('name' => 'hide_post_date', 'title' => __('Hide Post Date', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'hide_post_image', 'title' => __('Hide Featured Image', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'unlink_post_image', 'title' => __('Unlink Featured Image', 'themify'), 'description' => __('Display the Featured Image without link', 'themify'), 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'video_url', 'title' => __('Video URL', 'themify'), 'description' => __('Video embed URL such as YouTube or Vimeo video url (<a href="http://themify.me/docs/video-embeds">details</a>).', 'themify'), 'type' => 'textbox', 'meta' => array()), array('name' => 'external_link', 'title' => __('External Link', 'themify'), 'description' => __('Link Featured Image to external URL', 'themify'), 'type' => 'textbox', 'meta' => array()), themify_lightbox_link_field());
}
/**
 * Portfolio Meta Box Options
 * @param array $args
 * @return array
 * @since 1.0.7
 */
function themify_theme_testimonial_meta_box($args = array())
{
    extract($args);
    return array(array('name' => 'post_image', 'title' => __('Featured Image', 'themify'), 'description' => '', 'type' => 'image', 'meta' => array()), array('name' => 'feature_size', 'title' => __('Image Size', 'themify'), 'description' => sprintf(__('Image sizes can be set at <a href="%s">Media Settings</a> and <a href="%s">Regenerated</a>', 'themify'), 'options-media.php', 'admin.php?page=themify_regenerate-thumbnails'), 'type' => 'featimgdropdown'), themify_image_dimensions_field(), array('name' => 'testimonial_name', 'title' => __('Author Name', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array()), array('name' => 'testimonial_title', 'title' => __('Title', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array()), array('name' => 'external_link', 'title' => __('External Link', 'themify'), 'description' => __('Link Featured Image to external URL', 'themify'), 'type' => 'textbox', 'meta' => array()), themify_lightbox_link_field(), array('name' => 'post_id_info', 'title' => __('Shortcode ID', 'themify'), 'description' => __('To show this use [testimonial id="%s"]'), 'type' => 'post_id_info'));
}
 * Post Styles Meta Box Options
 * @var array
 */
$section_meta_box = array(array('name' => 'section_width', 'title' => __('Section Width', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => array(array('value' => 'default', 'img' => 'images/layout-icons/default.png', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'fullwidth', 'img' => 'images/layout-icons/slider-image-only.png', 'title' => __('Fullwidth', 'themify')))), array('name' => 'section_type', 'title' => __('Section Type', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => array(array('value' => 'default', 'img' => 'images/layout-icons/default.png', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'message', 'img' => 'images/layout-icons/type-text.png', 'selected' => true, 'title' => __('Message', 'themify')), array('value' => 'video', 'img' => 'images/layout-icons/type-video.png', 'title' => __('Video', 'themify')), array('value' => 'slider', 'img' => 'images/layout-icons/type-slider.png', 'title' => __('Slider', 'themify'))), 'enable_toggle' => true), array('name' => 'video_url', 'title' => __('Video URL', 'themify'), 'description' => __('Video embed URL such as YouTube or Vimeo video url (<a href="http://themify.me/docs/video-embeds">details</a>).', 'themify'), 'type' => 'textbox', 'meta' => array(), 'toggle' => 'video-toggle'), array('name' => 'slider_gallery', 'title' => __('Slider Gallery', 'themify'), 'description' => '', 'type' => 'gallery_shortcode', 'toggle' => 'slider-toggle'), array('name' => 'hide_section_title', 'title' => __('Hide Section Title', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'hide_section_subtitle', 'title' => __('Hide Section Subtitle', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'separator_font', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Section Font') . '</h4><hr class="meta_fields_separator"/>')), array('type' => 'multi', 'name' => 'multi_font', 'title' => __('Font', 'themify'), 'meta' => array('fields' => array(array('name' => 'font_size', 'label' => '', 'description' => '', 'type' => 'textbox', 'meta' => array('size' => 'small'), 'before' => '', 'after' => ''), array('name' => 'font_size_unit', 'label' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify'), 'selected' => true), array('value' => 'em', 'name' => __('em', 'themify'))), 'before' => '', 'after' => ''), array('name' => 'font_family', 'label' => '', 'type' => 'dropdown', 'meta' => array_merge($fonts_list, $google_fonts_list), 'before' => '', 'after' => '')), 'description' => '', 'before' => '', 'after' => '', 'separator' => '')), array('name' => 'font_color', 'title' => __('Font Color', 'themify'), 'description' => '', 'type' => 'color', 'meta' => array('default' => null)), array('name' => 'link_color', 'title' => __('Link Color', 'themify'), 'description' => '', 'type' => 'color', 'meta' => array('default' => null)), array('name' => 'separator', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Section Background') . '</h4><hr class="meta_fields_separator"/>')), array('name' => 'background_color', 'title' => __('Background Color', 'themify'), 'description' => '', 'type' => 'color', 'meta' => array('default' => null)), array('name' => 'background_image', 'title' => '', 'type' => 'image', 'description' => '', 'meta' => array(), 'before' => '', 'after' => ''), array('name' => 'background_repeat', 'title' => __('Background Repeat', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'repeat', 'name' => __('Repeat', 'themify')), array('value' => 'fullcover', 'name' => __('Fullcover', 'themify')))));
/** Portfolio Meta Box Options */
$portfolio_meta_box = array(array('name' => 'content_width', 'title' => __('Content Width', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => array(array('value' => 'default_width', 'img' => 'themify/img/default.png', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'full_width', 'img' => 'themify/img/fullwidth.png', 'title' => __('Fullwidth', 'themify')))), $post_image, array('name' => 'gallery_shortcode', 'title' => __('Gallery', 'themify'), 'description' => '', 'type' => 'gallery_shortcode'), $featured_image_size, array('type' => 'multi', 'name' => 'image_dimensions', 'title' => __('Image Dimension', 'themify'), 'meta' => array('fields' => $post_image_dimensions, 'description' => __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify'), 'before' => '', 'after' => '', 'separator' => ''), 'toggle' => array('media-image-toggle')), array("name" => "hide_post_title", "title" => __('Hide Post Title', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "unlink_post_title", "title" => __('Unlink Post Title', 'themify'), "description" => __('Unlink post title (it will display the post title without link)', 'themify'), "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "hide_post_date", "title" => __('Hide Post Date', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "hide_post_meta", "title" => __('Hide Post Meta', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "hide_post_image", "title" => __('Hide Featured Image', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "unlink_post_image", "title" => __('Unlink Featured Image', 'themify'), "description" => __('Display the Featured Image without link', 'themify'), "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array('name' => 'video_url', 'title' => __('Video URL', 'themify'), 'description' => __('Video embed URL such as YouTube or Vimeo video url (<a href="http://themify.me/docs/video-embeds">details</a>)', 'themify'), 'type' => 'textbox', 'meta' => array()), $external_link, themify_lightbox_link_field(), array('name' => '_multi_layout', 'type' => 'multi', 'title' => __('Layout', 'themify'), 'meta' => array('fields' => array(array('name' => 'hide_header', 'label' => __('Exclude Header', 'themify'), 'description' => '', 'type' => 'checkbox', 'meta' => array('size' => 'small'), 'before' => '<div>', 'after' => '</div>'), array('name' => 'hide_footer', 'label' => __('Exclude Footer', 'themify'), 'description' => '', 'type' => 'checkbox', 'meta' => array('size' => 'small'), 'before' => '<div>', 'after' => '</div>')), 'description' => '', 'before' => '', 'after' => '', 'separator' => '')), array('name' => '_post_id_info', 'title' => __('Shortcode ID', 'themify'), 'description' => __('To show this use [portfolio id="%s"]', 'themify'), 'type' => 'post_id_info'));
/**
 * Highlight Meta Box Options
 * @var array $highlight_meta_box Options for Themify Custom Panel
 */
$highlight_meta_box = array(array('name' => 'highlight_type', 'title' => __('Highlight Type', 'themify'), 'description' => '', 'type' => 'radio', 'meta' => array(array('value' => 'icon', 'selected' => true, 'name' => __('Icon', 'themify')), array('value' => 'image', 'name' => __('Image', 'themify'))), 'enable_toggle' => true), array('name' => 'post_image', 'title' => __('Featured Image', 'themify'), 'description' => '', 'type' => 'image', 'meta' => array(), 'toggle' => 'image-toggle'), array('name' => 'feature_size', 'title' => __('Image Size', 'themify'), 'description' => __('Image sizes can be set at <a href="options-media.php">Media Settings</a> and <a href="admin.php?page=themify_regenerate-thumbnails">Regenerated</a>', 'themify'), 'type' => 'featimgdropdown', 'toggle' => 'image-toggle'), array('type' => 'multi', 'name' => 'image_dimensions', 'title' => __('Image Dimension', 'themify'), 'meta' => array('fields' => $post_image_dimensions, 'description' => __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify'), 'before' => '', 'after' => '', 'separator' => ''), 'toggle' => 'image-toggle'), array('name' => 'icon', 'title' => __('Icon', 'themify'), 'type' => 'fontawesome', 'meta' => array(), 'toggle' => 'icon-toggle'), array('name' => 'icon_color', 'title' => __('Icon Color', 'themify'), 'description' => __('Defaults to Bar Color if blank', 'themify'), 'type' => 'color', 'meta' => array('default' => null), 'toggle' => 'icon-toggle'), array('name' => 'icon_background', 'title' => __('Icon Background Color', 'themify'), 'description' => __('Defaults to transparent if blank', 'themify'), 'type' => 'color', 'meta' => array('default' => null), 'toggle' => 'icon-toggle'), array('name' => 'bar_percentage', 'title' => __('Bar Percentage', 'themify'), 'description' => __('Enter a value from 0 to 100', 'themify'), 'type' => 'textbox', 'meta' => array()), array('name' => 'bar_color', 'title' => __('Bar Color', 'themify'), 'description' => sprintf(__('You can set up the default color at <a href="%s">Styling &gt; Backgrounds</a>.', 'themify'), admin_url('admin.php?page=themify#styling')), 'type' => 'color', 'meta' => array('default' => null)), $external_link, themify_lightbox_link_field(), array('name' => 'post_id_info', 'title' => __('Shortcode ID', 'themify'), 'description' => __('To show this use [highlight id="%s"]', 'themify'), 'type' => 'post_id_info'));
/**
 * Team Meta Box Options
 * @var array $team_meta_box Options for Themify Custom Panel
 */
$team_meta_box = array(array('name' => 'content_width', 'title' => __('Content Width', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => array(array('value' => 'default_width', 'img' => 'themify/img/default.png', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'full_width', 'img' => 'themify/img/fullwidth.png', 'title' => __('Fullwidth', 'themify')))), $post_image, $featured_image_size, array('type' => 'multi', 'name' => 'image_dimensions', 'title' => __('Image Dimension', 'themify'), 'meta' => array('fields' => $post_image_dimensions, 'description' => __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify'), 'before' => '', 'after' => '', 'separator' => '')), array('name' => 'team_title', 'title' => __('Team Member Position', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array()), array('name' => 'skills', 'title' => __('Skill Set', 'themify'), 'description' => '', 'type' => 'textarea'), array('name' => 'social', 'title' => __('Social Links', 'themify'), 'description' => '', 'type' => 'textarea'), array('name' => 'post_id_info', 'title' => __('Shortcode ID', 'themify'), 'description' => __('To show this use [team id="%s"]', 'themify'), 'type' => 'post_id_info'), $external_link, themify_lightbox_link_field());
///////////////////////////////////////
// Build Write Panels
///////////////////////////////////////
themify_build_write_panels(array(array('name' => __('Post Options', 'themify'), 'id' => 'post-options', 'options' => $post_meta_box_options, 'pages' => 'post'), array('name' => __('Post Styles', 'themify'), 'id' => 'post-styles', 'options' => $post_meta_box_styles, 'pages' => 'post'), array('name' => __('Page Options', 'themify'), 'id' => 'page-options', 'options' => $page_meta_box_options, 'pages' => 'page'), array('name' => __('Query Posts', 'themify'), 'id' => 'query-posts', 'options' => $query_post_meta_box, 'pages' => 'page'), array('name' => __('Query Sections', 'themify'), 'id' => 'query-section', 'options' => $query_section_meta_box, 'pages' => 'page'), array('name' => __('Query Portfolios', 'themify'), 'id' => 'query-portfolio', 'options' => $query_portfolio_meta_box, 'pages' => 'page'), array('name' => __('Portfolio Options', 'themify'), 'id' => 'portfolio-options', 'options' => $portfolio_meta_box, 'pages' => 'portfolio'), array('name' => __('Portfolio Styles', 'themify'), 'id' => 'portfolio-styles', 'options' => $portfolio_meta_box_styles, 'pages' => 'portfolio'), array('name' => __('Highlight Options', 'themify'), 'id' => 'highlight-options', 'options' => $highlight_meta_box, 'pages' => 'highlight'), array('name' => __('Highlight Styles', 'themify'), 'id' => 'highlight-styles', 'options' => $highlight_meta_box_styles, 'pages' => 'highlight'), array('name' => __('Team Options', 'themify'), 'id' => 'team-options', 'options' => $team_meta_box, 'pages' => 'team'), array('name' => __('Team Styles', 'themify'), 'id' => 'team-styles', 'options' => $team_meta_box_styles, 'pages' => 'team'), array('name' => __('Section Options', 'themify'), 'id' => 'section-options', 'options' => $section_meta_box, 'pages' => 'section')));
/* 	Custom Functions
/***************************************************************************/
///////////////////////////////////////
// Enable WordPress feature image
///////////////////////////////////////
add_theme_support('post-thumbnails');
remove_post_type_support('page', 'thumbnail');
///////////////////////////////////////
// Setup content width for media
///////////////////////////////////////
if (!isset($content_width)) {
Пример #6
0
 * @var array
 */
$section_meta_box = array(array('name' => 'separator_font', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Section Font') . '</h4><hr class="meta_fields_separator"/>')), array('type' => 'multi', 'name' => 'multi_font', 'title' => __('Font', 'themify'), 'meta' => array('fields' => array(array('name' => 'font_size', 'label' => '', 'description' => '', 'type' => 'textbox', 'meta' => array('size' => 'small'), 'before' => '', 'after' => ''), array('name' => 'font_size_unit', 'label' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'px', 'name' => __('px', 'themify'), 'selected' => true), array('value' => 'em', 'name' => __('em', 'themify'))), 'before' => '', 'after' => ''), array('name' => 'font_family', 'label' => '', 'type' => 'dropdown', 'meta' => array_merge($fonts_list, $google_fonts_list), 'before' => '', 'after' => '')), 'description' => '', 'before' => '', 'after' => '', 'separator' => '')), array('name' => 'font_color', 'title' => __('Font Color', 'themify'), 'description' => '', 'type' => 'color', 'meta' => array('default' => null)), array('name' => 'link_color', 'title' => __('Link Color', 'themify'), 'description' => '', 'type' => 'color', 'meta' => array('default' => null)), array('name' => 'separator', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Section Background') . '</h4><hr class="meta_fields_separator"/>')), array('name' => 'background_color', 'title' => __('Background Color', 'themify'), 'description' => '', 'type' => 'color', 'meta' => array('default' => null)), array('name' => 'background_image', 'title' => '', 'type' => 'image', 'description' => '', 'meta' => array(), 'before' => '', 'after' => ''), array('name' => 'background_repeat', 'title' => __('Background Repeat', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'repeat', 'name' => __('Repeat', 'themify')), array('value' => 'fullcover', 'name' => __('Fullcover', 'themify')))));
/** Portfolio Meta Box Options */
$portfolio_meta_box = array($post_image, array('name' => 'gallery_shortcode', 'title' => __('Gallery', 'themify'), 'description' => '', 'type' => 'gallery_shortcode'), $featured_image_size, array('type' => 'multi', 'name' => 'image_dimensions', 'title' => __('Image Dimension', 'themify'), 'meta' => array('fields' => $post_image_dimensions, 'description' => __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify'), 'before' => '', 'after' => '', 'separator' => ''), 'toggle' => array('media-image-toggle')), array("name" => "hide_post_title", "title" => __('Hide Post Title', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "unlink_post_title", "title" => __('Unlink Post Title', 'themify'), "description" => __('Unlink post title (it will display the post title without link)', 'themify'), "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "hide_post_date", "title" => __('Hide Post Date', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "hide_post_meta", "title" => __('Hide Post Meta', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "hide_post_image", "title" => __('Hide Featured Image', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array("name" => "unlink_post_image", "title" => __('Unlink Featured Image', 'themify'), "description" => __('Display the Featured Image without link', 'themify'), "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))), array('name' => 'video_url', 'title' => __('Video URL', 'themify'), 'description' => __('Video embed URL such as YouTube or Vimeo video url (<a href="http://themify.me/docs/video-embeds">details</a>)', 'themify'), 'type' => 'textbox', 'meta' => array()), $external_link, themify_lightbox_link_field(), array('name' => '_post_id_info', 'title' => __('Shortcode ID', 'themify'), 'description' => __('To show this use [portfolio id="%s"]'), 'type' => 'post_id_info'));
$portfolio_meta_box_styles = array(array('name' => 'separator', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Custom Header Background') . '</h4><hr class="meta_fields_separator"/>')), array('name' => 'background_image', 'title' => __('Background Image', 'themify'), 'type' => 'image', 'description' => '', 'meta' => array(), 'before' => '', 'after' => ''), array('name' => 'background_repeat', 'title' => __('Background Repeat', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'repeat', 'name' => __('Repeat', 'themify')), array('value' => 'fullcover', 'name' => __('Fullcover', 'themify')))), array('name' => 'background_gallery', 'title' => __('Header Slider', 'themify'), 'description' => '', 'type' => 'gallery_shortcode'));
/**
 * Highlight Meta Box Options
 * @var array $highlight_meta_box Options for Themify Custom Panel
 */
$highlight_meta_box = array($post_image, $featured_image_size, array('type' => 'multi', 'name' => 'image_dimensions', 'title' => __('Image Dimension', 'themify'), 'meta' => array('fields' => $post_image_dimensions, 'description' => __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify'), 'before' => '', 'after' => '', 'separator' => '')), $external_link, themify_lightbox_link_field(), array('name' => 'post_id_info', 'title' => __('Shortcode ID', 'themify'), 'description' => __('To show this use [highlight id="%s"]'), 'type' => 'post_id_info'));
/**
 * Team Meta Box Options
 * @var array $team_meta_box Options for Themify Custom Panel
 */
$team_meta_box = array($post_image, $featured_image_size, array('type' => 'multi', 'name' => 'image_dimensions', 'title' => __('Image Dimension', 'themify'), 'meta' => array('fields' => $post_image_dimensions, 'description' => __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify'), 'before' => '', 'after' => '', 'separator' => '')), array('name' => 'team_title', 'title' => __('Team Member Position', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array()), array('name' => 'post_id_info', 'title' => __('Shortcode ID', 'themify'), 'description' => __('To show this use [team id="%s"]'), 'type' => 'post_id_info'), $external_link, themify_lightbox_link_field());
///////////////////////////////////////
// Build Write Panels
///////////////////////////////////////
themify_build_write_panels(array(array('name' => __('Post Options', 'themify'), 'id' => 'post-options', 'options' => $post_meta_box_options, 'pages' => 'post'), array('name' => __('Post Styles', 'themify'), 'id' => 'post-styles', 'options' => $post_meta_box_styles, 'pages' => 'post'), array('name' => __('Page Options', 'themify'), 'id' => 'page-options', 'options' => $page_meta_box_options, 'pages' => 'page'), array('name' => __('Query Posts', 'themify'), 'id' => 'query-posts', 'options' => $query_post_meta_box, 'pages' => 'page'), array('name' => __('Query Sections', 'themify'), 'id' => 'query-section', 'options' => $query_section_meta_box, 'pages' => 'page'), array('name' => __('Query Portfolios', 'themify'), 'id' => 'query-portfolio', 'options' => $query_portfolio_meta_box, 'pages' => 'page'), array('name' => __('Portfolio Options', 'themify'), 'id' => 'portfolio-options', 'options' => $portfolio_meta_box, 'pages' => 'portfolio'), array('name' => __('Portfolio Styles', 'themify'), 'id' => 'portfolio-styles', 'options' => $portfolio_meta_box_styles, 'pages' => 'portfolio'), array('name' => __('Highlight Options', 'themify'), 'id' => 'highlight-options', 'options' => $highlight_meta_box, 'pages' => 'highlight'), array('name' => __('Team Options', 'themify'), 'id' => 'team-options', 'options' => $team_meta_box, 'pages' => 'team'), array('name' => __('Section Options', 'themify'), 'id' => 'section-options', 'options' => $section_meta_box, 'pages' => 'section')));
/* 	Custom Functions
/***************************************************************************/
///////////////////////////////////////
// Enable WordPress feature image
///////////////////////////////////////
add_theme_support('post-thumbnails');
remove_post_type_support('page', 'thumbnail');
///////////////////////////////////////
// Setup content width for media
///////////////////////////////////////
if (!isset($content_width)) {
/**
 * Portfolio Meta Box Options
 * @param array $args
 * @return array
 * @since 1.0.7
 */
function themify_theme_portfolio_meta_box($args = array())
{
    extract($args);
    return array(array('name' => 'layout', 'title' => __('Sidebar Option', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => array(array('value' => 'default', 'img' => 'images/layout-icons/default.png', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'sidebar1', 'img' => 'images/layout-icons/sidebar1.png', 'title' => __('Sidebar Right', 'themify')), array('value' => 'sidebar1 sidebar-left', 'img' => 'images/layout-icons/sidebar1-left.png', 'title' => __('Sidebar Left', 'themify')), array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'title' => __('No Sidebar ', 'themify')))), array('name' => 'content_width', 'title' => __('Content Width', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => array(array('value' => 'default_width', 'img' => 'themify/img/default.png', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'full_width', 'img' => 'themify/img/fullwidth.png', 'title' => __('Fullwidth', 'themify')))), array('name' => 'post_image', 'title' => __('Featured Image', 'themify'), 'description' => '', 'type' => 'image', 'meta' => array()), array('name' => 'feature_size', 'title' => __('Image Size', 'themify'), 'description' => sprintf(__('Image sizes can be set at <a href="%s">Media Settings</a> and <a href="%s">Regenerated</a>', 'themify'), 'options-media.php', 'admin.php?page=themify_regenerate-thumbnails'), 'type' => 'featimgdropdown'), themify_image_dimensions_field(), array('name' => 'imagefilter_options', 'title' => __('Image Filter', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('name' => '', 'value' => 'initial'), array('name' => __('None', 'themify'), 'value' => 'none'), array('name' => __('Grayscale', 'themify'), 'value' => 'grayscale'), array('name' => __('Sepia', 'themify'), 'value' => 'sepia'), array('name' => __('Blur', 'themify'), 'value' => 'blur'))), array('name' => 'imagefilter_options_hover', 'title' => __('Image Hover Filter', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('name' => '', 'value' => 'initial'), array('name' => __('None', 'themify'), 'value' => 'none'), array('name' => __('Grayscale', 'themify'), 'value' => 'grayscale'), array('name' => __('Sepia', 'themify'), 'value' => 'sepia'), array('name' => __('Blur', 'themify'), 'value' => 'blur'))), array('name' => 'imagefilter_applyto', 'title' => __('Apply to', 'themify'), 'description' => sprintf(__('Theme Default = can be set in <a href="%s" target="_blank">Themify > Settings > Theme Settings</a>', 'themify'), admin_url('admin.php?page=themify#setting-theme_settings')), 'type' => 'radio', 'meta' => array(array('value' => 'initial', 'name' => __('Theme Default', 'themify'), 'selected' => true), array('value' => 'featured-only', 'name' => __('Featured Images Only', 'themify')), array('value' => 'all', 'name' => __('All Images', 'themify')))), array('name' => 'hide_post_title', 'title' => __('Hide Post Title', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'unlink_post_title', 'title' => __('Unlink Post Title', 'themify'), 'description' => __('Unlink post title (it will display the post title without link)', 'themify'), 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'hide_post_meta', 'title' => __('Hide Post Meta', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'hide_post_image', 'title' => __('Hide Featured Image', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'unlink_post_image', 'title' => __('Unlink Featured Image', 'themify'), 'description' => __('Display the Featured Image without link', 'themify'), 'type' => 'dropdown', 'meta' => array(array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Yes', 'themify')), array('value' => 'no', 'name' => __('No', 'themify')))), array('name' => 'external_link', 'title' => __('External Link', 'themify'), 'description' => __('Link Featured Image and Post Title to external URL', 'themify'), 'type' => 'textbox', 'meta' => array()), themify_lightbox_link_field(), array('name' => 'post_id_info', 'title' => __('Shortcode ID', 'themify'), 'description' => __('To show this use [portfolio id="%s"]', 'themify'), 'type' => 'post_id_info'), array('name' => 'custom_menu', 'title' => __('Custom Menu', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => $args['nav_menus']), array('name' => '_separator_project_info', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<h4>' . __('Project Info', 'themify') . '</h4><hr class="meta_fields_separator"/>')), array('name' => 'project_date', 'title' => __('Date', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array()), array('name' => 'project_client', 'title' => __('Client', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array()), array('name' => 'project_services', 'title' => __('Services', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array()), array('name' => 'project_launch', 'title' => __('Link to Launch', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array()));
}
/**
 * Highlight Meta Box Options
 * @param array $args
 * @return array
 * @since 1.0.7
 */
function themify_theme_highlight_meta_box($args = array())
{
    extract($args);
    return array(array('name' => 'post_image', 'title' => __('Featured Image', 'themify'), 'description' => '', 'type' => 'image', 'meta' => array()), array('name' => 'feature_size', 'title' => __('Image Size', 'themify'), 'description' => sprintf(__('Image sizes can be set at <a href="%s">Media Settings</a> and <a href="%s">Regenerated</a>', 'themify'), 'options-media.php', 'admin.php?page=themify_regenerate-thumbnails'), 'type' => 'featimgdropdown'), themify_image_dimensions_field(), array('name' => 'bar_percentage', 'title' => __('Bar Percentage', 'themify'), 'description' => __('Enter a value from 0 to 100', 'themify'), 'type' => 'textbox', 'meta' => array()), array('name' => 'bar_color', 'title' => __('Bar Color', 'themify'), 'description' => sprintf(__('You can set up the default color at <a href="%s">Styling &gt; Backgrounds</a>.', 'themify'), admin_url('admin.php?page=themify#styling')), 'type' => 'color', 'meta' => array('default' => null)), array('name' => 'external_link', 'title' => __('External Link', 'themify'), 'description' => __('Link Featured Image to external URL', 'themify'), 'type' => 'textbox', 'meta' => array()), themify_lightbox_link_field(), array('name' => 'post_id_info', 'title' => __('Shortcode ID', 'themify'), 'description' => __('To show this use [highlight id="%s"]', 'themify'), 'type' => 'post_id_info'));
}