Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/2/pages.tar
Назад
post.php 0000644 00000044304 15151170176 0006253 0 ustar 00 <?php /** * Post Meta Box Options * @return array * @since 1.0.0 */ if (!function_exists('themify_theme_post_meta_box')) { function themify_theme_post_meta_box() { return array( // Layout array( 'name' => 'layout', 'title' => __('Sidebar Option', 'themify'), 'description' => '', 'type' => 'page_layout', 'show_title' => true, 'meta' => array( array('value' => 'default', 'img' => 'themify/img/default.svg', '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' => 'sidebar2', 'img' => 'images/layout-icons/sidebar2.png', 'title' => __('Left and Right', 'themify')), array('value' => 'sidebar2 content-left', 'img' => 'images/layout-icons/sidebar2-content-left.png', 'title' => __('2 Right Sidebars', 'themify')), array('value' => 'sidebar2 content-right', 'img' => 'images/layout-icons/sidebar2-content-right.png', 'title' => __('2 Left Sidebars', 'themify')), array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'title' => __('No Sidebar ', 'themify')), array('value' => 'full_width', 'img' => 'themify/img/fullwidth.svg', 'title' => __('Fullwidth (Builder Page)', 'themify')), ), 'default' => 'default', // 'hide' => 'sidebar-none post_sticky_sidebar', ), array( 'name' => 'content_width', 'type' => 'hidden', ), array( 'name' => 'post_sticky_sidebar', 'title' => __('Sticky Sidebar', 'themify'), 'description' => '', 'type' => 'dropdown', 'show_title' => true, 'class' => 'hide-if sidebar-none full_width', 'meta' => array( array('value' => '', 'name' => '', 'selected' => true), array('value' => 1, 'name' => __('Enable', 'themify')), array('value' => 0, 'name' => __('Disable', 'themify')) ), ), //Post Layout array( 'name' => 'post_layout', 'title' => __('Post Layout', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'enable_toggle' => true, 'class' => 'hide-if none', 'meta' => array( array('value' => '', 'img' => 'themify/img/default.svg', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'classic', 'img' => 'images/layout-icons/post-classic.png', 'title' => __('Classic', 'themify')), array('value' => 'fullwidth', 'img' => 'images/layout-icons/post-fullwidth.png', 'title' => __('Fullwidth', 'themify')), array('value' => 'slider', 'img' => 'images/layout-icons/post-slider.png', 'title' => __('Slider', 'themify')), array('value' => 'gallery', 'img' => 'images/layout-icons/post-gallery.png', 'title' => __('Gallery', 'themify')), array('value' => 'split', 'img' => 'images/layout-icons/post-split.png', 'title' => __('Split', 'themify')) ), 'default' => 'default', ), // Gallery Layout shortcode array( 'name' => 'post_layout_gallery', 'title' => '', 'description' => '', 'type' => 'gallery_shortcode', 'toggle' => 'gallery-toggle', 'class' => 'hide-if none', ), // Slider Layout shortcode array( 'name' => 'post_layout_slider', 'title' => '', 'description' => '', 'type' => 'gallery_shortcode', 'toggle' => 'slider-toggle', 'class' => 'hide-if none', ), // Featured Image Size 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" target="_blank">Regenerated</a>', 'themify'), 'options-media.php', 'admin.php?page=regenerate-thumbnails'), 'type' => 'featimgdropdown', 'display_callback' => 'themify_is_image_script_disabled' ), // Multi field: Image Dimension themify_image_dimensions_field(), // Hide Post Title array( 'name' => 'hide_post_title', 'title' => __('Post Title', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), // Unlink Post Title array( 'name' => 'unlink_post_title', 'title' => __('Post Title Link', 'themify'), 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Unlinked', 'themify')), array('value' => 'no', 'name' => __('Linked', 'themify')) ), 'default' => 'default', ), // Multi field: Hide Post Meta themify_multi_meta_field(), // Hide Post Date array( 'name' => 'hide_post_date', 'title' => __('Post Date', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), // Hide Post Image array( 'name' => 'hide_post_image', 'title' => __('Featured Image', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), // Unlink Post Image array( 'name' => 'unlink_post_image', 'title' => __('Featured Image Link', 'themify'), 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Unlinked', 'themify')), array('value' => 'no', 'name' => __('Linked', 'themify')) ), 'default' => 'default', ), // Video URL 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="https://themify.me/docs/video-embeds">details</a>).', 'themify'), 'type' => 'textbox', 'meta' => array() ), // External Link array( 'name' => 'external_link', 'title' => __('External Link', 'themify'), 'description' => __('Link Featured Image and Post Title to external URL', 'themify'), 'type' => 'textbox', 'meta' => array() ), // Lightbox Link + Zoom icon themify_lightbox_link_field(), // Custom menu array( 'name' => 'custom_menu', 'title' => __('Custom Menu', 'themify'), 'description' => '', 'type' => 'dropdown', // extracted from $args 'meta' => themify_get_available_menus() ), ); } } /** * Default Single Post Layout * @param array $data Theme settings data * @return string Markup for module. * @since 1.0.0 */ function themify_default_post_layout($data = array()) { $data = themify_get_data(); /** * Theme Settings Option Key Prefix * @var string */ $prefix = 'setting-default_page_'; /** * Tertiary options <blank>|yes|no * @var array */ $default_options = array( array('name' => '', 'value' => ''), array('name' => __('Yes', 'themify'), 'value' => 'yes'), array('name' => __('No', 'themify'), 'value' => 'no') ); $show_hide_options = array( array('name'=>__('Show', 'themify'),'value'=>'no'), array('name'=>__('Hide', 'themify'),'value'=>'yes'), ); $no_yes_options = array( array('name'=>__('No', 'themify'),'value'=>'no'), array('name'=>__('Yes', 'themify'),'value'=>'yes'), ); /** * Sidebar placement options * @var array */ $sidebar_location_options = array( array('value' => 'sidebar1', 'img' => 'images/layout-icons/sidebar1.png', 'selected' => true, 'title' => __('Sidebar Right', 'themify')), array('value' => 'sidebar1 sidebar-left', 'img' => 'images/layout-icons/sidebar1-left.png', 'title' => __('Sidebar Left', 'themify')), array('value' => 'sidebar2', 'img' => 'images/layout-icons/sidebar2.png', 'title' => __('Left and Right', 'themify')), array('value' => 'sidebar2 content-left', 'img' => 'images/layout-icons/sidebar2-content-left.png', 'title' => __('2 Right Sidebars', 'themify')), array('value' => 'sidebar2 content-right', 'img' => 'images/layout-icons/sidebar2-content-right.png', 'title' => __('2 Left Sidebars', 'themify')), array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'title' => __('No Sidebar', 'themify')), array('value' => 'full_width', 'img' => 'themify/img/fullwidth.svg', 'title' => __('Fullwidth (Builder Page)', 'themify')), ); /** * Post Layout options * @var array */ $post_layout = array( array('selected' => true, 'value' => 'classic', 'img' => 'images/layout-icons/post-classic.png', 'title' => __('Classic', 'themify')), array('value' => 'fullwidth', 'img' => 'images/layout-icons/post-fullwidth.png', 'title' => __('Fullwidth', 'themify')), array('value' => 'slider', 'img' => 'images/layout-icons/post-slider.png', 'title' => __('Slider', 'themify')), array('value' => 'gallery', 'img' => 'images/layout-icons/post-gallery.png', 'title' => __('Gallery', 'themify')), array('value' => 'split', 'img' => 'images/layout-icons/post-split.png', 'title' => __('Split', 'themify')) ); /** * Image alignment options * @var array */ $alignment_options = array( array('name' => '', 'value' => ''), array('name' => __('Left', 'themify'), 'value' => 'left'), array('name' => __('Right', 'themify'), 'value' => 'right') ); /** * Entry media position, above or below the title */ $media_position = array( array('name' => __('Above Post Title', 'themify'), 'value' => 'above'), array('name' => __('Below Post Title', 'themify'), 'value' => 'below'), ); $unlink_options = [ [ 'name' => __('Linked', 'themify'), 'value' => 'no' ], [ 'name' => __('Unlinked', 'themify'), 'value' => 'yes' ], ]; /** * Module markup * @var string */ $output = ''; /** * Post sidebar placement */ $output .= '<p> <span class="label">' . __('Post Sidebar Option', 'themify') . '</span>'; $val = themify_get($prefix . 'post_layout'); foreach ($sidebar_location_options as $option) { if (($val == '' || !$val || !isset($val)) && $option['selected']) { $val = $option['value']; } if ($val == $option['value']) { $class = 'selected'; } else { $class = ''; } $output .= '<a href="#" class="preview-icon ' . $class . '" title="' . $option['title'] . '"><img src="' . THEME_URI . '/' . $option['img'] . '" alt="' . $option['value'] . '" /></a>'; } $output .= ' <input type="hidden" name="' . $prefix . 'post_layout" class="val" value="' . $val . '" /> </p>'; $output .= '<p class="pushlabel" data-show-if-element="[name=' . esc_attr($prefix) . 'post_layout]" data-show-if-value=\'["sidebar1", "sidebar1 sidebar-left", "sidebar2" ,"sidebar2 content-left" ,"sidebar2 content-right"]\'> <label for="' . esc_attr($prefix) . 'post_sticky_sidebar"> <input type="checkbox" id="' . esc_attr($prefix) . 'post_sticky_sidebar" name="' . esc_attr($prefix) . 'post_sticky_sidebar" value="1" ' . checked(themify_get(esc_attr($prefix) . 'post_sticky_sidebar'), 1, false) . ' />' . __('Enable sticky sidebar', 'themify') . ' </label> </p>'; /** * Post Layout placement */ $output .= '<p> <span class="label">' . __('Post Layout', 'themify') . '</span>'; $val = themify_get($prefix . 'post_layout_type'); foreach ($post_layout as $option) { if (( $val == '' || !$val || !isset($val) ) && ( isset($option['selected']) && $option['selected'] )) { $val = $option['value']; } if ($val == $option['value']) { $class = 'selected'; } else { $class = ''; } $output .= '<a href="#" class="preview-icon ' . $class . '" title="' . $option['title'] . '"><img src="' . THEME_URI . '/' . $option['img'] . '" alt="' . $option['value'] . '" /></a>'; } $output .= ' <input type="hidden" name="' . $prefix . 'post_layout_type" class="val" value="' . $val . '" /> </p>'; /** * Hide Post Title */ $output .= '<p> <span class="label">' . __('Post Title', 'themify') . '</span> <select name="' . $prefix . 'post_title">' . themify_options_module($show_hide_options, $prefix . 'post_title') . ' </select> </p>'; /** * Unlink Post Title */ $output .= '<p> <span class="label">' . __('Post Title Link', 'themify') . '</span> <select name="' . $prefix . 'unlink_post_title">' . themify_options_module($unlink_options, $prefix . 'unlink_post_title') . ' </select> </p>'; /** * Hide Post Meta */ $output .= themify_post_meta_options($prefix . 'post_meta', $data); /** * Hide Post Date */ $output .= '<p> <span class="label">' . __('Post Date', 'themify') . '</span> <select onchange="jQuery(this).val()===\'yes\'?jQuery(\'#' . $prefix . 'display_post_date_wrap\').fadeOut():jQuery(\'#' . $prefix . 'display_post_date_wrap\').fadeIn();" name="' . $prefix . 'post_date">' . themify_options_module($show_hide_options, $prefix . 'post_date') . ' </select> <br/><br/> <span id="' . $prefix . 'display_post_date_wrap" class="pushlabel"> <label for="' . $prefix . 'display_date_inline"><input type="checkbox" value="1" id="' . $prefix . 'display_date_inline" name="' . $prefix . 'display_date_inline" ' . checked(themify_get($prefix . 'display_date_inline'), 1, false) . '/>' . __('Display post date as inline text instead of circle style', 'themify') . ' </span> </p>'; /** * Featured Image Position */ $output .= '<p data-show-if-element="[name=setting-default_page_post_layout_type]" data-show-if-value="classic"> <span class="label">' . __('Featured Image Position', 'themify') . '</span> <select name="' . esc_attr($prefix) . 'single_media_position">' . themify_options_module($media_position, $prefix . 'single_media_position') . ' </select> </p>'; /** * Hide Featured Image */ $output .= '<p> <span class="label">' . __('Featured Image', 'themify') . '</span> <select name="' . $prefix . 'post_image">' . themify_options_module($show_hide_options, $prefix . 'post_image') . ' </select> </p>'; /** * Unlink Featured Image */ $output .= '<p> <span class="label">' . __('Featured Image Link', 'themify') . '</span> <select name="' . $prefix . 'unlink_post_image">' . themify_options_module($unlink_options, $prefix . 'unlink_post_image') . ' </select> </p>'; /** * Featured Image Sizes */ $output .= themify_feature_image_sizes_select('image_post_single_feature_size'); /** * Image dimensions */ $output .= '<p> <span class="label">' . __('Image Size', 'themify') . '</span> <input type="text" class="width2" name="setting-image_post_single_width" value="' . themify_get('setting-image_post_single_width', '', true) . '" /> ' . __('width', 'themify') . ' <small>(px)</small> <input type="text" class="width2 show_if_enabled_img_php" name="setting-image_post_single_height" value="' . themify_get('setting-image_post_single_height', '', true) . '" /> <span class="show_if_enabled_img_php">' . __('height', 'themify') . ' <small>(px)</small></span> <br /><span class="pushlabel show_if_enabled_img_php"><small>' . __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify') . '</small></span> </p>'; /** * Disable comments */ $pre = 'setting-comments_posts'; $comments_posts_checked = themify_check($pre) ? 'checked="checked"' : ''; $output .= '<p><span class="label">' . __('Post Comments', 'themify') . '</span><label for="' . $pre . '"><input type="checkbox" id="' . $pre . '" name="' . $pre . '" ' . $comments_posts_checked . ' /> ' . __('Disable comments in all Posts', 'themify') . '</label></p>'; /** * Show author box */ $pre = 'setting-post_author_box'; $author_box_checked = themify_check($pre) ? 'checked="checked"' : ''; $output .= '<p><span class="label">' . __('Show Author Box', 'themify') . '</span><label for="' . $pre . '"><input type="checkbox" id="' . $pre . '" name="' . $pre . '" ' . $author_box_checked . ' /> ' . __('Show author box in all Posts', 'themify') . '</label></p>'; /** * Remove Post Navigation */ $pre = 'setting-post_nav_'; $output .= '<p> <span class="label">' . __('Post Navigation', 'themify') . '</span> <label for="' . $pre . 'disable"> <input type="checkbox" id="' . $pre . 'disable" name="' . $pre . 'disable" ' . checked(themify_get($pre . 'disable', '', true), 'on', false) . '/> ' . __('Remove Post Navigation', 'themify') . ' </label> <span class="pushlabel vertical-grouped"> <label for="' . $pre . 'same_cat"> <input type="checkbox" id="' . $pre . 'same_cat" name="' . $pre . 'same_cat" ' . checked(themify_get($pre . 'same_cat', '', true), 'on', false) . '/> ' . __('Show only posts in the same category', 'themify') . ' </label> </span> </p>'; /** * Single post infinite scroll */ $pre = 'setting-infinite_single_posts'; $infinite_posts_checked = themify_check($pre) ? 'checked="checked"' : ''; $output .= '<p><span class="label">' . __('Single Post Infinite Scroll', 'themify') .themify_help(__('The next post will load automatically when user scrolls to the end of the post.', 'themify')) . '</span><label for="' . $pre . '"><input type="checkbox" id="' . $pre . '" name="' . $pre . '" ' . $infinite_posts_checked . ' /> ' . __('Enable infinite scroll on single post view', 'themify') . '</label> </p>'; return $output; } /** * Options get metabox * @since 1.0.0 * @var array */ if (!function_exists('themify_theme_get_post_metaboxes')) { function themify_theme_get_post_metaboxes(array $args, &$meta_boxes) { return array( array( 'name' => __('Post Options', 'themify'), 'id' => 'post-options', 'options' => themify_theme_post_meta_box(), 'pages' => 'post' ), ); } } product.php 0000644 00000003067 15151170176 0006747 0 ustar 00 <?php /** * Product Meta Box Options * @since 1.0.0 * @var array */ if (!function_exists('themify_theme_get_product_metaboxes')) { /** * @deprecated * kept for backwards compatibility */ function themify_theme_get_product_metaboxes(array $args, &$meta_boxes) { return array(); } } /** * Creates module for ajax cart style * @param array * @return string */ function themify_ajax_cart_style($data = array()) { $key = 'setting-cart_show_seconds'; $output = '<p><span class="label">' . __('Show cart', 'themify') . '</span> <select name="' . $key . '">' . themify_options_module(array( array('name' => __('Off','themify'), 'value' => 'off'), array('name' => 1, 'value' => 1000), array('name' => 2, 'value' => 2000), array('name' => 3, 'value' => 3000), array('name' => 4, 'value' => 4000), array('name' => 5, 'value' => 5000) ), $key,true,'1000') . ' </select> ' . esc_html__('seconds', 'themify') . '<br> <small class="pushlabel">' . esc_html__('When an item is added, show cart for n second(s)', 'themify') . '</small> </p>'; /** * Disable AJAX add to cart * @var String */ $output .= '<p> <label for="setting-single_ajax_cart" class="pushlabel"><input type="checkbox" id="setting-single_ajax_cart" name="setting-single_ajax_cart" ' . checked(themify_get('setting-single_ajax_cart',null,true), 'on', false) . ' /> ' . __('Disable AJAX cart on single product page', 'themify') . '</label></p>'; return $output; } portfolio.php 0000644 00000063600 15151170176 0007303 0 ustar 00 <?php /** * Portfolio Meta Box Options * @return array * @since 1.0.7 */ if (!function_exists('themify_theme_portfolio_meta_box')) { function themify_theme_portfolio_meta_box() { return array( // Layout array( 'name' => 'layout', 'title' => __('Sidebar Option', 'themify'), 'description' => '', 'type' => 'page_layout', 'show_title' => true, 'meta' => array( array('value' => 'default', 'img' => 'themify/img/default.svg', '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' => 'sidebar2', 'img' => 'images/layout-icons/sidebar2.png', 'title' => __('Left and Right', 'themify')), array('value' => 'sidebar2 content-left', 'img' => 'images/layout-icons/sidebar2-content-left.png', 'title' => __('2 Right Sidebars', 'themify')), array('value' => 'sidebar2 content-right', 'img' => 'images/layout-icons/sidebar2-content-right.png', 'title' => __('2 Left Sidebars', 'themify')), array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'title' => __('No Sidebar ', 'themify')), array('value' => 'full_width', 'img' => 'themify/img/fullwidth.svg', 'title' => __('Fullwidth (Builder Page)', 'themify')), ), 'default' => 'default', 'hide' => 'sidebar-none post_sticky_sidebar', ), array( 'name' => 'content_width', 'type' => 'hidden', ), array( 'name' => 'post_sticky_sidebar', 'title' => __('Sticky Sidebar', 'themify'), 'description' => '', 'type' => 'dropdown', 'show_title' => true, 'class' => 'hide-if sidebar-none', 'meta' => array( array('value' => '', 'name' => '', 'selected' => true), array('value' => 1, 'name' => __('Enable', 'themify')), array('value' => 0, 'name' => __('Disable', 'themify')) ), ), //Post Layout array( 'name' => 'post_layout', 'title' => __('Portfolio Layout', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'enable_toggle' => true, 'class' => 'hide-if none', 'meta' => array( array('value' => '', 'img' => 'themify/img/default.svg', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'fullwidth', 'img' => 'images/layout-icons/post-fullwidth.png', 'title' => __('Fullwidth', 'themify')), array('value' => 'classic', 'img' => 'images/layout-icons/post-classic.png', 'title' => __('Classic', 'themify')), array('value' => 'slider', 'img' => 'images/layout-icons/post-slider.png', 'title' => __('Slider', 'themify')), array('value' => 'gallery', 'img' => 'images/layout-icons/post-gallery.png', 'title' => __('Gallery', 'themify')), array('value' => 'split', 'img' => 'images/layout-icons/post-split.png', 'title' => __('Split', 'themify')) ), ), // Gallery Layout shortcode array( 'name' => 'post_layout_gallery', 'title' => '', 'description' => '', 'type' => 'gallery_shortcode', 'toggle' => 'gallery-toggle', 'class' => 'hide-if none', ), // Slider Layout shortcode array( 'name' => 'post_layout_slider', 'title' => '', 'description' => '', 'type' => 'gallery_shortcode', 'toggle' => 'slider-toggle', 'class' => 'hide-if none', ), // Featured Image Size 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" target="_blank">Regenerated</a>', 'themify'), 'options-media.php', 'https://wordpress.org/plugins/regenerate-thumbnails/'), 'type' => 'featimgdropdown', 'display_callback' => 'themify_is_image_script_disabled' ), // Multi field: Image Dimension themify_image_dimensions_field(), // Hide Title array( 'name' => 'hide_post_title', 'title' => __('Post Title', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), // Unlink Post Title array( 'name' => 'unlink_post_title', 'title' => __('Post Title Link', 'themify'), 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Unlinked', 'themify')), array('value' => 'no', 'name' => __('Linked', 'themify')) ), 'default' => 'default', ), // Hide Post Meta array( 'name' => 'hide_post_meta', 'title' => __('Post Meta', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), // Hide Post Image array( 'name' => 'hide_post_image', 'title' => __('Featured Image', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), // Unlink Post Image array( 'name' => 'unlink_post_image', 'title' => __('Featured Image Link', 'themify'), 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Unlinked', 'themify')), array('value' => 'no', 'name' => __('Linked', 'themify')) ), 'default' => 'default', ), // External Link array( 'name' => 'external_link', 'title' => __('External Link', 'themify'), 'description' => __('Link Featured Image and Post Title to external URL', 'themify'), 'type' => 'textbox', 'meta' => array() ), // Lightbox Link themify_lightbox_link_field(), // Custom menu array( 'name' => 'custom_menu', 'title' => __('Custom Menu', 'themify'), 'description' => '', 'type' => 'dropdown', // extracted from $args 'meta' => themify_get_available_menus(), ), // Separator - Project Information array( 'name' => '_separator_project_info', 'title' => '', 'description' => '', 'type' => 'separator', 'meta' => array( 'html' => '<h4>' . __('Project Info', 'themify') . '</h4><hr class="meta_fields_separator"/>' ), ), // Project Date array( 'name' => 'project_date', 'title' => __('Date', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array() ), // Project Client array( 'name' => 'project_client', 'title' => __('Client', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array() ), // Project Services array( 'name' => 'project_services', 'title' => __('Services', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array() ), // Project Launch array( 'name' => 'project_launch', 'title' => __('Link to Launch', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array() ), ); } } if (!function_exists('themify_default_portfolio_single_layout')) { /** * Default Single Portfolio Layout * @param array $data * @return string */ function themify_default_portfolio_single_layout($data = array()) { /** * Associative array containing theme settings * @var array */ $data = themify_get_data(); /** * Variable prefix key * @var string */ $prefix = 'setting-default_portfolio_single_'; /** * Sidebar Layout * @var string */ $layout = isset($data[$prefix . 'layout']) ? $data[$prefix . 'layout'] : ''; /** * Basic default options '', 'yes', 'no' * @var array */ $default_options = array( array('name' => __('Show', 'themify'), 'value' => 'no'), array('name' => __('Hide', 'themify'), 'value' => 'yes'), ); $no_yes_options = array( array('name'=>__('No', 'themify'),'value'=>'no'), array('name'=>__('Yes', 'themify'),'value'=>'yes'), ); $unlink_options = [ [ 'name' => __('Linked', 'themify'), 'value' => 'no' ], [ 'name' => __('Unlinked', 'themify'), 'value' => 'yes' ], ]; /** * Sidebar Layout Options * @var array */ $sidebar_options = array( 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' => 'sidebar2', 'img' => 'images/layout-icons/sidebar2.png', 'title' => __('Left and Right', 'themify')), array('value' => 'sidebar2 content-left', 'img' => 'images/layout-icons/sidebar2-content-left.png', 'title' => __('2 Right Sidebars', 'themify')), array('value' => 'sidebar2 content-right', 'img' => 'images/layout-icons/sidebar2-content-right.png', 'title' => __('2 Left Sidebars', 'themify')), array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'selected' => true, 'title' => __('No Sidebar', 'themify')), ); /** * Post Layout options * @var array */ $post_layout = array( array('selected' => true, 'value' => 'fullwidth', 'img' => 'images/layout-icons/post-fullwidth.png', 'title' => __('Fullwidth', 'themify')), array('value' => 'classic', 'img' => 'images/layout-icons/post-classic.png', 'title' => __('Classic', 'themify')), array('value' => 'slider', 'img' => 'images/layout-icons/post-slider.png', 'title' => __('Slider', 'themify')), array('value' => 'gallery', 'img' => 'images/layout-icons/post-gallery.png', 'title' => __('Gallery', 'themify')), array('value' => 'split', 'img' => 'images/layout-icons/post-split.png', 'title' => __('Split', 'themify')) ); /** * HTML for settings panel * @var string */ $output = '<p><span class="label">' . __('Portfolio Sidebar Option', 'themify') . '</span>'; foreach ($sidebar_options as $option) { if ((!isset($layout) || !$layout ) && ( isset($option['selected']) && $option['selected'] )) { $layout = $option['value']; } if ($layout == $option['value']) { $class = 'selected'; } else { $class = ''; } $output .= '<a href="#" class="preview-icon ' . $class . '" title="' . $option['title'] . '"><img src="' . THEME_URI . '/' . $option['img'] . '" alt="' . $option['value'] . '" /></a>'; } $output .= '<input type="hidden" name="' . $prefix . 'layout" class="val" value="' . $layout . '" />'; $output .= '</p>'; $output .= '<p class="pushlabel"> <label for="' . esc_attr($prefix) . 'sticky_sidebar"> <input type="checkbox" id="' . esc_attr($prefix) . 'sticky_sidebar" name="' . esc_attr($prefix) . 'sticky_sidebar" value="1" ' . checked(themify_get(esc_attr($prefix) . "sticky_sidebar"), 1, false) . ' />' . __('Enable sticky sidebar', 'themify') . ' </label> </p>'; /** * Post Layout placement */ $output .= '<p> <span class="label">' . __('Portfolio Layout', 'themify') . '</span>'; $val = themify_get($prefix . 'portfolio_layout_type'); foreach ($post_layout as $option) { if (!$val && !empty($option['selected'])) { $val = $option['value']; } if ($val == $option['value']) { $class = 'selected'; } else { $class = ''; } $output .= '<a href="#" class="preview-icon ' . $class . '" title="' . $option['title'] . '"><img src="' . THEME_URI . '/' . $option['img'] . '" alt="' . $option['value'] . '" /></a>'; } $output .= ' <input type="hidden" name="' . $prefix . 'portfolio_layout_type" class="val" value="' . $val . '" /> </p>'; /** * HTML for settings panel * @var string */ $output .= '<p> <span class="label">' . __('Portfolio Title', 'themify') . '</span> <select name="' . $prefix . 'title">' . themify_options_module($default_options, $prefix . 'title') . ' </select> </p>'; $output .= '<p> <span class="label">' . __('Portfolio Title Link', 'themify') . '</span> <select name="' . $prefix . 'unlink_post_title">' . themify_options_module($unlink_options, $prefix . 'unlink_post_title') . ' </select> </p>'; // Hide Post Meta ///////////////////////////////////////// $output .= '<p> <span class="label">' . __('Portfolio Meta', 'themify') . '</span> <select name="' . $prefix . 'post_meta_category">' . themify_options_module($default_options, $prefix . 'post_meta_category') . ' </select> </p>'; // Hide Portfolio Image ///////////////////////////////////////// $output .= '<p> <span class="label">' . __('Portfolio Image', 'themify') . '</span> <select name="' . $prefix . 'image">' .themify_options_module($default_options, $prefix . 'image') . '</select> </p>'; $output .= '<p> <span class="label">' . __('Portfolio Image Link', 'themify') . '</span> <select name="' . esc_attr($prefix . 'unlink_post_image') . '">' . themify_options_module($unlink_options, $prefix . 'unlink_post_image', true, '') . ' </select> </p>'; /** * Image Dimensions */ $output .= ' <p> <span class="label">' . __('Image Size', 'themify') . '</span> <input type="text" class="width2" name="' . $prefix . 'image_post_width" value="' . themify_get($prefix . 'image_post_width') . '" /> ' . __('width', 'themify') . ' <small>(px)</small> <input type="text" class="width2 show_if_enabled_img_php" name="' . $prefix . 'image_post_height" value="' . themify_get($prefix . 'image_post_height') . '" /> <span class="show_if_enabled_img_php">' . __('height', 'themify') . ' <small>(px)</small></span> </p>'; // Portfolio Navigation $prefix = 'setting-portfolio_nav_'; $output .= ' <p> <span class="label">' . __('Portfolio Navigation', 'themify') . '</span> <label for="' . $prefix . 'disable"> <input type="checkbox" id="' . $prefix . 'disable" name="' . $prefix . 'disable" ' . checked(themify_get($prefix . 'disable'), 'on', false) . '/> ' . __('Remove portfolio navigation', 'themify') . ' </label> <span class="pushlabel vertical-grouped"> <label for="' . $prefix . 'same_cat"> <input type="checkbox" id="' . $prefix . 'same_cat" name="' . $prefix . 'same_cat" ' . checked(themify_get($prefix . 'same_cat'), 'on', false) . '/> ' . __('Show only portfolios in the same category', 'themify') . ' </label> </span> </p>'; $output .= ' <p> <span class="label">' . __('Portfolio Comments', 'themify') . '</span> <label for="setting-portfolio_comments"> <input type="checkbox" id="setting-portfolio_comments" name="setting-portfolio_comments" ' . checked(themify_get('setting-portfolio_comments'), 'on', false) . '/> ' . __('Enable portfolio comments', 'themify') . ' </label> </p>'; return $output; } } if (!function_exists('themify_default_portfolio_index_layout')) { /** * Default Archive Portfolio Layout * @param array $data * @return string */ function themify_default_portfolio_index_layout($data = array()) { /** * Associative array containing theme settings * @var array */ $data = themify_get_data(); /** * Variable prefix key * @var string */ $prefix = 'setting-default_portfolio_index_'; /** * Basic default options '', 'yes', 'no' * @var array */ $default_options = array( array('name' => __('Show', 'themify'), 'value' => 'no'), array('name' => __('Hide', 'themify'), 'value' => 'yes'), ); /** * Default options 'yes', 'no' * @var array */ $binary_options = array( array('name' => __('Hide', 'themify'), 'value' => 'yes'), array('name' => __('Show', 'themify'), 'value' => 'no') ); $unlink_options = [ [ 'name' => __('Linked', 'themify'), 'value' => 'no' ], [ 'name' => __('Unlinked', 'themify'), 'value' => 'yes' ], ]; /** * Sidebar Layout * @var string */ $layout = isset($data[$prefix . 'layout']) ? $data[$prefix . 'layout'] : ''; /** * Sidebar Layout Options * @var array */ $sidebar_options = array( 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' => 'sidebar2', 'img' => 'images/layout-icons/sidebar2.png', 'title' => __('Left and Right', 'themify')), array('value' => 'sidebar2 content-left', 'img' => 'images/layout-icons/sidebar2-content-left.png', 'title' => __('2 Right Sidebars', 'themify')), array('value' => 'sidebar2 content-right', 'img' => 'images/layout-icons/sidebar2-content-right.png', 'title' => __('2 Left Sidebars', 'themify')), array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'selected' => true, 'title' => __('No Sidebar', 'themify')), ); /** * Post Layout Options * @var array */ $post_layout_options = array( array('value' => 'list-post', 'img' => 'images/layout-icons/list-post.png', 'title' => __('List Post', 'themify')), array('value' => 'grid2', 'img' => 'images/layout-icons/grid2.png', 'title' => __('Grid 2', 'themify')), array('value' => 'grid3', 'img' => 'images/layout-icons/grid3.png', 'title' => __('Grid 3', 'themify'), 'selected' => true), array('value' => 'grid4', 'img' => 'images/layout-icons/grid4.png', 'title' => __('Grid 4', 'themify')), array('value' => 'grid5', 'img' => 'images/layout-icons/grid5.png','title' => __('Grid 5', 'themify')), array('value' => 'grid6','img' => 'images/layout-icons/grid6.png','title' => __('Grid 6', 'themify')), array('value' => 'auto_tiles', 'img' => 'images/layout-icons/auto-tiles.png', 'title' => __('Tiles', 'themify')) ); /** * HTML for settings panel * @var string */ $output = '<p> <span class="label">' . __('Portfolio Sidebar Option', 'themify') . '</span>'; foreach ($sidebar_options as $option) { if (( '' == $layout || !$layout || !isset($layout) ) && ( isset($option['selected']) && $option['selected'] )) { $layout = $option['value']; } if ($layout == $option['value']) { $class = 'selected'; } else { $class = ''; } $output .= '<a href="#" class="preview-icon ' . $class . '" title="' . $option['title'] . '"><img src="' . THEME_URI . '/' . $option['img'] . '" alt="' . $option['value'] . '" /></a>'; } $output .= '<input type="hidden" name="' . $prefix . 'layout" class="val" value="' . $layout . '" />'; $output .= '</p>'; $output .= '<p class="pushlabel"> <label for="' . esc_attr($prefix) . 'sticky_sidebar"> <input type="checkbox" id="' . esc_attr($prefix) . 'sticky_sidebar" name="' . esc_attr($prefix) . 'sticky_sidebar" value="1" ' . checked(themify_get(esc_attr($prefix) . "sticky_sidebar"), 1, false) . ' />' . __('Enable sticky sidebar', 'themify') . ' </label> </p>'; /** * Post Layout */ $output .= '<p> <span class="label">' . __('Portfolio Layout', 'themify') . '</span>'; $val = isset($data[$prefix . 'post_layout']) ? $data[$prefix . 'post_layout'] : ''; foreach ($post_layout_options as $option) { if (( '' == $val || !$val || !isset($val) ) && ( isset($option['selected']) && $option['selected'] )) { $val = $option['value']; } if ($val == $option['value']) { $class = "selected"; } else { $class = ""; } $output .= '<a href="#" class="preview-icon ' . $class . '" title="' . $option['title'] . '"><img src="' . THEME_URI . '/' . $option['img'] . '" alt="' . $option['value'] . '" /></a>'; } $output .= ' <input type="hidden" name="' . $prefix . 'post_layout" class="val" value="' . $val . '" /> </p>'; /** * Post Content Layout */ $output .= '<p> <span class="label">' . __('Post Content Layout', 'themify') . '</span> <select name="setting-portfolio_content_layout">' . themify_options_module(array( array('name' => __('Default', 'themify'), 'value' => ''), array('name' => __('Overlay', 'themify'), 'value' => 'overlay'), array('name' => __('Polaroid', 'themify'), 'value' => 'polaroid'), array('name' => __('Boxed', 'themify'), 'value' => 'boxed'), array('name' => __('Flip', 'themify'), 'value' => 'flip') ), 'setting-portfolio_content_layout') . ' </select> </p>'; /** * Enable Post Filter */ $output .= '<p><span class="label">' . __('Post Filter', 'themify') . '</span> <select name="setting-portfolio_post_filter">' . themify_options_module($binary_options, 'setting-portfolio_post_filter') . ' </select> </p>'; /** * Enable Masonry */ $output .= '<p> <span class="label">' . __('Masonry Layout', 'themify') . '</span> <select name="setting-portfolio_disable_masonry">' . themify_options_module($binary_options, 'setting-portfolio_disable_masonry') . ' </select> </p>'; $output .= '<p><span class="label">' . __('Align Posts', 'themify') . '</span> <label><input type="checkbox" name="setting-portfolio_masonry_align" ' . checked(themify_check('setting-portfolio_masonry_align',true), true, false) . ' /></label></p>'; /** * Post Gutter */ $output .= '<p> <span class="label">' . __('Post Gutter', 'themify') . '</span> <select name="setting-portfolio_gutter">' . themify_options_module(array( array('name' => __('Default', 'themify'), 'value' => 'gutter'), array('name' => __('No gutter', 'themify'), 'value' => 'no-gutter') ), 'setting-portfolio_gutter') . ' </select> </p>'; /** * Display Content */ $output .= '<p> <span class="label">' . __('Display Content', 'themify') . '</span> <select name="' . $prefix . 'display">' . themify_options_module(array( array('name' => __('None', 'themify'), 'value' => 'none'), array('name' => __('Full Content', 'themify'), 'value' => 'content'), array('name' => __('Excerpt', 'themify'), 'value' => 'excerpt') ), $prefix . 'display') . ' </select> </p>'; $output .= '<p> <span class="label">' . __('Portfolio Title', 'themify') . '</span> <select name="' . $prefix . 'title">' . themify_options_module($default_options, $prefix . 'title') . ' </select> </p>'; $output .= '<p> <span class="label">' . __('Portfolio Title Link', 'themify') . '</span> <select name="' . $prefix . 'unlink_post_title">' . themify_options_module($unlink_options, $prefix . 'unlink_post_title') . ' </select> </p>'; // Hide Post Meta ///////////////////////////////////////// $output .= '<p> <span class="label">' . __('Portfolio Meta', 'themify') . '</span> <select name="' . $prefix . 'post_meta_category">' . themify_options_module($default_options, $prefix . 'post_meta_category', true, '') . ' </select> </p>'; // Hide Portfolio Image ///////////////////////////////////////// $output .= '<p> <span class="label">' . __('Portfolio Image', 'themify') . '</span> <select name="' . $prefix . 'image">' .themify_options_module($default_options, $prefix . 'image') . '</select> </p>'; $output .= '<p> <span class="label">' . __('Portfolio Image Link', 'themify') . '</span> <select name="' . esc_attr($prefix . 'unlink_post_image') . '">' . themify_options_module($unlink_options, $prefix . 'unlink_post_image', true, '') . ' </select> </p>'; /** * Image Dimensions */ $output .= '<p> <span class="label">' . __('Image Size', 'themify') . '</span> <input type="text" class="width2" name="' . $prefix . 'image_post_width" value="' . themify_get($prefix . 'image_post_width') . '" /> ' . __('width', 'themify') . ' <small>(px)</small> <input type="text" class="width2 show_if_enabled_img_php" name="' . $prefix . 'image_post_height" value="' . themify_get($prefix . 'image_post_height') . '" /> <span class="show_if_enabled_img_php">' . __('height', 'themify') . ' <small>(px)</small></span> </p>'; return $output; } } if (!function_exists('themify_portfolio_slug')) { /** * Portfolio Slug * @param array $data * @return string */ function themify_portfolio_slug($data = array()) { $data = themify_get_data(); $portfolio_slug = isset($data['themify_portfolio_slug']) ? $data['themify_portfolio_slug'] : apply_filters('themify_portfolio_rewrite', 'project'); $output = ' <p> <span class="label">' . __('Portfolio Base Slug', 'themify') . '</span> <input type="text" name="themify_portfolio_slug" value="' . $portfolio_slug . '" class="slug-rewrite"> </p>'; $portfolio_category_slug = isset($data['themify_portfolio_category_slug']) ? $data['themify_portfolio_category_slug'] : apply_filters('themify_portfolio_category_rewrite', 'portfolio-category'); $output .= ' <p> <span class="label">' . __('Portfolio Category Slug', 'themify') .themify_help(sprintf(__('Use only lowercase letters, numbers, underscores and dashes. After changing this, go to <a href="%s">permalinks</a> and click "Save changes" to refresh them.', 'themify'), admin_url('options-permalink.php'))) . '</span> <input type="text" name="themify_portfolio_category_slug" value="' . $portfolio_category_slug . '" class="slug-rewrite"> </p>'; return $output; } } /** * Options get metabox * @since 1.0.0 * @var array */ if (!function_exists('themify_theme_get_portfolio_metaboxes')) { function themify_theme_get_portfolio_metaboxes(array $args, &$meta_boxes) { /* remove the "portfolio-options" metabox added by Portfolio module in Builder */ foreach ($meta_boxes as $i => $m) { if ($m['id'] === 'portfolio-options' && $m['pages'] === 'portfolio') { unset($meta_boxes[$i]); break; } } return array( array( 'name' => __('Portfolio Options', 'themify'), 'id' => 'portfolio-options', 'options' => themify_theme_portfolio_meta_box(), 'pages' => 'portfolio' ), ); } } page.php 0000644 00000106364 15151170176 0006207 0 ustar 00 <?php /** * Page Meta Box Options * @since 1.0.0 * @return array */ if (!function_exists('themify_theme_page_meta_box')) { function themify_theme_page_meta_box() { return array( // Page Layout array( 'name' => 'page_layout', 'title' => __('Page Layout', 'themify'), 'description' => '', 'type' => 'page_layout', 'show_title' => true, 'meta' => array( array('value' => 'default', 'img' => 'themify/img/default.svg', 'selected' => true, 'title' => __('Default', 'themify')), array('value' => 'full_width', 'img' => 'themify/img/fullwidth.svg', 'title' => __('Fullwidth (Builder Page)', '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' => 'sidebar2', 'img' => 'images/layout-icons/sidebar2.png', 'title' => __('Left and Right', 'themify')), array('value' => 'sidebar2 content-left', 'img' => 'images/layout-icons/sidebar2-content-left.png', 'title' => __('2 Right Sidebars', 'themify')), array('value' => 'sidebar2 content-right', 'img' => 'images/layout-icons/sidebar2-content-right.png', 'title' => __('2 Left Sidebars', 'themify')), array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'title' => __('No Sidebar ', 'themify')), array('value' => 'section_scroll', 'img' => 'images/layout-icons/section-scroll.png', 'title' => __('Section Scrolling', 'themify')), ), 'default' => 'default', ), array( 'name' => 'content_width', 'type' => 'hidden', ), array( 'name' => 'section_full_scrolling', 'type' => 'hidden', ), array( 'name' => 'post_sticky_sidebar', 'title' => __('Sticky Sidebar', 'themify'), 'description' => '', 'type' => 'dropdown', 'show_title' => true, 'meta' => array( array('value' => '', 'name' => '', 'selected' => true), array('value' => 1, 'name' => __('Enable', 'themify')), array('value' => 0, 'name' => __('Disable', 'themify')) ), ), // Hide page title array( 'name' => 'hide_page_title', 'title' => __('Page Title', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default' ), // Custom menu array( 'name' => 'custom_menu', 'title' => __('Custom Menu', 'themify'), 'description' => '', 'type' => 'dropdown', // extracted from $args 'meta' => themify_get_available_menus() ), // Full section scroll array( 'type' => 'separator', 'meta' => [ 'html' => '<hr><strong>' . __( 'Section Scrolling Options', 'themify' ) . '</strong>', ], 'class' => 'tf_section_scroll_setting' ), // Scroll Section on mobile devices array( 'name' => 'section_scrolling_mobile', 'title' => __('Keep section scroll enabled on tablet/mobile', 'themify'), 'type' => 'checkbox', 'default' => 'checked', 'shop'=>false, 'class' => 'section-scrolling-mobile tf_section_scroll_setting' ), array( 'name' => 'section_scrolling_effect', 'type' => 'dropdown', 'meta' => array( array('value' => 'scroll', 'name' => __('Scroll', 'themify'), 'selected' => true), array('value' => 'fade', 'name' => __('Fade', 'themify')) ), 'shop' => false, 'default' => 'scroll', 'class' => 'section-scrolling-effect tf_section_scroll_setting', 'title' => __(' Scroll Effect', 'themify') ), // section scroll direction array( 'name' => 'section_scrolling_direction', 'type' => 'dropdown', 'meta' => array( array('value' => 'vertical', 'name' => __('Vertical', 'themify'), 'selected' => true), array('value' => 'horizontal', 'name' => __('Horizontal', 'themify')) ), 'shop'=>false, 'default' => 'vertical', 'class' => 'section-scrolling-direction tf_section_scroll_setting', 'title' => __('Scroll Direction', 'themify') ), // section scroll style array( 'name' => 'section_scrolling_style', 'type' => 'dropdown', 'meta' => array( array('value' => 'snake', 'name' => __('Snake-style', 'themify'), 'selected' => true), array('value' => 'single', 'name' => __('Single-direction', 'themify')) ), 'default' => 'snake', 'shop'=>false, 'class' => 'section-scrolling-style tf_section_scroll_setting', 'title' => __('Scroll Style', 'themify') ), // Enalble parallax scrolling array( 'name' => 'section_scrolling_parallax', 'title' => __('Disable parallax scrolling', 'themify'), 'type' => 'checkbox', 'default' => 'off', 'shop'=>false, 'class' => 'section-scrolling-parallax tf_section_scroll_setting' ), array( 'name' => 'fullpage_footer_section', 'title' => __('Append footer as last section', 'themify'), 'type' => 'checkbox', 'default' => 'off', 'shop' => false, 'class' => 'fullpage-footer tf_section_scroll_setting', ), ); } } /** * Default Page Layout Module * @param array $data Theme settings data * @return string Markup for module. * @since 1.0.0 */ function themify_default_page_layout($data = array()) { $data = themify_get_data(); /** * Theme Settings Option Key Prefix * @var string */ $prefix = 'setting-default_page_'; /** * Sidebar placement options * @var array */ $sidebar_location_options = themify_sidebar_location_options(); /** * Tertiary options <blank>|yes|no * @var array */ $default_options = array( array('name' => '', 'value' => ''), array('name' => __('Hide', 'themify'), 'value' => 'yes'), array('name' => __('Show', 'themify'), 'value' => 'no') ); $show_hide_options = array( array('name'=>__('Show', 'themify'),'value'=>'no'), array('name'=>__('Hide', 'themify'),'value'=>'yes'), ); /** * Module markup * @var string */ $output = ''; /** * Page sidebar placement */ $output .= '<p> <span class="label">' . __('Page Sidebar Option', 'themify') . '</span>'; $val = isset($data[$prefix . 'layout']) ? $data[$prefix . 'layout'] : ''; foreach ($sidebar_location_options as $option) { if (( '' == $val || !$val || !isset($val) ) && ( isset($option['selected']) && $option['selected'] )) { $val = $option['value']; } if ($val == $option['value']) { $class = "selected"; } else { $class = ""; } $output .= '<a href="#" class="preview-icon ' . $class . '" title="' . $option['title'] . '"><img src="' . THEME_URI . '/' . $option['img'] . '" alt="' . $option['value'] . '" /></a>'; } $output .= '<input type="hidden" name="' . $prefix . 'layout" class="val" value="' . $val . '" /></p>'; $output .= '<p class="pushlabel" data-show-if-element="[name=' . esc_attr($prefix) . 'layout]" data-show-if-value=\'["sidebar1", "sidebar1 sidebar-left", "sidebar2" ,"sidebar2 content-left" ,"sidebar2 content-right"]\'> <label for="' . esc_attr($prefix) . 'sticky_sidebar"> <input type="checkbox" id="' . esc_attr($prefix) . 'sticky_sidebar" name="' . esc_attr($prefix) . 'sticky_sidebar" value="1" ' . checked(themify_get(esc_attr($prefix) . 'sticky_sidebar'), 1, false) . ' />' . __('Enable sticky sidebar', 'themify') . ' </label> </p>'; /** * Hide Title in All Pages */ $output .= '<p> <span class="label">' . __('Title in All Pages', 'themify') . '</span> <select name="setting-hide_page_title">' . themify_options_module($show_hide_options, 'setting-hide_page_title') . ' </select> </p>'; /** * Hide Feauted images in All Pages */ $output .= '<p> <span class="label">' . __('Featured Image', 'themify') . '</span> <select name="setting-hide_page_image">' . themify_options_module($show_hide_options, 'setting-hide_page_image') . ' </select> </p>'; /** * Featured Image dimensions */ $output .= '<p> <span class="label">' . __('Image Size', 'themify') . '</span> <input type="text" class="width2" name="setting-page_featured_image_width" value="' . themify_get('setting-page_featured_image_width') . '" /> ' . __('width', 'themify') . ' <small>(px)</small> <input type="text" class="width2 show_if_enabled_img_php" name="setting-page_featured_image_height" value="' . themify_get('setting-page_featured_image_height') . '" /> <span class="show_if_enabled_img_php">' . __('height', 'themify') . ' <small>(px)</small></span> <br /><span class="pushlabel show_if_enabled_img_php"><small>' . __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify') . '</small></span> </p>'; /** * Page Comments */ $pre = 'setting-comments_pages'; $output .= '<p><span class="label">' . __('Page Comments', 'themify') . '</span><label for="' . $pre . '"><input type="checkbox" id="' . $pre . '" name="' . $pre . '" ' . checked(themify_get($pre), 'on', false) . ' /> ' . __('Disable comments in all Pages', 'themify') . '</label></p>'; return $output; } /** * Default Custom Post Layout Module * @param array $data Theme settings data * @return string Markup for module. * @since 1.0.0 */ if (!function_exists('themify_ultra_custom_post_type_layouts')) { function themify_ultra_custom_post_type_layouts($data = array()) { $data = themify_get_data(); /** * Theme Settings Option Key Prefix * @var string */ $prefix = 'setting-custom_post_'; /** * Module markup * @var string */ $output = ''; $custom_posts = null; $post_types = get_post_types(array('public' => true, 'publicly_queryable' => 'true'), 'objects'); $excluded_types = apply_filters( 'themify_exclude_CPT_for_sidebar', array('post', 'page', 'attachment', 'tbuilder_layout', 'tbuilder_layout_part', 'section', 'portfolio')); if ( themify_is_woocommerce_active() ) { $excluded_types[] = 'product'; } foreach ($post_types as $key => $value) { if (!in_array($key, $excluded_types)) { $custom_posts[$key] = array('name' => $value->labels->singular_name, 'archive' => $value->has_archive); } } $custom_posts = apply_filters('themify_get_public_post_types', $custom_posts); /** * Sidebar placement options * @var array */ $sidebar_location_options = themify_sidebar_location_options(); /** * Page sidebar placement */ if (is_array($custom_posts)) { foreach ($custom_posts as $key => $cPost) { $output .= sprintf('<h4>%s %s</h4>', $cPost['name'], __('Post Type', 'themify')); if ($cPost['archive']) { $output .= '<p>' . sprintf('<span class="label">%s %s</span>', $cPost['name'], __('Archive Sidebar', 'themify')); $val = isset($data[$prefix . $key . '_archive']) ? $data[$prefix . $key . '_archive'] : ''; foreach ($sidebar_location_options as $option) { if (( '' == $val || !$val || !isset($val) ) && ( isset($option['selected']) && $option['selected'] )) { $val = $option['value']; } if ($val == $option['value']) { $class = "selected"; } else { $class = ""; } $output .= '<a href="#" class="preview-icon ' . $class . '" title="' . $option['title'] . '"><img src="' . THEME_URI . '/' . $option['img'] . '" alt="' . $option['value'] . '" /></a>'; } $output .= '<input type="hidden" name="' . ($prefix . $key) . '_archive" class="val" value="' . $val . '" /></p>'; $output .= '<p class="pushlabel" data-show-if-element="[name=' . ($prefix.$key) . '_archive]" data-show-if-value=\'["sidebar1", "sidebar1 sidebar-left", "sidebar2" ,"sidebar2 content-left" ,"sidebar2 content-right"]\'> <label for="'.esc_attr($prefix.$key).'_archive_post_sticky_sidebar"> <input type="checkbox" id="'.esc_attr($prefix.$key).'_archive_post_sticky_sidebar" name="'.esc_attr($prefix.$key).'_archive_post_sticky_sidebar" value="1" '.checked( themify_get( esc_attr($prefix.$key).'_archive_post_sticky_sidebar' ),1, false ) .' />'.__('Enable sticky sidebar', 'themify').' </label> </p>'; } $output .= '<p>' . sprintf('<span class="label">%s %s</span>', $cPost['name'], __('Single Sidebar', 'themify')); $val = isset($data[$prefix . $key . '_single']) ? $data[$prefix . $key . '_single'] : ''; foreach ($sidebar_location_options as $option) { if (!$val && !empty($option['selected'])) { $val = $option['value']; } if ($val == $option['value']) { $class = "selected"; } else { $class = ""; } $output .= '<a href="#" class="preview-icon ' . $class . '" title="' . $option['title'] . '"><img src="' . THEME_URI . '/' . $option['img'] . '" alt="' . $option['value'] . '" /></a>'; } $output .= '<input type="hidden" name="' . ($prefix . $key) . '_single" class="val" value="' . $val . '" /></p>'; $output .= '<p class="pushlabel" data-show-if-element="[name=' . ($prefix.$key) . '_single]" data-show-if-value=\'["sidebar1", "sidebar1 sidebar-left", "sidebar2" ,"sidebar2 content-left" ,"sidebar2 content-right"]\'> <label for="'.esc_attr($prefix.$key).'_single_post_sticky_sidebar"> <input type="checkbox" id="'.esc_attr($prefix.$key).'_single_post_sticky_sidebar" name="'.esc_attr($prefix.$key).'_single_post_sticky_sidebar" value="1" '.checked( themify_get( esc_attr($prefix.$key).'_single_post_sticky_sidebar' ),1, false ) .' />'.__('Enable sticky sidebar', 'themify').' </label> </p>'; } } return $output; } } /** * Query Posts Options * @return array * @since 1.0.0 */ function themify_theme_query_post_meta_box() { return array( // Notice 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'), 'https://themify.me/docs/query-posts') . '</div>' ), ), // Query Category 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() ), // Query All Post Types array( 'name' => 'query_all_post_types', 'type' => 'dropdown', 'title' => __('Query All Post Types', 'themify'), 'meta' => array( array( 'value' => '', 'name' => '', ), array( 'value' => 'yes', 'name' => 'Yes', ), array( 'value' => 'no', 'name' => 'No', ), ) ), // Descending or Ascending Order for Posts 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') ), 'default' => 'desc' ), // Criteria to Order By array( 'name' => 'orderby', 'title' => __('Order By', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('name' => __('Date', 'themify'), 'value' => 'date', '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' => __('Custom Field String', 'themify'), 'value' => 'meta_value'), array('name' => __('Custom Field Numeric', 'themify'), 'value' => 'meta_value_num') ), 'default' => 'date', 'hide' => 'date|rand|author|title|comment_count|modified|name|ID field-meta-key' ), array( 'name' => 'meta_key', 'title' => __('Custom Field Key', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array('size' => 'medium'), 'class' => 'field-meta-key' ), // Post Layout 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 ), array( 'value' => 'grid2', 'img' => 'images/layout-icons/grid2.png', 'title' => __('Grid 2', 'themify') ), array( 'value' => 'grid3', 'img' => 'images/layout-icons/grid3.png', 'title' => __('Grid 3', 'themify') ), array( 'value' => 'grid4', 'img' => 'images/layout-icons/grid4.png', 'title' => __('Grid 4', 'themify') ), array( 'value' => 'grid5', 'img' => 'images/layout-icons/grid5.png', 'title' => __('Grid 5', 'themify') ), array( 'value' => 'grid6', 'img' => 'images/layout-icons/grid6.png', 'title' => __('Grid 6', '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('value' => 'auto_tiles', 'img' => 'images/layout-icons/auto-tiles.png', 'title' => __('Tiles', 'themify') ) ), 'default' => 'list-post', ), // Post Content Layout array( 'name' => 'post_content_layout', 'title' => __('Post Content Layout', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array( 'value' => '', 'name' => '', 'selected' => true, ), array( 'value' => 'overlay', 'name' => __('Overlay', 'themify'), ), array( 'value' => 'polaroid', 'name' => __('Polaroid', 'themify'), ), array( 'value' => 'boxed', 'name' => __('Boxed', 'themify'), ), array( 'value' => 'flip', 'name' => __('Flip', 'themify'), ) ) ), // Masonry Layout array( 'name' => 'disable_masonry', 'title' => __('Masonry Layout', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array( 'value' => '', 'name' => '', 'selected' => true, ), array( 'value' => 'yes', 'name' => __('Enable', 'themify'), ), array( 'value' => 'no', 'name' => __('Disable', 'themify'), ) ) ), // Post Gutter array( 'name' => 'post_gutter', 'title' => __('Post Gutter', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array( 'value' => '', 'name' => '', 'selected' => true, ), array( 'value' => 'no-gutter', 'name' => __('No gutter', 'themify'), ) ) ), // Infinite Scroll array( 'name' => 'more_posts', 'title' => __('Infinite Scroll', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array( 'value' => '', 'name' => '', 'selected' => true, ), array( 'value' => 'infinite', 'name' => __('Enable', 'themify'), ), array( 'value' => 'pagination', 'name' => __('Disable', 'themify'), ) ) ), // Posts Per Page array( 'name' => 'posts_per_page', 'title' => __('Posts Per Page', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array('size' => 'small') ), // Display Content array( 'name' => 'display_content', 'title' => __('Display Content', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('name' => __('Full Content', 'themify'), 'value' => 'content'), array('name' => __('Excerpt', 'themify'), 'value' => 'excerpt', 'selected' => true), array('name' => __('None', 'themify'), 'value' => 'none') ), 'default' => 'excerpt', ), // Post filter array( 'name' => 'post_filter', 'type' => 'dropdown', 'title' => __('Post Filter', 'themify'), 'meta' => array( array( 'value' => '', 'name' => '', ), array( 'value' => 'yes', 'name' => 'Yes', ), array( 'value' => 'no', 'name' => 'No', ), ) ), // Featured Image Size array( 'name' => 'feature_size_page', 'title' => __('Image Size', 'themify'), 'description' => sprintf(__('Image sizes can be set at <a href="%s">Media Settings</a> and <a href="%s" target="_blank">Regenerated</a>', 'themify'), 'options-media.php', 'https://wordpress.org/plugins/regenerate-thumbnails/'), 'type' => 'featimgdropdown', 'display_callback' => 'themify_is_image_script_disabled' ), // Multi field: Image Dimension themify_image_dimensions_field(), // Hide Title array( 'name' => 'hide_title', 'title' => __('Post Title', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), // Unlink Post Title array( 'name' => 'unlink_title', 'title' => __('Post Title Link', 'themify'), 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Unlinked', 'themify')), array('value' => 'no', 'name' => __('Linked', 'themify')) ), 'default' => 'default', ), // Hide Post Date array( 'name' => 'hide_date', 'title' => __('Post Date', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), // Hide Post Meta themify_multi_meta_field(), // Hide Post Image array( 'name' => 'hide_image', 'title' => __('Featured Image', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), // Unlink Post Image array( 'name' => 'unlink_image', 'title' => __('Featured Image Link', 'themify'), 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Unlinked', 'themify')), array('value' => 'no', 'name' => __('Linked', 'themify')) ), 'default' => 'default', ), // Pagination Visibility array( 'name' => 'hide_navigation', 'title' => __('Pagination', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), ); } /** * Portfolio Meta Box Options * @return array * @since 1.0.7 */ function themify_theme_query_portfolio_meta_box() { return array( // Query Category array( 'name' => 'portfolio_query_category', 'title' => __('Portfolio Category', 'themify'), 'description' => __('Select a portfolio category or enter multiple portfolio category IDs (eg. 2,5,6). Enter 0 to display all portfolio categories.', 'themify'), 'type' => 'query_category', 'meta' => array('taxonomy' => 'portfolio-category') ), // Descending or Ascending Order for Portfolios array( 'name' => 'portfolio_order', 'title' => __('Order', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('name' => __('Descending', 'themify'), 'value' => 'desc', 'selected' => true), array('name' => __('Ascending', 'themify'), 'value' => 'asc') ), 'default' => 'desc', ), // Criteria to Order By array( 'name' => 'portfolio_orderby', 'title' => __('Order By', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('name' => __('Date', 'themify'), 'value' => 'date', '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' => __('Custom Field String', 'themify'), 'value' => 'meta_value'), array('name' => __('Custom Field Numeric', 'themify'), 'value' => 'meta_value_num') ), 'default' => 'date', 'hide' => 'date|rand|author|title|comment_count|modified|name|ID field-portfolio-meta-key' ), array( 'name' => 'portfolio_meta_key', 'title' => __('Custom Field Key', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array('size' => 'medium'), 'class' => 'field-portfolio-meta-key' ), // Post Layout array( 'name' => 'portfolio_layout', 'title' => __('Portfolio Layout', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => array( array( 'value' => 'list-post', 'img' => 'images/layout-icons/list-post.png', 'selected' => true ), array( 'value' => 'grid2', 'img' => 'images/layout-icons/grid2.png', 'title' => __('Grid 2', 'themify') ), array( 'value' => 'grid3', 'img' => 'images/layout-icons/grid3.png', 'title' => __('Grid 3', 'themify') ), array( 'value' => 'grid4', 'img' => 'images/layout-icons/grid4.png', 'title' => __('Grid 4', 'themify') ), array( 'value' => 'grid5', 'img' => 'images/layout-icons/grid5.png', 'title' => __('Grid 5', 'themify') ), array( 'value' => 'grid6', 'img' => 'images/layout-icons/grid6.png', 'title' => __('Grid 6', 'themify') ), array( 'value' => 'slider', 'img' => 'images/layout-icons/slider-default.png', 'title' => __('Slider', 'themify') ), array('value' => 'auto_tiles', 'img' => 'images/layout-icons/auto-tiles.png', 'title' => __('Tiles', 'themify') ) ), 'default' => 'list-post', ), // Post Content Layout array( 'name' => 'portfolio_content_layout', 'title' => __('Post Content Layout', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array( 'value' => '', 'name' => '', 'selected' => true, ), array( 'value' => 'overlay', 'name' => __('Overlay', 'themify'), ), array( 'value' => 'polaroid', 'name' => __('Polaroid', 'themify'), ), array( 'value' => 'boxed', 'name' => __('Boxed', 'themify'), ), array( 'value' => 'flip', 'name' => __('Flip', 'themify'), ), ) ), // Masonry Layout array( 'name' => 'portfolio_disable_masonry', 'title' => __('Masonry Layout', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array( 'value' => '', 'name' => '', 'selected' => true, ), array( 'value' => 'yes', 'name' => __('Enable', 'themify'), ), array( 'value' => 'no', 'name' => __('Disable', 'themify'), ) ) ), // Post Gutter array( 'name' => 'portfolio_post_gutter', 'title' => __('Post Gutter', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array( 'value' => '', 'name' => '', 'selected' => true, ), array( 'value' => 'no-gutter', 'name' => __('No gutter', 'themify'), ) ) ), // Infinite Scroll array( 'name' => 'portfolio_more_posts', 'title' => __('Infinite Scroll', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array( 'value' => '', 'name' => '', 'selected' => true, ), array( 'value' => 'infinite', 'name' => __('Enable', 'themify'), ), array( 'value' => 'pagination', 'name' => __('Disable', 'themify'), ) ) ), // Posts Per Page array( 'name' => 'portfolio_posts_per_page', 'title' => __('Portfolios Per Page', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array('size' => 'small') ), // Display Content array( 'name' => 'portfolio_display_content', 'title' => __('Display Content', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('name' => __('Full Content', 'themify'), 'value' => 'content'), array('name' => __('Excerpt', 'themify'), 'value' => 'excerpt', 'selected' => true), array('name' => __('None', 'themify'), 'value' => 'none') ), 'default' => 'excerpt', ), // Post filter array( 'name' => 'portfolio_post_filter', 'type' => 'dropdown', 'title' => __('Post Filter', 'themify'), 'meta' => array( array( 'value' => '', 'name' => '', ), array( 'value' => 'yes', 'name' => 'Yes', ), array( 'value' => 'no', 'name' => 'No', ), ) ), // Featured Image Size array( 'name' => 'portfolio_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="https://wordpress.org/plugins/regenerate-thumbnails/" target="_blank">Regenerated</a>', 'themify'), 'type' => 'featimgdropdown', 'display_callback' => 'themify_is_image_script_disabled' ), // Multi field: Image Dimension array( 'type' => 'multi', 'name' => '_portfolio_image_dimensions', 'title' => __('Image Dimensions', 'themify'), 'meta' => array( 'fields' => array( // Image Width array( 'name' => 'portfolio_image_width', 'label' => __('width', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array('size' => 'small') ), // Image Height array( 'name' => 'portfolio_image_height', 'label' => __('height', 'themify'), 'description' => '', 'type' => 'textbox', 'meta' => array('size' => 'small') ), ), 'description' => __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify'), 'before' => '', 'after' => '', 'separator' => '' ) ), // Hide Title array( 'name' => 'portfolio_hide_title', 'title' => __('Portfolio Title', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), // Unlink Post Title array( 'name' => 'portfolio_unlink_title', 'title' => __('Unlink Portfolio Title', 'themify'), 'description' => __('Unlink portfolio 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')) ), 'default' => 'default', ), array( 'name' => 'hide_portfolio_date', 'title' => __('Portfolio Date', 'themify'), 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), // Hide Post Meta array( 'name' => 'portfolio_hide_meta_all', 'title' => __('Portfolio Meta', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), // Hide Post Image array( 'name' => 'portfolio_hide_image', 'title' => __('Featured Image', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ), // Unlink Post Image array( 'name' => 'portfolio_unlink_image', 'title' => __('Featured Image Link', 'themify'), 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Unlinked', 'themify')), array('value' => 'no', 'name' => __('Linked', 'themify')) ), 'default' => 'default', ), // Pagination Visibility array( 'name' => 'portfolio_hide_navigation', 'title' => __('Pagination', 'themify'), 'description' => '', 'type' => 'dropdown', 'meta' => array( array('value' => 'default', 'name' => '', 'selected' => true), array('value' => 'yes', 'name' => __('Hide', 'themify')), array('value' => 'no', 'name' => __('Show', 'themify')) ), 'default' => 'default', ) ); } /** * Disable Query Posts feature if it's not already in use. * * @since 7.0.8 * @return bool */ function themify_query_posts_check() { if ( themify_is_woocommerce_active() && wc_get_page_id('shop') == get_the_id() ) { return false; } return themify_get( 'query_category', '' ) !== ''; } /** * Disable Query Portfolios feature if it's not already in use. * * @since 7.0.8 * @return bool */ function themify_query_portfolio_check() { return themify_get( 'portfolio_query_category', '' ) !== ''; } /** * Options get metabox * @since 1.0.0 * @var array */ if (!function_exists('themify_theme_get_page_metaboxes')) { function themify_theme_get_page_metaboxes(array $args, &$meta_boxes) { $theme_metaboxes = array( array( 'name' => __('Page Options', 'themify'), 'id' => 'page-options', 'options' => themify_theme_page_meta_box(), 'pages' => 'page' ), array( 'name' => __('Query Posts', 'themify'), 'id' => 'query-posts', 'options' => themify_theme_query_post_meta_box(), 'pages' => 'page', 'display_callback' => 'themify_query_posts_check', ), ); if (post_type_exists('portfolio')) { $theme_metaboxes[] = array( 'name' => __('Query Portfolios', 'themify'), 'id' => 'query-portfolio', 'options' => themify_theme_query_portfolio_meta_box(), 'display_callback' => 'themify_query_portfolio_check', 'pages' => 'page' ); } return $theme_metaboxes; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка