'. __( 'Here you can set the theme appearance site-wide. The appearance settings here can be override on individual post/page > edit > Themify Custom Panel > Page Appearance).', 'themify' ) .''; /** * Theme Color * @var array */ $design_options = themify_theme_color_design_options(); /** * Prefix for theme settings * @var string */ $pre = 'setting-color_design'; /** * Theme Color */ $html .= '

' . __( 'Theme Color', 'themify' ) . ''; $val = themify_get( $pre,'',true ); foreach ( $design_options as $option ) { if ( ( '' == $val || ! $val ) && $option['selected'] ) { $val = $option['value']; } $class = ( $val == $option['value'] ) ? 'selected' : ''; $html .= '' . esc_attr( $option['value'] ) . ''; } $html .= '

'; /** * Typography * @var array */ $design_options = themify_theme_font_design_options(); /** * Prefix for theme settings * @var string */ $pre = 'setting-font_design'; /** * Typography */ $html .= '

' . __( 'Typography', 'themify' ) . ''; $val = themify_get( $pre,'',true); foreach ( $design_options as $option ) { if ( ( '' == $val || ! $val ) && $option['selected'] ) { $val = $option['value']; } $class = ( $val == $option['value'] ) ? 'selected' : ''; $html .= '' . esc_attr( $option['value'] ) . ''; } $html .= '

'; /** * Header Design * @var array */ $design_options = themify_theme_header_design_options(); /** * Prefix for theme settings * @var string */ $pre = 'setting-header_design'; // Store items to hide $html .= '
'; /** * Header Design */ $html .= '

' . __( 'Header Design', 'themify' ) . ''; $val = themify_get( $pre,'header-horizontal',true); $html .= ''; unset( $design_options[0] ); foreach ( $design_options as $option ) { $class = ( $val == $option['value'] ) ? 'selected' : ''; $html .= '' . esc_attr( $option['value'] ) . ''; } $html .= ' '; $html .= ''; '

'; /** * Fixed header */ $html .= sprintf('

', 'setting-revealing_header', checked( themify_get( 'setting-revealing_header' ), 'on', false ), __('Enable Revealing Header', 'themify') ); $html .= sprintf('

', 'setting-fixed_header_disabled', checked( themify_get( 'setting-fixed_header_disabled' ), 'on', false ), __('Disable Sticky Header', 'themify') ); /** * Full height header */ $key = 'setting-full_height_header'; $html .= sprintf('


%4$s

', $key, checked( themify_get( $key ), 'yes', false ), __( 'Full Height Header', 'themify' ), __( 'Full height will display the container in 100% viewport height', 'themify' ) ); /** * Exclude Site Logo */ $html .= sprintf('

', 'setting-exclude_site_logo', checked( themify_get( 'setting-exclude_site_logo' ), 'on', false ), __('Exclude Site Logo', 'themify') ); /** * Exclude Site Tagline */ $html .= sprintf('

', 'setting-exclude_site_tagline', checked( themify_get( 'setting-exclude_site_tagline' ), 'on', false ), __('Exclude Site Tagline', 'themify') ); /** * Exclude Search Form */ $html .= sprintf('

', 'setting-exclude_search_form', checked( themify_get( 'setting-exclude_search_form' ), 'on', false ), __('Exclude Search Form', 'themify') ); /** * search form options */ $search_type=themify_get('setting_search_form','live_search',true ); $html .= '

'; // live search $html .= ''; // search form $html .= '

'; // search form $html .= '

'; $html .= ''; /** * Exclude Header Widgets */ $html .= sprintf('

', 'setting-exclude_header_widgets', checked( themify_get( 'setting-exclude_header_widgets' ), 'on', false ), __('Exclude Header Widgets', 'themify') ); /** * Exclude Social Widgets */ $html .= sprintf('

', 'setting-exclude_social_widget', checked( themify_get( 'setting-exclude_social_widget' ), 'on', false ), __('Exclude Social Widgets', 'themify') ); /** * Exclude Menu Navigation */ $html .= sprintf('

', 'setting-exclude_menu_navigation', checked( themify_get( 'setting-exclude_menu_navigation' ), 'on', false ), __('Exclude Menu Navigation', 'themify') ); if( themify_is_woocommerce_active() ) { /** * Exclude Cart Icon */ $html .= sprintf('

', 'setting-exclude_cart_icon', checked( themify_get( 'setting-exclude_cart_icon' ), 'on', false ), __('Exclude Cart Icon', 'themify') ); /** * Disable Slide Cart */ $html .= '

'; $html .= '

'; } /** * Mobile Menu Design */ $html .= '

' . __( 'Mobile Menu Style', 'themify' ) . ''; $html.='

'; /** * Expand All child menus */ $html .= sprintf('

', 'setting-mobile_menu_expand', checked( themify_get( 'setting-mobile_menu_expand','',true ), 'on', false ), __('Expand all child menus', 'themify') ); /** * Toggle child menus */ $html .= sprintf('

', 'setting-mobile_menu_toggle', checked( themify_get( 'setting-mobile_menu_toggle','',true ), 'on', false ), __('Toggle child menus like accordion', 'themify') ); // End group of elements to hide $html .= '
'; $html .= '

' . __( 'Main Menu Tooltip', 'themify' ) .themify_help(__( 'On main navigation menu, use WordPress menu link title attribute as tooltip.', 'themify' )) . ''; $html .= sprintf('

', 'menu_tooltips', checked( themify_get( 'menu_tooltips','',true ), 'on', false ), __('Enable menu tooltip (use link title attribute as tooltip)', 'themify') ); $html .= '

'; $html .= '

' . __( 'Main Menu Description', 'themify' ) . themify_help( sprintf( __( 'On main navigation menu, display the item description below the title.', 'themify' ), 'https://codex.wordpress.org/WordPress_Menu_User_Guide#Customizing_Menu_Items' ) ) . ''; $html .= sprintf('

', 'menu_description', checked( themify_get( 'menu_description','',true ), 'on', false ), __('Display menu link description text', 'themify') ); $html .= '

'; /** * Header Widgets */ $options = array( array( 'value' => 'headerwidget-4col', 'img' => 'themify/img/sidebars/4col.png', 'title' => __('Widgets 4 Columns', 'themify')), array( 'value' => 'headerwidget-3col', 'img' => 'themify/img/sidebars/3col.png', 'title' => __('Widgets 3 Columns', 'themify'), 'selected' => true), array( 'value' => 'headerwidget-2col', 'img' => 'themify/img/sidebars/2col.png', 'title' => __('Widgets 2 Columns', 'themify')), array( 'value' => 'headerwidget-1col', 'img' => 'themify/img/sidebars/1col.png', 'title' => __('Widgets 1 Column', 'themify')), array( 'value' => 'none', 'img' => 'themify/img/sidebars/none.png', 'title' => __('No Widgets', 'themify')) ); $val = themify_get( 'setting-header_widgets' ); $html .= '

' . __( 'Header Widgets', 'themify' ) . ''; foreach($options as $option){ if(('' == $val || !$val || !isset($val)) && isset($option['selected']) && $option['selected']){ $val = $option['value']; } if($val == $option['value']){ $class = 'selected'; } else { $class = ''; } $html .= '' . esc_attr( $option['value'] ) . ''; } $html .= ''; $html .= '

'; /** * Footer Design * @var array */ $design_options = themify_theme_footer_design_options(); /** * Prefix for theme settings * @var string */ $key = 'setting-footer_design'; // Store items to hide $html .= '
'; /** * Footer Design */ $html .= '

' . __( 'Footer Design', 'themify' ) . ''; $val = themify_get( $key, 'footer-horizontal-left',true); foreach ( $design_options as $option ) { if( $option['value'] === 'default' ) { continue; } elseif( $option['value'] === 'footer-block' ) { $option['selected'] = true; } if ( ( '' == $val || ! $val ) && $option['selected'] ) { $val = $option['value']; } $class = ( $val == $option['value'] ) ? 'selected' : ''; $html .= '' . esc_attr( $option['value'] ) . ''; } $html .= '

'; // Exclusions $key = 'setting-exclude_'; /** * Exclude Site Logo */ $html .= sprintf('

', $key . 'footer_site_logo', checked( themify_get( $key . 'footer_site_logo' ), 'on', false ), __('Exclude Site Logo', 'themify') ); /** * Exclude Footer Widgets */ $html .= sprintf('

', $key . 'footer_widgets', checked( themify_get( $key . 'footer_widgets' ), 'on', false ), __('Exclude Footer Widgets', 'themify') ); /** * Exclude Menu Navigation */ $html .= sprintf('

', $key . 'footer_menu_navigation', checked( themify_get( $key . 'footer_menu_navigation' ), 'on', false ), __('Exclude Menu Navigation', 'themify') ); /** * Exclude Footer Texts */ $html .= sprintf('

', $key . 'footer_texts', checked( themify_get( $key . 'footer_texts' ), 'on', false ), __('Exclude Footer Text', 'themify') ); /** * Exclude Footer Back to Top */ $html .= sprintf('

', $key . 'footer_back', checked( themify_get( $key . 'footer_back' ), 'on', false ), __('Exclude Back to Top button', 'themify') ); /** * Use Floating Back to Top * The hidden input is required for the default value */ $html .= sprintf('

', 'setting-use_float_back', checked( themify_get( 'setting-use_float_back', 'on' ), 'on', false ), __('Use Floating Back to Top Button', 'themify') ); /** * Revealing footer */ $html .= sprintf('

', 'setting-revealing_footer', checked( themify_get( 'setting-revealing_footer' ), 'on', false ), __( 'Enable Revealing Footer', 'themify' ) ); $options = array( array( 'value' => 'footerwidget-4col', 'img' => 'themify/img/sidebars/4col.png', 'title' => __('Widgets 4 Columns', 'themify')), array( 'value' => 'footerwidget-3col', 'img' => 'themify/img/sidebars/3col.png', 'title' => __('Widgets 3 Columns', 'themify'), 'selected' => true), array( 'value' => 'footerwidget-2col', 'img' => 'themify/img/sidebars/2col.png', 'title' => __('Widgets 2 Columns', 'themify')), array( 'value' => 'footerwidget-1col', 'img' => 'themify/img/sidebars/1col.png', 'title' => __('Widgets 1 Column', 'themify')), array( 'value' => 'none_widget', 'img' => 'themify/img/sidebars/none.png', 'title' => __('None Widgets', 'themify')) ); $val = themify_get( 'setting-footer_widgets','',true ); $html .= '

' . __( 'Footer Widgets', 'themify' ) . ''; foreach($options as $option){ if(('' == $val || !$val || !isset($val)) && isset($option['selected']) && $option['selected']){ $val = $option['value']; } if($val == $option['value']){ $class = 'selected'; } else { $class = ''; } $html .= '' . esc_attr( $option['value'] ) . ''; } $html .= ''; $html .= '

'; // Footer widget position $key = 'setting-footer_widget_position'; $html .= '

' . __( 'Footer Widgets Position', 'themify' ) . ''; $html.='

'; // Rounded Corners $key = 'setting-rounded_corners_'; $html .= sprintf('

%1$s

', __('Rounded Corners', 'themify'), $key . 'images', checked( themify_get( $key . 'images',null,true ), 'on', false ), __('Reset rounded corners on featured images and containers', 'themify') ); $html .= sprintf('

', $key . 'inputs', checked( themify_get( $key . 'inputs',null,true ), 'on', false ), __('Reset rounded corners on form inputs/buttons', 'themify') ); // End group of elements to hide $html .= '
'; $html .= '

'.__('Icons','themify').'

'; $icons=array('cart'=>__('Cart','themify'),'search'=>__('Search','themify'),'blogc'=>__('Blog Comment','themify')); foreach($icons as $ic=>$label){ $key='setting-ic-'.$ic; $html.='

'; $html.=' '.__( 'Insert Icon', 'themify' ).'

'; } return $html; } /** * Markup for theme dark mode options * @param array $data * @return string */ function themify_theme_dark_mode_controls( $data = array() ) { $key = 'setting-dark_mode_'; $html = sprintf('

%1$s

', __('Dark Mode', 'themify'), $key . 'enabled', checked( themify_get( $key . 'enabled',null,true ), 'on', false ), __('Enable dark mode', 'themify') ); $time=themify_get( $key . 'time',null,true ); $html .= sprintf('

', $key . 'time', checked( $time, 'always', false ), __('All time', 'themify'), checked( $time, 'schedule', false ), __('Schedule', 'themify'), checked( $time, 'user', false ), __('Show toggle button on header', 'themify'), $key . 'enabled' ); $html .= sprintf('

', $key . 'start', themify_get( $key . 'start','',true ), __('Start time(eg. 20:00)', 'themify'), $key . 'end', themify_get( $key . 'end','',true ), __('End time(eg. 07:00)', 'themify'), $key . 'time' ); return $html; } /** * Markup for several color pickers module * @param array $data * @return string */ function themify_color_pickers_module( $data = array() ) { /** * Variable key in theme settings * @var string */ $key = ''; /** * Module markup * @var string */ $html = ''; // Color animation control for header $key = 'setting-header_color_animation_enabled'; $html .= sprintf('

', $key, checked( themify_get( $key,'',true ), 'on', false ), __( 'Enable animated colors in header.', 'themify' ) ); // Color animation control for footer $key = 'setting-footer_color_animation_enabled'; $html .= sprintf('

', $key, checked( themify_get( $key,'',true ), 'on', false ), __( 'Enable animated colors in footer.', 'themify' ) ); $html .= '
'; // Color animation speed $key = 'setting-color_animation_speed'; $speed = themify_get( $key,'5',true ); $html .= '
' . __( 'Animation Speed', 'themify' ) . '
' . __( 'Enter the speed in seconds (example: 5)', 'themify' ) . '
'; // Create color pickers $key = 'setting-color_stop_'; for ( $i = 1; $i <= 7; $i++ ) { $html .= '
' . sprintf( __( 'Color Animation #%s', 'themify' ), $i ) . '
'; } $html .= '
'; return $html; } /** * Image Filter Module * @param array $data Theme settings data * @return string Markup for module. * @since 1.0.0 */ function themify_image_filter( $data = array() ) { $data = themify_get_data(); /** * Theme Settings Option Key Prefix * * @var string */ $key = 'setting-imagefilter_options'; /** * Module markup * @var string */ $out = '

' . __( 'Image Filter', 'themify' ) . '

'; $out .= '

' . __( 'Image Hover Filter', 'themify' ) . '

'; $key1 = 'setting-imagefilter_applyto'; $preset = themify_check( $key1,'featuredonly' ) ; $out .= '
' . __( 'Apply to', 'themify' ) . '' . sprintf('', $key1.'_1',$key1, checked( $preset, 'featuredonly', false ), __( 'Featured Images Only', 'themify' ) ) . '
' . sprintf('', $key1.'_2',$key1, checked( themify_get( $key1 ), 'allimages', false ), __( 'All Images', 'themify' ) ) . '
'; return $out; } /** * Markup for related posts module * @param array $data * @return string */ function themify_related_posts( $data = array() ) { /** * Variable key in theme settings * @var string */ $key = 'setting-relationship_taxonomy'; $options = array( array( 'value' => 'category', 'name' => __( 'Category', 'themify' ) ), array( 'value' => 'tag', 'name' => __( 'Tags', 'themify' ) ) ); /** * Post content display options * @var array */ $display_content_options = array( array( 'name' => __( 'Full Content', 'themify' ), 'value' => 'content' ), array( 'name' => __( 'Excerpt', 'themify' ), 'value' => 'excerpt' ), array( 'name' => __( 'None', 'themify' ), 'value' => 'none', ) ); $number = themify_get( $key . '_entries',3 ); /** * Module markup * @var string */ $html = ''; $val = themify_get( $key . '_enabled',themify_get($key,null,true),true ); $html .= '

' . __( 'Related Posts', 'themify' ) . '

'; /** * Taxonomy to use */ $html .= '

' . __( 'Show Related Posts By', 'themify' ) . '

'; /** * Number of Entries */ $html .= '

' . __( 'Number of Entries', 'themify' ) . '

'; /** * Featured Image Size */ $html .= '

' . __( 'Featured Image', 'themify' ) . ' ' . esc_html__( 'width', 'themify' ) . ' (px) ' . esc_html__( 'height', 'themify' ) . ' (px)

'; /** * Hide Image */ $html .= sprintf('

', esc_attr( $key . '_hide_image' ), checked( themify_get( $key . '_hide_image' ), 'on', false ), __('Hide Image', 'themify') ); /** * Display Content */ $html .= '

' . __( 'Display Content', 'themify' ) . '

'; $html .= '

' . __( 'Post Meta', 'themify' ) . '

'; return $html; } /** * Default Index Layout Module * @param array $data Theme settings data * @return string Markup for module. * @since 1.0.0 */ function themify_default_layout( $data = array() ){ $data = themify_get_data(); /** * Theme Settings Option Key Prefix * @var string */ $prefix = 'setting-default_'; if ( ! isset( $data[$prefix . 'more_text'] ) || '' == $data[$prefix . 'more_text'] ) { $more_text = __( 'More', 'themify' ); } else { $more_text = $data[$prefix . 'more_text']; } /** * Tertiary options |yes|no * @var array */ $default_options = array( array('name' => '', 'value' => ''), array('name' => __('Yes', 'themify'), 'value' => 'yes'), array('name' => __('No', 'themify'), 'value' => 'no') ); /** * Default options 'yes', 'no' * @var array */ $binary_options = array( array('name'=>__('Yes', 'themify'),'value'=>'yes'), array('name'=>__('No', 'themify'),'value'=>'no') ); /** * Post content display options * @var array */ $default_display_options = array( array('name' => __('Full Content', 'themify'),'value' => 'content'), array('name' => __('Excerpt', 'themify'),'value' => 'excerpt'), array('name' => __('None', 'themify'),'value' => 'none') ); $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'), ); /** * Post layout options * @var array */ $default_post_layout_options = array( array('value' => 'list-post', 'img' => 'images/layout-icons/list-post.png', 'title' => __( 'List Post', 'themify' ), "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')) ); /** * Sidebar placement options * @var array */ $sidebar_location_options = themify_sidebar_location_options(); /** * 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' ], ]; /** * Index Sidebar Option */ $output = '

' . __('Archive Sidebar Option', 'themify') . ''; $val = isset( $data[$prefix.'layout'] ) ? $data[$prefix.'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 .= '' . esc_attr( $option['value'] ) . ''; } $output .= '

'; $output .= '

'; /** * Post Layout */ $output .= '

' . __('Post Layout', 'themify') . ''; $val = isset( $data[$prefix.'post_layout'] ) ? $data[$prefix.'post_layout'] : ''; foreach($default_post_layout_options as $option){ if(($val == '' || !$val || !isset($val)) && $option['selected']){ $val = $option['value']; } if($val == $option['value']){ $class = 'selected'; } else { $class = ''; } $output .= '' . esc_attr( $option['value'] ) . ''; } $output .= '

'; /** * Post Content Layout */ $output .= '

' . __( 'Post Content Layout', 'themify' ) . '

'; /** * Enable Post Filter */ $output .= '

' . __( 'Post Filter', 'themify' ) . themify_help( __( 'Displayed on Category and Tag archive pages only.', 'themify' ) ) . '

'; $output .= '

'; /** * Enable Masonry */ $output .= '

' . __('Masonry Layout', 'themify') . '

'; $output .= '

' . __('Align Posts', 'themify') .themify_help(__( 'When masonry layout or post filter is enabled, this option will make the posts align instead of stacking.', 'themify' )) . '

'; /** * Post Gutter */ $output .= '

' . __( 'Post Gutter', 'themify' ) . '

'; /** * Display Content */ $output .= '

' . __('Display Content', 'themify') . '

'; /** * Excerpt length */ $output .= '

'; /** * More Text */ $output .= '

' . __('More Text', 'themify') . '

'; /** * Order & OrderBy Options */ $output .= themify_post_sorting_options('setting-index_order', $data); /** * Hide Post Title */ $output .= '

' . __('Post Title', 'themify') . '

'; /** * Unlink Post Title */ $output .= '

' . __('Post Title Link', 'themify') . '

'; /** * Hide Post Meta */ $output .= themify_post_meta_options($prefix.'post_meta', $data); /** * Hide Post Date */ $output .= '

' . __('Post Date', 'themify') . '

'; /** * Auto Featured Image */ $output .= '

' . __('Auto Featured Image', 'themify') . '

'; /** * Featured Image Position */ $output .= '

' . __( 'Featured Image Position', 'themify' ) . '

'; /** * Hide Featured Image */ $output .= '

' . __('Featured Image', 'themify') . '

'; /** * Unlink Featured Image */ $output .= '

' . __('Featured Image Link', 'themify') . '

'; /** * Featured Image Sizes */ $output .= themify_feature_image_sizes_select('image_post_feature_size'); /** * Image Dimensions */ $output .= '

' . __('Image Size', 'themify') . ' ' . __('width', 'themify') . ' (px) ' . __('height', 'themify') . ' (px)
' . __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify') . '

'; return $output; } if (!function_exists('themify_pagination_infinite')) { /** * Choose pagination or infinite scroll * @param array $data * @return string */ function themify_pagination_infinite($data = array()) { $output = '

' . __( 'Pagination Option', 'themify' ) . ''; //Infinite Scroll $output .= ' '; $output .= __('Infinite Scroll (posts are loaded on the same page)', 'themify'); $output .= '

'; $output .= ''; $output .= '
'; $output .= ''; $output .= '
'; $output .= '
'; //Numbered pagination $output .= ' '; $output .= __('Standard Pagination', 'themify') . ''; $output .= '

'; $key = 'setting-entries_nav'; $output .= '
'; $output .= '

'; // Numbered pagination $output .= ''; $output .= '
'; // Previous / Next links $output .= ''; $output .= '

'; $output .= '
'; return $output; } } /** * Control page loader effect in regular pages. * @param array $data * @return string */ function themify_page_section_scroll( $data = array() ) { $out=''; $key = 'setting-page_loader_sensitivity'; $out.= '

' . __( 'Scroll Sensitivity', 'themify' ) . '

'; $key = 'setting-page_loader_duration'; $out.= '

' . __( 'Transition Duration', 'themify' ) . ' '; $key = 'setting-page_loader_duration_sec'; $out.= ''. __( 'Second', 'themify' ) .'

'; $key = 'setting-all_page_loader'; $out .= '

'.__('Loading Screen','themify').'

' . __( 'Loading Screen Every Page', 'themify' ) . ' ' . __('Enable loading screen on every page', 'themify') . '

'; $key = 'setting-page_loader_color'; $value = themify_get($key,'',true); $out .= '

'; $key = 'setting-page_loader_icon'; $value = themify_get($key,'',true); $out.='
'. __('Loader Icon', 'themify') . '
'.__( 'Insert Icon', 'themify' ).' '.__('or', 'themify').'
' . themify_get_uploader($key, array('tomedia' => true,'label'=>__('Upload an image','themify'))) . '
'; return $out; } /** * Settings for the slider in single post pages * * @since 1.4.5 */ function single_post_slider_settings() { $output = ''; $output .= '

' . __( 'Autoplay', 'themify' ) . '

'; $output .= '

' . __( 'Transition Speed', 'themify' ) . '

'; $output .= '

' . __( 'Effect', 'themify' ) . '

'; $output .= '

' . __( 'Slider Height', 'themify' ) .themify_help(__( '"Auto" measures the highest slide and all other slides will be set to that size. "Variable" makes every slide has it\'s own height', 'themify' )) . '

'; return $output; } /* WooCommerce additional options */ /** * Creates module for general shop layout and settings * @param array * @return string * @since 1.5.1 */ function themify_shop_layout( $data = array() ){ $data = themify_get_data(); $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')), ); /** * Entries layout options * @var array */ $default_entry_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')), array('value' => 'grid4', 'img' => 'images/layout-icons/grid4.png', 'title' => __('Grid 4', 'themify'), 'selected' => true), 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')) ); $default_options = array( '' => '', __('Hide', 'themify') => 'yes', __('Show', 'themify') => 'no' ); $binary_options = array( array('name'=>__('Yes', 'themify'),'value'=>'yes'), array('name'=>__('No', 'themify'),'value'=>'no') ); $content_options = array( __('None', 'themify') => '', __('Short Description', 'themify') => 'excerpt', __('Full Content', 'themify') => 'content' ); $val = isset( $data['setting-shop_layout'] ) ? $data['setting-shop_layout'] : ''; $output = ''; /** * Sidebar option */ $output .= '

' . __('Shop Page Sidebar', 'themify') . ''; foreach ( $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 .= ''.$option['value'].''; } $output .= '

'; $output .= '

'; $output .= shop_archive_layout(); $output .= '

'; /** * Entries Layout */ $output .= '

' . __('Product Layout', 'themify') . ''; $val = isset( $data['setting-products_layout'] ) ? $data['setting-products_layout'] : ''; foreach($default_entry_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 .= ''.$option['value'].''; } $output .= '

'; /** * Enable Masonry */ $output .= '

' . __('Masonry Layout', 'themify') . '

'; $output .= '

' . __('Align Products', 'themify') .themify_help(__( 'When masonry layout is enabled, this option will make the products align instead of stacking.', 'themify' )) . '

'; /** * Product Content Style */ $output .= '

' . __( 'Product Content Style', 'themify' ) . '

'; $output .= '

' . __('Product Image Hover', 'themify') . '

'; $output .= '

' . __('Products Per Page', 'themify') . '

'; $hide = ''; $sel=themify_get( 'setting-product_archive_hide_title',false,true ); foreach($default_options as $name => $option){ $selected=$sel === $option?' selected="selected"':''; $hide .= ''; } $output .= '

' . __('Product Title', 'themify') . '

'; $hide = ''; $sel=themify_get( 'setting-product_archive_hide_price',false,true ); foreach($default_options as $name => $option){ $selected=$sel === $option?' selected="selected"':''; $hide .= ''; } $output .= '

' . __('Product Price', 'themify') . '

'; /** * Hide Add to Cart Button * @var String */ $hide = ''; $sel=themify_get( 'setting-product_archive_hide_cart_button',false,true ); foreach($default_options as $name => $option){ $selected=$sel === $option?' selected="selected"':''; $hide .= ''; } $output .= '

' . __('Add to Cart Button', 'themify') . '

'; $output .= '

' . __('Breadcrumbs Navigation', 'themify') . '

'; $output .= '

' . __('Shop Page Products', 'themify') . '
' . __('Warning: no products will show on the Shop page. Only enable this option if you want to use Woo Products addon for a custom shop page layout.', 'themify') . '

'; $output .= '

' . __('Product Count', 'themify') . '

'; $output .= '

' . __('Product Sorting', 'themify') . '

'; /** * Show product rating stars */ $output .= '

' . __('Rating Stars', 'themify') . '

'; /** * Product Reviews (Always show them even empty ones) */ $output .= '

'; $hide = ''; $sel=themify_get( 'setting-product_archive_show_short',false,true ); foreach($content_options as $name => $option){ $selected=$sel === $option?' selected="selected"':''; $hide .= ''; } $output .= '

' . __('Product Description', 'themify') . '

'; /** * Shop Image Dimensions */ $output .= '

' . __('Image Size', 'themify') . '

'; $output .= '

' . __('width', 'themify') . ' (px) ' . __('height', 'themify') . ' (px)
' . __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify') . '

'; return $output; } /** * Creates module for single product settings * @param array * @return string * @since 1.5.1 */ function themify_single_product( $data = array() ){ $data = themify_get_data(); $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')), ); $default_options = array( array('name' => '', 'value' => ''), array('name' => __('Hide', 'themify'), 'value' => 'yes'), array('name' => __('Show', 'themify'), 'value' => 'no') ); $val = isset( $data['setting-single_product_layout'] ) ? $data['setting-single_product_layout'] : ''; /** * HTML for settings panel * @var string */ $output = '

' . __('Product Sidebar Option', 'themify') . ''; foreach ( $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 .= ''.$option['value'].''; } $output .= '

'; $output .= '

'; /** * Image Dimensions */ $output .= '

' . __('Image Size', 'themify') . '

'; $output .= '

' . __('width', 'themify') . ' (px) ' . __('height', 'themify') . ' (px)
' . __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify') . '

'; /** * Hide Breadcrumbs * @var String */ $output .= '

' . __('Shop Breadcrumbs', 'themify') . '

'; /** * Disable Product Image zoom */ $output .= '

' . __('Image Zoom', 'themify') . '

'; /** * Product Reviews */ $output .= '

' . __('Product Reviews', 'themify') . '

'; /** * Product Reviews (Always show them even empty ones) */ $output .= '

'; /** * Related Products */ $output .= '

' . __('Related Products', 'themify') . '

'; $output .= '

' . __('Related Products Limit', 'themify') . '

'; /** * Related Image Dimensions */ $output .= '

' . __('Related Products Image Size', 'themify') . ' ' . __('width', 'themify') . ' (px) ' . __('height', 'themify') . ' (px)
' . __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify') . '

'; /** * Product description Display */ $output .= '

' . __('Builder Content Display', 'themify') . ''; $output .= ''; $output .= ''; $output .= '

'; /** * Sticky Buy Button */ $output .= '

' . __('Sticky Buy Button', 'themify') . '

'; /** * Description & Reviews Layout */ $output .= '

' . __('Description & Reviews', 'themify') . ''; $output .= ''; $output .= ''; $output .= ''; $output .= '

'; return $output; } /** * Creates module for general archive layout * @param array $data * @return string * @since 1.5.1 */ function shop_archive_layout( $data = array() ) { $data = themify_get_data(); /** * Sidebar option */ $val = isset( $data['setting-shop_archive_layout'] ) ? $data['setting-shop_archive_layout'] : ''; $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')), array('value' => 'full_width', 'img' => 'themify/img/fullwidth.svg', 'title' => __('Fullwidth (Builder Page)', 'themify')) ); $html= '

' . __('Product Archive Sidebar', 'themify') . ''; foreach ( $options as $option ) { if ( ( '' == $val || ! $val || ! isset( $val ) ) && ( isset( $option['selected'] ) && $option['selected'] ) ) { $val = $option['value']; } $class = $val == $option['value'] ?"selected":""; $html.= ''.$option['value'].''; } $html.= '

'; return $html; } if (!function_exists('themify_search_result_layout')) { /** * Default Index Layout Module * @param array $data Theme settings data * @return string Markup for module. * @since 1.0.0 */ function themify_search_result_layout( $data = array() ){ $data = themify_get_data(); $prefix = 'setting-search-result_'; $setting = 'setting-search-'; $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'), ); $unlink_options = [ [ 'name' => __('Linked', 'themify'), 'value' => 'no' ], [ 'name' => __('Unlinked', 'themify'), 'value' => 'yes' ], ]; /** * Index Sidebar Option */ $output = '

' . __('Search Sidebar Option', 'themify') . ''; $val = isset( $data[$prefix.'layout'] ) ? $data[$prefix.'layout'] : ''; $output .= themify_render_option_items( themify_sidebar_location_options(), $val ); $output .= '

'; $output .= '

'; /** * Post Layout */ $output .= '

' . __('Post Layout', 'themify') . ''; $val = isset( $data[$prefix.'post_layout'] ) ? $data[$prefix.'post_layout'] : ''; $output .= themify_render_option_items( themify_default_post_layout_options(), $val); $output .= '

'; /** * Post Content Layout */ $output .= '

' . __( 'Post Content Layout', 'themify' ) . '

'; /** * Display Content */ $output .= '

' . __('Display Content', 'themify') . '

'; /** * Hide Post Title */ $output .= '

' . __('Post Title', 'themify') . '

'; /** * Unlink Post Title */ $output .= '

' . __('Post Title Link', 'themify') . '

'; /** * Hide Post Meta */ $output .= themify_post_meta_options($prefix.'post_meta', $data); /** * Hide Post Date */ $output .= '

' . __('Post Date', 'themify') . '

'; /** * Auto Featured Image */ $output .= '

' . __('Auto Featured Image', 'themify') . '

'; /** * Featured Image Position */ $output .= '

' . __( 'Featured Image Position', 'themify' ) . '

'; /** * Hide Featured Image */ $output .= '

' . __('Featured Image', 'themify') . '

'; /** * Unlink Featured Image */ $output .= '

' . __('Featured Image Link', 'themify') . '

'; /** * Featured Image Sizes */ $output .= themify_feature_image_sizes_select('image_post_feature_size'); /** * Image Dimensions */ $output .= '

' . __('Image Size', 'themify') . ' ' . __('width', 'themify') . ' (px) ' . __('height', 'themify') . ' (px)
' . __('Enter height = 0 to disable vertical cropping with img.php enabled', 'themify') . '

'; return $output; } } /** * @return array */ function themify_post_gutter(){ return array( array('name' => __('Default', 'themify'), 'value' => 'gutter'), array('name' => __('No gutter', 'themify'), 'value' => 'no-gutter') ); } /** * @return array */ function themify_content_layout(){ return 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') ); } /** * @return array */ function themify_media_position(){ return array( array('name' => __('Above Post Title', 'themify'), 'value' => 'above'), array('name' => __('Below Post Title', 'themify'), 'value' => 'below'), ); } /** * @return array */ function themify_sidebar_location_options(){ return 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')), ); } /** * @return array */ function themify_default_post_layout_options(){ return array( array('value' => 'list-post', 'img' => 'images/layout-icons/list-post.png', 'title' => __('List Post', 'themify'), "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')) ); } /** * @return array */ function themify_default_display_options(){ return array( array('name' => __('Full Content', 'themify'), 'value' => 'content'), array('name' => __('Excerpt', 'themify'), 'value' => 'excerpt'), array('name' => __('None', 'themify'), 'value' => 'none') ); } /** * @return array */ function themify_binary_options(){ return array( array('name' => __('Hide', 'themify'), 'value' => 'yes'), array('name' => __('Show', 'themify'), 'value' => 'no') ); } /** * Tertiary options |yes|no * @var array */ function themify_default_options(){ return array( array('name' => '', 'value' => ''), array('name' => __('Hide', 'themify'), 'value' => 'yes'), array('name' => __('Show', 'themify'), 'value' => 'no') ); } function themify_render_option_items(array $item_list, $val ){ $output = ''; foreach ($item_list as $option) { if (($val == '' || !$val || !isset($val)) && $option['selected']) { $val = $option['value']; } if ($val == $option['value']) { $class = 'selected'; } else { $class = ''; } $output .= '' . esc_attr($option['value']) . ''; } return $output; } function themify_extend_mega_menu_options($out){ $key = 'setting-mega_menu'; $out .= '

' . __( 'Post Count', 'themify' ) . ' ' . __('Include post count on category links', 'themify') . '

'; return $out; } add_filter('themify_mega_menu_settings','themify_extend_mega_menu_options'); if(themify_is_woocommerce_active()){ function themify_add_serach_post_type_option($out){ $out = '

' . __('Search Post Type', 'themify') . '

'.$out; return $out; } add_filter('themify_search_settings_output','themify_add_serach_post_type_option'); }