Esempio n. 1
0
add_action('wp_head', 'themify_ie_standards_compliant');
/* Custom Write Panels
/***************************************************************************/
///////////////////////////////////////
// Setup Write Panel Options
///////////////////////////////////////
// Post Meta Box Options
$post_meta_box_options = array(array("name" => "layout", "title" => __('Single Layout', '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" => "post_image", "title" => __('Featured Image', 'themify'), "description" => '', "type" => "image", "meta" => array()), 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'), array("name" => "image_width", "title" => __('Image Width', 'themify'), "description" => "", "type" => "textbox", "meta" => array("size" => "small")), array("name" => "image_height", "title" => __('Image Height', 'themify'), "description" => __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify'), "type" => "textbox", "meta" => array("size" => "small")), 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_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 and Post Title to external URL', 'themify'), "type" => "textbox", "meta" => array()));
// Page Meta Box Options
$page_meta_box_options = array(array("name" => "page_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" => "hide_page_title", "title" => __('Hide Page 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' => 'custom_menu', 'title' => __('Custom Menu', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => themify_get_available_menus()));
// Query Post Meta Box Options
$query_post_meta_box_options = array(array('name' => '_query_posts_notice', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array('html' => '<div class="themify-info-link">' . sprintf(__('<a href="%s">Query Posts</a> allows you to query WordPress posts from any category on the page. To use it, select a Query Category.', 'themify'), 'http://themify.me/docs/query-posts') . '</div>')), array("name" => "query_category", "title" => __('Query Category', 'themify'), "description" => __('Select a category or enter multiple category IDs (eg. 2,5,6). Enter 0 to display all category.', 'themify'), "type" => "query_category", "meta" => array()), array('name' => 'order', 'title' => __('Order', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('name' => __('Descending', 'themify'), 'value' => 'desc', 'selected' => true), array('name' => __('Ascending', 'themify'), 'value' => 'asc'))), array('name' => 'orderby', 'title' => __('Order By', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array(array('name' => __('Date', 'themify'), 'value' => 'content', 'selected' => true), array('name' => __('Random', 'themify'), 'value' => 'rand'), array('name' => __('Author', 'themify'), 'value' => 'author'), array('name' => __('Post Title', 'themify'), 'value' => 'title'), array('name' => __('Comments Number', 'themify'), 'value' => 'comment_count'), array('name' => __('Modified Date', 'themify'), 'value' => 'modified'), array('name' => __('Post Slug', 'themify'), 'value' => 'name'), array('name' => __('Post ID', 'themify'), 'value' => 'ID'))), array("name" => "section_categories", "title" => __('Section Categories', 'themify'), "description" => __('Display multiple query categories separately', '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" => "layout", "title" => __('Query Post Layout', 'themify'), "description" => "", "type" => "layout", 'show_title' => true, "meta" => array(array('value' => 'list-post', 'img' => 'images/layout-icons/list-post.png', 'selected' => true, 'title' => __('List Post', 'themify')), array('value' => 'grid4', 'img' => 'images/layout-icons/grid4.png', 'title' => __('Grid 4', 'themify')), array('value' => 'grid3', 'img' => 'images/layout-icons/grid3.png', 'title' => __('Grid 3', 'themify')), array('value' => 'grid2', 'img' => 'images/layout-icons/grid2.png', 'title' => __('Grid 2', 'themify')), array('value' => 'list-large-image', 'img' => 'images/layout-icons/list-large-image.png', 'title' => __('List Large Image', 'themify')), array('value' => 'list-thumb-image', 'img' => 'images/layout-icons/list-thumb-image.png', 'title' => __('List Thumb Image', 'themify')), array('value' => 'grid2-thumb', 'img' => 'images/layout-icons/grid2-thumb.png', 'title' => __('Grid 2 Thumb', 'themify')))), array("name" => "posts_per_page", "title" => __('Posts per page', 'themify'), "description" => "", "type" => "textbox", "meta" => array("size" => "small")), array("name" => "display_content", "title" => __('Display Content', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array('name' => __('Full Content', 'themify'), "value" => "content", "selected" => true), array('name' => __('Excerpt', 'themify'), "value" => "excerpt"), array('name' => __('None', 'themify'), "value" => "none"))), array('name' => 'feature_size_page', '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'), array("name" => "image_width", "title" => __('Image Width', 'themify'), "description" => "", "type" => "textbox", "meta" => array("size" => "small")), array("name" => "image_height", "title" => __('Image Height', 'themify'), "description" => __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify'), "type" => "textbox", "meta" => array("size" => "small")), array("name" => "hide_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_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_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_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_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_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" => "hide_navigation", "title" => __('Hide Page Navigation', 'themify'), "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", 'name' => __('Yes', 'themify')), array("value" => "no", 'name' => __('No', 'themify')))));
///////////////////////////////////////
// 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" => __('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_options, "pages" => "page")));
/* 	Custom Functions
/***************************************************************************/
///////////////////////////////////////
// Enable WordPress feature image
///////////////////////////////////////
add_theme_support('post-thumbnails');
// Register Custom Menu Function
function themify_register_custom_nav()
{
    if (function_exists('register_nav_menus')) {
        register_nav_menus(array('main-nav' => __('Main Navigation', 'themify'), 'footer-nav' => __('Footer Navigation', 'themify')));
    }
}
// Register Custom Menu Function - Action
add_action('init', 'themify_register_custom_nav');
Esempio n. 2
0
 /**
  * Initialize custom panel with its definitions
  * Custom panel definitions are located in admin/post-type-TYPE.php
  * @since 1.0.7
  */
 function themify_theme_init_types()
 {
     // Load required files for post, page and custom post types where it applies
     foreach (array('post', 'page', 'highlight', 'team', 'portfolio', 'section', 'timeline', 'testimonial') as $type) {
         require_once "admin/post-type-{$type}.php";
     }
     /**
      * Navigation menus used in page custom panel to specify a custom menu for the page.
      * @var array
      * @since 1.2.7
      */
     $nav_menus = array(array('name' => '', 'value' => '', 'selected' => true));
     foreach (get_terms('nav_menu') as $menu) {
         $nav_menus[] = array('name' => $menu->name, 'value' => $menu->slug);
     }
     themify_build_write_panels(apply_filters('themify_theme_meta_boxes', array(array('name' => __('Post Options', 'themify'), 'id' => 'post-options', 'options' => themify_theme_post_meta_box(), 'pages' => 'post'), array('name' => __('Page Options', 'themify'), 'id' => 'page-options', 'options' => themify_theme_page_meta_box(array('nav_menus' => $nav_menus)), 'pages' => 'page'), array("name" => __('Query Posts', 'themify'), 'id' => 'query-posts', "options" => themify_theme_query_post_meta_box(), "pages" => "page"), array("name" => __('Query Sections', 'themify'), 'id' => 'query-section', "options" => themify_theme_query_section_meta_box(), "pages" => "page"), array("name" => __('Query Portfolios', 'themify'), 'id' => 'query-portfolio', "options" => themify_theme_query_portfolio_meta_box(), "pages" => "page"), array('name' => __('Section Options', 'themify'), 'id' => 'section-options', 'options' => themify_theme_section_meta_box(), 'pages' => 'section'), array('name' => __('Portfolio Options', 'themify'), 'id' => 'portfolio-options', 'options' => themify_theme_portfolio_meta_box(), 'pages' => 'portfolio'), array('name' => __('Team Options', 'themify'), 'id' => 'team-options', 'options' => themify_theme_team_meta_box(), 'pages' => 'team'), array('name' => __('Highlight Options', 'themify'), 'id' => 'highlight-options', 'options' => themify_theme_highlight_meta_box(), 'pages' => 'highlight'), array('name' => __('Testimonial Options', 'themify'), 'id' => 'testimonial-options', 'options' => themify_theme_testimonial_meta_box(), 'pages' => 'testimonial'), array('name' => __('Timeline Options', 'themify'), 'id' => 'timeline-options', 'options' => themify_theme_timeline_meta_box(), 'pages' => 'timeline'))));
 }
 /**
  * Initialize custom panel with its definitions
  * Custom panel definitions are located in admin/post-type-TYPE.php
  * @since 1.0.0
  */
 function themify_theme_init_types()
 {
     // Load required files for post, page and custom post types where it applies
     foreach (array('post', 'page', 'portfolio') as $type) {
         require_once "admin/post-type-{$type}.php";
     }
     /**
      * Navigation menus used in page custom panel to specify a custom menu for the page.
      * @since 1.0.0
      * @var array
      */
     $nav_menus = array(array('name' => '', 'value' => '', 'selected' => true));
     foreach (get_terms('nav_menu') as $menu) {
         $nav_menus[] = array('name' => $menu->name, 'value' => $menu->slug);
     }
     /**
      * Options for header design
      * @since 1.0.0
      * @var array
      */
     $header_design_options = themify_theme_header_design_options();
     /**
      * Options for footer design
      * @since 1.0.0
      * @var array
      */
     $footer_design_options = themify_theme_footer_design_options();
     /**
      * Options for font design
      * @since 1.0.0
      * @var array
      */
     $font_design_options = themify_theme_font_design_options();
     /**
      * Options for color design
      * @since 1.0.0
      * @var array
      */
     $color_design_options = themify_theme_color_design_options();
     $entry_id = isset($_GET['post']) ? $_GET['post'] : null;
     $background_slider = false;
     if ($entry_id) {
         $background_slider = get_post_meta($entry_id, 'header_wrap', true) == '' && get_post_meta($entry_id, 'background_gallery', true) != '';
     }
     themify_build_write_panels(apply_filters('themify_theme_meta_boxes', array(array('name' => __('Post Options', 'themify'), 'id' => 'post-options', 'options' => themify_theme_post_meta_box(array('nav_menus' => $nav_menus)), 'pages' => 'post'), array('name' => __('Theme Appearance', 'themify'), 'id' => 'post-theme-design', 'options' => themify_theme_post_theme_design_meta_box(array('header_design_options' => $header_design_options, 'footer_design_options' => $footer_design_options, 'font_design_options' => $font_design_options, 'color_design_options' => $color_design_options, 'background_slider' => $background_slider)), 'pages' => 'post'), array('name' => __('Page Options', 'themify'), 'id' => 'page-options', 'options' => themify_theme_page_meta_box(array('nav_menus' => $nav_menus, 'header_design_options' => $header_design_options, 'footer_design_options' => $footer_design_options, 'font_design_options' => $font_design_options, 'color_design_options' => $color_design_options)), 'pages' => 'page'), array('name' => __('Theme Appearance', 'themify'), 'id' => 'page-theme-design', 'options' => themify_theme_page_theme_design_meta_box(array('header_design_options' => $header_design_options, 'footer_design_options' => $footer_design_options, 'font_design_options' => $font_design_options, 'color_design_options' => $color_design_options, 'background_slider' => $background_slider)), 'pages' => 'page'), array('name' => __('Portfolio Options', 'themify'), 'id' => 'portfolio-options', 'options' => themify_theme_portfolio_meta_box(array('nav_menus' => $nav_menus, 'header_design_options' => $header_design_options, 'footer_design_options' => $footer_design_options, 'font_design_options' => $font_design_options, 'color_design_options' => $color_design_options)), 'pages' => 'portfolio'), array('name' => __('Theme Appearance', 'themify'), 'id' => 'portfolio-theme-design', 'options' => themify_theme_portfolio_theme_design_meta_box(array('header_design_options' => $header_design_options, 'footer_design_options' => $footer_design_options, 'font_design_options' => $font_design_options, 'color_design_options' => $color_design_options, 'background_slider' => $background_slider)), 'pages' => 'portfolio'), array('name' => __('Query Posts', 'themify'), 'id' => 'query-posts', 'options' => themify_theme_query_post_meta_box(), 'pages' => 'page'), array('name' => __('Query Portfolios', 'themify'), 'id' => 'query-portfolio', 'options' => themify_theme_query_portfolio_meta_box(), 'pages' => 'page'))));
 }
    //prettyPhoto styles
    wp_enqueue_style('pretty-photo', get_template_directory_uri() . '/prettyPhoto.css');
}
/* 	Custom Write Panels
/***************************************************************************/
///////////////////////////////////////
// Setup Write Panel Options
///////////////////////////////////////
// Post Meta Box Options
$post_meta_box_options = array(array("name" => "layout", "title" => "Single Layout", "description" => "", "type" => "layout", "meta" => array(array("value" => "default", "img" => "images/layout-icons/default.png", "selected" => true), array("value" => "sidebar1", "img" => "images/layout-icons/sidebar1.png"), array("value" => "sidebar1 sidebar-left", "img" => "images/layout-icons/sidebar1-left.png"), array("value" => "sidebar-none", "img" => "images/layout-icons/sidebar-none.png"))), array("name" => "hide_post_title", "title" => "Hide Post Title", "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "unlink_post_title", "title" => "Unlink Post Title", "description" => "Unlink post title (it will display the post title without link)", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "hide_post_meta", "title" => "Hide Post Meta", "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "hide_post_date", "title" => "Hide Post Date", "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "hide_post_image", "title" => "Hide Post Image", "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "unlink_post_image", "title" => "Unlink Post Image", "description" => "Unlink post image (it will display the post image without link)", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "post_image", "title" => "Post Image", "description" => "Post image used in the loop", "type" => "image", "meta" => array()), array("name" => "feature_image", "title" => "Feature Image", "description" => "Feature image used in feature post widget", "type" => "image", "meta" => array()), array("name" => "image_width", "title" => "Image Width", "description" => "", "type" => "textbox", "meta" => array("size" => "small")), array("name" => "image_height", "title" => "Image Height", "description" => "", "type" => "textbox", "meta" => array("size" => "small")), array("name" => "external_link", "title" => "External Link", "description" => "Link post image to external URL", "type" => "textbox", "meta" => array()));
// Page Meta Box Options
$page_meta_box_options = array(array("name" => "page_layout", "title" => "Sidebar Option", "description" => "", "type" => "layout", "meta" => array(array("value" => "default", "img" => "images/layout-icons/default.png", "selected" => true), array("value" => "sidebar1", "img" => "images/layout-icons/sidebar1.png"), array("value" => "sidebar1 sidebar-left", "img" => "images/layout-icons/sidebar1-left.png"), array("value" => "sidebar-none", "img" => "images/layout-icons/sidebar-none.png"))), array("name" => "hide_page_title", "title" => "Hide Page Title", "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "query_category", "title" => "Query Category", "description" => "Select a category or enter multiple category IDs (eg. 2,5,6). Enter 0 to display all category.", "type" => "query_category", "meta" => array()), array("name" => "section_categories", "title" => "Section Categories", "description" => "Display multiple query categories separately", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "layout", "title" => "Query Post Layout", "description" => "", "type" => "layout", "meta" => array(array("value" => "list-post", "img" => "images/layout-icons/list-post.png", "selected" => true), array("value" => "grid4", "img" => "images/layout-icons/grid4.png"), array("value" => "grid3", "img" => "images/layout-icons/grid3.png"), array("value" => "grid2", "img" => "images/layout-icons/grid2.png"), array("value" => "list-large-image", "img" => "images/layout-icons/list-large-image.png"), array("value" => "list-thumb-image", "img" => "images/layout-icons/list-thumb-image.png"), array("value" => "grid2-thumb", "img" => "images/layout-icons/grid2-thumb.png"))), array("name" => "posts_per_page", "title" => "Posts per page", "description" => "", "type" => "textbox", "meta" => array("size" => "small")), array("name" => "display_content", "title" => "Display", "description" => "", "type" => "dropdown", "meta" => array(array("name" => "Excerpt", "value" => "excerpt", "selected" => true), array("name" => "Content", "value" => "content"), array("name" => "None", "value" => "none"))), array("name" => "hide_title", "title" => "Hide Post Title", "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "unlink_title", "title" => "Unlink Post Title", "description" => "Unlink post title (it will display the post title without link)", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "hide_date", "title" => "Hide Post Date", "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "hide_meta", "title" => "Hide Post Meta", "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "hide_image", "title" => "Hide Post Image", "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "unlink_image", "title" => "Unlink Post Image", "description" => "Unlink post image (it will display the post image without link)", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "hide_navigation", "title" => "Hide Page Navigation", "description" => "", "type" => "dropdown", "meta" => array(array("value" => "default", "name" => "", "selected" => true), array("value" => "yes", "name" => "Yes"), array("value" => "no", "name" => "No"))), array("name" => "image_width", "title" => "Image Width", "description" => "", "type" => "textbox", "meta" => array("size" => "small")), array("name" => "image_height", "title" => "Image Height", "description" => "", "type" => "textbox", "meta" => array("size" => "small")));
///////////////////////////////////////
// Build Write Panels
///////////////////////////////////////
themify_build_write_panels(array(array("name" => "Post Options", "options" => $post_meta_box_options, "pages" => "post"), array("name" => "Page Options", "options" => $page_meta_box_options, "pages" => "page")));
/* 	Custom Functions
/***************************************************************************/
///////////////////////////////////////
// Enable WordPress feature image
///////////////////////////////////////
add_theme_support('post-thumbnails');
///////////////////////////////////////
// Add wmode transparent and post-video container for responsive purpose
///////////////////////////////////////
function themify_add_video_wmode_transparent($html, $url, $attr)
{
    $html = '<p class="post-video">' . $html . '</p>';
    if (strpos($html, "<embed src=") !== false) {
        $html = str_replace('</param><embed', '</param><param name="wmode" value="transparent"></param><embed wmode="transparent" ', $html);
        return $html;
/** 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)) {
    $content_width = 978;
}
/**
 * Register Custom Menu Function