| Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/ |
| Current File : /home/x/b/o/xbodynamge/namtation/wp-content/configs.tar |
config-default.php 0000666 00000012764 15115303712 0010160 0 ustar 00 <?php
add_filter( 'customify/customize/settings-default', 'customify_layout_builder_config_default', 15, 2 );
/**
* Default theme customize settings data.
*
* @param string $val
* @param string $name
*
* @return mixed
*/
function customify_layout_builder_config_default( $val, $name ) {
$defaults =
array(
// Start header builder layout version 1.
'header_builder_panel' => array(
'desktop' =>
array(
'main' =>
array(
array(
'x' => '0',
'y' => '1',
'width' => '3',
'height' => '1',
'id' => 'logo',
),
array(
'x' => '3',
'y' => '1',
'width' => '9',
'height' => '1',
'id' => 'primary-menu',
),
),
),
'mobile' =>
array(
'main' =>
array(
array(
'x' => '0',
'y' => '1',
'width' => '5',
'height' => '1',
'id' => 'logo',
),
array(
'x' => '9',
'y' => '1',
'width' => '3',
'height' => '1',
'id' => 'nav-icon',
),
),
'sidebar' =>
array(
array(
'x' => '0',
'y' => '1',
'width' => '1',
'height' => '1',
'id' => 'html',
),
array(
'x' => '0',
'y' => '1',
'width' => '1',
'height' => '1',
'id' => 'primary-menu',
),
),
),
), // End header builder layout version 1.
'header_builder_version' => '',
// Start header builder layout version 2.
'header_builder_panel_v2' => array(
'desktop' => array(
'top' => array(
'left' => array(
array(
'id' => 'html',
),
),
'center' => array(),
'right' => array(
array(
'id' => 'social-icons',
),
),
),
'main' => array(
'left' => array(
array(
'id' => 'logo',
),
array(
'id' => 'primary-menu',
),
),
'center' => array(),
'right' => array(
array(
'id' => 'search_icon',
),
array(
'id' => 'nav-icon',
),
array(
'id' => 'button',
),
),
),
'bottom' => array(
'left' => array(),
'center' => array(),
'right' => array(),
),
),
'mobile' => array(
'top' => array(
'left' => array(),
'center' => array(),
'right' => array(),
),
'main' => array(
'left' => array(
array(
'id' => 'logo',
),
),
'center' => array(),
'right' => array(
array(
'id' => 'search_icon',
),
array(
'id' => 'nav-icon',
),
),
),
'bottom' => array(
'left' => array(),
'center' => array(),
'right' => array(),
),
'sidebar' => array(
'sidebar' => array(
array(
'id' => 'html',
),
array(
'id' => 'search_box',
),
array(
'id' => 'primary-menu',
),
array(
'id' => 'social-icons',
),
array(
'id' => 'button',
),
),
),
),
), // End header builder layout version 2.
'header_top_height' => array(
'desktop' =>
array(
'unit' => 'px',
'value' => '33',
),
'tablet' =>
array(
'unit' => 'px',
'value' => '',
),
'mobile' =>
array(
'unit' => 'px',
'value' => '33',
),
),
'header_main_height' => array(
'desktop' => array(
'unit' => 'px',
'value' => '90',
),
'tablet' => array(
'unit' => 'px',
'value' => '',
),
'mobile' => array(
'unit' => 'px',
'value' => '',
),
),
'header_bottom_height' => array(
'desktop' => array(
'unit' => 'px',
'value' => '55',
),
'tablet' => array(
'unit' => 'px',
'value' => '',
),
'mobile' => array(
'unit' => 'px',
'value' => '',
),
),
'header_sidebar_animate' => 'menu_sidebar_dropdown',
'header_nav-icon_align' => array(
'desktop' => 'right',
'tablet' => 'right',
'mobile' => 'right',
),
'header_primary-menu_align' => array(
'desktop' => 'right',
'tablet' => '',
'mobile' => '',
),
'footer_builder_panel' => array(
'desktop' =>
array(
'main' =>
array(
array(
'x' => '0',
'y' => '1',
'width' => '3',
'height' => '1',
'id' => 'footer-1',
),
array(
'x' => '3',
'y' => '1',
'width' => '3',
'height' => '1',
'id' => 'footer-2',
),
array(
'x' => '6',
'y' => '1',
'width' => '3',
'height' => '1',
'id' => 'footer-3',
),
array(
'x' => '9',
'y' => '1',
'width' => '3',
'height' => '1',
'id' => 'footer-4',
),
),
'bottom' =>
array(
array(
'x' => '0',
'y' => '1',
'width' => '6',
'height' => '1',
'id' => 'footer_copyright',
),
),
),
),
);
if ( ! $val && isset( $defaults[ $name ] ) ) {
return $defaults[ $name ];
}
return $val;
}
layouts.php 0000666 00000016642 15115303712 0006770 0 ustar 00 <?php
if ( ! function_exists( 'customify_customizer_layouts_config' ) ) {
/**
* Add layout settings.
*
* @since 0.0.1
* @since 0.2.6
*
* @param array $configs
* @return array
*/
function customify_customizer_layouts_config( $configs ) {
$config = array(
// Layout panel.
array(
'name' => 'layout_panel',
'type' => 'panel',
'priority' => 18,
'theme_supports' => '',
'title' => __( 'Layouts', 'customify' ),
),
// Global layout section.
array(
'name' => 'global_layout_section',
'type' => 'section',
'panel' => 'layout_panel',
'theme_supports' => '',
'title' => __( 'Global', 'customify' ),
),
array(
'name' => 'site_layout',
'type' => 'radio_group',
'section' => 'global_layout_section',
'title' => __( 'Site layout', 'customify' ),
'description' => __( 'Select global site layout.', 'customify' ),
'default' => 'site-full-width',
'css_format' => 'html_class',
'selector' => 'body',
'choices' => array(
'site-full-width' => __( 'Full Width', 'customify' ),
'site-boxed' => __( 'Boxed', 'customify' ),
'site-framed' => __( 'Framed', 'customify' ),
),
),
array(
'name' => 'site_box_shadow',
'type' => 'radio_group',
'section' => 'global_layout_section',
'title' => __( 'Site boxed/framed shadow', 'customify' ),
'choices' => array(
'box-shadow' => __( 'Yes', 'customify' ),
'no-box-shadow' => __( 'No', 'customify' ),
),
'default' => 'box-shadow',
'css_format' => 'html_class',
'selector' => '#page',
'required' => array(
array( 'site_layout', '=', array( 'site-boxed', 'site-framed' ) ),
),
),
array(
'name' => 'site_margin',
'type' => 'css_ruler',
'section' => 'global_layout_section',
'title' => __( 'Site framed margin', 'customify' ),
'device_settings' => true,
'fields_disabled' => array(
'left' => '',
'right' => '',
),
'css_format' => array(
'top' => 'margin-top: {{value}};',
'bottom' => 'margin-bottom: {{value}};',
),
'selector' => '.site-framed .site',
'required' => array(
array( 'site_layout', '=', 'site-framed' ),
),
),
/**
* @since 0.2.6 Change css_format and selector.
*/
array(
'name' => 'container_width',
'type' => 'slider',
'device_settings' => false,
'default' => 1200,
'min' => 700,
'step' => 10,
'max' => 2000,
'section' => 'global_layout_section',
'title' => __( 'Container width', 'customify' ),
'selector' => 'format',
'css_format' => '.customify-container, .layout-contained, .site-framed .site, .site-boxed .site { max-width: {{value}}; } .main-layout-content .entry-content > .alignwide { width: calc( {{value}} - 4em ); max-width: 100vw; }',
),
// Site content layout.
array(
'name' => 'site_content_layout',
'type' => 'radio_group',
'section' => 'global_layout_section',
'title' => __( 'Site content layout', 'customify' ),
'choices' => array(
'site-content-fullwidth' => __( 'Full width', 'customify' ),
'site-content-boxed' => __( 'Boxed', 'customify' ),
),
'default' => 'site-content-boxed',
'css_format' => 'html_class',
'selector' => '.site-content',
),
array(
'name' => 'site_content_padding',
'type' => 'css_ruler',
'section' => 'global_layout_section',
'title' => __( 'Site content padding', 'customify' ),
'device_settings' => true,
'fields_disabled' => array(
'left' => '',
'right' => '',
),
'css_format' => array(
'top' => 'padding-top: {{value}};',
'bottom' => 'padding-bottom: {{value}};',
),
'selector' => '#sidebar-secondary, #sidebar-primary, #main',
),
// Page layout.
array(
'name' => 'sidebar_layout_section',
'type' => 'section',
'panel' => 'layout_panel',
'theme_supports' => '',
'title' => __( 'Sidebars', 'customify' ),
),
// Global sidebar layout.
array(
'name' => 'sidebar_layout',
'type' => 'select',
'default' => 'content-sidebar',
'section' => 'sidebar_layout_section',
'title' => __( 'Default Sidebar Layout', 'customify' ),
'choices' => customify_get_config_sidebar_layouts(),
),
// Sidebar vertical border.
array(
'name' => 'sidebar_vertical_border',
'type' => 'radio_group',
'section' => 'sidebar_layout_section',
'title' => __( 'Sidebar with vertical border', 'customify' ),
'choices' => array(
'sidebar_vertical_border' => __( 'Yes', 'customify' ),
'no-sidebar_vertical_border' => __( 'No', 'customify' ),
),
'default' => 'sidebar_vertical_border',
'css_format' => 'html_class',
'selector' => 'body',
),
// Page sidebar layout.
array(
'name' => 'page_sidebar_layout',
'type' => 'select',
'default' => 'content-sidebar',
'section' => 'sidebar_layout_section',
'title' => __( 'Pages', 'customify' ),
'choices' => customify_get_config_sidebar_layouts(),
),
// Blog Posts sidebar layout.
array(
'name' => 'posts_sidebar_layout',
'type' => 'select',
'default' => 'content-sidebar',
'section' => 'sidebar_layout_section',
'title' => __( 'Blog posts', 'customify' ),
'choices' => customify_get_config_sidebar_layouts(),
),
// Blog Posts sidebar layout.
array(
'name' => 'posts_archives_sidebar_layout',
'type' => 'select',
'default' => 'content-sidebar',
'section' => 'sidebar_layout_section',
'title' => __( 'Blog Archive Page', 'customify' ),
'choices' => customify_get_config_sidebar_layouts(),
),
// Search.
array(
'name' => 'search_sidebar_layout',
'type' => 'select',
'default' => 'content-sidebar',
'section' => 'sidebar_layout_section',
'title' => __( 'Search Page', 'customify' ),
'choices' => customify_get_config_sidebar_layouts(),
),
// 404.
array(
'name' => '404_sidebar_layout',
'type' => 'select',
'default' => 'content',
'section' => 'sidebar_layout_section',
'title' => __( '404 Page', 'customify' ),
'choices' => customify_get_config_sidebar_layouts(),
),
);
$post_types = Customify()->get_post_types( false );
if ( count( $post_types ) ) {
$config[] = array(
'name' => 'post_types_sidebar_h_tb',
'type' => 'heading',
'section' => 'sidebar_layout_section',
'title' => __( 'Post Type Settings', 'customify' ),
);
foreach ( $post_types as $pt => $label ) {
$config[] = array(
'name' => "{$pt}_sidebar_layout",
'type' => 'select',
'default' => 'content',
'section' => 'sidebar_layout_section',
'title' => sprintf( __( 'Single %s', 'customify' ), $label['singular_name'] ),
'choices' => array_merge(
array( 'default' => __( 'Default', 'customify' ) ),
customify_get_config_sidebar_layouts()
),
);
}
}
return array_merge( $configs, $config );
}
}
add_filter( 'customify/customizer/config', 'customify_customizer_layouts_config' );
search.php 0000666 00000003700 15115303712 0006524 0 ustar 00 <?php
if ( ! function_exists( 'customify_customizer_search_config' ) ) {
function customify_customizer_search_config( $configs = array() ) {
$args = array(
'name' => __( 'Search Results', 'customify' ),
'id' => 'search_results',
'selector' => '',
'cb' => '',
);
$top_panel = 'blog_panel';
$level_2_panel = 'section_' . $args['id'];
$config = array(
array(
'name' => $level_2_panel,
'type' => 'section',
'panel' => $top_panel,
'title' => $args['name'],
),
array(
'name' => $args['id'] . '_excerpt_type',
'type' => 'select',
'section' => $level_2_panel,
'default' => 'excerpt',
'choices' => array(
'custom' => __( 'Custom', 'customify' ),
'excerpt' => __( 'Use excerpt metabox', 'customify' ),
'more_tag' => __( 'Strip excerpt by more tag', 'customify' ),
'content' => __( 'Full content', 'customify' ),
),
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'label' => __( 'Excerpt Type', 'customify' ),
),
array(
'name' => $args['id'] . '_excerpt_length',
'type' => 'number',
'section' => $level_2_panel,
'default' => 150,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'label' => __( 'Excerpt Length', 'customify' ),
'required' => array( $args['id'] . '_excerpt_type', '=', 'custom' ),
),
array(
'name' => $args['id'] . '_excerpt_more',
'type' => 'text',
'section' => $level_2_panel,
'default' => '',
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'label' => __( 'Excerpt More', 'customify' ),
),
);
return array_merge( $configs, $config );
}
}
add_filter( 'customify/customizer/config', 'customify_customizer_search_config' );
footer/templates.php 0000666 00000004651 15115303712 0010561 0 ustar 00 <?php
class Customify_Builder_Footer_Templates {
public $id = 'footer_templates';
function customize() {
$section = 'footer_templates';
$prefix = 'footer_templates_';
$id = 'footer';
$theme_name = wp_get_theme()->get( 'Name' );
$option_name = "{$theme_name}_{$id}_saved_templates";
$saved_templates = get_option( $option_name );
if ( ! is_array( $saved_templates ) ) {
$saved_templates = array();
}
$saved_templates = array_reverse( $saved_templates );
$n = count( $saved_templates );
$html = '';
$html .= '<span class="customize-control-title">' . __( 'Saved Templates', 'customify' ) . '</span>';
$html .= '<ul class="list-saved-templates list-boxed ' . ( $n > 0 ? 'has-templates' : 'no-templates' ) . '">';
if ( count( $saved_templates ) > 0 ) {
foreach ( $saved_templates as $key => $tpl ) {
$tpl = wp_parse_args(
$tpl,
array(
'name' => '',
'data' => '',
)
);
if ( ! $tpl['name'] ) {
$name = __( 'Untitled', 'customify' );
} else {
$name = $tpl['name'];
}
$html .= '<li class="saved_template li-boxed" data-control-id="' . esc_attr( $prefix . 'save' ) . '" data-id="' . esc_attr( $key ) . '" data-data="' . esc_attr( json_encode( $tpl['data'] ) ) . '">' . esc_html( $name ) . ' <a href="#" class="load-tpl">' . __( 'Load', 'customify' ) . '</a><a href="#" class="remove-tpl">' . __( 'Remove', 'customify' ) . '</a></li>'; // phpcs:ignore
}
}
$html .= '<li class="no_template">' . __( 'No saved templates.', 'customify' ) . '</li>';
$html .= '</ul>';
$html .= '</div>';
return array(
array(
'name' => $section,
'type' => 'section',
'panel' => 'footer_settings',
'priority' => 0,
'title' => __( 'Templates', 'customify' ),
),
array(
'name' => $prefix . 'save',
'type' => 'custom_html',
'section' => $section,
'theme_supports' => '',
'title' => __( 'Save Template', 'customify' ),
'description' => '<div class="save-template-form"><input type="text" data-builder-id="footer" data-control-id="' . esc_attr( $prefix . 'save' ) . '" class="template-input-name change-by-js"><button class="button button-secondary save-builder-template" type="button">' . esc_html__( 'Save', 'customify' ) . '</button></div>' . $html,
),
);
}
}
Customify_Customize_Layout_Builder()->register_item( 'footer', 'Customify_Builder_Footer_Templates' );
footer/widgets.php 0000666 00000013201 15115303712 0010220 0 ustar 00 <?php
class Customify_Builder_Item_Footer_Widget_1 {
public $id = 'footer-1';
function item() {
return array(
'name' => __( 'Footer Sidebar 1', 'customify' ),
'id' => 'footer-1',
'width' => '3',
'section' => 'sidebar-widgets-footer-1',
);
}
function customize() {
return customify_footer_layout_settings( 'footer-1', 'sidebar-widgets-footer-1' );
}
}
class Customify_Builder_Item_Footer_Widget_2 { //phpcs:ignore
public $id = 'footer-2';
function item() {
return array(
'name' => __( 'Footer Sidebar 2', 'customify' ),
'id' => 'footer-2',
'width' => '3',
'section' => 'sidebar-widgets-footer-2',
);
}
function customize() {
return customify_footer_layout_settings( 'footer-2', 'sidebar-widgets-footer-2' );
}
}
class Customify_Builder_Item_Footer_Widget_3 { //phpcs:ignore
public $id = 'footer-3';
function item() {
return array(
'name' => __( 'Footer Sidebar 3', 'customify' ),
'id' => 'footer-3',
'width' => '3',
'section' => 'sidebar-widgets-footer-3',
);
}
function customize() {
return customify_footer_layout_settings( 'footer-3', 'sidebar-widgets-footer-3' );
}
}
class Customify_Builder_Item_Footer_Widget_4 { //phpcs:ignore
public $id = 'footer-4';
function item() {
return array(
'name' => __( 'Footer Sidebar 4', 'customify' ),
'id' => 'footer-4',
'width' => '3',
'section' => 'sidebar-widgets-footer-4',
);
}
function customize() {
return customify_footer_layout_settings( 'footer-4', 'sidebar-widgets-footer-4' );
}
}
class Customify_Builder_Item_Footer_Widget_5 { //phpcs:ignore
public $id = 'footer-5';
function item() {
return array(
'name' => __( 'Footer Sidebar 5', 'customify' ),
'id' => 'footer-5',
'width' => '3',
'section' => 'sidebar-widgets-footer-5',
);
}
function customize() {
return customify_footer_layout_settings( 'footer-5', 'sidebar-widgets-footer-5' );
}
}
class Customify_Builder_Item_Footer_Widget_6 { //phpcs:ignore
public $id = 'footer-6';
function item() {
return array(
'name' => __( 'Footer Sidebar 6', 'customify' ),
'id' => 'footer-6',
'width' => '3',
'section' => 'sidebar-widgets-footer-6',
);
}
function customize() {
return customify_footer_layout_settings( 'footer-6', 'sidebar-widgets-footer-6' );
}
}
function customify_change_footer_widgets_location( $wp_customize ) {
for ( $i = 1; $i <= 6; $i ++ ) {
if ( $wp_customize->get_section( 'sidebar-widgets-footer-' . $i ) ) {
$wp_customize->get_section( 'sidebar-widgets-footer-' . $i )->panel = 'footer_settings';
}
}
}
add_action( 'customize_register', 'customify_change_footer_widgets_location', 999 );
/**
* Always show footer widgets for customize builder
*
* @param bool $active
* @param string $section
*
* @return bool
*/
function customify_customize_footer_widgets_show( $active, $section ) {
if ( strpos( $section->id, 'widgets-footer-' ) ) {
$active = true;
}
return $active;
}
add_filter( 'customize_section_active', 'customify_customize_footer_widgets_show', 15, 2 );
/**
* Display Footer widget
*
* @param string $footer_id
*/
function customify_builder_footer_widget_item( $footer_id = 'footer-1' ) {
$show = false;
if ( is_active_sidebar( $footer_id ) ) {
echo '<div class="widget-area">';
dynamic_sidebar( $footer_id );
$show = true;
echo '</div>';
}
// Show admin notice.
if ( ! $show ) {
if ( current_user_can( 'edit_theme_options' ) ) {
echo '<div class="widget-area">';
$id = str_replace( 'footer-', '', $footer_id );
the_widget(
'WP_Widget_Text',
array(
'title' => sprintf( __( 'Footer Widget %s', 'customify' ), $id ),
'text' => sprintf( // WPCS: XSS ok.
/*Translators: 1: Admin URL2: Customize URL 3: Footer ID */
__( '<p>Replace this widget content by going to <a href="%1$s"><strong>Appearance → Customize → Footer → Footer %2$s</strong></a> and adding widgets into this widget area.</p>', 'customify' ),
esc_url( admin_url( 'customize.php?autofocus[section]=sidebar-widgets-footer-' . $id ) ),
$id
),
'filter' => true,
'visual' => true,
),
array(
'before_widget' => '<section id="placeholder-widget-text" class="widget widget_text">',
'after_widget' => '</section>',
'before_title' => '<h4 class="widget-title">',
'after_title' => '</h4>',
)
);
echo '</div>';
}
}
}
function customify_builder_footer_1_item() {
customify_builder_footer_widget_item( 'footer-1' );
}
function customify_builder_footer_2_item() {
customify_builder_footer_widget_item( 'footer-2' );
}
function customify_builder_footer_3_item() {
customify_builder_footer_widget_item( 'footer-3' );
}
function customify_builder_footer_4_item() {
customify_builder_footer_widget_item( 'footer-4' );
}
function customify_builder_footer_5_item() {
customify_builder_footer_widget_item( 'footer-5' );
}
function customify_builder_footer_6_item() {
customify_builder_footer_widget_item( 'footer-6' );
}
Customify_Customize_Layout_Builder()->register_item( 'footer', new Customify_Builder_Item_Footer_Widget_1() );
Customify_Customize_Layout_Builder()->register_item( 'footer', new Customify_Builder_Item_Footer_Widget_2() );
Customify_Customize_Layout_Builder()->register_item( 'footer', new Customify_Builder_Item_Footer_Widget_3() );
Customify_Customize_Layout_Builder()->register_item( 'footer', new Customify_Builder_Item_Footer_Widget_4() );
Customify_Customize_Layout_Builder()->register_item( 'footer', new Customify_Builder_Item_Footer_Widget_5() );
Customify_Customize_Layout_Builder()->register_item( 'footer', new Customify_Builder_Item_Footer_Widget_6() );
footer/panel.php 0000666 00000012036 15115303712 0007656 0 ustar 00 <?php
class Customify_Builder_Footer extends Customify_Customize_Builder_Panel {
public $id = 'footer';
function get_config() {
return array(
'id' => $this->id,
'title' => __( 'Footer Builder', 'customify' ),
'control_id' => 'footer_builder_panel',
'panel' => 'footer_settings',
'section' => 'footer_builder_panel',
'devices' => array(
'desktop' => __( 'Footer Layout', 'customify' ),
),
);
}
function get_rows_config() {
return array(
'main' => __( 'Footer Main', 'customify' ),
'bottom' => __( 'Footer Bottom', 'customify' ),
);
}
function customize() {
$fn = 'customify_customize_render_footer';
$config = array(
array(
'name' => 'footer_settings',
'type' => 'panel',
'priority' => 98,
'title' => __( 'Footer', 'customify' ),
),
array(
'name' => 'footer_builder_panel',
'type' => 'section',
'panel' => 'footer_settings',
'title' => __( 'Footer Builder', 'customify' ),
),
array(
'name' => 'footer_builder_panel',
'type' => 'js_raw',
'section' => 'footer_builder_panel',
'theme_supports' => '',
'title' => __( 'Footer Builder', 'customify' ),
'selector' => '#site-footer',
'render_callback' => $fn,
'container_inclusive' => true,
),
);
return $config;
}
function row_config( $section = false, $section_name = false ) {
if ( ! $section ) {
$section = 'footer_top';
}
if ( ! $section_name ) {
$section_name = __( 'Footer Top', 'customify' );
}
// Text skin.
$color_mode = 'dark-mode';
if ( 'footer_top' == $section ) {
$color_mode = 'light-mode';
}
$selector = '#cb-row--' . str_replace( '_', '-', $section );
$skin_mode_selector = '.footer--row-inner.' . str_replace( '_', '-', $section ) . '-inner';
$fn = 'customify_customize_render_footer';
$config = array(
array(
'name' => $section,
'type' => 'section',
'panel' => 'footer_settings',
'theme_supports' => '',
'title' => $section_name,
),
array(
'name' => $section . '_layout',
'type' => 'select',
'section' => $section,
'title' => __( 'Layout', 'customify' ),
'selector' => $selector,
'render_callback' => $fn,
'css_format' => 'html_class',
'default' => 'layout-full-contained',
'choices' => array(
'layout-full-contained' => __( 'Full width - Contained', 'customify' ),
'layout-fullwidth' => __( 'Full Width', 'customify' ),
'layout-contained' => __( 'Contained', 'customify' ),
),
),
array(
'name' => $section . '_noti_layout',
'type' => 'custom_html',
'section' => $section,
'title' => '',
'description' => __( "Layout <code>Full width - Contained</code> and <code>Full Width</code> will not fit browser width because you've selected <a class='focus-control' data-id='site_layout' href='#'>Site Layout</a> as <code>Boxed</code> or <code>Framed</code>", 'customify' ),
'required' => array(
array( 'site_layout', '=', array( 'site-boxed', 'site-framed' ) ),
),
),
array(
'name' => $section . '_text_mode',
'type' => 'image_select',
'section' => $section,
'selector' => $skin_mode_selector,
'css_format' => 'html_class',
'title' => __( 'Skin Mode', 'customify' ),
'default' => $color_mode,
'choices' => array(
'dark-mode' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/text_mode_light.svg',
'label' => 'Dark',
),
'light-mode' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/text_mode_dark.svg',
'label' => 'Light',
),
),
),
array(
'name' => "{$section}_background_color",
'type' => 'color',
'section' => $section,
'title' => __( 'Background Color', 'customify' ),
'selector' => "{$selector} .footer--row-inner",
'css_format' => 'background-color: {{value}}',
),
);
$config = apply_filters( 'customify/builder/' . $this->id . '/rows/section_configs', $config, $section, $section_name );
return $config;
}
}
function customify_footer_layout_settings( $item_id, $section ) {
global $wp_customize;
if ( is_object( $wp_customize ) ) {
global $wp_registered_sidebars;
$name = $section;
if ( is_array( $wp_registered_sidebars ) ) {
if ( isset( $wp_registered_sidebars[ $item_id ] ) ) {
$name = $wp_registered_sidebars[ $item_id ]['name'];
}
}
$wp_customize->add_section(
$section,
array(
'title' => $name,
)
);
}
if ( function_exists( 'customify_header_layout_settings' ) ) {
return customify_header_layout_settings( $item_id, $section, 'customify_customize_render_footer', 'footer_' );
}
return false;
}
Customify_Customize_Layout_Builder()->register_builder( 'footer', new Customify_Builder_Footer() );
footer/social-icons.php 0000666 00000001011 15115303712 0011131 0 ustar 00 <?php
class Customify_Builder_Footer_Item_Social_Icons extends Customify_Builder_Item_Social_Icons {
public $id;
public $section;
public $class;
public $selector;
public $panel;
function __construct() {
$this->id = 'footer-social-icons';
$this->section = 'footer_social_icons';
$this->class = 'footer-social-icons';
$this->panel = 'footer_settings';
parent::__construct();
}
}
Customify_Customize_Layout_Builder()->register_item( 'footer', new Customify_Builder_Footer_Item_Social_Icons() );
footer/copyright.php 0000666 00000005211 15115303712 0010564 0 ustar 00 <?php
class Customify_Builder_Footer_Item_Copyright {
public $id = 'footer_copyright';
public $section = 'footer_copyright';
public $name = 'footer_copyright';
public $label = '';
/**
* Optional construct
*/
function __construct() {
$this->label = __( 'Copyright', 'customify' );
}
/**
* Register Builder item
*
* @return array
*/
function item() {
return array(
'name' => __( 'Copyright', 'customify' ),
'id' => $this->id,
'col' => 0,
'width' => '6',
'section' => $this->section, // Customizer section to focus when click settings.
);
}
/**
* Optional, Register customize section and panel.
*
* @return array
*/
function customize() {
$fn = array( $this, 'render' );
$config = array(
array(
'name' => $this->section,
'type' => 'section',
'panel' => 'footer_settings',
'title' => $this->label,
),
array(
'name' => $this->name,
'type' => 'textarea',
'section' => $this->section,
'selector' => '.builder-footer-copyright-item',
'render_callback' => $fn,
'theme_supports' => '',
'default' => __( 'Copyright © {current_year} {site_title} - Powered by {theme_author}.', 'customify' ),
'title' => __( 'Copyright Text', 'customify' ),
'description' => __( 'Arbitrary HTML code or shortcode. Available tags: {current_year}, {site_title}, {theme_author}', 'customify' ),
),
array(
'name' => $this->name . '_typography',
'type' => 'typography',
'section' => $this->section,
'title' => __( 'Copyright Text Typography', 'customify' ),
'selector' => '.builder-item--footer_copyright, .builder-item--footer_copyright p',
'css_format' => 'typography',
'default' => array(),
),
);
return array_merge( $config, customify_footer_layout_settings( $this->id, $this->section ) );
}
/**
* Optional. Render item content
*/
function render() {
$tags = array(
'current_year' => date_i18n( 'Y' ),
'site_title' => get_bloginfo( 'name' ),
'theme_author' => sprintf( '<a href="https://pressmaximum.com/customify">%1$s</a>', 'Customify' ), // Brand name.
);
$content = Customify()->get_setting( $this->name );
foreach ( $tags as $k => $v ) {
$content = str_replace( '{' . $k . '}', $v, $content );
}
echo '<div class="builder-footer-copyright-item footer-copyright">';
echo apply_filters( 'customify_the_content', wp_kses_post( balanceTags( $content, true ) ) ); // WPCS: XSS OK.
echo '</div>';
}
}
Customify_Customize_Layout_Builder()->register_item( 'footer', new Customify_Builder_Footer_Item_Copyright() );
page-header.php 0000666 00000075460 15115303712 0007435 0 ustar 00 <?php
class Customify_Page_Header {
public $name = null;
public $description = null;
static $is_transparent = null;
static $_instance = null;
static $_settings = null;
function __construct() {
add_filter( 'customify/customizer/config', array( $this, 'config' ) );
if ( ! is_admin() ) {
add_action( 'customify_is_post_title_display', array( $this, 'display_page_title' ), 35 );
add_action( 'customify/site-start', array( $this, 'render' ), 35 );
add_action( 'wp', array( $this, 'wp' ), 85 );
}
self::$_instance = $this;
}
function wp() {
$this->get_settings();
}
static function get_instance() {
if ( is_null( self::$_instance ) ) {
self::$_instance = new self();
}
return self::$_instance;
}
function config( $configs = array() ) {
$section = 'page_header';
$name = 'page_header';
$choices = array(
'default' => __( 'Default', 'customify' ),
'cover' => __( 'Cover', 'customify' ),
'titlebar' => __( 'Titlebar', 'customify' ),
'none' => __( 'Hide', 'customify' ),
);
$render_cb_el = array( $this, 'render' );
$display_fields = array(
array(
'name' => 'page',
'type' => 'select',
'label' => __( 'Display on single page', 'customify' ),
'description' => __( 'Apply when viewing single page', 'customify' ),
'default' => 'titlebar',
'choices' => $choices,
),
array(
'name' => 'post',
'type' => 'select',
'label' => __( 'Display on single post', 'customify' ),
'description' => __( 'Apply when viewing single post', 'customify' ),
'default' => '',
'choices' => $choices,
),
array(
'name' => 'category',
'type' => 'select',
'label' => __( 'Display on categories', 'customify' ),
'description' => __( 'Apply when viewing a category page', 'customify' ),
'default' => '',
'choices' => $choices,
),
array(
'name' => 'index',
'type' => 'select',
'label' => __( 'Display on index', 'customify' ),
'description' => __( 'Apply when your homepage displays as latest posts', 'customify' ),
'default' => '',
'choices' => $choices,
),
array(
'name' => 'search',
'type' => 'select',
'label' => __( 'Display on search', 'customify' ),
'description' => __( 'Apply when viewing search results page', 'customify' ),
'default' => '',
'choices' => $choices,
),
array(
'name' => 'archive',
'type' => 'select',
'label' => __( 'Display on archive', 'customify' ),
'description' => __( 'Apply when viewing archive pages, e.g. Tag, Author, Date, Custom Post Type or Custom Taxonomy', 'customify' ),
'default' => '',
'choices' => $choices,
),
array(
'name' => 'page_404',
'type' => 'select',
'label' => __( 'Display on 404 page', 'customify' ),
'description' => __( 'Apply when the page not found', 'customify' ),
'default' => '',
'choices' => $choices,
),
);
$title_fields = array(
array(
'name' => 'index',
'type' => 'text',
'label' => __( 'Title for index page', 'customify' ),
'description' => __( 'Apply when your homepage displays as latest posts', 'customify' ),
'default' => '',
),
array(
'name' => 'post',
'type' => 'text',
'label' => __( 'Title for single post', 'customify' ),
'description' => __( 'Apply when viewing single post', 'customify' ),
'default' => '',
),
array(
'name' => 'page_404',
'type' => 'text',
'label' => __( 'Title for 404 page', 'customify' ),
'description' => __( 'Apply when the page not found', 'customify' ),
'default' => '',
),
);
$tagline_fields = array(
array(
'name' => 'index',
'type' => 'textarea',
'label' => __( 'Tagline for index page', 'customify' ),
'description' => __( 'Apply when your homepage displays as latest posts', 'customify' ),
'default' => '',
),
array(
'name' => 'post',
'type' => 'textarea',
'label' => __( 'Tagline for single post', 'customify' ),
'description' => __( 'Apply when viewing single post', 'customify' ),
'default' => '',
),
array(
'name' => 'page_404',
'type' => 'textarea',
'label' => __( 'Tagline for 404 page', 'customify' ),
'description' => __( 'Apply when the page not found', 'customify' ),
'default' => '',
),
);
$post_types = Customify()->get_post_types( false );
if ( count( $post_types ) > 0 ) {
foreach ( $post_types as $pt => $label ) {
$display_fields[] = array(
'name' => $pt,
'type' => 'select',
'label' => sprintf( __( 'Display on %s page', 'customify' ), $label['singular_name'] ),
'description' => sprintf( __( 'Apply when viewing single %s', 'customify' ), $label['singular_name'] ),
'default' => '',
'choices' => $choices,
);
$taxonomy_filter_args = [
'show_in_nav_menus' => true,
];
$taxonomy_filter_args['object_type'] = [ $pt ];
$taxonomies = get_taxonomies( $taxonomy_filter_args, 'objects' );
$options = array();
foreach ( $taxonomies as $taxonomy => $object ) {
$options[ $taxonomy ] = $object->label;
$display_fields[] = array(
'name' => $taxonomy,
'type' => 'select',
'label' => sprintf( __( 'Display on %1$s %2$s', 'customify' ), $label['singular_name'], $object->labels->singular_name ),
'description' => sprintf( __( 'Apply when viewing %1$s %2$s', 'customify' ), $label['singular_name'], $object->labels->singular_name ),
'default' => '',
'choices' => $choices,
);
}
$title_fields[] = array(
'name' => $pt,
'type' => 'text',
'label' => sprintf( __( 'Title for %s', 'customify' ), $label['singular_name'] ),
'description' => sprintf( __( 'Apply when viewing single %s', 'customify' ), $label['singular_name'] ),
'default' => '',
);
$tagline_fields[] = array(
'name' => $pt,
'type' => 'textarea',
'label' => sprintf( __( 'Tagline for %s', 'customify' ), $label['singular_name'] ),
'description' => sprintf( __( 'Apply when viewing single %s', 'customify' ), $label['singular_name'] ),
'default' => '',
);
}
}
$config = array(
array(
'name' => $section,
'type' => 'section',
'panel' => 'layout_panel',
'title' => __( 'Page Header', 'customify' ),
),
array(
'name' => $section . '_layout',
'type' => 'select',
'section' => $section,
'title' => __( 'Layout', 'customify' ),
'selector' => '.page-header--item',
'css_format' => 'html_class',
'default' => '',
'choices' => array(
'' => __( 'Default', 'customify' ),
'layout-full-contained' => __( 'Full width - Contained', 'customify' ),
'layout-fullwidth' => __( 'Full Width', 'customify' ),
'layout-contained' => __( 'Contained', 'customify' ),
),
),
array(
'name' => "{$name}_display_h",
'type' => 'heading',
'section' => $section,
'title' => __( 'Display Settings', 'customify' ),
),
array(
'name' => "{$name}_display",
'type' => 'modal',
'section' => $section,
'label' => __( 'Display', 'customify' ),
'description' => __( 'Settings display for special pages.', 'customify' ),
'default' => array(
'display' => array(
'page' => 'titlebar',
'archive' => 'titlebar',
'category' => 'titlebar',
),
),
'fields' => array(
'tabs' => array(
'display' => __( 'Display', 'customify' ),
'advanced' => __( 'Advanced', 'customify' ),
),
'display_fields' => $display_fields,
'advanced_fields' => array(
array(
'name' => 'post_bg',
'type' => 'select',
'label' => __( 'Post Header Background Cover', 'customify' ),
'description' => __( 'Apply when viewing single post and page header setting displays as cover.', 'customify' ),
'default' => '',
'choices' => array(
'default' => __( 'Default', 'customify' ),
'blog_page' => __( 'Use featured image from blog page', 'customify' ),
'featured' => __( 'Use featured image of current post', 'customify' ),
),
),
array(
'name' => 'post_title_tagline',
'type' => 'select',
'label' => __( 'Single Post Title & Tagline', 'customify' ),
'default' => '',
'choices' => array(
'default' => __( 'Default', 'customify' ),
'blog_page' => __( 'Use title & tagline from blog page', 'customify' ),
'current' => __( 'Use title & tagline of current post', 'customify' ),
),
),
),
),
),
array(
'name' => "{$name}_title_tagline",
'type' => 'modal',
'section' => $section,
'label' => __( 'Title & Tagline', 'customify' ),
'description' => __( 'Title & tagline for special pages.', 'customify' ),
'default' => array(),
'fields' => array(
'tabs' => array(
'titles' => __( 'Title', 'customify' ),
'taglines' => __( 'Tagline', 'customify' ),
),
'titles_fields' => $title_fields,
'taglines_fields' => $tagline_fields,
),
'selector' => '#page-titlebar, #page-cover',
'render_callback' => $render_cb_el,
),
array(
'name' => $name . '_show_archive_prefix',
'type' => 'checkbox',
'section' => $section,
'title' => __( 'Archive Prefix', 'customify' ),
'description' => __( 'Enable or disable archive prefix on category, date, tag page.', 'customify' ),
'checkbox_label' => __( 'Enable', 'customify' ),
'default' => 1,
'selector' => '#page-titlebar, #page-cover',
'render_callback' => $render_cb_el,
),
);
$configs = array_merge( $configs, $config );
$configs = array_merge( $configs, $this->config_cover() );
$configs = array_merge( $configs, $this->config_titlebar() );
return $configs;
}
function config_titlebar() {
$section = 'page_header';
$render_cb_el = array( $this, 'render' );
$selector = '#page-titlebar';
$name = 'titlebar';
$config = array(
array(
'name' => "{$name}_styling_h_tb",
'type' => 'heading',
'section' => 'page_header',
'title' => __( 'Titlebar Settings', 'customify' ),
),
array(
'name' => $name . '_show_title',
'type' => 'checkbox',
'section' => $section,
'label' => __( 'Show Title', 'customify' ),
'description' => __( 'Title is pull from post title, archive title.', 'customify' ),
'checkbox_label' => __( 'Enable', 'customify' ),
'default' => 1,
),
array(
'name' => $name . '_show_tagline',
'type' => 'checkbox',
'section' => $section,
'label' => __( 'Show Tagline', 'customify' ),
'description' => __( 'Tagline is pull from post excerpt, archive description.', 'customify' ),
'checkbox_label' => __( 'Enable', 'customify' ),
'default' => 1,
),
array(
'name' => "{$name}_align",
'type' => 'text_align_no_justify',
'section' => $section,
'device_settings' => true,
'selector' => "$selector",
'css_format' => 'text-align: {{value}};',
'title' => __( 'Text Align', 'customify' ),
),
);
$config = apply_filters( 'customify/titlebar/config', $config, $this );
return $config;
}
function config_cover() {
$section = 'page_header';
$render_cb_el = array( $this, 'render' );
$selector = '#page-cover';
$name = 'header_cover';
$config = array(
array(
'name' => "{$name}_settings_h",
'type' => 'heading',
'section' => $section,
'title' => __( 'Cover Settings', 'customify' ),
),
array(
'name' => $name . '_show_title',
'type' => 'checkbox',
'section' => $section,
'label' => __( 'Show Title', 'customify' ),
'description' => __( 'Title is pull from post title, archive title.', 'customify' ),
'checkbox_label' => __( 'Enable', 'customify' ),
'default' => 1,
),
array(
'name' => $name . '_show_tagline',
'type' => 'checkbox',
'section' => $section,
'label' => __( 'Show Tagline', 'customify' ),
'description' => __( 'Tagline is pull from post excerpt, archive description.', 'customify' ),
'checkbox_label' => __( 'Enable', 'customify' ),
'default' => 1,
),
array(
'name' => $name . '_bg',
'type' => 'modal',
'section' => $section,
'title' => __( 'Cover Background', 'customify' ),
'selector' => $selector,
'css_format' => 'styling', // Styling.
'default' => array(
'normal' => array(
'bg_image' => array(
'id' => '',
'url' => esc_url( get_template_directory_uri() ) . '/assets/images/default-cover.jpg',
),
),
),
'fields' => array(
'tabs' => array(
'normal' => '_',
),
'normal_fields' => array(
array(
'name' => 'bg_image',
'type' => 'image',
'label' => __( 'Background Image', 'customify' ),
'selector' => "$selector",
'css_format' => 'background-image: url("{{value}}");',
),
array(
'name' => 'bg_cover',
'type' => 'select',
'choices' => array(
'' => __( 'Default', 'customify' ),
'auto' => __( 'Auto', 'customify' ),
'cover' => __( 'Cover', 'customify' ),
'contain' => __( 'Contain', 'customify' ),
),
'required' => array( 'bg_image', 'not_empty', '' ),
'label' => __( 'Size', 'customify' ),
'class' => 'field-half-left',
'selector' => "$selector",
'css_format' => '-webkit-background-size: {{value}}; -moz-background-size: {{value}}; -o-background-size: {{value}}; background-size: {{value}};',
),
array(
'name' => 'bg_position',
'type' => 'select',
'label' => __( 'Position', 'customify' ),
'required' => array( 'bg_image', 'not_empty', '' ),
'class' => 'field-half-right',
'choices' => array(
'' => __( 'Default', 'customify' ),
'center' => __( 'Center', 'customify' ),
'top left' => __( 'Top Left', 'customify' ),
'top right' => __( 'Top Right', 'customify' ),
'top center' => __( 'Top Center', 'customify' ),
'bottom left' => __( 'Bottom Left', 'customify' ),
'bottom center' => __( 'Bottom Center', 'customify' ),
'bottom right' => __( 'Bottom Right', 'customify' ),
),
'selector' => "$selector",
'css_format' => 'background-position: {{value}};',
),
array(
'name' => 'bg_repeat',
'type' => 'select',
'label' => __( 'Repeat', 'customify' ),
'class' => 'field-half-left',
'required' => array(
array( 'bg_image', 'not_empty', '' ),
),
'choices' => array(
'repeat' => __( 'Default', 'customify' ),
'no-repeat' => __( 'No repeat', 'customify' ),
'repeat-x' => __( 'Repeat horizontal', 'customify' ),
'repeat-y' => __( 'Repeat vertical', 'customify' ),
),
'selector' => "$selector",
'css_format' => 'background-repeat: {{value}};',
),
array(
'name' => 'bg_attachment',
'type' => 'select',
'label' => __( 'Attachment', 'customify' ),
'class' => 'field-half-right',
'required' => array(
array( 'bg_image', 'not_empty', '' ),
),
'choices' => array(
'' => __( 'Default', 'customify' ),
'scroll' => __( 'Scroll', 'customify' ),
'fixed' => __( 'Fixed', 'customify' ),
),
'selector' => "$selector",
'css_format' => 'background-attachment: {{value}};',
),
array(
'name' => 'overlay',
'type' => 'color',
'section' => $section,
'class' => 'customify--clear',
'device_settings' => false,
'selector' => "$selector:before",
'label' => __( 'Cover Overlay', 'customify' ),
'css_format' => 'background-color: {{value}};',
),
),
'hover_fields' => false,
),
),
array(
'name' => "{$name}_align",
'type' => 'text_align_no_justify',
'section' => $section,
'device_settings' => true,
'selector' => "$selector",
'css_format' => 'text-align: {{value}};',
'title' => __( 'Cover Text Align', 'customify' ),
),
array(
'name' => "{$name}_height",
'type' => 'slider',
'section' => $section,
'device_settings' => true,
'max' => 1000,
'title' => __( 'Cover Height', 'customify' ),
'selector' => "{$selector} .page-cover-inner",
'css_format' => 'min-height: {{value}};',
'default' => array(
'desktop' => array(
'value' => '300',
),
'tablet' => array(
'value' => '250',
),
'mobile' => array(
'value' => '200',
),
),
),
array(
'name' => "{$name}_align",
'type' => 'text_align_no_justify',
'section' => $section,
'device_settings' => true,
'selector' => "$selector",
'css_format' => 'text-align: {{value}};',
'title' => __( 'Cover Text Align', 'customify' ),
),
);
$config = apply_filters( 'customify/cover/config', $config, $this );
return $config;
}
function get_settings() {
if ( ! is_null( self::$_settings ) ) {
return self::$_settings;
}
$args = array(
'_page' => 'index',
'display' => 'default',
'title' => '',
'tagline' => '',
'image' => '',
'title_tag' => 'h1',
'force_display_single_title' => '', // Show || or hide.
'show_title' => false, // force show post title.
'shortcode' => false, // force show post title.
'cover_tagline' => 1, // Display tagline in cover.
'titlebar_tagline' => 1, // Display tagline in titlbar.
);
$name = 'page_header';
$display = Customify()->get_setting_tab( $name . '_display', 'display' );
$advanced = Customify()->get_setting_tab( $name . '_display', 'advanced' );
$titles = Customify()->get_setting_tab( $name . '_title_tagline', 'titles' );
$taglines = Customify()->get_setting_tab( $name . '_title_tagline', 'taglines' );
$args['cover_tagline'] = Customify()->get_setting( 'header_cover_show_tagline' );
$args['titlebar_tagline'] = Customify()->get_setting( 'titlebar_show_tagline' );
$display = wp_parse_args(
$display,
array(
'index' => '',
'category' => '',
'search' => '',
'archive' => '',
'page' => '',
'post' => '',
'singular' => '',
'product' => '',
'product_cat' => '',
'product_tag' => '',
'page_404' => '',
)
);
$advanced = wp_parse_args(
$advanced,
array(
'post_bg' => '',
'post_title_tagline' => '',
)
);
$titles = wp_parse_args(
$titles,
array(
'index' => '',
'post' => '',
'product' => '',
'page_404' => '',
)
);
$taglines = wp_parse_args(
$taglines,
array(
'index' => '',
'post' => '',
'product' => '',
'page_404' => '',
)
);
$post_thumbnail_id = false;
$post_id = 0;
if ( is_front_page() && is_home() ) { // index page.
// Default homepage.
$args['display'] = $display['index'];
$args['title'] = $titles['index'];
$args['tagline'] = $taglines['index'];
$args['_page'] = 'index';
} elseif ( is_front_page() ) {
// static homepage.
$args['display'] = $display['page'];
$post_id = get_the_ID();
$args['_page'] = 'page';
} elseif ( is_home() ) {
// blog page.
$args['display'] = $display['page'];
$post_id = get_option( 'page_for_posts' );
$args['_page'] = 'page';
} elseif ( is_category() ) {
// category.
$args['display'] = $display['category'];
$args['title'] = get_the_archive_title();
$args['tagline'] = get_the_archive_description();
$args['_page'] = 'category';
$post_id = 0;
} elseif ( is_page() ) {
// single page.
$args['display'] = $display['page'];
$post_id = get_the_ID();
$args['_page'] = 'page';
} elseif ( is_singular( 'post' ) ) {
// single post.
$args['display'] = $display['post'];
$args['title_tag'] = 'h2';
// Setup single post bg for cover.
if ( 'blog_page' == $advanced['post_bg'] ) {
$post_id = get_option( 'page_for_posts' );
$post_thumbnail_id = get_post_thumbnail_id( $post_id );
} elseif ( 'featured' == $advanced['post_bg'] ) {
$post_thumbnail_id = get_post_thumbnail_id( get_the_ID() );
} else {
$post_id = get_option( 'page_for_posts' );
if ( $post_id ) {
$post_thumbnail_id = get_post_thumbnail_id( get_the_ID() );
}
}
if ( 'none' != $args['display'] ) {
if ( 'blog_page' == $advanced['post_title_tagline'] ) {
$post_id = get_option( 'page_for_posts' );
$args['force_display_single_title'] = 'show';
} elseif ( 'current' == $advanced['post_title_tagline'] ) {
$post_id = get_the_ID();
if ( 'default' != $args['display'] ) {
$args['force_display_single_title'] = 'hide';
} else {
$args['force_display_single_title'] = 'show';
}
$args['title_tag'] = 'h1';
} else {
$post_id = get_option( 'page_for_posts' );
$args['force_display_single_title'] = 'show';
if ( ! $post_id ) {
$args['force_display_single_title'] = 'show';
if ( $titles['post'] || $taglines['post'] ) {
$args['title'] = $titles['post'];
$args['tagline'] = $taglines['post'];
}
}
}
}
$args['_page'] = 'post';
} elseif ( is_singular() ) {
// single custom post type.
$post_id = get_the_ID();
$post_type = get_post_type();
if ( isset( $display[ $post_type ] ) ) {
$args['display'] = $display[ $post_type ];
$args['_page'] = 'singular_' . $post_type;
} elseif ( isset( $display['singular'] ) ) {
$args['display'] = $display['singular'];
$args['_page'] = 'singular';
}
} elseif ( is_404() ) {
// page not found.
$args['display'] = $display['page_404'];
$args['_page'] = '404';
$args['title'] = $titles['page_404'];
$args['tagline'] = $taglines['page_404'];
if ( ! $args['title'] ) {
$args['title'] = __( "Oops! That page can't be found.", 'customify' );
}
} elseif ( is_search() ) {
// Search result.
$args['display'] = $display['search'];
$args['title'] = sprintf( // WPCS: XSS ok.
/* translators: 1: Search query name */
__( 'Search Results for: %s', 'customify' ),
'<span>' . get_search_query() . '</span>'
);
$args['tagline'] = '';
$args['_page'] = 'search';
$post_id = 0;
} elseif ( is_archive() ) {
$args['display'] = $display['archive'];
$args['title'] = get_the_archive_title();
$args['tagline'] = get_the_archive_description();
$args['_page'] = 'archive';
$post_id = 0;
}
if ( is_tax() ) {
$queried_object = get_queried_object();
if ( isset( $display[ $queried_object->taxonomy ] ) ) {
$args['display'] = $display['product_tag'];
}
if ( isset( $titles[ $queried_object->taxonomy ] ) ) {
$args['display'] = $titles[ $queried_object->taxonomy ];
}
if ( isset( $taglines[ $queried_object->taxonomy ] ) ) {
$args['tagline'] = $taglines[ $queried_object->taxonomy ];
}
$args['_page'] = 'tax_' . $queried_object->taxonomy;
}
// WooCommerce Settings.
if ( Customify()->is_woocommerce_active() ) {
if ( is_product() ) {
$post_id = wc_get_page_id( 'shop' );
$args['display'] = $display['product'];
$args['title'] = $titles['product'];
$args['tagline'] = $taglines['product'];
$args['_page'] = 'product';
if ( $args['title'] || $args['tagline'] ) {
$post_id = 0;
}
} elseif ( is_product_category() ) {
$post_id = 0;
$args['display'] = $display['product_cat'];
$args['title'] = get_the_archive_title();
$args['tagline'] = get_the_archive_description();
$args['_page'] = 'product_cat';
} elseif ( is_product_tag() ) {
$post_id = 0;
$args['display'] = $display['product_tag'];
$args['title'] = get_the_archive_title();
$args['tagline'] = get_the_archive_description();
$args['_page'] = 'product_tag';
} elseif ( is_shop() && ! is_search() ) {
$args['display'] = $display['page'];
$post_id = wc_get_page_id( 'shop' );
$args['_page'] = 'shop';
$args['tagline'] = '';
}
}
if ( $post_id > 0 ) {
$post = get_post( $post_id );
if ( $post ) {
$args['title'] = get_the_title( $post_id );
if ( $post->post_excerpt ) {
$args['tagline'] = get_the_excerpt( $post );
}
if ( ! $post_thumbnail_id ) {
$post_thumbnail_id = get_post_thumbnail_id( $post_id );
}
}
}
if ( ! $args['image'] && $post_thumbnail_id ) {
$_i = Customify()->get_media( $post_thumbnail_id );
if ( $_i ) {
$args['image'] = $_i;
}
}
if ( Customify()->is_using_post() ) {
$post_id = Customify()->get_current_post_id();
// If Disable page title.
$disable = get_post_meta( $post_id, '_customify_disable_page_title', true );
if ( $disable ) {
$args['force_display_single_title'] = 'hide';
}
// If has custom field custom title.
$post_display = get_post_meta( $post_id, '_customify_page_header_display', true );
if ( $post_display && 'default' != $post_display ) {
if ( 'normal' == $post_display ) {
$args['display'] = 'default';
} else {
$args['display'] = $post_display;
}
}
// If has custom field custom title.
$title = get_post_meta( $post_id, '_customify_page_header_title', true );
if ( $title ) {
$args['title'] = $title;
}
// If has custom field custom tagline.
$tagline = trim( get_post_meta( $post_id, '_customify_page_header_tagline', true ) );
if ( $tagline ) {
$args['tagline'] = $tagline;
}
// If has custom field header media.
$media = get_post_meta( $post_id, '_customify_page_header_image', true );
if ( ! empty( $media ) ) {
$image = Customify()->get_media( $media );
if ( $image ) {
$args['image'] = $image;
}
}
// Has custom shortcode.
$args['shortcode'] = trim( get_post_meta( $post_id, '_customify_page_header_shortcode', true ) );
if ( $args['shortcode'] ) {
$args['display'] = 'shortcode';
}
}
if ( ! $args['display'] ) {
$args['display'] = 'default';
}
self::$_settings = apply_filters( 'customify/page-header/get-settings', $args );
return $args;
}
function display_page_title( $show ) {
$args = $this->get_settings();
if ( ! $args['display'] || 'default' == $args['display'] ) {
$show = true;
} elseif ( 'cover' == $args['display'] || 'titlebar' == $args['display'] || 'none' == $args['display'] ) {
$show = false;
}
if ( 'hide' == $args['force_display_single_title'] ) {
$show = false;
} elseif ( 'show' == $args['force_display_single_title'] ) {
$show = true;
}
return $show;
}
function render_cover( $args = array() ) {
$args = $this->get_settings();
extract( $args, EXTR_SKIP ); // phpcs:ignore
$style = '';
if ( $args['image'] ) {
$style = ' style="background-image: url(\'' . esc_url( $args['image'] ) . '\')" ';
}
if ( ! $args['title_tag'] ) {
$args['title_tag'] = 'h2';
}
$layout = Customify()->get_setting_tab( 'page_header_layout' );
$classes = array( 'page-header--item page-cover' );
$classes[] = $layout;
?>
<div id="page-cover" class="<?php echo esc_attr( join( ' ', $classes ) ); ?>"<?php echo $style; ?>>
<div class="page-cover-inner customify-container">
<?php
do_action( 'customify/page-cover/before' );
if ( Customify()->get_setting( 'header_cover_show_title' ) ) {
if ( $args['title'] ) {
// WPCS: XSS ok.
echo '<' . $args['title_tag'] . ' class="page-cover-title">' . apply_filters( 'customify_the_title', wp_kses_post( $args['title'] ) ) . '</' . $args['title_tag'] . '>';
}
}
if ( $args['cover_tagline'] ) {
if ( $args['tagline'] ) {
// WPCS: XSS ok.
echo '<div class="page-cover-tagline-wrapper"><div class="page-cover-tagline">' . apply_filters( 'customify_the_title', wp_kses_post( $args['tagline'] ) ) . '</div></div>';
}
}
do_action( 'customify/page-cover/after' );
?>
</div>
</div>
<?php
}
function render_titlebar( $args = array() ) {
$classes = array( 'page-header--item page-titlebar' );
$layout = Customify()->get_setting_tab( 'page_header_layout' );
$classes[] = $layout;
?>
<div id="page-titlebar" class="<?php echo esc_attr( join( ' ', $classes ) ); ?>">
<div class="page-titlebar-inner customify-container">
<?php
/**
* Hook titlebar before
*/
do_action( 'customify/titlebar/before' );
// WPCS: XSS ok.
if ( Customify()->get_setting( 'titlebar_show_title' ) ) {
if ( $args['title'] ) {
echo '<' . $args['title_tag'] . ' class="titlebar-title h4">' . apply_filters( 'customify_the_title', wp_kses_post( $args['title'] ) ) . '</' . $args['title_tag'] . '>';
}
}
if ( $args['titlebar_tagline'] ) {
if ( $args['tagline'] ) {
// WPCS: XSS ok.
echo '<div class="titlebar-tagline">' . apply_filters( 'customify_the_title', wp_kses_post( $args['tagline'] ) ) . '</div>';
}
}
/**
* Hook titlebar after
*/
do_action( 'customify/titlebar/after' );
?>
</div>
</div>
<?php
}
function render() {
$args = $this->get_settings();
if ( 'none' == $args['display'] ) {
return '';
}
switch ( $args['display'] ) {
case 'cover':
$this->render_cover( $args );
break;
case 'titlebar':
$this->render_titlebar( $args );
break;
case 'shortcode':
echo '<div class="page-header-shortcode">' . apply_filters( 'customify_the_content', $args['shortcode'] ) . '</div>';
break;
}
}
}
Customify_Page_Header::get_instance();
single-blog-post.php 0000666 00000014071 15115303712 0010447 0 ustar 00 <?php
if ( ! function_exists( 'customify_customizer_single_blog_config' ) ) {
function customify_customizer_single_blog_config( $configs = array() ) {
$args = array(
'name' => __( 'Single Blog Post', 'customify' ),
'id' => 'single_blog_post',
'selector' => '.entry.entry-single',
'cb' => 'customify_single_post',
);
$top_panel = 'blog_panel';
$level_2_panel = 'section_' . $args['id'];
$config = array(
array(
'name' => $level_2_panel,
'type' => 'section',
'panel' => $top_panel,
'title' => $args['name'],
),
array(
'name' => $args['id'] . '_content_width',
'section' => $level_2_panel,
'type' => 'slider',
'max' => 1200,
'label' => __( 'Content Max Width', 'customify' ),
'selector' => '.single-post .content-inner',
'css_format' => 'max-width: {{value}};',
),
array(
'name' => $args['id'] . '_items',
'section' => $level_2_panel,
'type' => 'repeater',
'title' => __( 'Items Display', 'customify' ),
'live_title_field' => 'title',
'addable' => false,
'title_only' => true,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'default' => array(
array(
'_visibility' => '',
'_key' => 'title',
'title' => __( 'Title', 'customify' ),
),
array(
'_key' => 'meta',
'_visibility' => '',
'title' => __( 'Meta', 'customify' ),
),
array(
'_key' => 'thumbnail',
'_visibility' => '',
'title' => __( 'Thumbnail', 'customify' ),
),
array(
'_key' => 'content',
'_visibility' => '',
'title' => __( 'Content', 'customify' ),
),
array(
'_key' => 'categories',
'_visibility' => 'hidden',
'title' => __( 'Categories', 'customify' ),
),
array(
'_key' => 'tags',
'_visibility' => '',
'title' => __( 'Tags', 'customify' ),
),
array(
'_key' => 'author_bio',
'_visibility' => 'hidden',
'title' => __( 'Author Biography', 'customify' ),
),
array(
'_key' => 'navigation',
'_visibility' => '',
'title' => __( 'Post Navigation', 'customify' ),
),
array(
'_key' => 'related',
'_visibility' => 'hidden',
'title' => __( 'Related Posts', 'customify' ),
),
array(
'_key' => 'comment_form',
'_visibility' => '',
'title' => __( 'Comment Form', 'customify' ),
),
),
'fields' => array(
array(
'name' => '_key',
'type' => 'hidden',
),
array(
'name' => 'title',
'type' => 'hidden',
'label' => __( 'Title', 'customify' ),
),
),
),
array(
'name' => $args['id'] . '_thumbnail_size',
'type' => 'select',
'section' => $level_2_panel,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'default' => 'large',
'label' => __( 'Thumbnail Size', 'customify' ),
'choices' => customify_get_all_image_sizes(),
),
array(
'name' => $level_2_panel . '_h_meta',
'type' => 'heading',
'section' => $level_2_panel,
'title' => __( 'Meta Settings', 'customify' ),
),
array(
'name' => $args['id'] . '_meta_sep',
'section' => $level_2_panel,
'type' => 'text',
'default' => '',
'label' => __( 'Separator', 'customify' ),
'selector' => $args['selector'],
'render_callback' => $args['cb'],
),
array(
'name' => $args['id'] . '_meta_sep_width',
'section' => $level_2_panel . '_meta',
'type' => 'slider',
'max' => 20,
'label' => __( 'Separator Width', 'customify' ),
'selector' => $args['selector'] . ' .entry-meta .sep',
'css_format' => 'margin-left: calc( {{value}} / 2 ); margin-right: calc( {{value}} / 2 );',
),
array(
'name' => $args['id'] . '_meta_config',
'section' => $level_2_panel,
'type' => 'repeater',
'description' => __( 'Drag to reorder the meta item.', 'customify' ),
'live_title_field' => 'title',
'limit' => 4,
'addable' => false,
'title_only' => true,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'default' => array(
array(
'_key' => 'author',
'title' => __( 'Author', 'customify' ),
),
array(
'_key' => 'date',
'title' => __( 'Date', 'customify' ),
),
array(
'_key' => 'categories',
'title' => __( 'Categories', 'customify' ),
),
array(
'_key' => 'comment',
'title' => __( 'Comment', 'customify' ),
),
),
'fields' => array(
array(
'name' => '_key',
'type' => 'hidden',
),
array(
'name' => 'title',
'type' => 'hidden',
'label' => __( 'Title', 'customify' ),
),
),
),
array(
'name' => $args['id'] . '_author_avatar',
'type' => 'checkbox',
'section' => $level_2_panel,
'default' => 0,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'checkbox_label' => __( 'Show author avatar', 'customify' ),
),
array(
'name' => $args['id'] . '_avatar_size',
'type' => 'slider',
'section' => $level_2_panel,
'default' => 32,
'max' => 150,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'label' => __( 'Avatar Size', 'customify' ),
'required' => array( $args['id'] . '_author_avatar', '==', '1' ),
),
);
return array_merge( $configs, $config );
}
}
add_filter( 'customify/customizer/config', 'customify_customizer_single_blog_config' );
header/search-box.php 0000666 00000024740 15115303712 0010551 0 ustar 00 <?php
class Customify_Builder_Item_Search_Box {
public $id = 'search_box';
public $section = 'search_box';
public $name = 'search_box';
public $label = '';
/**
* Optional construct
*
* Customify_Builder_Item_HTML constructor.
*/
function __construct() {
$this->label = __( 'Search Box', 'customify' );
}
/**
* Register Builder item
*
* @return array
*/
function item() {
return array(
'name' => $this->label,
'id' => $this->id,
'col' => 0,
'width' => '1',
'section' => $this->section, // Customizer section to focus when click settings.
);
}
/**
* Optional, Register customize section and panel.
*
* @return array
*/
function customize() {
// Render callback function.
$fn = array( $this, 'render' );
$selector = ".header-{$this->id}-item";
$icon_postion_css = "$selector .search-submit{margin-left: {{value}};} $selector .woo_bootster_search .search-submit{margin-left: {{value}};} $selector .header-search-form button.search-submit{margin-left:{{value}};}";
if ( is_rtl() ) {
$icon_postion_css = ".rtl $selector .search-submit{margin-right: {{value}}; margin-left:auto;} .rtl $selector .woo_bootster_search .search-submit{margin-left: {{value}};margin-left:auto;} .rtl $selector .header-search-form button.search-submit{margin-left: {{value}};margin-left:auto;}";
}
$config = array(
array(
'name' => $this->section,
'type' => 'section',
'panel' => 'header_settings',
'title' => $this->label,
),
array(
'name' => $this->section . '_placeholder',
'type' => 'text',
'section' => $this->section,
'selector' => "$selector",
'render_callback' => $fn,
'label' => __( 'Placeholder', 'customify' ),
'default' => __( 'Search ...', 'customify' ),
'priority' => 10,
),
array(
'name' => $this->section . '_width',
'type' => 'slider',
'device_settings' => true,
'section' => $this->section,
'selector' => "$selector .search-form-fields",
'css_format' => 'width: {{value}};',
'label' => __( 'Search Form Width', 'customify' ),
'description' => __( 'Note: The width can not greater than grid width.', 'customify' ),
'priority' => 15,
),
array(
'name' => $this->section . '_height',
'type' => 'slider',
'device_settings' => true,
'section' => $this->section,
'min' => 25,
'step' => 1,
'max' => 100,
'selector' => "$selector .search-form-fields, $selector .search-form-fields .search-field",
'css_format' => 'height: {{value}};',
'label' => __( 'Input Height', 'customify' ),
'priority' => 20,
),
array(
'name' => $this->section . '_icon_size',
'type' => 'slider',
'device_settings' => true,
'section' => $this->section,
'min' => 5,
'step' => 1,
'max' => 100,
'selector' => "$selector .search-submit svg,$selector .header-search-form button.search-submit svg",
'css_format' => 'height: {{value}}; width: {{value}};',
'label' => __( 'Icon Size', 'customify' ),
'priority' => 25,
),
array(
'name' => $this->section . '_icon_pos',
'type' => 'slider',
'device_settings' => true,
'default' => array(
'desktop' => array(
'value' => - 40,
'unit' => 'px',
),
'tablet' => array(
'value' => - 40,
'unit' => 'px',
),
'mobile' => array(
'value' => - 40,
'unit' => 'px',
),
),
'section' => $this->section,
'min' => - 150,
'step' => 1,
'max' => 90,
'selector' => 'format',
'css_format' => $icon_postion_css,
'label' => __( 'Icon Position', 'customify' ),
'priority' => 30,
),
array(
'name' => $this->section . '_font_size',
'type' => 'typography',
'section' => $this->section,
'selector' => "$selector .search-form-fields",
'css_format' => 'typography',
'label' => __( 'Input Text Typography', 'customify' ),
'description' => __( 'Typography for search input', 'customify' ),
'priority' => 35,
),
array(
'name' => $this->section . '_input_styling',
'type' => 'styling',
'section' => $this->section,
'css_format' => 'styling',
'title' => __( 'Input Styling', 'customify' ),
'description' => __( 'Search input styling', 'customify' ),
'selector' => array(
'normal' => "{$selector} .search-form-fields",
'hover' => "{$selector} .search-form-fields",
'normal_text_color' => "{$selector} .search-form-fields,
{$selector} .search-form-fields input.search-field::placeholder,
.dark-mode {$selector} .search-form-fields .search-field,
.dark-mode {$selector} .search-form-fields .search-field::placeholder,
.woo_bootster_search .dark-mode {$selector} .header-search-form .search-form-fields input.search-field,
.woo_bootster_search .dark-mode {$selector} .header-search-form .search-form-fields input.search-field::placeholder,
.woo_bootster_search .dark-mode {$selector} .header-search-form .search-form-fields .search_product_cats
",
'normal_bg_color' => ".dark-mode {$selector} .search-form-fields, {$selector} .search-form-fields",
'normal_border_style' => ".dark-mode {$selector} .search-form-fields, {$selector} .search-form-fields",
'normal_border_width' => ".dark-mode {$selector} .search-form-fields, {$selector} .search-form-fields",
'normal_border_color' => ".dark-mode {$selector} .search-form-fields, {$selector} .search-form-fields",
'normal_border_radius' => ".dark-mode {$selector} .search-form-fields, {$selector} .search-form-fields",
'normal_box_shadow' => ".dark-mode {$selector} .search-form-fields, {$selector} .search-form-fields",
),
'default' => array(
'normal' => array(
'border_style' => 'solid',
),
),
'fields' => array(
'normal_fields' => array(
'link_color' => false, // disable for special field.
'bg_cover' => false,
'bg_image' => false,
'bg_repeat' => false,
'bg_attachment' => false,
'margin' => false,
),
'hover_fields' => array(
'link_color' => false,
'padding' => false,
'bg_cover' => false,
'bg_image' => false,
'bg_repeat' => false,
'border_radius' => false,
), // disable hover tab and all fields inside.
),
'priority' => 40,
),
array(
'name' => $this->section . '_icon_styling',
'type' => 'styling',
'section' => $this->section,
'css_format' => 'styling',
'title' => __( 'Icon Styling', 'customify' ),
'description' => __( 'Search input styling', 'customify' ),
'selector' => array(
'normal' => "{$selector} .header-search-form button.search-submit",
'hover' => "{$selector} .header-search-form button.search-submit",
'normal_text_color' => ".dark-mode {$selector} .header-search-form button.search-submit",
),
'fields' => array(
'normal_fields' => array(
'link_color' => false, // disable for special field.
'bg_cover' => false,
'bg_image' => false,
'bg_repeat' => false,
'bg_attachment' => false,
'margin' => false,
),
'hover_fields' => array(
'link_color' => false,
'padding' => false,
'bg_cover' => false,
'bg_image' => false,
'bg_repeat' => false,
'bg_attachment' => false,
'border_radius' => false,
), // disable hover tab and all fields inside.
),
'priority' => 45,
),
);
// Item Layout.
return array_merge( $config, customify_header_layout_settings( $this->id, $this->section ) );
}
/**
* Optional. Render item content
*/
function render() {
$form_extra_class = apply_filters( 'customify/builder_item/search-box/form_extra_class', array() );
$placeholder = Customify()->get_setting( $this->section . '_placeholder' );
$placeholder = sanitize_text_field( $placeholder );
/**
* Hook: customify/builder_item/search-box/before_html
*
* @since 0.2.8
*/
do_action( 'customify/builder_item/search-box/before_html' );
echo '<div class="header-' . esc_attr( $this->id ) . '-item item--' . esc_attr( $this->id ) . '">';
?>
<form role="search" class="header-search-form <?php echo esc_attr( implode( ' ', $form_extra_class ) ); ?>" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<div class="search-form-fields">
<span class="screen-reader-text"><?php echo _x( 'Search for:', 'label', 'customify' ); ?></span>
<?php
/**
* Hook: customify/builder_item/search-box/html_content/before_input
*
* @since 0.2.8
*/
do_action( 'customify/builder_item/search-box/html_content/before_input' );
?>
<input type="search" class="search-field" placeholder="<?php echo esc_attr( $placeholder ); ?>" value="<?php echo get_search_query(); ?>" name="s" title="<?php echo esc_attr_x( 'Search for:', 'label', 'customify' ); ?>" />
<?php
/**
* Hook: customify/builder_item/search-box/html_content/after_input
*
* @since 0.2.8
*/
do_action( 'customify/builder_item/search-box/html_content/after_input' );
?>
</div>
<button type="submit" class="search-submit">
<svg aria-hidden="true" focusable="false" role="presentation" xmlns="http://www.w3.org/2000/svg" width="20" height="21" viewBox="0 0 20 21">
<path fill="currentColor" fill-rule="evenodd" d="M12.514 14.906a8.264 8.264 0 0 1-4.322 1.21C3.668 16.116 0 12.513 0 8.07 0 3.626 3.668.023 8.192.023c4.525 0 8.193 3.603 8.193 8.047 0 2.033-.769 3.89-2.035 5.307l4.999 5.552-1.775 1.597-5.06-5.62zm-4.322-.843c3.37 0 6.102-2.684 6.102-5.993 0-3.31-2.732-5.994-6.102-5.994S2.09 4.76 2.09 8.07c0 3.31 2.732 5.993 6.102 5.993z"></path>
</svg>
</button>
</form>
<?php
echo '</div>';
/**
* Hook: customify/builder_item/search-box/after_html
*
* @since 0.2.8
*/
do_action( 'customify/builder_item/search-box/after_html' );
}
}
Customify_Customize_Layout_Builder()->register_item( 'header', new Customify_Builder_Item_Search_Box() );
header/search-icon.php 0000666 00000027740 15115303712 0010714 0 ustar 00 <?php
class Customify_Builder_Item_Search_Icon {
public $id = 'search_icon';
public $section = 'search_icon';
public $name = 'search_icon';
public $label = '';
/**
* Optional construct
*
* Customify_Builder_Item_HTML constructor.
*/
function __construct() {
$this->label = __( 'Search Icon', 'customify' );
}
/**
* Register Builder item
*
* @return array
*/
function item() {
return array(
'name' => $this->label,
'id' => $this->id,
'col' => 0,
'width' => '1',
'section' => $this->section, // Customizer section to focus when click settings.
);
}
/**
* Optional, Register customize section and panel.
*
* @return array
*/
function customize() {
// Render callback function.
$fn = array( $this, 'render' );
$selector = ".header-{$this->id}-item";
$config = array(
array(
'name' => $this->section,
'type' => 'section',
'panel' => 'header_settings',
'title' => $this->label,
),
array(
'name' => $this->section . '_size',
'type' => 'slider',
'device_settings' => true,
'section' => $this->section,
'min' => 5,
'step' => 1,
'max' => 100,
'selector' => "$selector svg",
'css_format' => 'height: {{value}}; width: {{value}};',
'label' => __( 'Icon Size', 'customify' ),
),
array(
'name' => $this->section . '_padding',
'type' => 'slider',
'device_settings' => true,
'section' => $this->section,
'min' => 0,
'step' => 1,
'max' => 100,
'selector' => "$selector .search-icon",
'css_format' => 'padding: {{value}};',
'label' => __( 'Icon Padding', 'customify' ),
),
array(
'name' => $this->section . '_styling',
'type' => 'styling',
'section' => $this->section,
'css_format' => 'styling',
'title' => __( 'Icon Styling', 'customify' ),
'description' => __( 'Search icon styling', 'customify' ),
'selector' => array(
'normal' => "{$selector} .search-icon",
'hover' => "{$selector} .search-icon:hover",
'normal_box_shadow' => "{$selector} .search-icon",
'normal_text_color' => "{$selector} .search-icon",
),
'fields' => array(
'normal_fields' => array(
'link_color' => false, // disable for special field.
'bg_cover' => false,
'bg_image' => false,
'bg_repeat' => false,
'bg_attachment' => false,
'padding' => false,
'margin' => false,
),
'hover_fields' => array(
'link_color' => false,
'padding' => false,
'bg_cover' => false,
'bg_image' => false,
'bg_attachment' => false,
'bg_repeat' => false,
'border_radius' => false,
), // disable hover tab and all fields inside.
),
),
array(
'name' => $this->section . '_modal_h',
'type' => 'heading',
'section' => $this->section,
'label' => __( 'Modal Settings', 'customify' ),
),
array(
'name' => $this->section . '_placeholder',
'type' => 'text',
'selector' => "$selector",
'render_callback' => $fn,
'section' => $this->section,
'label' => __( 'Placeholder', 'customify' ),
'default' => __( 'Search ...', 'customify' ),
),
array(
'name' => $this->section . '_form_styling',
'type' => 'styling',
'section' => $this->section,
'css_format' => 'styling',
'title' => __( 'Form Styling', 'customify' ),
'description' => __( 'Form modal styling', 'customify' ),
'selector' => array(
'normal' => "{$selector} .header-search-modal",
'normal_bg_color' => "{$selector} .header-search-modal, {$selector} .header-search-modal:before",
'normal_border_color' => "{$selector} .header-search-modal, {$selector} .header-search-modal:before",
),
'default' => array(
'normal' => array(
'border_style' => 'solid',
),
),
'fields' => array(
'normal_fields' => array(
'text_color' => false, // disable for special field.
'link_color' => false, // disable for special field.
'bg_cover' => false,
'bg_image' => false,
'bg_repeat' => false,
'bg_attachment' => false,
'margin' => false,
),
'hover_fields' => false,
),
),
array(
'name' => $this->section . '_modal_height',
'type' => 'slider',
'device_settings' => true,
'section' => $this->section,
'min' => 25,
'step' => 1,
'max' => 100,
'selector' => "$selector .header-search-form .search-field",
'css_format' => 'height: {{value}};',
'label' => __( 'Input Height', 'customify' ),
),
array(
'name' => $this->section . '_modal_width',
'type' => 'slider',
'device_settings' => true,
'section' => $this->section,
'selector' => "$selector .header-search-modal",
'css_format' => 'width: {{value}};',
'label' => __( 'Search Modal Width', 'customify' ),
),
array(
'name' => $this->section . '_modal_font_size',
'type' => 'typography',
'section' => $this->section,
'selector' => "$selector .header-search-form .search-field",
'css_format' => 'typography',
'label' => __( 'Input Text Typography', 'customify' ),
'description' => __( 'Typography for search input', 'customify' ),
),
array(
'name' => $this->section . '_modal_icon_size',
'type' => 'slider',
'device_settings' => true,
'section' => $this->section,
'min' => 5,
'step' => 1,
'max' => 100,
'selector' => "$selector .search-submit svg",
'css_format' => 'height: {{value}}; width: {{value}};',
'label' => __( 'Icon Size', 'customify' ),
),
array(
'name' => $this->section . '_modal_icon_pos',
'type' => 'slider',
'device_settings' => true,
'default' => array(
'desktop' => array(
'value' => - 40,
'unit' => 'px',
),
'tablet' => array(
'value' => - 40,
'unit' => 'px',
),
'mobile' => array(
'value' => - 40,
'unit' => 'px',
),
),
'section' => $this->section,
'min' => - 150,
'step' => 1,
'max' => 90,
'selector' => "$selector .search-submit",
'css_format' => 'margin-left: {{value}}; ',
'label' => __( 'Icon Position', 'customify' ),
),
array(
'name' => $this->section . '_modal_input_styling',
'type' => 'styling',
'section' => $this->section,
'css_format' => 'styling',
'title' => __( 'Input Styling', 'customify' ),
'description' => __( 'Search input styling', 'customify' ),
'selector' => array(
'normal' => "{$selector} .search-field",
'hover' => "{$selector} .search-field:focus",
'normal_text_color' => "{$selector} .search-field, {$selector} input.search-field::placeholder",
),
'default' => array(
'normal' => array(
'border_style' => 'solid',
),
),
'fields' => array(
'normal_fields' => array(
'link_color' => false, // disable for special field.
'bg_cover' => false,
'bg_image' => false,
'bg_repeat' => false,
'bg_attachment' => false,
'margin' => false,
),
'hover_fields' => array(
'link_color' => false,
'padding' => false,
'bg_cover' => false,
'bg_image' => false,
'bg_repeat' => false,
'border_radius' => false,
), // disable hover tab and all fields inside.
),
),
array(
'name' => $this->section . '_modal_icon_styling',
'type' => 'styling',
'section' => $this->section,
'css_format' => 'styling',
'title' => __( 'Icon Styling', 'customify' ),
'description' => __( 'Search input styling', 'customify' ),
'selector' => array(
'normal' => "{$selector} .search-submit",
'hover' => "{$selector} .search-submit:hover",
),
'fields' => array(
'normal_fields' => array(
'link_color' => false, // disable for special field.
'bg_cover' => false,
'bg_image' => false,
'bg_repeat' => false,
'bg_attachment' => false,
'margin' => false,
),
'hover_fields' => array(
'link_color' => false,
'padding' => false,
'bg_cover' => false,
'bg_image' => false,
'bg_repeat' => false,
'bg_attachment' => false,
'border_radius' => false,
), // disable hover tab and all fields inside.
),
),
);
// Item Layout.
return array_merge( $config, customify_header_layout_settings( $this->id, $this->section ) );
}
/**
* Optional. Render item content
*/
function render() {
$placeholder = Customify()->get_setting( $this->section . '_placeholder' );
$placeholder = sanitize_text_field( $placeholder );
echo '<div class="header-' . esc_attr( $this->id ) . '-item item--' . esc_attr( $this->id ) . '">';
?>
<a class="search-icon" href="#">
<span class="ic-search">
<svg aria-hidden="true" focusable="false" role="presentation" xmlns="http://www.w3.org/2000/svg" width="20" height="21" viewBox="0 0 20 21">
<path fill="currentColor" fill-rule="evenodd" d="M12.514 14.906a8.264 8.264 0 0 1-4.322 1.21C3.668 16.116 0 12.513 0 8.07 0 3.626 3.668.023 8.192.023c4.525 0 8.193 3.603 8.193 8.047 0 2.033-.769 3.89-2.035 5.307l4.999 5.552-1.775 1.597-5.06-5.62zm-4.322-.843c3.37 0 6.102-2.684 6.102-5.993 0-3.31-2.732-5.994-6.102-5.994S2.09 4.76 2.09 8.07c0 3.31 2.732 5.993 6.102 5.993z"></path>
</svg>
</span>
<span class="ic-close">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="612px" height="612px" viewBox="0 0 612 612" fill="currentColor" style="enable-background:new 0 0 612 612;" xml:space="preserve"><g><g id="cross"><g><polygon points="612,36.004 576.521,0.603 306,270.608 35.478,0.603 0,36.004 270.522,306.011 0,575.997 35.478,611.397 306,341.411 576.521,611.397 612,575.997 341.459,306.011 " /></g></g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></svg>
</span>
<span class="arrow-down"></span>
</a>
<div class="header-search-modal-wrapper">
<form role="search" class="header-search-modal header-search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label>
<span class="screen-reader-text"><?php echo _x( 'Search for:', 'label', 'customify' ); ?></span>
<input type="search" class="search-field" placeholder="<?php echo esc_attr( $placeholder ); ?>" value="<?php echo get_search_query(); ?>" name="s" title="<?php echo esc_attr_x( 'Search for:', 'label', 'customify' ); ?>" />
</label>
<button type="submit" class="search-submit">
<svg aria-hidden="true" focusable="false" role="presentation" xmlns="http://www.w3.org/2000/svg" width="20" height="21" viewBox="0 0 20 21">
<path fill="currentColor" fill-rule="evenodd" d="M12.514 14.906a8.264 8.264 0 0 1-4.322 1.21C3.668 16.116 0 12.513 0 8.07 0 3.626 3.668.023 8.192.023c4.525 0 8.193 3.603 8.193 8.047 0 2.033-.769 3.89-2.035 5.307l4.999 5.552-1.775 1.597-5.06-5.62zm-4.322-.843c3.37 0 6.102-2.684 6.102-5.993 0-3.31-2.732-5.994-6.102-5.994S2.09 4.76 2.09 8.07c0 3.31 2.732 5.993 6.102 5.993z"></path>
</svg>
</button>
</form>
</div>
<?php
echo '</div>';
}
}
Customify_Customize_Layout_Builder()->register_item( 'header', new Customify_Builder_Item_Search_Icon() );
header/social-icons.php 0000666 00000026601 15115303712 0011077 0 ustar 00 <?php
class Customify_Builder_Item_Social_Icons {
public $id = 'social-icons';
public $section = 'header_social_icons';
public $class = 'header-social-icons';
public $selector = '';
public $panel = 'header_settings';
function __construct() {
$this->selector = '.' . $this->class;
add_filter( 'customify/icon_used', array( $this, 'used_icon' ) );
}
function used_icon( $list = array() ) {
$list[ $this->id ] = 1;
return $list;
}
function item() {
return array(
'name' => __( 'Social Icons', 'customify' ),
'id' => $this->id,
'col' => 0,
'width' => '4',
'section' => $this->section, // Customizer section to focus when click settings.
);
}
function customize() {
$section = $this->section;
$prefix = $this->section;
$fn = array( $this, 'render' );
$selector = "{$this->selector}.customify-builder-social-icons";
$config = array(
array(
'name' => $section,
'type' => 'section',
'panel' => $this->panel,
'theme_supports' => '',
'title' => __( 'Social Icons', 'customify' ),
),
array(
'name' => $prefix . '_items',
'type' => 'repeater',
'section' => $section,
'selector' => $this->selector,
'render_callback' => $fn,
'title' => __( 'Social Profiles', 'customify' ),
'live_title_field' => 'title',
'default' => array(
array(
'title' => 'Facebook',
'url' => '#',
'icon' => array(
'type' => 'font-awesome',
'icon' => 'fa fa-facebook',
),
),
array(
'title' => 'Twitter',
'url' => '#',
'icon' => array(
'type' => 'font-awesome',
'icon' => 'fa fa-twitter',
),
),
array(
'title' => 'Youtube',
'url' => '#',
'icon' => array(
'type' => 'font-awesome',
'icon' => 'fa fa-youtube-play',
),
),
array(
'title' => 'Instagram',
'url' => '#',
'icon' => array(
'type' => 'font-awesome',
'icon' => 'fa fa-instagram',
),
),
array(
'title' => 'Pinterest',
'url' => '#',
'icon' => array(
'type' => 'font-awesome',
'icon' => 'fa fa-pinterest',
),
),
),
'fields' => array(
array(
'name' => 'title',
'type' => 'text',
'label' => __( 'Title', 'customify' ),
),
array(
'name' => 'icon',
'type' => 'icon',
'label' => __( 'Icon', 'customify' ),
),
array(
'name' => 'url',
'type' => 'text',
'label' => __( 'URL', 'customify' ),
),
),
),
array(
'name' => $prefix . '_target',
'type' => 'checkbox',
'section' => $section,
'selector' => $this->selector,
'render_callback' => $fn,
'default' => 1,
'checkbox_label' => __( 'Open link in a new tab.', 'customify' ),
),
array(
'name' => $prefix . '_nofollow',
'type' => 'checkbox',
'section' => $section,
'render_callback' => $fn,
'default' => 1,
'checkbox_label' => __( 'Adding rel="nofollow" for social links.', 'customify' ),
),
array(
'name' => $prefix . '_size',
'type' => 'slider',
'device_settings' => true,
'section' => $section,
'min' => 10,
'step' => 1,
'max' => 100,
'selector' => 'format',
'css_format' => "$selector li a { font-size: {{value}}; }",
'label' => __( 'Size', 'customify' ),
),
array(
'name' => $prefix . '_padding',
'type' => 'slider',
'device_settings' => true,
'section' => $section,
'min' => .1,
'step' => .1,
'max' => 5,
'selector' => "$selector li a",
'unit' => 'em',
'css_format' => 'padding: {{value_no_unit}}em;',
'label' => __( 'Padding', 'customify' ),
),
array(
'name' => $prefix . '_spacing',
'type' => 'slider',
'device_settings' => true,
'section' => $section,
'min' => 0,
'max' => 30,
'selector' => "$selector li",
'css_format' => 'margin-left: {{value}}; margin-right: {{value}};',
'label' => __( 'Icon Spacing', 'customify' ),
),
array(
'name' => $prefix . '_shape',
'type' => 'select',
'section' => $section,
'selector' => '.header-social-icons',
'default' => 'circle',
'render_callback' => $fn,
'title' => __( 'Shape', 'customify' ),
'choices' => array(
'rounded' => __( 'Rounded', 'customify' ),
'square' => __( 'Square', 'customify' ),
'circle' => __( 'Circle', 'customify' ),
'none' => __( 'None', 'customify' ),
),
),
array(
'name' => $prefix . '_color_type',
'type' => 'select',
'section' => $section,
'selector' => $this->selector,
'default' => 'default',
'render_callback' => $fn,
'title' => __( 'Color', 'customify' ),
'choices' => array(
'default' => __( 'Official Color', 'customify' ),
'custom' => __( 'Custom', 'customify' ),
),
),
array(
'name' => $prefix . '_custom_color',
'type' => 'modal',
'section' => $section,
'selector' => "{$this->selector} li a",
'required' => array( $prefix . '_color_type', '==', 'custom' ),
'css_format' => 'styling',
'title' => __( 'Custom Color', 'customify' ),
'fields' => array(
'tabs' => array(
'default' => __( 'Normal', 'customify' ),
'hover' => __( 'Hover', 'customify' ),
),
'default_fields' => array(
array(
'name' => 'primary',
'type' => 'color',
'label' => __( 'Background Color', 'customify' ),
'selector' => "$selector.color-custom li a",
'css_format' => 'background-color: {{value}};',
),
array(
'name' => 'secondary',
'type' => 'color',
'label' => __( 'Icon Color', 'customify' ),
'selector' => "$selector.color-custom li a",
'css_format' => 'color: {{value}};',
),
),
'hover_fields' => array(
array(
'name' => 'primary',
'type' => 'color',
'label' => __( 'Background Color', 'customify' ),
'selector' => "$selector.color-custom li a:hover",
'css_format' => 'background-color: {{value}};',
),
array(
'name' => 'secondary',
'type' => 'color',
'label' => __( 'Icon Color', 'customify' ),
'selector' => "$selector.color-custom li a:hover",
'css_format' => 'color: {{value}};',
),
),
),
),
array(
'name' => $prefix . '_border',
'type' => 'modal',
'section' => $section,
'selector' => "{$this->selector} li a",
'css_format' => 'styling',
'title' => __( 'Border', 'customify' ),
'description' => __( 'Border & border radius', 'customify' ),
'fields' => array(
'tabs' => array(
'default' => '_',
),
'default_fields' => array(
array(
'name' => 'border_style',
'type' => 'select',
'class' => 'clear',
'label' => __( 'Border Style', 'customify' ),
'default' => 'none',
'choices' => array(
'' => __( 'Default', 'customify' ),
'none' => __( 'None', 'customify' ),
'solid' => __( 'Solid', 'customify' ),
'dotted' => __( 'Dotted', 'customify' ),
'dashed' => __( 'Dashed', 'customify' ),
'double' => __( 'Double', 'customify' ),
'ridge' => __( 'Ridge', 'customify' ),
'inset' => __( 'Inset', 'customify' ),
'outset' => __( 'Outset', 'customify' ),
),
'css_format' => 'border-style: {{value}};',
'selector' => "$selector li a",
),
array(
'name' => 'border_width',
'type' => 'css_ruler',
'label' => __( 'Border Width', 'customify' ),
'required' => array( 'border_style', '!=', 'none' ),
'selector' => "$selector li a",
'css_format' => array(
'top' => 'border-top-width: {{value}};',
'right' => 'border-right-width: {{value}};',
'bottom' => 'border-bottom-width: {{value}};',
'left' => 'border-left-width: {{value}};',
),
),
array(
'name' => 'border_color',
'type' => 'color',
'label' => __( 'Border Color', 'customify' ),
'required' => array( 'border_style', '!=', 'none' ),
'selector' => "$selector li a",
'css_format' => 'border-color: {{value}};',
),
array(
'name' => 'border_radius',
'type' => 'slider',
'label' => __( 'Border Radius', 'customify' ),
'selector' => "$selector li a",
'css_format' => 'border-radius: {{value}};',
),
),
),
),
);
// Item Layout.
return array_merge( $config, customify_header_layout_settings( $this->id, $section ) );
}
function render( $item_config = array() ) {
$shape = Customify()->get_setting( $this->section . '_shape', 'all' );
$color_type = Customify()->get_setting( $this->section . '_color_type' );
$items = Customify()->get_setting( $this->section . '_items' );
$nofollow = Customify()->get_setting( $this->section . '_nofollow' );
$target_blank = Customify()->get_setting( $this->section . '_target' );
$rel = '';
if ( 1 == $nofollow ) {
$rel = 'rel="nofollow" ';
}
$target = '_self';
if ( 1 == $target_blank ) {
$target = '_blank';
}
if ( ! empty( $items ) ) {
$classes = array();
$classes[] = $this->class;
$classes[] = 'customify-builder-social-icons';
if ( $shape ) {
$shape = ' shape-' . sanitize_text_field( $shape );
}
if ( $color_type ) {
$classes[] = 'color-' . sanitize_text_field( $color_type );
}
echo '<ul class="' . esc_attr( join( ' ', $classes ) ) . '">';
foreach ( (array) $items as $index => $item ) {
$item = wp_parse_args(
$item,
array(
'title' => '',
'icon' => '',
'url' => '',
'_visibility' => '',
)
);
if ( 'hidden' !== $item['_visibility'] ) {
echo '<li>';
if ( ! $item['url'] ) {
$item['url'] = '#';
}
$icon = wp_parse_args(
$item['icon'],
array(
'type' => '',
'icon' => '',
)
);
if ( $item['url'] && $icon['icon'] ) {
echo '<a class="social-' . str_replace(
array( ' ', 'fa-fa' ),
array(
'-',
'icon',
),
esc_attr( $icon['icon'] )
) . $shape . '" ' . $rel . 'target="' . esc_attr( $target ) . '" href="' . esc_url( $item['url'] ) . '">';
}
if ( $icon['icon'] ) {
echo '<i class="icon ' . esc_attr( $icon['icon'] ) . '" title="' . esc_attr( $item['title'] ) . '"></i>';
}
if ( $item['url'] ) {
echo '</a>';
}
echo '</li>';
}
}
echo '</ul>';
}
}
}
Customify_Customize_Layout_Builder()->register_item( 'header', new Customify_Builder_Item_Social_Icons() );
header/templates.php 0000666 00000004657 15115303712 0010521 0 ustar 00 <?php
class Customify_Builder_Header_Templates {
public $id = 'header_templates';
function customize() {
$section = 'header_templates';
$prefix = 'header_templates_';
$id = 'header';
$theme_name = wp_get_theme()->get( 'Name' );
$option_name = "{$theme_name}_{$id}_saved_templates";
$saved_templates = get_option( $option_name );
if ( ! is_array( $saved_templates ) ) {
$saved_templates = array();
}
$saved_templates = array_reverse( $saved_templates );
$n = count( $saved_templates );
$html = '';
$html .= '<span class="customize-control-title">' . __( 'Saved Templates', 'customify' ) . '</span>';
$html .= '<ul class="list-saved-templates list-boxed ' . ( $n > 0 ? 'has-templates' : 'no-templates' ) . '">';
if ( count( $saved_templates ) > 0 ) {
foreach ( $saved_templates as $key => $tpl ) {
$tpl = wp_parse_args(
$tpl,
array(
'name' => '',
'data' => '',
)
);
if ( ! $tpl['name'] ) {
$name = __( 'Untitled', 'customify' );
} else {
$name = $tpl['name'];
}
$html .= '<li class="saved_template li-boxed" data-control-id="' . esc_attr( $prefix . 'save' ) . '" data-id="' . esc_attr( $key ) . '" data-data="' . esc_attr( json_encode( $tpl['data'] ) ) . '">' . esc_html( $name ) . ' <a href="#" class="load-tpl">' . __( 'Load', 'customify' ) . '</a><a href="#" class="remove-tpl">' . __( 'Remove', 'customify' ) . '</a></li>'; // phpcs:ignore
}
}
$html .= '<li class="no_template">' . __( 'No saved templates.', 'customify' ) . '</li>';
$html .= '</ul>';
$html .= '</div>';
return array(
array(
'name' => $section,
'type' => 'section',
'panel' => 'header_settings',
'priority' => 299,
'title' => __( 'Templates', 'customify' ),
),
array(
'name' => $prefix . 'save',
'type' => 'custom_html',
'section' => $section,
'theme_supports' => '',
'title' => __( 'Save Template', 'customify' ),
'description' => '<div class="save-template-form"><input type="text" data-builder-id="header" data-control-id="' . esc_attr( $prefix . 'save' ) . '" class="template-input-name change-by-js"><button class="button button-secondary save-builder-template" type="button">' . esc_html__( 'Save', 'customify' ) . '</button></div>' . $html,
),
);
}
}
Customify_Customize_Layout_Builder()->register_item( 'header', new Customify_Builder_Header_Templates() );
header/panel.php 0000666 00000033736 15115303712 0007622 0 ustar 00 <?php
class Customify_Builder_Header extends Customify_Customize_Builder_Panel {
public $id = 'header';
/**
* Panel builder configs.
*
* @since 0.0.1
* @since 0.2.9
*
* @return array
*/
function get_config() {
return array(
'id' => $this->id,
'title' => __( 'Header Builder', 'customify' ),
'control_id' => 'header_builder_panel', // Control ID for ver 1.
'version_id' => 'header_builder_version', // The control id where store version.
'panel' => 'header_settings',
'section' => 'header_builder_panel',
// Versions support, can choice v1 or v2.
'versions' => array(
'v1' => array(
'control_id' => 'header_builder_panel',
'label' => __( 'Version 1', 'customify' ),
),
'v2' => array(
'control_id' => 'header_builder_panel_v2',
'label' => __( 'Version 2', 'customify' ),
),
),
'devices' => array(
'desktop' => __( 'Desktop', 'customify' ),
'mobile' => __( 'Mobile/Tablet', 'customify' ),
),
);
}
function get_rows_config() {
return array(
'top' => __( 'Header Top', 'customify' ),
'main' => __( 'Header Main', 'customify' ),
'bottom' => __( 'Header Bottom', 'customify' ),
'sidebar' => __( 'Menu Sidebar', 'customify' ),
);
}
function customize() {
$fn = 'customify_customize_render_header';
$config = array(
array(
'name' => 'header_settings',
'type' => 'panel',
'priority' => 1,
'title' => __( 'Header', 'customify' ),
),
array(
'name' => 'header_builder_panel',
'type' => 'section',
'panel' => 'header_settings',
'title' => __( 'Header Builder', 'customify' ),
),
// Header Builder v1 store data key.
array(
'name' => 'header_builder_panel',
'type' => 'js_raw',
'section' => 'header_builder_panel',
'theme_supports' => '',
'title' => __( 'Header Builder', 'customify' ),
'selector' => '#masthead',
'render_callback' => $fn,
'container_inclusive' => true,
),
// Header Builder v2 store data key.
array(
'name' => 'header_builder_panel_v2',
'type' => 'js_raw',
'section' => 'header_builder_panel',
'theme_supports' => '',
'title' => '',
'selector' => '#masthead',
'render_callback' => $fn,
'container_inclusive' => true,
),
// Header Builder v2 store data key.
array(
'name' => 'header_builder_version',
'type' => 'js_raw',
'section' => 'header_builder_panel',
'theme_supports' => '',
'title' => '',
'selector' => '#masthead',
'sanitize_callback' => 'sanitize_text_field',
'render_callback' => $fn,
'container_inclusive' => true,
),
);
return $config;
}
function row_config( $section = false, $section_name = false ) {
if ( ! $section ) {
$section = 'header_top';
}
if ( ! $section_name ) {
$section_name = __( 'Header Top', 'customify' );
}
// Text skin.
$color_mode = 'light-mode';
if ( 'header_top' == $section ) {
$color_mode = 'dark-mode';
}
$selector = '.header--row.' . str_replace( '_', '-', $section );
$skin_selector = '.header--row.' . str_replace( '_', '-', $section );
$skin_selector = '.header--row:not(.header--transparent).' . str_replace( '_', '-', $section );
$skin_mode_selector = '.header--row-inner.' . str_replace( '_', '-', $section ) . '-inner';
$fn = 'customify_customize_render_header';
$selector_all = '#masthead';
$config = array(
array(
'name' => $section,
'type' => 'section',
'panel' => 'header_settings',
'theme_supports' => '',
'title' => $section_name,
),
array(
'name' => $section . '_layout',
'type' => 'select',
'section' => $section,
'title' => __( 'Layout', 'customify' ),
'selector' => $selector,
'css_format' => 'html_class',
'render_callback' => $fn,
'default' => 'layout-full-contained',
'choices' => array(
'layout-full-contained' => __( 'Full width - Contained', 'customify' ),
'layout-fullwidth' => __( 'Full Width', 'customify' ),
'layout-contained' => __( 'Contained', 'customify' ),
),
),
array(
'name' => $section . '_noti_layout',
'type' => 'custom_html',
'section' => $section,
'title' => '',
'description' => __( "Layout <code>Full width - Contained</code> and <code>Full Width</code> will not fit browser width because you've selected <a class='focus-control' data-id='site_layout' href='#'>Site Layout</a> as <code>Boxed</code> or <code>Framed</code>", 'customify' ),
'required' => array(
array( 'site_layout', '=', array( 'site-boxed', 'site-framed' ) ),
),
),
array(
'name' => $section . '_height',
'type' => 'slider',
'section' => $section,
'theme_supports' => '',
'device_settings' => true,
'max' => 250,
'selector' => $selector . " .customify-grid, $selector .style-full-height .primary-menu-ul > li > a",
'css_format' => 'min-height: {{value}};',
'title' => __( 'Height', 'customify' ),
),
array(
'name' => $section . '_text_mode',
'type' => 'image_select',
'section' => $section,
'selector' => $skin_mode_selector,
'css_format' => 'html_class',
'title' => __( 'Skin Mode', 'customify' ),
'default' => $color_mode,
'choices' => array(
'dark-mode' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/text_mode_light.svg',
'label' => 'Dark',
),
'light-mode' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/text_mode_dark.svg',
'label' => 'Light',
),
),
),
array(
'name' => $section . '_styling',
'type' => 'styling',
'section' => $section,
'title' => __( 'Advanced Styling', 'customify' ),
'description' => sprintf( __( 'Advanced styling for %s', 'customify' ), $section_name ),
'live_title_field' => 'title',
'selector' => array(
'normal' => "{$skin_selector} .header--row-inner",
),
'css_format' => 'styling',
'fields' => array(
'normal_fields' => array(
'text_color' => false,
'link_color' => false,
'padding' => false,
'margin' => false,
),
'hover_fields' => false,
), // disable hover tab and all fields inside.
),
);
return $config;
}
function row_sidebar_config( $section, $section_name ) {
$selector = '#header-menu-sidebar-bg';
$config = array(
array(
'name' => $section,
'type' => 'section',
'panel' => 'header_settings',
'theme_supports' => '',
'title' => $section_name,
),
array(
'name' => $section . '_animate',
'type' => 'select',
'section' => $section,
'selector' => 'body',
'render_callback' => 'customify_customize_render_header',
'css_format' => 'html_class',
'title' => __( 'Display Type', 'customify' ),
'default' => 'menu_sidebar_slide_left',
'choices' => array(
'menu_sidebar_slide_left' => __( 'Slide From Left', 'customify' ),
'menu_sidebar_slide_right' => __( 'Slide From Right', 'customify' ),
'menu_sidebar_slide_overlay' => __( 'Full-screen Overlay', 'customify' ),
'menu_sidebar_dropdown' => __( 'Toggle Dropdown', 'customify' ),
),
),
array(
'name' => $section . '_skin_mode',
'type' => 'image_select',
'section' => $section,
'selector' => '#header-menu-sidebar, .close-sidebar-panel',
'css_format' => 'html_class',
'title' => __( 'Skin Mode', 'customify' ),
'default' => 'dark-mode',
'choices' => array(
'dark-mode' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/text_mode_light.svg',
'label' => 'Dark',
),
'light-mode' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/text_mode_dark.svg',
'label' => 'Light',
),
),
),
array(
'name' => $section . '_styling',
'type' => 'styling',
'section' => $section,
'title' => __( 'Styling', 'customify' ),
'description' => sprintf( __( 'Advanced styling for %s', 'customify' ), $section_name ),
'live_title_field' => 'title',
'selector' => array(
'normal' => $selector,
'normal_link_color' => "{$selector} .menu li a, {$selector} .item--html a, {$selector} .cart-item-link, {$selector} .nav-toggle-icon",
'hover_link_color' => "{$selector} .menu li a:hover, {$selector} .item--html a:hover, {$selector} .cart-item-link:hover, {$selector} li.open-sub .nav-toggle-icon",
'normal_bg_color' => '#header-menu-sidebar-bg:before',
'normal_bg_image' => '#header-menu-sidebar-bg:before',
'normal_bg_attachment' => '#header-menu-sidebar-bg:before',
'normal_bg_cover' => '#header-menu-sidebar-bg:before',
'normal_bg_repeat' => '#header-menu-sidebar-bg:before',
'normal_bg_position' => '#header-menu-sidebar-bg:before',
'normal_box_shadow' => '#header-menu-sidebar',
),
'css_format' => 'styling', // styling.
'fields' => array(
'normal_fields' => array(
'border_color' => false,
'border_radius' => false,
'border_width' => false,
'border_style' => false,
),
'hover_fields' => array(
'text_color' => false,
'padding' => false,
'bg_color' => false,
'bg_heading' => false,
'bg_cover' => false,
'bg_image' => false,
'bg_repeat' => false,
'border_heading' => false,
'border_color' => false,
'border_radius' => false,
'border_width' => false,
'border_style' => false,
'box_shadow' => false,
), // disable hover tab and all fields inside.
),
),
array(
'name' => $section . '_menu_no_duplicator',
'type' => 'checkbox',
'section' => $section,
'selector' => '.sub-menu .li-duplicator',
'css_format' => 'display:none !important;',
'checkbox_label' => __( 'Do not copy parent menu to submenu.', 'customify' ),
'default' => 1,
),
array(
'name' => $section . '_align',
'type' => 'text_align_no_justify',
'section' => $section,
'priority' => 820,
'device_settings' => true,
'selector' => '.header-menu-sidebar-inner',
'css_format' => 'text-align: {{value}};',
'title' => __( 'Align', 'customify' ),
),
);
return $config;
}
}
if ( ! function_exists( 'customify_header_layout_settings' ) ) {
function customify_header_layout_settings( $item_id = '', $section = '', $cb = '', $name_prefix = 'header_' ) {
if ( ! $cb ) {
$cb = 'customify_customize_render_header';
}
$class = '.header--row';
$selector = '#masthead';
if ( ! $name_prefix ) {
$name_prefix = 'header_';
} else {
if ( strpos( $item_id, 'footer' ) !== false ) {
$class = '.footer--row';
$name_prefix = 'footer_';
$cb = 'customify_customize_render_footer';
}
}
$layout = array(
array(
'name' => $name_prefix . $item_id . '_l_heading',
'type' => 'heading',
'priority' => 800,
'section' => $section,
'title' => __( 'Item Layout', 'customify' ),
),
array(
'name' => $name_prefix . $item_id . '_margin',
'type' => 'css_ruler',
'priority' => 810,
'section' => $section,
'device_settings' => true,
'css_format' => array(
'top' => 'margin-top: {{value}};',
'right' => 'margin-right: {{value}};',
'bottom' => 'margin-bottom: {{value}};',
'left' => 'margin-left: {{value}};',
),
'selector' => "{$class} .builder-item--{$item_id}, .builder-item.builder-item--group .item--inner.builder-item--{$item_id}",
'label' => __( 'Margin', 'customify' ),
),
/**
* Apply for version 1 only
*
* @since 0.2.9
*/
array(
'name' => $name_prefix . $item_id . '_align',
'type' => 'text_align_no_justify',
'section' => $section,
'priority' => 820,
'device_settings' => true,
'selector' => "{$class} .builder-first--" . $item_id,
'css_format' => 'text-align: {{value}};',
'title' => __( 'Align', 'customify' ),
'required' => array( 'header_builder_version', '!=', 'v2' ),
),
/**
* Apply for version 1 only
*
* @since 0.2.9
*/
array(
'name' => $name_prefix . $item_id . '_merge',
'type' => 'select',
'section' => $section,
'selector' => $selector,
'render_callback' => $cb,
'priority' => 999,
'device_settings' => true,
'devices' => array( 'desktop', 'mobile' ),
'title' => __( 'Merge Item', 'customify' ),
'description' => __( 'If you choose to merge this item, the alignment setting will inherit from the item you are merging.', 'customify' ),
'choices' => array(
0 => __( 'No', 'customify' ),
'prev' => __( 'Merge with left item', 'customify' ),
'next' => __( 'Merge with right item', 'customify' ),
),
'required' => array( 'header_builder_version', '!=', 'v2' ),
),
);
return $layout;
}
}
Customify_Customize_Layout_Builder()->register_builder( 'header', new Customify_Builder_Header() );
header/nav-icon.php 0000666 00000010115 15115303712 0010217 0 ustar 00 <?php
class Customify_Builder_Item_Nav_Icon {
public $id = 'nav-icon';
public $section = 'header_menu_icon';
function item() {
return array(
'name' => __( 'Menu Icon', 'customify' ),
'id' => $this->id,
'width' => '3',
'section' => $this->section, // Customizer section to focus when click settings.
);
}
function customize() {
$section = $this->section;
$fn = array( $this, 'render' );
$selector = '.menu-mobile-toggle';
$config = array(
array(
'name' => $section,
'type' => 'section',
'panel' => 'header_settings',
'theme_supports' => '',
'title' => __( 'Menu Icon', 'customify' ),
),
array(
'name' => 'nav_icon_text',
'type' => 'text',
'section' => $section,
'selector' => $selector,
'render_callback' => $fn,
'default' => __( 'Menu', 'customify' ),
'title' => __( 'Label', 'customify' ),
),
array(
'name' => 'nav_icon_show_text',
'type' => 'checkbox',
'section' => $section,
'selector' => $selector,
'render_callback' => $fn,
'title' => __( 'Label Settings', 'customify' ),
'device_settings' => true,
'default' => array(
'desktop' => 1,
'tablet' => 0,
'mobile' => 0,
),
'checkbox_label' => __( 'Show Label', 'customify' ),
),
array(
'name' => 'nav_icon_size',
'type' => 'radio_group',
'section' => $section,
'selector' => $selector,
'render_callback' => $fn,
'title' => __( 'Icon Size', 'customify' ),
'default' => array(
'desktop' => 'medium',
'tablet' => 'medium',
'mobile' => 'medium',
),
'device_settings' => true,
'choices' => array(
'small' => __( 'Small', 'customify' ),
'medium' => __( 'Medium', 'customify' ),
'large' => __( 'Large', 'customify' ),
),
),
array(
'name' => 'nav_icon_item_color',
'type' => 'color',
'section' => $section,
'title' => __( 'Color', 'customify' ),
'css_format' => 'color: {{value}};',
'selector' => ".header--row:not(.header--transparent) {$selector}",
),
array(
'name' => 'nav_icon_item_color_hover',
'type' => 'color',
'section' => $section,
'css_format' => 'color: {{value}};',
'selector' => ".header--row:not(.header--transparent) {$selector}:hover",
'title' => __( 'Color Hover', 'customify' ),
),
);
// Item Layout.
return array_merge( $config, customify_header_layout_settings( $this->id, $section ) );
}
function render() {
$label = sanitize_text_field( Customify()->get_setting( 'nav_icon_text' ) );
$show_label = Customify()->get_setting( 'nav_icon_show_text', 'all' );
$style = sanitize_text_field( Customify()->get_setting( 'nav_icon_style' ) );
$sizes = Customify()->get_setting( 'nav_icon_size', 'all' );
$classes = array( 'menu-mobile-toggle item-button' );
$label_classes = array( 'nav-icon--label' );
if ( is_array( $show_label ) ) {
foreach ( $show_label as $d => $v ) {
if ( $v ) { // phpcs:ignore
} else {
$label_classes[] = 'hide-on-' . $d;
}
}
}
if ( empty( $sizes ) ) {
$sizes = 'is-size-' . $sizes;
}
if ( is_string( $sizes ) ) {
$classes[] = $sizes;
} else {
foreach ( $sizes as $d => $s ) {
if ( ! is_string( $s ) ) {
$s = 'is-size-medium';
}
$classes[] = 'is-size-' . $d . '-' . $s;
}
}
if ( $style ) {
$classes[] = $style;
}
?>
<a class="<?php echo esc_attr( join( ' ', $classes ) ); ?>">
<span class="hamburger hamburger--squeeze">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</span>
<?php
if ( $show_label ) {
echo '<span class="' . esc_attr( join( ' ', $label_classes ) ) . '">' . $label . '</span>';
}
?></a>
<?php
}
}
Customify_Customize_Layout_Builder()->register_item( 'header', new Customify_Builder_Item_Nav_Icon() );
header/button.php 0000666 00000011473 15115303712 0010030 0 ustar 00 <?php
class Customify_Builder_Item_Button {
public $id = 'button';
function __construct() {
add_filter( 'customify/icon_used', array( $this, 'used_icon' ) );
}
function used_icon( $list = array() ) {
$list[ $this->id ] = 1;
return $list;
}
function item() {
return array(
'name' => __( 'Button', 'customify' ),
'id' => 'button',
'col' => 0,
'width' => '4',
'section' => 'header_button', // Customizer section to focus when click settings.
);
}
function customize() {
$section = 'header_button';
$prefix = 'header_button';
$fn = array( $this, 'render' );
$selector = 'a.item--' . $this->id;
$config = array(
array(
'name' => $section,
'type' => 'section',
'panel' => 'header_settings',
'title' => __( 'Button', 'customify' ),
),
array(
'name' => $prefix . '_text',
'type' => 'text',
'section' => $section,
'theme_supports' => '',
'selector' => $selector,
'render_callback' => $fn,
'title' => __( 'Text', 'customify' ),
'default' => __( 'Button', 'customify' ),
),
array(
'name' => $prefix . '_icon',
'type' => 'icon',
'section' => $section,
'selector' => $selector,
'render_callback' => $fn,
'theme_supports' => '',
'title' => __( 'Icon', 'customify' ),
),
array(
'name' => $prefix . '_position',
'type' => 'radio_group',
'section' => $section,
'selector' => $selector,
'render_callback' => $fn,
'default' => 'before',
'title' => __( 'Icon Position', 'customify' ),
'choices' => array(
'before' => __( 'Before', 'customify' ),
'after' => __( 'After', 'customify' ),
),
),
array(
'name' => $prefix . '_link',
'type' => 'text',
'section' => $section,
'selector' => $selector,
'render_callback' => $fn,
'title' => __( 'Link', 'customify' ),
),
array(
'name' => $prefix . '_target',
'type' => 'checkbox',
'section' => $section,
'selector' => $selector,
'render_callback' => $fn,
'checkbox_label' => __( 'Open link in a new tab.', 'customify' ),
),
array(
'name' => $prefix . '_typography',
'type' => 'typography',
'section' => $section,
'title' => __( 'Typography', 'customify' ),
'description' => __( 'Advanced typography for button', 'customify' ),
'selector' => $selector,
'css_format' => 'typography',
'default' => array(),
),
array(
'name' => $prefix . '_styling',
'type' => 'styling',
'section' => $section,
'title' => __( 'Styling', 'customify' ),
'description' => __( 'Advanced styling for button', 'customify' ),
'selector' => array(
'normal' => $selector,
'hover' => $selector . ':hover',
),
'css_format' => 'styling',
'default' => array(),
'fields' => array(
'normal_fields' => array(
'link_color' => false, // disable for special field.
'margin' => false,
'bg_image' => false,
'bg_cover' => false,
'bg_position' => false,
'bg_repeat' => false,
'bg_attachment' => false,
),
'hover_fields' => array(
'link_color' => false, // disable for special field.
),
),
),
);
// Item Layout.
return array_merge( $config, customify_header_layout_settings( $this->id, $section ) );
}
function render() {
$text = Customify()->get_setting( 'header_button_text' );
$icon = Customify()->get_setting( 'header_button_icon' );
$new_window = Customify()->get_setting( 'header_button_target' );
$link = Customify()->get_setting( 'header_button_link' );
$icon_position = Customify()->get_setting( 'header_button_position' );
$classes = array( 'item--' . $this->id, 'customify-btn customify-builder-btn' );
$icon = wp_parse_args(
$icon,
array(
'type' => '',
'icon' => '',
)
);
$target = '';
if ( 1 == $new_window ) {
$target = ' target="_blank" ';
}
$icon_html = '';
if ( $icon['icon'] ) {
$icon_html = '<i class="' . esc_attr( $icon['icon'] ) . '"></i> ';
}
$classes[] = 'is-icon-' . $icon_position;
if ( ! $text ) {
$text = __( 'Button', 'customify' );
}
echo '<a' . $target . ' href="' . esc_url( $link ) . '" class="' . esc_attr( join( ' ', $classes ) ) . '">';
if ( 'after' != $icon_position ) {
echo $icon_html . esc_html( $text );
} else {
echo esc_html( $text ) . $icon_html;
}
echo '</a>';
}
}
Customify_Customize_Layout_Builder()->register_item( 'header', new Customify_Builder_Item_Button() );
header/menus.php 0000666 00000026775 15115303712 0007657 0 ustar 00 <?php
class Customify_Builder_Item_Primary_Menu {
public $id;
public $label;
public $prefix;
public $selector;
public $section;
public $theme_location;
/**
* Optional construct
*
* Customify_Builder_Item_HTML constructor.
*/
function __construct() {
$this->id = 'primary-menu';
$this->label = __( 'Primary Menu', 'customify' );
$this->prefix = 'primary_menu';
$this->selector = '.builder-item--' . $this->id . ' .nav-menu-desktop .primary-menu-ul';
$this->section = 'header_menu_primary';
$this->theme_location = 'menu-1';
}
function item() {
return array(
'name' => $this->label,
'id' => $this->id,
'width' => '6',
'section' => $this->section, // Customizer section to focus when click settings.
);
}
function customize() {
$section = $this->section;
$fn = array( $this, 'render' );
$config = array(
array(
'name' => $section,
'type' => 'section',
'panel' => 'header_settings',
'theme_supports' => '',
'title' => $this->label,
'description' => sprintf( __( 'Assign <a href="#menu_locations" class="focus-section">Menu Location</a> for %1$s', 'customify' ), $this->label ),
),
array(
'name' => $this->prefix . '_style',
'type' => 'image_select',
'section' => $section,
'selector' => '.builder-item--' . $this->id . " .{$this->id}",
'render_callback' => $fn,
'title' => __( 'Menu Preset', 'customify' ),
'default' => 'style-plain',
'css_format' => 'html_class',
'choices' => array(
'style-plain' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/menu_style_1.svg',
),
'style-full-height' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/menu_style_2.svg',
),
'style-border-bottom' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/menu_style_3.svg',
),
'style-border-top' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/menu_style_4.svg',
),
),
),
array(
'name' => $this->prefix . '_style_border_h',
'type' => 'slider',
'section' => $section,
'selector' => 'format',
'max' => 20,
'title' => __( 'Border Height', 'customify' ),
'css_format' => ".nav-menu-desktop.style-border-bottom .{$this->id}-ul > li > a .link-before:before, .nav-menu-desktop.style-border-top .{$this->id}-ul > li > a .link-before:before { height: {{value}}; }",
'required' => array(
$this->prefix . '_style',
'in',
array( 'style-border-bottom', 'style-border-top' ),
),
),
array(
'name' => $this->prefix . '_style_border_pos',
'type' => 'slider',
'section' => $section,
'selector' => 'format',
'min' => - 50,
'max' => 50,
'title' => __( 'Border Position', 'customify' ),
'css_format' => ".nav-menu-desktop.style-border-bottom .{$this->id}-ul > li > a .link-before:before { bottom: {{value}}; } .nav-menu-desktop.style-border-top .{$this->id}-ul > li > a .link-before:before { top: {{value}}; }",
'required' => array(
$this->prefix . '_style',
'in',
array( 'style-border-bottom', 'style-border-top' ),
),
),
array(
'name' => $this->prefix . '_style_border_color',
'type' => 'color',
'section' => $section,
'selector' => 'format',
'title' => __( 'Border Color', 'customify' ),
'css_format' => ".nav-menu-desktop.style-border-bottom .{$this->id}-ul > li:hover > a .link-before:before,
.nav-menu-desktop.style-border-bottom .{$this->id}-ul > li.current-menu-item > a .link-before:before,
.nav-menu-desktop.style-border-bottom .{$this->id}-ul > li.current-menu-ancestor > a .link-before:before,
.nav-menu-desktop.style-border-top .{$this->id}-ul > li:hover > a .link-before:before,
.nav-menu-desktop.style-border-top .{$this->id}-ul > li.current-menu-item > a .link-before:before,
.nav-menu-desktop.style-border-top .{$this->id}-ul > li.current-menu-ancestor > a .link-before:before
{ background-color: {{value}}; }",
'required' => array(
$this->prefix . '_style',
'in',
array( 'style-border-bottom', 'style-border-top' ),
),
),
array(
'name' => $this->prefix . '__hide-arrow',
'type' => 'checkbox',
'section' => $section,
'selector' => '.builder-item--' . $this->id . " .{$this->id}",
'checkbox_label' => __( 'Hide menu dropdown arrow', 'customify' ),
'css_format' => 'html_class',
),
array(
'name' => $this->prefix . '_arrow_size',
'type' => 'slider',
'devices_setting' => true,
'section' => $section,
'selector' => 'format',
'max' => 20,
'title' => __( 'Arrow icon size', 'customify' ),
'css_format' => ".builder-item--{$this->id} .nav-icon-angle { width: {{value}}; height: {{value}}; }",
'required' => array( $this->prefix . '__hide-arrow', '!=', 1 ),
),
array(
'name' => $this->prefix . '_top_heading',
'type' => 'heading',
'section' => $section,
'title' => __( 'Top Menu', 'customify' ),
),
array(
'name' => $this->prefix . '_item_styling',
'type' => 'styling',
'section' => $section,
'title' => __( 'Top Menu Items Styling', 'customify' ),
'description' => __( 'Styling for top level menu items', 'customify' ),
'selector' => array(
'normal' => "{$this->selector} > li > a",
'normal_margin' => "{$this->selector} > li",
'hover' => ".header--row:not(.header--transparent) {$this->selector} > li > a:hover, .header--row:not(.header--transparent) {$this->selector} > li.current-menu-item > a, .header--row:not(.header--transparent) {$this->selector} > li.current-menu-ancestor > a, .header--row:not(.header--transparent) {$this->selector} > li.current-menu-parent > a",
),
'css_format' => 'styling',
'fields' => array(
'tabs' => array(
'normal' => __( 'Normal', 'customify' ),
'hover' => __( 'Hover/Active', 'customify' ),
),
'normal_fields' => array(
'link_color' => false,
'bg_cover' => false,
'bg_image' => false,
'bg_repeat' => false,
'bg_attachment' => false,
'bg_position' => false,
),
'hover_fields' => array(
'link_color' => false,
'bg_cover' => false,
'bg_image' => false,
'bg_repeat' => false,
'bg_attachment' => false,
'bg_position' => false,
),
),
),
array(
'name' => $this->prefix . '_typography',
'type' => 'typography',
'section' => $section,
'title' => __( 'Top Menu Items Typography', 'customify' ),
'description' => __( 'Typography for menu', 'customify' ),
'selector' => "{$this->selector} > li > a,.builder-item-sidebar .primary-menu-sidebar .primary-menu-ul > li > a",
'css_format' => 'typography',
),
);
if ( ! class_exists( 'Customify_Pro' ) ) {
$config[] = array(
'name' => $this->prefix . '_submenu_heading',
'type' => 'heading',
'section' => $section,
'title' => __( 'Submenu', 'customify' ),
);
$config[] = array(
'name' => $this->prefix . '_typography_submenu',
'type' => 'custom_html',
'section' => $section,
'description' => sprintf( __( 'Submenu settings is a part of Advanced Header & Footer builder modules which only available in Customify Pro. <a target="_blank" href="https://pressmaximum.com/docs/customify/customify-pro-modules/advanced-header-footer-builder/">Learn more about it here</a>.', 'customify' ) ),
'selector' => "{$this->selector} .sub-menu li a",
);
}
$config = apply_filters( 'customify/customize-menu-config-more', $config, $section, $this );
// Item Layout.
return array_merge( $config, customify_header_layout_settings( $this->id, $section ) );
}
function menu_fallback_cb() {
$pages = get_pages(
array(
'child_of' => 0,
'sort_order' => 'ASC',
'sort_column' => 'menu_order, post_title',
'hierarchical' => 0,
'parent' => 0,
'exclude_tree' => array(),
'number' => 10,
)
);
echo '<ul class="' . $this->id . '-ul menu nav-menu menu--pages">';
foreach ( (array) $pages as $p ) {
$class = '';
if ( is_page( $p ) ) {
$class = 'current-menu-item';
}
echo '<li id="menu-item--__id__-__device__-' . esc_attr( $p->ID ) . '" class="menu-item menu-item-type--page menu-item-' . esc_attr( $p->ID . ' ' . $class ) . '"><a href="' . esc_url( get_the_permalink( $p ) ) . '"><span class="link-before">' . apply_filters( '', $p->post_title ) . '</span></a></li>';
}
echo '</ul>';
}
/**
* @see Walker_Nav_Menu
*/
function render() {
$style = sanitize_text_field( Customify()->get_setting( $this->prefix . '_style' ) );
if ( $style ) {
$style = sanitize_text_field( $style );
}
$hide_arrow = sanitize_text_field( Customify()->get_setting( $this->prefix . '__hide-arrow' ) );
if ( $hide_arrow ) {
$style .= ' hide-arrow-active';
}
$container_classes = $this->id . ' ' . $this->id . '-__id__ nav-menu-__device__ ' . $this->id . '-__device__' . ( $style ? ' ' . $style : '' );
echo '<nav id="site-navigation-__id__-__device__" class="site-navigation ' . $container_classes . '">';
wp_nav_menu(
array(
'theme_location' => $this->theme_location,
'container' => false,
'container_id' => false,
'container_class' => false,
'menu_id' => false,
'menu_class' => $this->id . '-ul menu nav-menu',
'fallback_cb' => '',
'link_before' => '<span class="link-before">',
'link_after' => '</span>',
)
);
echo '</nav>';
}
}
/**
* Change menu item ID
*
* @see Walker_Nav_Menu::start_el();
*
* @param string $string_id
* @param object $item
* @param object $args An object of wp_nav_menu() arguments.
*
* @return mixed
*/
function customify_change_nav_menu_item_id( $string_id, $item, $args ) {
if ( 'menu-1' == $args->theme_location || 'menu-2' == $args->theme_location ) {
$string_id = 'menu-item--__id__-__device__-' . $item->ID;
}
return $string_id;
}
add_filter( 'nav_menu_item_id', 'customify_change_nav_menu_item_id', 55, 3 );
/**
* Add Nav icon to menu
*
* @param string $title
* @param object $item
* @param array $args
* @param int $depth
*
* @return string
*/
function customify_add_icon_to_menu( $title, $item, $args, $depth ) {
if ( in_array( 'menu-item-has-children', $item->classes ) ) { // phpcs:ignore
$title .= '<span class="nav-icon-angle"> </span>';
}
return $title;
}
add_filter( 'nav_menu_item_title', 'customify_add_icon_to_menu', 25, 4 );
/**
* Add more sub menu classes
*
* @since 0.1.1
* @see Walker_Nav_Menu::start_lvl
*
* @param array $classes
* @param array $args
* @param int $depth
*
* @return array
*/
function customify_add_sub_menu_classes( $classes, $args, $depth ) {
$classes[] = 'sub-lv-' . $depth;
return $classes;
}
add_filter( 'nav_menu_submenu_css_class', 'customify_add_sub_menu_classes', 35, 3 );
// Register header item.
Customify_Customize_Layout_Builder()->register_item( 'header', new Customify_Builder_Item_Primary_Menu() );
header/html.php 0000666 00000004737 15115303712 0007466 0 ustar 00 <?php
class Customify_Builder_Item_HTML {
/**
* @var string Required
*/
public $id = 'html';
/**
* @var string Optional
*/
public $section = 'header_html';
/**
* @var string Optional
*/
public $name = 'header_html';
/**
* @var string Optional
*/
public $label = '';
public $priority = 200;
public $panel = 'header_settings';
/**
* Optional construct
*
* Customify_Builder_Item_HTML constructor.
*/
function __construct() {
$this->label = __( 'HTML 1', 'customify' );
}
/**
* Register Builder item
*
* @return array
*/
function item() {
return array(
'name' => $this->label,
'id' => $this->id,
'col' => 0,
'width' => '4',
'section' => $this->section, // Customizer section to focus when click settings.
);
}
/**
* Optional, Register customize section and panel.
*
* @return array
*/
function customize() {
// Render callback function.
$fn = array( $this, 'render' );
$config = array(
array(
'name' => $this->section,
'type' => 'section',
'panel' => $this->panel,
'priority' => $this->priority,
'title' => $this->label,
),
array(
'name' => $this->name,
'type' => 'textarea',
'section' => $this->section,
'selector' => '.builder-header-' . $this->id . '-item',
'render_callback' => $fn,
'theme_supports' => '',
'default' => __( 'Add custom text here or remove it', 'customify' ),
'title' => __( 'HTML', 'customify' ),
'description' => __( 'Arbitrary HTML code.', 'customify' ),
),
array(
'name' => $this->name . '_typo',
'type' => 'typography',
'section' => $this->section,
'selector' => '.builder-header-' . $this->id . '-item.item--html p, .builder-header-' . $this->id . '-item.item--html',
'css_format' => 'typography',
'title' => __( 'Typography Setting', 'customify' ),
),
);
// Item Layout.
return array_merge( $config, customify_header_layout_settings( $this->id, $this->section ) );
}
/**
* Optional. Render item content
*/
function render() {
$content = Customify()->get_setting( $this->name );
echo '<div class="builder-header-' . esc_attr( $this->id ) . '-item item--html">';
echo apply_filters( 'customify_the_content', wp_kses_post( balanceTags( $content, true ) ) );
echo '</div>';
}
}
Customify_Customize_Layout_Builder()->register_item( 'header', new Customify_Builder_Item_HTML() );
header/logo.php 0000666 00000012310 15115303712 0007444 0 ustar 00 <?php
class Customify_Builder_Item_Logo {
public $id = 'logo';
function item() {
return array(
'name' => __( 'Logo', 'customify' ),
'id' => 'logo',
'width' => '3',
'section' => 'title_tagline', // Customizer section to focus when click settings.
);
}
function customize( $wp_customize ) {
$section = 'title_tagline';
$render_cb_el = array( $this, 'render' );
$selector = '.site-header .site-branding';
$fn = 'customify_customize_render_header';
$config = array(
array(
'name' => 'logo_max_width',
'type' => 'slider',
'section' => $section,
'default' => array(),
'max' => 400,
'priority' => 8,
'device_settings' => true,
'title' => __( 'Logo Max Width', 'customify' ),
'selector' => 'format',
'css_format' => "$selector img { max-width: {{value}}; } .site-header .cb-row--mobile .site-branding img { width: {{value}}; } ",
),
array(
'name' => 'header_logo_retina',
'type' => 'image',
'section' => $section,
'device_settings' => false,
'selector' => $selector,
'render_callback' => $render_cb_el,
'priority' => 9,
'title' => __( 'Logo Retina', 'customify' ),
),
array(
'name' => 'header_logo_name',
'type' => 'radio_group',
'section' => $section,
'selector' => $selector,
'render_callback' => $render_cb_el,
'title' => __( 'Show Site Title', 'customify' ),
'default' => 'yes',
'choices' => array(
'yes' => __( 'Yes', 'customify' ),
'no' => __( 'No', 'customify' ),
),
),
array(
'name' => 'header_logo_desc',
'type' => 'radio_group',
'section' => $section,
'selector' => $selector,
'render_callback' => $render_cb_el,
'title' => __( 'Show Site Tagline', 'customify' ),
'default' => 'no',
'choices' => array(
'yes' => __( 'Yes', 'customify' ),
'no' => __( 'No', 'customify' ),
),
),
array(
'name' => 'header_logo_pos',
'type' => 'radio_group',
'section' => $section,
'selector' => $selector,
'render_callback' => $render_cb_el,
'title' => __( 'Logo Position', 'customify' ),
'default' => 'top',
'choices' => array(
'top' => __( 'Top', 'customify' ),
'left' => __( 'Left', 'customify' ),
'right' => __( 'Right', 'customify' ),
'bottom' => __( 'Bottom', 'customify' ),
),
),
);
$config = apply_filters( 'customify/builder/header/logo-settings', $config, $this );
// Item Layout.
return array_merge( $config, customify_header_layout_settings( $this->id, $section ) );
}
function logo() {
$custom_logo_id = get_theme_mod( 'custom_logo' );
$logo_image = Customify()->get_media( $custom_logo_id, 'full' );
$logo_retina = Customify()->get_setting( 'header_logo_retina' );
$logo_retina_image = Customify()->get_media( $logo_retina );
if ( $logo_image ) {
?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="logo-link" rel="home" itemprop="url">
<img class="site-img-logo" src="<?php echo esc_url( $logo_image ); ?>" alt="<?php bloginfo( 'name' ); ?>"<?php if ( $logo_retina_image ) {
?> srcset="<?php echo esc_url( $logo_retina_image ); ?> 2x"<?php } ?>>
<?php do_action( 'customizer/after-logo-img' ); ?>
</a>
<?php
}
}
/**
* Render Logo item
*
* @see get_custom_logo
*/
function render() {
$show_name = Customify()->get_setting( 'header_logo_name' );
$show_desc = Customify()->get_setting( 'header_logo_desc' );
$image_position = Customify()->get_setting( 'header_logo_pos' );
$logo_classes = array( 'site-branding' );
$logo_classes[] = 'logo-' . $image_position;
$logo_classes = apply_filters( 'customify/logo-classes', $logo_classes );
$tag = is_customize_preview() ? 'h2' : '__site_device_tag__';
?>
<div class="<?php echo esc_attr( join( ' ', $logo_classes ) ); ?>">
<?php
$this->logo();
if ( 'no' !== $show_name || 'no' !== $show_desc ) {
echo '<div class="site-name-desc">';
if ( 'no' !== $show_name ) {
if ( is_front_page() && is_home() ) : ?>
<<?php echo $tag; /* WPCS: xss ok. */ ?> class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</<?php echo $tag; /* WPCS: xss ok. */ ?>>
<?php else : ?>
<p class="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
</p>
<?php
endif;
}
if ( 'no' !== $show_desc ) {
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) { ?>
<p class="site-description text-uppercase text-xsmall"><?php echo $description; /* WPCS: xss ok. */ ?></p>
<?php
};
}
echo '</div>';
}
?>
</div><!-- .site-branding -->
<?php
}
}
Customify_Customize_Layout_Builder()->register_item( 'header', new Customify_Builder_Item_Logo() );
related-posts.php 0000666 00000017033 15115303712 0010051 0 ustar 00 <?php
if ( ! function_exists( 'customify_customizer_single_related_posts_config' ) ) {
function customify_customizer_single_related_posts_config( $configs = array() ) {
$args = array(
'name' => __( 'Single Blog Post', 'customify' ),
'id' => 'single_blog_post',
'selector' => '.entry.entry-single',
'cb' => 'customify_single_post',
);
$top_panel = 'blog_panel';
$level_2_panel = 'section_' . $args['id'];
$config = array(
array(
'name' => $level_2_panel . '_h_related',
'type' => 'heading',
'section' => $level_2_panel,
'title' => __( 'Related Posts', 'customify' ),
),
array(
'name' => $args['id'] . '_related_title',
'type' => 'text',
'section' => $level_2_panel,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'default' => __( 'Related Posts', 'customify' ),
'label' => __( 'Title', 'customify' ),
),
array(
'name' => $args['id'] . '_related_by',
'type' => 'select',
'section' => $level_2_panel,
'default' => 'tag',
'max' => 150,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'label' => __( 'Related posts by', 'customify' ),
'choices' => array(
'cat' => __( 'By categories', 'customify' ),
'tag' => __( 'By tags', 'customify' ),
),
),
array(
'name' => $args['id'] . '_related_col',
'type' => 'select',
'section' => $level_2_panel,
'default' => array(
'desktop' => 3,
'tablet' => 3,
'mobile' => 1,
),
'max' => 150,
'device_settings' => true,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'label' => __( 'Number columns to show', 'customify' ),
'choices' => array(
1 => 1,
2 => 2,
3 => 3,
4 => 4,
5 => 5,
6 => 6,
),
),
array(
'name' => $args['id'] . '_related_number',
'type' => 'text',
'section' => $level_2_panel,
'selector' => $args['selector'],
'default' => 3,
'render_callback' => $args['cb'],
'label' => __( 'Number posts to show', 'customify' ),
'description' => __( 'Enter 0 to disable related posts.', 'customify' ),
),
array(
'name' => $args['id'] . '_related_img_pos',
'type' => 'select',
'section' => $level_2_panel,
'default' => 'top',
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'label' => __( 'Image Position', 'customify' ),
'choices' => array(
'left' => __( 'Left', 'customify' ),
'right' => __( 'Right', 'customify' ),
'top' => __( 'Top', 'customify' ),
),
),
array(
'name' => $args['id'] . '_related_thumbnail_size',
'type' => 'select',
'section' => $level_2_panel,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'default' => 'medium',
'label' => __( 'Thumbnail Size', 'customify' ),
'choices' => customify_get_all_image_sizes(),
),
array(
'name' => $args['id'] . '_related_thumbnail_height',
'type' => 'slider',
'section' => $level_2_panel,
'selector' => 'format',
'unit' => '%',
'max' => '200',
'default' => '',
'label' => __( 'Custom Thumbnail Height', 'customify' ),
'device_settings' => true,
'devices' => array( 'desktop', 'tablet' ),
'css_format' => '.related-post .related-thumbnail a { padding-top: {{value_no_unit}}%; } .related-post .related-thumbnail img { width: 100%;position: absolute; top: 0px; right: 0px; display: block; height: 100%; object-fit: cover; }',
),
array(
'name' => $args['id'] . '_related_thumbnail_width',
'type' => 'slider',
'section' => $level_2_panel,
'selector' => 'format',
'unit' => '%',
'max' => '100',
'default' => '',
'label' => __( 'Custom Thumbnail Width', 'customify' ),
'device_settings' => true,
'devices' => array( 'desktop', 'tablet' ),
'css_format' => '.img-pos-left .related-thumbnail, .img-pos-right .related-thumbnail { flex-basis: {{value_no_unit}}%; } .img-pos-left .related-body, .img-pos-right .related-body { flex-basis: calc( 100% - {{value_no_unit}}% ); }',
'required' => array( $args['id'] . '_related_img_pos', 'in', array( 'left', 'right' ) ),
),
array(
'name' => $args['id'] . '_related_orderby',
'type' => 'select',
'section' => $level_2_panel,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'label' => __( 'Order by', 'customify' ),
'default' => 'date',
'choices' => array(
'date' => __( 'Date', 'customify' ),
'title' => __( 'Title', 'customify' ),
'menu_order' => __( 'Post order', 'customify' ),
'rand' => __( 'Random', 'customify' ),
'comment_count' => __( 'Comment count', 'customify' ),
),
),
array(
'name' => $args['id'] . '_related_order',
'type' => 'select',
'section' => $level_2_panel,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'default' => 'desc',
'label' => __( 'Order', 'customify' ),
'choices' => array(
'desc' => __( 'Desc', 'customify' ),
'asc' => __( 'Asc', 'customify' ),
),
),
array(
'name' => $args['id'] . '_related_meta',
'section' => $level_2_panel,
'type' => 'repeater',
'label' => __( 'Related post meta', 'customify' ),
'live_title_field' => 'title',
'limit' => 4,
'addable' => false,
'title_only' => true,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'default' => array(
array(
'_key' => 'author',
'title' => __( 'Author', 'customify' ),
'_visibility' => 'hidden',
),
array(
'_key' => 'date',
'title' => __( 'Date', 'customify' ),
),
array(
'_key' => 'categories',
'title' => __( 'Categories', 'customify' ),
'_visibility' => 'hidden',
),
array(
'_key' => 'comment',
'title' => __( 'Comment', 'customify' ),
'_visibility' => 'hidden',
),
),
'fields' => array(
array(
'name' => '_key',
'type' => 'hidden',
),
array(
'name' => 'title',
'type' => 'hidden',
'label' => __( 'Title', 'customify' ),
),
),
),
array(
'name' => $args['id'] . '_related_excerpt_length',
'type' => 'text',
'section' => $level_2_panel,
'selector' => $args['selector'],
'default' => 0,
'render_callback' => $args['cb'],
'label' => __( 'Excerpt length', 'customify' ),
'description' => __( 'Custom excerpt length. Enter 0 to hide the excerpt.', 'customify' ),
),
);
return array_merge( $configs, $config );
}
}
add_filter( 'customify/customizer/config', 'customify_customizer_single_related_posts_config', 399 );
blogs.php 0000666 00000036161 15115303712 0006374 0 ustar 00 <?php
if ( ! function_exists( 'customify_customizer_blog_config' ) ) {
function customify_customizer_blog_config( $args = array() ) {
$args = wp_parse_args(
$args,
array(
'name' => __( 'Blog Posts', 'customify' ),
'id' => 'blog_post',
'selector' => '#blog-posts',
'cb' => 'customify_blog_posts',
)
);
$top_panel = 'blog_panel';
$level_2_panel = 'panel_' . $args['id'];
$config = array(
array(
'name' => $level_2_panel,
'type' => 'panel',
'panel' => $top_panel,
'title' => $args['name'],
),
array(
'name' => $level_2_panel . '_layout',
'type' => 'section',
'panel' => $level_2_panel,
'title' => __( 'Layout', 'customify' ),
),
array(
'name' => $args['id'] . '_layout',
'type' => 'image_select',
'section' => $level_2_panel . '_layout',
'label' => __( 'Layout', 'customify' ),
'default' => 'blog_column',
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'disabled_msg' => __( 'This option is available in Customify Pro plugin only.', 'customify' ),
'disabled_pro_msg' => __( 'Please activate module Blog Posts to use this layout.', 'customify' ),
'choices' => array(
'blog_classic' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/blog_classic.svg',
),
'blog_column' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/blog_column.svg',
),
'blog_masonry' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/blog_masonry.svg',
'disable' => 1,
'bubble' => __( 'Pro', 'customify' ),
),
'blog_lateral' => array(
'img' => esc_url( get_template_directory_uri() ) . '/assets/images/customizer/blog_lateral.svg',
'disable' => 1,
'bubble' => __( 'Pro', 'customify' ),
),
),
'reset_controls' => array(
$args['id'] . '_media_ratio',
$args['id'] . '_media_width',
),
),
array(
'name' => $level_2_panel . '_layout_h1',
'type' => 'heading',
'section' => $level_2_panel . '_layout',
'title' => __( 'Article Styling', 'customify' ),
),
array(
'name' => $args['id'] . '_a_item',
'type' => 'styling',
'section' => $level_2_panel . '_layout',
'selector' => array(
'normal' => "{$args['selector'] } .entry-inner",
'hover' => "{$args['selector'] } .entry-inner:hover",
'normal_margin' => "{$args['selector'] } .entry-inner",
),
'css_format' => 'styling',
'label' => __( 'Article Wrapper', 'customify' ),
'fields' => array(
'normal_fields' => array(
'link_color' => false, // disable for special field.
'bg_image' => false,
'bg_cover' => false,
'bg_position' => false,
'bg_repeat' => false,
'bg_attachment' => false,
),
'hover_fields' => array(
'link_color' => false,
),
),
),
array(
'name' => $level_2_panel . '_media',
'type' => 'section',
'panel' => $level_2_panel,
'title' => __( 'Media', 'customify' ),
),
array(
'name' => $args['id'] . '_media_hide',
'type' => 'checkbox',
'section' => $level_2_panel . '_media',
'checkbox_label' => __( 'Hide Media', 'customify' ),
'selector' => $args['selector'],
'render_callback' => $args['cb'],
),
array(
'name' => $args['id'] . '_media_ratio',
'type' => 'slider',
'section' => $level_2_panel . '_media',
'label' => __( 'Media Ratio', 'customify' ),
'selector' => "{$args['selector']} .posts-layout .entry .entry-media",
'css_format' => 'padding-top: {{value_no_unit}}%;',
'max' => 200,
'min' => 0,
'device_settings' => true,
'unit' => '%',
'required' => array( $args['id'] . '_media_hide', '!=', '1' ),
),
array(
'name' => $args['id'] . '_media_width',
'type' => 'slider',
'section' => $level_2_panel . '_media',
'label' => __( 'Media Width', 'customify' ),
'device_settings' => true,
'devices' => array( 'desktop', 'tablet' ),
'max' => 100,
'min' => 20,
'unit' => '%',
'selector' => "{$args['selector']} .posts-layout .entry-media, {$args['selector']} .posts-layout.layout--blog_classic .entry-media",
'css_format' => 'flex-basis: {{value_no_unit}}%; width: {{value_no_unit}}%;',
'required' => array( $args['id'] . '_media_hide', '!=', '1' ),
),
array(
'name' => $args['id'] . '_media_radius',
'type' => 'slider',
'section' => $level_2_panel . '_media',
'label' => __( 'Media Radius', 'customify' ),
'max' => 100,
'min' => 0,
'selector' => "{$args['selector']} .posts-layout .entry-media",
'css_format' => 'border-radius: {{value}};',
'required' => array( $args['id'] . '_media_hide', '!=', '1' ),
),
array(
'name' => $args['id'] . '_thumbnail_size',
'type' => 'select',
'section' => $level_2_panel . '_media',
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'default' => 'medium',
'label' => __( 'Thumbnail Size', 'customify' ),
'choices' => customify_get_all_image_sizes(),
'required' => array( $args['id'] . '_media_hide', '!=', '1' ),
),
array(
'name' => $args['id'] . '_hide_thumb_if_empty',
'type' => 'checkbox',
'section' => $level_2_panel . '_media',
'default' => '1',
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'checkbox_label' => __( 'Hide featured image if empty.', 'customify' ),
'required' => array( $args['id'] . '_media_hide', '!=', '1' ),
),
// Article Excerpt ---------------------------------------------------------------------------------.
array(
'name' => $level_2_panel . '_excerpt',
'type' => 'section',
'panel' => $level_2_panel,
'title' => __( 'Excerpt', 'customify' ),
),
array(
'name' => $args['id'] . '_excerpt_type',
'type' => 'select',
'section' => $level_2_panel . '_excerpt',
'default' => 'custom',
'choices' => array(
'custom' => __( 'Custom', 'customify' ),
'excerpt' => __( 'Use excerpt metabox', 'customify' ),
'more_tag' => __( 'Strip excerpt by more tag', 'customify' ),
'content' => __( 'Full content', 'customify' ),
),
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'label' => __( 'Excerpt Type', 'customify' ),
),
array(
'name' => $args['id'] . '_excerpt_length',
'type' => 'number',
'section' => $level_2_panel . '_excerpt',
'default' => 25,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'label' => __( 'Excerpt Length', 'customify' ),
'required' => array( $args['id'] . '_excerpt_type', '=', 'custom' ),
),
array(
'name' => $args['id'] . '_excerpt_more',
'type' => 'text',
'section' => $level_2_panel . '_excerpt',
'default' => '',
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'label' => __( 'Excerpt More', 'customify' ),
),
array(
'name' => $level_2_panel . '_meta',
'type' => 'section',
'panel' => $level_2_panel,
'title' => __( 'Metas', 'customify' ),
),
array(
'name' => $args['id'] . '_meta_sep',
'section' => $level_2_panel . '_meta',
'type' => 'text',
'default' => '',
'label' => __( 'Separator', 'customify' ),
'selector' => $args['selector'],
'render_callback' => $args['cb'],
),
array(
'name' => $args['id'] . '_meta_sep_width',
'section' => $level_2_panel . '_meta',
'type' => 'slider',
'max' => 20,
'label' => __( 'Separator Width', 'customify' ),
'selector' => $args['selector'] . ' .entry-meta .sep',
'css_format' => 'margin-left: calc( {{value}} / 2 ); margin-right: calc( {{value}} / 2 );',
),
array(
'name' => $args['id'] . '_meta_config',
'section' => $level_2_panel . '_meta',
'type' => 'repeater',
'description' => __( 'Drag to reorder the meta item.', 'customify' ),
'live_title_field' => 'title',
'limit' => 4,
'addable' => false,
'title_only' => true,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'default' => array(
array(
'_key' => 'author',
'title' => __( 'Author', 'customify' ),
),
array(
'_key' => 'date',
'title' => __( 'Date', 'customify' ),
),
array(
'_key' => 'categories',
'title' => __( 'Categories', 'customify' ),
),
array(
'_key' => 'comment',
'title' => __( 'Comment', 'customify' ),
),
),
'fields' => array(
array(
'name' => '_key',
'type' => 'hidden',
),
array(
'name' => 'title',
'type' => 'hidden',
'label' => __( 'Title', 'customify' ),
),
),
),
array(
'name' => $args['id'] . '_author_avatar',
'type' => 'checkbox',
'section' => $level_2_panel . '_meta',
'default' => 0,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'checkbox_label' => __( 'Show author avatar', 'customify' ),
),
array(
'name' => $args['id'] . '_avatar_size',
'type' => 'slider',
'section' => $level_2_panel . '_meta',
'default' => 32,
'max' => 150,
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'label' => __( 'Avatar Size', 'customify' ),
'required' => array( $args['id'] . '_author_avatar', '==', '1' ),
),
array(
'name' => $level_2_panel . '_readmore',
'type' => 'section',
'panel' => $level_2_panel,
'title' => __( 'Read More', 'customify' ),
),
array(
'name' => $args['id'] . '_more_display',
'type' => 'checkbox',
'default' => 1,
'section' => $level_2_panel . '_readmore',
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'checkbox_label' => __( 'Show Read More Button', 'customify' ),
),
array(
'name' => $args['id'] . '_more_text',
'type' => 'text',
'section' => $level_2_panel . '_readmore',
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'label' => __( 'Read More Text', 'customify' ),
'required' => array( $args['id'] . '_more_display', '==', '1' ),
),
array(
'name' => $args['id'] . '_more_typography',
'type' => 'typography',
'css_format' => 'typography',
'section' => $level_2_panel . '_readmore',
'selector' => "{$args['selector'] } .entry-readmore a",
'label' => __( 'Typography', 'customify' ),
'required' => array( $args['id'] . '_more_display', '==', '1' ),
),
array(
'name' => $args['id'] . '_more_styling',
'type' => 'styling',
'section' => $level_2_panel . '_readmore',
'selector' => array(
'normal' => "{$args['selector'] } .entry-readmore a",
'hover' => "{$args['selector'] } .entry-readmore a:hover",
'normal_margin' => "{$args['selector'] } .entry-readmore",
),
'css_format' => 'styling',
'label' => __( 'Styling', 'customify' ),
'fields' => array(
'normal_fields' => array(
'link_color' => false, // Disable for special field.
'bg_image' => false,
'bg_cover' => false,
'bg_position' => false,
'bg_repeat' => false,
'bg_attachment' => false,
),
'hover_fields' => array(
'link_color' => false, // Disable for special field.
),
),
'required' => array( $args['id'] . '_more_display', '==', '1' ),
),
array(
'name' => $level_2_panel . '_pagination',
'type' => 'section',
'panel' => $level_2_panel,
'title' => __( 'Pagination', 'customify' ),
),
array(
'name' => $args['id'] . '_pg_show_paging',
'section' => $level_2_panel . '_pagination',
'type' => 'checkbox',
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'default' => 1,
'checkbox_label' => __( 'Show Pagination', 'customify' ),
),
array(
'name' => $args['id'] . '_pg_show_nav',
'section' => $level_2_panel . '_pagination',
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'type' => 'checkbox',
'default' => 1,
'checkbox_label' => __( 'Show Next, Previous Label', 'customify' ),
'required' => array( $args['id'] . '_pg_show_paging', '==', '1' ),
),
array(
'name' => $args['id'] . '_pg_prev_text',
'section' => $level_2_panel . '_pagination',
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'type' => 'text',
'label' => __( 'Previous Label', 'customify' ),
'required' => array( $args['id'] . '_pg_show_paging', '==', '1' ),
),
array(
'name' => $args['id'] . '_pg_next_text',
'section' => $level_2_panel . '_pagination',
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'type' => 'text',
'label' => __( 'Next Label', 'customify' ),
'required' => array( $args['id'] . '_pg_show_paging', '==', '1' ),
),
array(
'name' => $args['id'] . '_pg_mid_size',
'section' => $level_2_panel . '_pagination',
'selector' => $args['selector'],
'render_callback' => $args['cb'],
'type' => 'text',
'default' => 3,
'label' => __( 'How many numbers to either side of the current pages', 'customify' ),
'required' => array( $args['id'] . '_pg_show_paging', '==', '1' ),
),
);
return $config;
}
}
if ( ! function_exists( 'customify_customizer_blog_posts_config' ) ) {
function customify_customizer_blog_posts_config( $configs ) {
$config = array(
array(
'name' => 'blog_panel',
'type' => 'panel',
'priority' => 20,
'title' => __( 'Blog', 'customify' ),
),
);
$blog = customify_customizer_blog_config();
$config = array_merge( $config, $blog );
return array_merge( $configs, $config );
}
}
add_filter( 'customify/customizer/config', 'customify_customizer_blog_posts_config' );
compatibility.php 0000666 00000001172 15115303712 0010131 0 ustar 00 <?php
if ( ! function_exists( 'customify_customizer_compatibility_config' ) ) {
/**
* Add compatibility panel.
*
* @param array $configs List customize settings.
*
* @return array
*/
function customify_customizer_compatibility_config( $configs ) {
$panel = 'compatibility';
$config = array(
// Layout panel.
array(
'name' => $panel . '_panel',
'type' => 'panel',
'priority' => 100,
'title' => __( 'Compatibility', 'customify' ),
),
);
return array_merge( $configs, $config );
}
}
add_filter( 'customify/customizer/config', 'customify_customizer_compatibility_config' );
typography.php 0000666 00000011100 15115303712 0007456 0 ustar 00 <?php
if ( ! function_exists( 'customify_customizer_typography_config' ) ) {
/**
* Add typograhy settings.
*
* @since 0.0.1
* @since 0.2.6
*
* @param array $configs
* @return array
*/
function customify_customizer_typography_config( $configs ) {
$section = 'global_typography';
$config = array(
array(
'name' => 'typography_panel',
'type' => 'panel',
'priority' => 22,
'title' => __( 'Typography', 'customify' ),
),
// Base.
array(
'name' => "{$section}_base",
'type' => 'section',
'panel' => 'typography_panel',
'title' => __( 'Base', 'customify' ),
),
array(
'name' => "{$section}_base_p",
'type' => 'typography',
'section' => "{$section}_base",
'title' => __( 'Body & Paragraph', 'customify' ),
'description' => __( 'Apply to body and paragraph text.', 'customify' ),
'css_format' => 'typography',
'selector' => 'body',
),
array(
'name' => "{$section}_base_heading",
'type' => 'typography',
'section' => "{$section}_base",
'title' => __( 'Heading', 'customify' ),
'description' => __( 'Apply to all heading elements.', 'customify' ),
'css_format' => 'typography',
'selector' => 'h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6',
'fields' => array(
'font_size' => false,
'line_height' => false,
'letter_spacing' => false,
),
),
array(
'name' => "{$section}_base_widget_title",
'type' => 'typography',
'section' => "{$section}_base",
'title' => __( 'Widget Title', 'customify' ),
'description' => __( 'Apply to all widget title in site content.', 'customify' ),
'css_format' => 'typography',
'selector' => '.site-content .widget-title',
),
// Site Title and Tagline.
array(
'name' => "{$section}_site_tt",
'type' => 'section',
'panel' => 'typography_panel',
'title' => __( 'Site Title & Tagline', 'customify' ),
),
array(
'name' => "{$section}_site_tt_title",
'type' => 'typography',
'section' => "{$section}_site_tt",
'title' => __( 'Site Title', 'customify' ),
'css_format' => 'typography',
'selector' => '.site-branding .site-title, .site-branding .site-title a',
),
array(
'name' => "{$section}_site_tt_desc",
'type' => 'typography',
'section' => "{$section}_site_tt",
'title' => __( 'Tagline', 'customify' ),
'css_format' => 'typography',
'selector' => '.site-branding .site-description',
),
// Content.
array(
'name' => "{$section}_content",
'type' => 'section',
'panel' => 'typography_panel',
'title' => __( 'Content', 'customify' ),
),
array(
'name' => "{$section}_heading_h1",
'type' => 'typography',
'section' => "{$section}_content",
'title' => __( 'Heading H1', 'customify' ),
'css_format' => 'typography',
'selector' => '.entry-content h1, .wp-block h1, .entry-single .entry-title',
),
array(
'name' => "{$section}_heading_h2",
'type' => 'typography',
'section' => "{$section}_content",
'title' => __( 'Heading H2', 'customify' ),
'css_format' => 'typography',
'selector' => '.entry-content h2, .wp-block h2',
),
array(
'name' => "{$section}_heading_h3",
'type' => 'typography',
'section' => "{$section}_content",
'title' => __( 'Heading H3', 'customify' ),
'css_format' => 'typography',
'selector' => '.entry-content h3, .wp-block h3',
),
array(
'name' => "{$section}_heading_h4",
'type' => 'typography',
'section' => "{$section}_content",
'title' => __( 'Heading H4', 'customify' ),
'css_format' => 'typography',
'selector' => '.entry-content h4, .wp-block h4',
),
array(
'name' => "{$section}_heading_h5",
'type' => 'typography',
'section' => "{$section}_content",
'title' => __( 'Heading H5', 'customify' ),
'css_format' => 'typography',
'selector' => '.entry-content h5, .wp-block h5',
),
array(
'name' => "{$section}_heading_h6",
'type' => 'typography',
'section' => "{$section}_content",
'title' => __( 'Heading H6', 'customify' ),
'css_format' => 'typography',
'selector' => '.entry-content h6, .wp-block h6',
),
);
return array_merge( $configs, $config );
}
}
add_filter( 'customify/customizer/config', 'customify_customizer_typography_config' );
upsell.php 0000666 00000004361 15115303712 0006567 0 ustar 00 <?php
if ( is_admin() || is_customize_preview() ) {
add_filter( 'customify/customizer/config', 'customify_pro_upsell', 9999 );
function customify_pro_upsell( $configs ) {
if ( class_exists( 'Customify_Pro' ) ) {
return $configs;
}
$configs[] = array(
'name' => 'customify-pro',
'type' => 'section',
'section_class' => 'Customify_WP_Customize_Section_Pro',
'priority' => 0,
'pro_text' => __( 'Customify Pro modules available', 'customify' ),
'pro_url' => 'https://pressmaximum.com/customify/pro-upgrade/?utm_source=theme_dashboard&utm_medium=links&utm_campaign=customizer_top',
);
$configs[] = array(
'name' => 'header_settings_pro',
'panel' => 'header_settings',
'type' => 'section',
'section_class' => 'Customify_WP_Customize_Section_Pro',
'priority' => 99999,
'title' => __( 'Header options in Customify Pro', 'customify' ),
'teaser' => true,
'pro_url' => 'https://pressmaximum.com/customify/pro-upgrade/?utm_source=theme_dashboard&utm_medium=links&utm_campaign=customizer_header_side',
'features' => array(
__( 'Header Sticky', 'customify' ),
__( 'Header Transparent', 'customify' ),
__( 'More HTML Items', 'customify' ),
__( 'Secondary Menu', 'customify' ),
__( 'Icon Box', 'customify' ),
__( 'Contact Info', 'customify' ),
__( 'And more header settings', 'customify' ),
),
);
$configs[] = array(
'name' => 'footer_settings_pro',
'panel' => 'footer_settings',
'type' => 'section',
'priority' => 99999,
'section_class' => 'Customify_WP_Customize_Section_Pro',
'title' => __( 'More Footer options in Customify Pro', 'customify' ),
'pro_url' => 'https://pressmaximum.com/customify/pro-upgrade/?utm_source=theme_dashboard&utm_medium=links&utm_campaign=customizer_footer_side',
'teaser' => true,
'features' => array(
__( 'Footer Top Row', 'customify' ),
__( 'Horizontal Menu Item', 'customify' ),
__( 'More HTML Items', 'customify' ),
__( 'Icon Box Item', 'customify' ),
__( 'Contact Info Item', 'customify' ),
__( 'Payment Methods Item', 'customify' ),
),
);
return $configs;
}
}
styling.php 0000666 00000020213 15115303712 0006746 0 ustar 00 <?php
if ( ! function_exists( 'customify_customizer_styling_config' ) ) {
function customify_customizer_styling_config( $configs ) {
$section = 'global_styling';
$config = array(
// Styling panel.
array(
'name' => 'styling_panel',
'type' => 'panel',
'priority' => 22,
'title' => __( 'Styling', 'customify' ),
),
// Styling Global Section.
array(
'name' => "{$section}",
'type' => 'section',
'panel' => 'styling_panel',
'title' => __( 'Global Colors', 'customify' ),
'priority' => 10,
),
array(
'name' => "{$section}_color_theme_heading",
'type' => 'heading',
'section' => $section,
'title' => __( 'Theme Colors', 'customify' ),
),
array(
'name' => "{$section}_color_primary",
'type' => 'color',
'section' => $section,
'placeholder' => '#235787',
'title' => __( 'Primary Color', 'customify' ),
'css_format' => apply_filters(
'customify/styling/primary-color',
'
.header-top .header--row-inner,
.button,
button,
button.button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button:not(.components-button):not(.customize-partial-edit-shortcut-button),
input[type="button"]:not(.components-button):not(.customize-partial-edit-shortcut-button),
input[type="reset"]:not(.components-button):not(.customize-partial-edit-shortcut-button),
input[type="submit"]:not(.components-button):not(.customize-partial-edit-shortcut-button),
.pagination .nav-links > *:hover,
.pagination .nav-links span,
.nav-menu-desktop.style-full-height .primary-menu-ul > li.current-menu-item > a,
.nav-menu-desktop.style-full-height .primary-menu-ul > li.current-menu-ancestor > a,
.nav-menu-desktop.style-full-height .primary-menu-ul > li > a:hover,
.posts-layout .readmore-button:hover
{
background-color: {{value}};
}
.posts-layout .readmore-button {
color: {{value}};
}
.pagination .nav-links > *:hover,
.pagination .nav-links span,
.entry-single .tags-links a:hover,
.entry-single .cat-links a:hover,
.posts-layout .readmore-button,
.posts-layout .readmore-button:hover
{
border-color: {{value}};
}'
),
'selector' => 'format',
),
array(
'name' => "{$section}_color_secondary",
'type' => 'color',
'section' => $section,
'placeholder' => '#c3512f',
'title' => __( 'Secondary Color', 'customify' ),
'css_format' => apply_filters(
'customify/styling/secondary-color',
'
.customify-builder-btn
{
background-color: {{value}};
}'
),
'selector' => 'format',
),
array(
'name' => "{$section}_color_text",
'type' => 'color',
'section' => $section,
'title' => __( 'Text Color', 'customify' ),
'placeholder' => '#686868',
'css_format' => apply_filters(
'customify/styling/text-color',
'
body
{
color: {{value}};
}
abbr, acronym {
border-bottom-color: {{value}};
}'
),
'selector' => 'format',
),
array(
'name' => "{$section}_color_link",
'type' => 'color',
'section' => $section,
'title' => __( 'Link Color', 'customify' ),
'placeholder' => '#1e4b75',
'css_format' => apply_filters(
'customify/styling/link-color',
'
a
{
color: {{value}};
}'
),
'selector' => 'format',
),
array(
'name' => "{$section}_color_link_hover",
'type' => 'color',
'section' => $section,
'title' => __( 'Link Hover Color', 'customify' ),
'placeholder' => '#111111',
'css_format' => apply_filters(
'customify/styling/link-color-hover',
'
a:hover,
a:focus,
.link-meta:hover, .link-meta a:hover
{
color: {{value}};
}'
),
'selector' => 'format',
),
array(
'name' => "{$section}_color_border",
'type' => 'color',
'section' => $section,
'title' => __( 'Border Color', 'customify' ),
'placeholder' => '#eaecee',
'css_format' => apply_filters(
'customify/styling/color-border',
'
h2 + h3,
.comments-area h2 + .comments-title,
.h2 + h3,
.comments-area .h2 + .comments-title,
.page-breadcrumb {
border-top-color: {{value}};
}
blockquote,
.site-content .widget-area .menu li.current-menu-item > a:before
{
border-left-color: {{value}};
}
@media screen and (min-width: 64em) {
.comment-list .children li.comment {
border-left-color: {{value}};
}
.comment-list .children li.comment:after {
background-color: {{value}};
}
}
.page-titlebar, .page-breadcrumb,
.posts-layout .entry-inner {
border-bottom-color: {{value}};
}
.header-search-form .search-field,
.entry-content .page-links a,
.header-search-modal,
.pagination .nav-links > *,
.entry-footer .tags-links a, .entry-footer .cat-links a,
.search .content-area article,
.site-content .widget-area .menu li.current-menu-item > a,
.posts-layout .entry-inner,
.post-navigation .nav-links,
article.comment .comment-meta,
.widget-area .widget_pages li a, .widget-area .widget_categories li a, .widget-area .widget_archive li a, .widget-area .widget_meta li a, .widget-area .widget_nav_menu li a, .widget-area .widget_product_categories li a, .widget-area .widget_recent_entries li a, .widget-area .widget_rss li a,
.widget-area .widget_recent_comments li
{
border-color: {{value}};
}
.header-search-modal::before {
border-top-color: {{value}};
border-left-color: {{value}};
}
@media screen and (min-width: 48em) {
.content-sidebar.sidebar_vertical_border .content-area {
border-right-color: {{value}};
}
.sidebar-content.sidebar_vertical_border .content-area {
border-left-color: {{value}};
}
.sidebar-sidebar-content.sidebar_vertical_border .sidebar-primary {
border-right-color: {{value}};
}
.sidebar-sidebar-content.sidebar_vertical_border .sidebar-secondary {
border-right-color: {{value}};
}
.content-sidebar-sidebar.sidebar_vertical_border .sidebar-primary {
border-left-color: {{value}};
}
.content-sidebar-sidebar.sidebar_vertical_border .sidebar-secondary {
border-left-color: {{value}};
}
.sidebar-content-sidebar.sidebar_vertical_border .content-area {
border-left-color: {{value}};
border-right-color: {{value}};
}
.sidebar-content-sidebar.sidebar_vertical_border .content-area {
border-left-color: {{value}};
border-right-color: {{value}};
}
}
'
),
'selector' => 'format',
),
array(
'name' => "{$section}_color_meta",
'type' => 'color',
'section' => $section,
'title' => __( 'Meta Color', 'customify' ),
'placeholder' => '#6d6d6d',
'css_format' => apply_filters(
'customify/styling/color-meta',
'
article.comment .comment-post-author {
background: {{value}};
}
.pagination .nav-links > *,
.link-meta,
.link-meta a,
.color-meta,
.entry-single .tags-links:before,
.entry-single .cats-links:before
{
color: {{value}};
}'
),
'selector' => 'format',
),
array(
'name' => "{$section}_color_heading",
'type' => 'color',
'section' => $section,
'title' => __( 'Heading Color', 'customify' ),
'placeholder' => '#2b2b2b',
'css_format' => apply_filters( 'customify/styling/color-heading', 'h1, h2, h3, h4, h5, h6 { color: {{value}};}' ),
'selector' => 'format',
),
array(
'name' => "{$section}_color_w_title",
'type' => 'color',
'section' => $section,
'title' => __( 'Widget Title Color', 'customify' ),
'placeholder' => '#444444',
'css_format' => '.site-content .widget-title { color: {{value}};}',
'selector' => 'format',
),
);
return array_merge( $configs, $config );
}
}
add_filter( 'customify/customizer/config', 'customify_customizer_styling_config' );
background.php 0000666 00000004333 15115303712 0007401 0 ustar 00 <?php
class Customify_Advanced_Styling_Background {
function __construct() {
add_filter( 'customify/customizer/config', array( $this, 'config' ), 100 );
}
function config( $configs = array() ) {
$config = array(
array(
'name' => 'background',
'type' => 'section',
'priority' => 15,
'panel' => 'styling_panel',
'title' => __( 'Background', 'customify' ),
),
array(
'name' => 'background',
'type' => 'styling',
'section' => 'background',
'title' => __( 'Site Background', 'customify' ),
'selector' => array(
'normal' => 'body',
),
'css_format' => 'styling', // styling.
'fields' => array(
'normal_fields' => array(
'text_color' => false,
'link_color' => false,
'padding' => false,
'margin' => false,
'border_heading' => false,
'border_width' => false,
'border_color' => false,
'border_radius' => false,
'box_shadow' => false,
'border_style' => false,
),
'hover_fields' => false,
),
),
array(
'name' => 'site_content_styling',
'type' => 'section',
'panel' => 'styling_panel',
'priority' => 20,
'title' => __( 'Site Content', 'customify' ),
),
array(
'name' => 'site_content_styling',
'type' => 'styling',
'section' => 'background',
'title' => __( 'Content Area Background', 'customify' ),
'selector' => array(
'normal' => '.site-content .content-area',
),
'default' => array(
'normal' => array(
'bg_color' => '#FFFFFF',
),
),
'css_format' => 'styling', // styling.
'fields' => array(
'normal_fields' => array(
'text_color' => false,
'link_color' => false,
'padding' => false,
'margin' => false,
'border_heading' => false,
'border_width' => false,
'border_color' => false,
'border_radius' => false,
'box_shadow' => false,
'border_style' => false,
),
'hover_fields' => false,
),
),
);
return array_merge( $configs, $config );
}
}
new Customify_Advanced_Styling_Background();