PATH:
home
/
niazsaze
/
public_html
/
wp-content
/
themes
/
flatsome
/
inc
/
admin
/
options
/
header
<?php Flatsome_Option::add_section( 'header_buttons', array( 'title' => __( 'دکمه ها', 'flatsome-admin' ), 'panel' => 'header', ) ); Flatsome_Option::add_field( '', array( 'type' => 'custom', 'settings' => 'custom_title_button_1', 'label' => __( '', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => '<div class="options-title-divider">دکمه 1</div>', ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'text', 'settings' => 'header_button_1', 'transport' => $transport, 'default' => 'دکمه 1', 'label' => __( 'متن', 'flatsome-admin' ), 'section' => 'header_buttons', ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'radio-buttonset', 'settings' => 'header_button_1_letter_case', 'transport' => flatsome_customizer_transport(), 'label' => __( 'حالت نمایش متن', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => '', 'choices' => array( '' => __( 'ABC', 'flatsome-admin' ), 'lowercase' => __( 'Abc', 'flatsome-admin' ), ), ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'text', 'settings' => 'header_button_1_link', 'transport' => $transport, 'default' => '', 'label' => __( 'لینک', 'flatsome-admin' ), 'section' => 'header_buttons', 'description' => $smart_links, ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'select', 'settings' => 'header_button_1_link_target', 'transport' => $transport, 'label' => __( 'هدف', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => '_self', 'choices' => array( '_self' => __( 'پنجره جاری', 'flatsome-admin' ), '_blank' => __( 'پنجره جدید', 'flatsome-admin' ), ), ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'text', 'settings' => 'header_button_1_link_rel', 'transport' => $transport, 'default' => '', 'label' => __( 'ریل', 'flatsome-admin' ), 'section' => 'header_buttons', ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'text', 'settings' => 'header_button_1_radius', 'transport' => $transport, 'default' => '99px', 'label' => __( 'ردیوس', 'flatsome-admin' ), 'section' => 'header_buttons', ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'select', 'settings' => 'header_button_1_icon', 'transport' => flatsome_customizer_transport(), 'label' => __( 'آیکون', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => '', 'choices' => require get_template_directory() . '/inc/builder/shortcodes/values/icons.php', ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'radio-buttonset', 'settings' => 'header_button_1_icon_position', 'transport' => flatsome_customizer_transport(), 'label' => __( 'موقعیت آیکون', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => '', 'choices' => array( 'left' => __( 'چپ', 'flatsome-admin' ), '' => __( 'راست', 'flatsome-admin' ), ), 'active_callback' => array( array( 'setting' => 'header_button_1_icon', 'operator' => '!=', 'value' => '', ), ), ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'radio-buttonset', 'settings' => 'header_button_1_icon_visibility', 'transport' => flatsome_customizer_transport(), 'label' => __( 'Icon visibility', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => '', 'choices' => array( '' => __( 'همیشه قابل مشاهده است', 'flatsome-admin' ), 'true' => __( 'قابل مشاهده در شناور', 'flatsome-admin' ), ), 'active_callback' => array( array( 'setting' => 'header_button_1_icon', 'operator' => '!=', 'value' => '', ), ), ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'radio-buttonset', 'settings' => 'header_button_1_color', 'transport' => $transport, 'label' => __( 'رنگ', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => 'primary', 'choices' => array( 'plain' => __( 'درشت', 'flatsome-admin' ), 'primary' => __( 'اصلی', 'flatsome-admin' ), 'secondary' => __( 'ثانویه', 'flatsome-admin' ), 'success' => __( 'موفقیت', 'flatsome-admin' ), 'alert' => __( 'هشدار', 'flatsome-admin' ), ), ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'radio-buttonset', 'settings' => 'header_button_1_style', 'transport' => $transport, 'label' => __( 'استایل', 'flatsome-admin' ), 'section' => 'header_buttons', 'choices' => $button_styles, ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'radio-buttonset', 'settings' => 'header_button_1_size', 'transport' => $transport, 'label' => __( 'سایز', 'flatsome-admin' ), 'section' => 'header_buttons', 'choices' => $nav_sizes, ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'slider', 'settings' => 'header_button_1_depth', 'label' => __( 'عمق', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => 0, 'choices' => array( 'min' => 0, 'max' => 5, 'step' => 1, ), 'transport' => $transport, ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'slider', 'settings' => 'header_button_1_depth_hover', 'label' => __( 'عمق: شناور', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => 0, 'choices' => array( 'min' => 0, 'max' => 5, 'step' => 1, ), 'transport' => $transport, ) ); Flatsome_Option::add_field( '', array( 'type' => 'custom', 'settings' => 'custom_title_button_2', 'label' => __( '', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => '<div class="options-title-divider">دکمه 2</div>', ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'text', 'settings' => 'header_button_2', 'transport' => $transport, 'default' => 'دکمه 2', 'label' => __( 'Text', 'flatsome-admin' ), 'section' => 'header_buttons', ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'radio-buttonset', 'settings' => 'header_button_2_letter_case', 'transport' => flatsome_customizer_transport(), 'label' => __( 'حالت نمایش', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => '', 'choices' => array( '' => __( 'ABC', 'flatsome-admin' ), 'lowercase' => __( 'Abc', 'flatsome-admin' ), ), ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'text', 'settings' => 'header_button_2_link', 'transport' => $transport, 'default' => '', 'label' => __( 'لینک', 'flatsome-admin' ), 'section' => 'header_buttons', 'description' => $smart_links, ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'select', 'settings' => 'header_button_2_link_target', 'transport' => $transport, 'label' => __( 'هدف', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => '_self', 'choices' => array( '_self' => __( 'پنجره جاری', 'flatsome-admin' ), '_blank' => __( 'پنجره جدید', 'flatsome-admin' ), ), ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'text', 'settings' => 'header_button_2_link_rel', 'transport' => $transport, 'default' => '', 'label' => __( 'ریل', 'flatsome-admin' ), 'section' => 'header_buttons', ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'text', 'settings' => 'header_button_2_radius', 'transport' => $transport, 'default' => '99px', 'label' => __( 'ردیوس', 'flatsome-admin' ), 'section' => 'header_buttons', ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'select', 'settings' => 'header_button_2_icon', 'transport' => flatsome_customizer_transport(), 'label' => __( 'آیکون', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => '', 'choices' => require get_template_directory() . '/inc/builder/shortcodes/values/icons.php', ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'radio-buttonset', 'settings' => 'header_button_2_icon_position', 'transport' => flatsome_customizer_transport(), 'label' => __( 'موقعیت آیکون', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => '', 'choices' => array( 'left' => __( 'چپ', 'flatsome-admin' ), '' => __( 'راست', 'flatsome-admin' ), ), 'active_callback' => array( array( 'setting' => 'header_button_2_icon', 'operator' => '!=', 'value' => '', ), ), ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'radio-buttonset', 'settings' => 'header_button_2_icon_visibility', 'transport' => flatsome_customizer_transport(), 'label' => __( 'نمایان بودن نماد', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => '', 'choices' => array( '' => __( 'همیشه قابل مشاهده است', 'flatsome-admin' ), 'true' => __( 'Visible on hover', 'flatsome-admin' ), ), 'active_callback' => array( array( 'setting' => 'header_button_2_icon', 'operator' => '!=', 'value' => '', ), ), ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'radio-buttonset', 'settings' => 'header_button_2_color', 'transport' => $transport, 'label' => __( 'رنگ', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => 'secondary', 'choices' => array( 'plain' => __( 'درشت', 'flatsome-admin' ), 'primary' => __( 'اصلی', 'flatsome-admin' ), 'secondary' => __( 'ثانویه', 'flatsome-admin' ), 'success' => __( 'موفق', 'flatsome-admin' ), 'alert' => __( 'هشدار', 'flatsome-admin' ), ), ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'radio-buttonset', 'settings' => 'header_button_2_style', 'transport' => $transport, 'label' => __( 'استایل', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => 'outline', 'choices' => $button_styles, ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'radio-buttonset', 'settings' => 'header_button_2_size', 'transport' => $transport, 'label' => __( 'سایز', 'flatsome-admin' ), 'section' => 'header_buttons', 'choices' => $nav_sizes, ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'slider', 'settings' => 'header_button_2_depth', 'label' => __( 'عمق', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => 0, 'choices' => array( 'min' => 0, 'max' => 5, 'step' => 1, ), 'transport' => $transport, ) ); Flatsome_Option::add_field( 'option', array( 'type' => 'slider', 'settings' => 'header_button_2_depth_hover', 'label' => __( 'عمق: شناور', 'flatsome-admin' ), 'section' => 'header_buttons', 'default' => 0, 'choices' => array( 'min' => 0, 'max' => 5, 'step' => 1, ), 'transport' => $transport, ) ); function flatsome_refresh_header_buttons_partials( WP_Customize_Manager $wp_customize ) { // Abort if selective refresh is not available. if ( ! isset( $wp_customize->selective_refresh ) ) { return; } $wp_customize->selective_refresh->add_partial( 'header-button-2', array( 'selector' => '.header-button-2', 'container_inclusive' => true, 'settings' => array( 'header_button_2', 'header_button_2_radius', 'header_button_2_link', 'header_button_2_style', 'header_button_2_color', 'header_button_2_size', 'header_button_2_depth', 'header_button_2_depth_hover', 'header_button_2_icon', 'header_button_2_icon_position', 'header_button_2_icon_visibility', 'header_button_2_letter_case', ), 'render_callback' => function () { get_template_part( 'template-parts/header/partials/element', 'button-2' ); }, ) ); $wp_customize->selective_refresh->add_partial( 'header-button-1', array( 'selector' => '.header-button-1', 'container_inclusive' => true, 'settings' => array( 'header_button_1', 'header_button_1_radius', 'header_button_1_link', 'header_button_1_style', 'header_button_1_color', 'header_button_1_size', 'header_button_1_depth', 'header_button_1_depth_hover', 'header_button_1_icon', 'header_button_1_icon_position', 'header_button_1_icon_visibility', 'header_button_1_letter_case', ), 'render_callback' => function () { get_template_part( 'template-parts/header/partials/element', 'button-1' ); }, ) ); } add_action( 'customize_register', 'flatsome_refresh_header_buttons_partials' );
[-] options-header-mobile.php
[edit]
[-] options-header-sticky.php
[edit]
[-] options-header-contact.php
[edit]
[-] options-header-buttons.php
[edit]
[-] options-header-top.php
[edit]
[-] options-header-presets.php
[edit]
[-] options-header-search.php
[edit]
[-] options-header-account.php
[edit]
[-] options-header-refresh.php
[edit]
[+]
img
[-] options-header-bottom.php
[edit]
[-] options-header-logo.php
[edit]
[-] options-header-dropdown.php
[edit]
[-] options-header-content.php
[edit]
[-] options-header-main.php
[edit]
[-] options-header-layout.php
[edit]
[-] options-header-nav-vertical.php
[edit]
[-] options-header-newsletter.php
[edit]
[-] options-header-cart.php
[edit]
[-] options-header-wishlist.php
[edit]
[+]
..
[-] options-header.php
[edit]