Ejemplo n.º 1
0
 /**
  * Definition for tri-state hide meta buttons
  *
  * @param array  $args
  * @param string $prefix
  *
  * @return mixed|void
  * @since 1.5.2
  */
 function themify_multi_meta_field($args = array(), $prefix = 'hide_meta')
 {
     $states = themify_ternary_states(array('label_no' => __('Do not hide', 'themify')));
     $defaults = array('name' => $prefix . '_multi', 'title' => __('Hide Post Meta', 'themify'), 'description' => '', 'type' => 'multi', 'meta' => array('fields' => array(array('name' => $prefix . '_all', 'title' => __('Hide All', 'themify'), 'description' => '', 'type' => 'dropdownbutton', 'states' => $states, 'main' => true, 'disable_value' => 'yes'), array('name' => $prefix . '_author', 'title' => __('Author', 'themify'), 'description' => '', 'type' => 'dropdownbutton', 'states' => $states, 'sub' => true), array('name' => $prefix . '_category', 'title' => __('Category', 'themify'), 'description' => '', 'type' => 'dropdownbutton', 'states' => $states, 'sub' => true), array('name' => $prefix . '_comment', 'title' => __('Comment', 'themify'), 'description' => '', 'type' => 'dropdownbutton', 'states' => $states, 'sub' => true), array('name' => $prefix . '_tag', 'title' => __('Tag', 'themify'), 'description' => '', 'type' => 'dropdownbutton', 'states' => $states, 'sub' => true)), 'description' => '', 'before' => '', 'after' => '', 'separator' => ''));
     $field = wp_parse_args($args, $defaults);
     return apply_filters('themify_multi_meta_field', $field);
 }
Ejemplo n.º 2
0
/**
 * Theme Appearance Tab for Themify Custom Panel
 *
 * @since 1.0.0
 *
 * @param array $args
 *
 * @return array
 */
function themify_theme_page_theme_design_meta_box($args = array())
{
    return array(array('name' => 'body_background_color', 'title' => __('Body Background', 'themify'), 'description' => '', 'type' => 'color', 'meta' => array('default' => null)), array('name' => 'body_background_image', 'title' => '', 'type' => 'image', 'description' => '', 'meta' => array(), 'before' => '', 'after' => ''), array('name' => 'body_background_repeat', 'title' => '', 'description' => __('Background Repeat', 'themify'), 'type' => 'dropdown', 'meta' => array(array('value' => 'fullcover', 'name' => __('Fullcover', 'themify')), array('value' => 'repeat', 'name' => __('Repeat', 'themify')), array('value' => 'no-repeat', 'name' => __('No Repeat', 'themify')), array('value' => 'repeat-x', 'name' => __('Repeat horizontally', 'themify')), array('value' => 'repeat-y', 'name' => __('Repeat vertically', 'themify')))), array('name' => 'color_scheme_mode', 'title' => __('Accent Color', 'themify'), 'description' => '', 'type' => 'radio', 'show_title' => true, 'meta' => array(array('value' => 'color-presets', 'name' => __('Presets', 'themify'), 'selected' => true), array('value' => 'color-custom', 'name' => __('Custom', 'themify'))), 'enable_toggle' => true), array('name' => 'color_design', 'title' => '', 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => $args['color_design_options'], 'toggle' => 'color-presets-toggle'), array('name' => 'scheme_color', 'title' => '', 'description' => '', 'type' => 'color', 'meta' => array('default' => null), 'after' => __('Accent Font Color', 'themify'), 'toggle' => 'color-custom-toggle'), array('name' => 'scheme_link', 'title' => '', 'description' => '', 'type' => 'color', 'meta' => array('default' => null), 'after' => __('Accent Link Color', 'themify'), 'toggle' => 'color-custom-toggle'), array('name' => 'scheme_background', 'title' => '', 'description' => '', 'type' => 'color', 'meta' => array('default' => null), 'after' => __('Accent Background Color', 'themify'), 'toggle' => 'color-custom-toggle'), array('name' => 'typography_mode', 'title' => __('Typography', 'themify'), 'description' => '', 'type' => 'radio', 'show_title' => true, 'meta' => array(array('value' => 'typography-presets', 'name' => __('Presets', 'themify'), 'selected' => true), array('value' => 'typography-custom', 'name' => __('Custom', 'themify'))), 'enable_toggle' => true), array('name' => 'font_design', 'title' => '', 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => $args['font_design_options'], 'toggle' => 'typography-presets-toggle'), array('name' => 'body_font', 'title' => '', 'description' => '', 'type' => 'dropdown', 'meta' => array_merge(themify_get_web_safe_font_list(), themify_get_google_web_fonts_list()), 'after' => ' ' . __('Body Font', 'themify'), 'toggle' => 'typography-custom-toggle'), array('name' => 'body_text_color', 'title' => '', 'description' => '', 'type' => 'color', 'meta' => array('default' => null), 'after' => __('Body Font Color', 'themify'), 'toggle' => 'typography-custom-toggle'), array('name' => 'body_link_color', 'title' => '', 'description' => '', 'type' => 'color', 'meta' => array('default' => null), 'after' => __('Body Link Color', 'themify'), 'toggle' => 'typography-custom-toggle'), array('name' => 'heading_font', 'title' => '', 'description' => '', 'type' => 'dropdown', 'meta' => array_merge(themify_get_web_safe_font_list(), themify_get_google_web_fonts_list()), 'after' => ' ' . __('Heading (h1 to h6)', 'themify'), 'toggle' => 'typography-custom-toggle'), array('name' => 'heading_color', 'title' => '', 'description' => '', 'type' => 'color', 'meta' => array('default' => null), 'after' => __('Heading Font Color', 'themify'), 'toggle' => 'typography-custom-toggle'), array('name' => 'header_design', 'title' => __('Header Design', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => $args['header_design_options'], 'hide' => 'none header-leftpane header-minbar boxed-content'), array('name' => 'fixed_header', 'title' => __('Sticky Header', 'themify'), 'description' => '', 'type' => 'radio', 'meta' => themify_ternary_options(), 'class' => 'hide-if none header-leftpane header-minbar boxed-content'), array('name' => 'full_height_header', 'title' => __('Full Height Header', 'themify'), 'description' => __('Full height will display the container in 100% viewport height', 'themify'), 'type' => 'radio', 'meta' => themify_ternary_options(), 'class' => 'hide-if none header-horizontal header-leftpane header-minbar boxed-content'), array('name' => '_multi_header_elements', 'title' => __('Header Elements', 'themify'), 'description' => '', 'type' => 'multi', 'class' => 'hide-if none', 'meta' => array('fields' => array(array('name' => 'exclude_site_logo', 'description' => '', 'title' => __('Show Site Logo', 'themify'), 'type' => 'dropdownbutton', 'states' => themify_ternary_states(array('icon_no' => THEMIFY_URI . '/img/ddbtn-check.png', 'icon_yes' => THEMIFY_URI . '/img/ddbtn-cross.png')), 'class' => 'hide-if none', 'after' => '<div class="clear"></div>'), array('name' => 'exclude_site_tagline', 'description' => '', 'title' => __('Show Site Tagline', 'themify'), 'type' => 'dropdownbutton', 'states' => themify_ternary_states(array('icon_no' => THEMIFY_URI . '/img/ddbtn-check.png', 'icon_yes' => THEMIFY_URI . '/img/ddbtn-cross.png')), 'class' => 'hide-if none', 'after' => '<div class="clear"></div>'), array('name' => 'exclude_search_form', 'description' => '', 'title' => __('Show Search Form', 'themify'), 'type' => 'dropdownbutton', 'states' => themify_ternary_states(array('icon_no' => THEMIFY_URI . '/img/ddbtn-check.png', 'icon_yes' => THEMIFY_URI . '/img/ddbtn-cross.png')), 'class' => 'hide-if none', 'after' => '<div class="clear"></div>'), array('name' => 'exclude_rss', 'description' => '', 'title' => __('Show RSS Link', 'themify'), 'type' => 'dropdownbutton', 'states' => themify_ternary_states(array('icon_no' => THEMIFY_URI . '/img/ddbtn-check.png', 'icon_yes' => THEMIFY_URI . '/img/ddbtn-cross.png')), 'class' => 'hide-if none', 'after' => '<div class="clear"></div>'), array('name' => 'exclude_header_widgets', 'description' => '', 'title' => __('Show Header Widgets', 'themify'), 'type' => 'dropdownbutton', 'states' => themify_ternary_states(array('icon_no' => THEMIFY_URI . '/img/ddbtn-check.png', 'icon_yes' => THEMIFY_URI . '/img/ddbtn-cross.png')), 'class' => 'hide-if none', 'after' => '<div class="clear"></div>'), array('name' => 'exclude_social_widget', 'description' => '', 'title' => __('Show Social Widget', 'themify'), 'type' => 'dropdownbutton', 'states' => themify_ternary_states(array('icon_no' => THEMIFY_URI . '/img/ddbtn-check.png', 'icon_yes' => THEMIFY_URI . '/img/ddbtn-cross.png')), 'class' => 'hide-if none', 'after' => '<div class="clear"></div>'), array('name' => 'exclude_menu_navigation', 'description' => '', 'title' => __('Show Menu Navigation', 'themify'), 'type' => 'dropdownbutton', 'states' => themify_ternary_states(array('icon_no' => THEMIFY_URI . '/img/ddbtn-check.png', 'icon_yes' => THEMIFY_URI . '/img/ddbtn-cross.png')), 'class' => 'hide-if none', 'after' => '<div class="clear"></div>')), 'description' => '', 'before' => '', 'after' => '<div class="clear"></div>', 'separator' => '')), array('name' => 'header_wrap', 'title' => __('Header Background', 'themify'), 'description' => '', 'type' => 'radio', 'show_title' => true, 'meta' => array(array('value' => 'solid', 'name' => __('Solid Background', 'themify'), 'selected' => true), array('value' => 'transparent', 'name' => __('Transparent Background', 'themify')), array('value' => 'slider', 'name' => __('Slider', 'themify')), array('value' => 'video', 'name' => __('Video', 'themify')), array('value' => 'colors', 'name' => __('Animating Colors', 'themify'))), 'enable_toggle' => true, 'class' => 'hide-if none clear'), array('name' => '_animated_colors', 'title' => __('Animating Colors', 'themify'), 'description' => sprintf(__('Animating Colors can be configured at <a href="%s">Themify > Settings > Theme Settings</a>', 'themify'), esc_url(add_query_arg('page', 'themify', admin_url('admin.php')))), 'type' => 'post_id_info', 'toggle' => 'colors-toggle'), array('name' => 'background_gallery', 'title' => __('Header Slider', 'themify'), 'description' => '', 'type' => 'gallery_shortcode', 'toggle' => 'slider-toggle'), array('type' => 'multi', 'name' => '_video_select', 'title' => __('Video', 'themify'), 'meta' => array('fields' => array(array('name' => 'video_file', 'title' => __('Video File', 'themify'), 'description' => '', 'type' => 'video', 'meta' => array())), 'description' => __('Video format: mp4. Note: video background does not play on mobile, background image will be used as fallback.', 'themify'), 'before' => '', 'after' => '', 'separator' => ''), 'toggle' => 'video-toggle'), array('name' => 'background_color', 'title' => '', 'description' => '', 'type' => 'color', 'meta' => array('default' => null), 'toggle' => array('solid-toggle', 'slider-toggle', 'video-toggle'), 'class' => 'hide-if none'), array('name' => 'background_image', 'title' => '', 'type' => 'image', 'description' => '', 'meta' => array(), 'before' => '', 'after' => '', 'toggle' => array('solid-toggle', 'video-toggle'), 'class' => 'hide-if none'), array('name' => 'background_repeat', 'title' => '', 'description' => __('Background Repeat', 'themify'), 'type' => 'dropdown', 'meta' => array(array('value' => 'fullcover', 'name' => __('Fullcover', 'themify')), array('value' => 'repeat', 'name' => __('Repeat', 'themify')), array('value' => 'no-repeat', 'name' => __('No Repeat', 'themify')), array('value' => 'repeat-x', 'name' => __('Repeat horizontally', 'themify')), array('value' => 'repeat-y', 'name' => __('Repeat vertically', 'themify'))), 'toggle' => array('solid-toggle', 'video-toggle'), 'class' => 'hide-if none'), array('name' => 'headerwrap_text_color', 'title' => __('Header Text Color', 'themify'), 'description' => '', 'type' => 'color', 'meta' => array('default' => null), 'class' => 'hide-if none'), array('name' => 'headerwrap_link_color', 'title' => __('Header Link Color', 'themify'), 'description' => '', 'type' => 'color', 'meta' => array('default' => null), 'class' => 'hide-if none'), array('name' => 'footer_design', 'title' => __('Footer Design', 'themify'), 'description' => '', 'type' => 'layout', 'show_title' => true, 'meta' => $args['footer_design_options'], 'hide' => 'none'), array('name' => '_multi_footer_elements', 'title' => __('Footer Elements', 'themify'), 'description' => '', 'type' => 'multi', 'class' => 'hide-if none', 'meta' => array('fields' => array(array('name' => 'exclude_footer_site_logo', 'description' => '', 'title' => __('Show Site Logo', 'themify'), 'type' => 'dropdownbutton', 'states' => themify_ternary_states(array('icon_no' => THEMIFY_URI . '/img/ddbtn-check.png', 'icon_yes' => THEMIFY_URI . '/img/ddbtn-cross.png')), 'class' => 'hide-if none', 'after' => '<div class="clear"></div>'), array('name' => 'exclude_footer_widgets', 'description' => '', 'title' => __('Show Footer Widgets', 'themify'), 'type' => 'dropdownbutton', 'states' => themify_ternary_states(array('icon_no' => THEMIFY_URI . '/img/ddbtn-check.png', 'icon_yes' => THEMIFY_URI . '/img/ddbtn-cross.png')), 'class' => 'hide-if none', 'after' => '<div class="clear"></div>'), array('name' => 'exclude_footer_menu_navigation', 'description' => '', 'title' => __('Show Menu Navigation', 'themify'), 'type' => 'dropdownbutton', 'states' => themify_ternary_states(array('icon_no' => THEMIFY_URI . '/img/ddbtn-check.png', 'icon_yes' => THEMIFY_URI . '/img/ddbtn-cross.png')), 'class' => 'hide-if none', 'after' => '<div class="clear"></div>'), array('name' => 'exclude_footer_texts', 'description' => '', 'title' => __('Show Footer Text', 'themify'), 'type' => 'dropdownbutton', 'states' => themify_ternary_states(array('icon_no' => THEMIFY_URI . '/img/ddbtn-check.png', 'icon_yes' => THEMIFY_URI . '/img/ddbtn-cross.png')), 'class' => 'hide-if none', 'after' => '<div class="clear"></div>'), array('name' => 'exclude_footer_back', 'description' => '', 'title' => __('Show Back to Top Arrow', 'themify'), 'type' => 'dropdownbutton', 'states' => themify_ternary_states(array('icon_no' => THEMIFY_URI . '/img/ddbtn-check.png', 'icon_yes' => THEMIFY_URI . '/img/ddbtn-cross.png')), 'class' => 'hide-if none', 'after' => '<div class="clear"></div>')), 'description' => '', 'before' => '', 'after' => '<div class="clear"></div>', 'separator' => '')));
}