403Webshell
Server IP : 172.67.158.161  /  Your IP : 18.224.67.0
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/giankuin/dangky.bnnagency.com/wp-content/themes/flatsome/inc/admin/options/header/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/giankuin/dangky.bnnagency.com/wp-content/themes/flatsome/inc/admin/options/header//options-header-content.php
<?php

/*************
 * HTML content
 *************/

// Add section immediately to keep sort order.
Flatsome_Option::add_section( 'header_content', array(
	'title'       => __( 'HTML', 'flatsome-admin' ),
	'panel'       => 'header',
) );

function flatsome_customizer_header_content_options() {
	Flatsome_Option::add_field( 'option',  array(
		'type'        => 'select',
		'settings'    => 'header-block-1',
		'transport'   => flatsome_customizer_transport(),
		'label'       => __( 'Header Block 1', 'flatsome-admin' ),
		'description' => __( 'Blocks can be edited in the page builder. Select a block, go to a page and open in the the Page Builder.', 'flatsome-admin' ),
		'section'     => 'header_content',
		'choices'     => flatsome_customizer_blocks(),
	));

	Flatsome_Option::add_field( 'option',  array(
		'type'        => 'select',
		'settings'    => 'header-block-2',
		'transport'   => flatsome_customizer_transport(),
		'label'       => __( 'Header Block 2', 'flatsome-admin' ),
		'description' => __( 'Blocks can be edited in the page builder. Select a block, go to a page and open in the the Page Builder.', 'flatsome-admin' ),
		'section'     => 'header_content',
		'choices'     => flatsome_customizer_blocks(),
	));

	Flatsome_Option::add_field( 'option',  array(
		'type'        => 'textarea',
		'settings'    => 'topbar_left',
		'transport'   => flatsome_customizer_transport(),
		'label'       => __( 'HTML 1', 'flatsome-admin' ),
		'description' => __( 'Add Any HTML or Shortcode here...', 'flatsome-admin' ),
		//'help'        => __( 'This is some extra help. You can use this to add some additional instructions for users. The main description should go in the "description" of the field, this is only to be used for help tips.', 'flatsome-admin' ),
		'section'     => 'header_content',
		'sanitize_callback' => 'flatsome_custom_sanitize',
		'default'     => '<strong class="uppercase">Add anything here or just remove it...</strong>',
	));



	Flatsome_Option::add_field( 'option',  array(
		'type'        => 'textarea',
		'settings'    => 'topbar_right',
		'transport'   => flatsome_customizer_transport(),
		'label'       => __( 'HTML 2', 'flatsome-admin' ),
		'description' => __( 'Add Any HTML or Shortcode here...', 'flatsome-admin' ),
		//'help'        => __( 'This is some extra help. You can use this to add some additional instructions for users. The main description should go in the "description" of the field, this is only to be used for help tips.', 'flatsome-admin' ),
		'section'     => 'header_content',
		'sanitize_callback' => 'flatsome_custom_sanitize',
	));

	Flatsome_Option::add_field( 'option',  array(
		'type'        => 'textarea',
		'settings'    => 'top_right_text',
		'transport'   => flatsome_customizer_transport(),
		'label'       => __( 'HTML 3', 'flatsome-admin' ),
		'description' => __( 'Add Any HTML or Shortcode here...', 'flatsome-admin' ),
		'section'     => 'header_content',
		'sanitize_callback' => 'flatsome_custom_sanitize',
	));

	Flatsome_Option::add_field( 'option',  array(
		'type'        => 'textarea',
		'settings'    => 'nav_position_text_top',
		'transport'   => flatsome_customizer_transport(),
		'label'       => __( 'HTML 4', 'flatsome-admin' ),
		'description' => __( 'Add Any HTML or Shortcode here...', 'flatsome-admin' ),
		'section'     => 'header_content',
		'sanitize_callback' => 'flatsome_custom_sanitize',
	));

	Flatsome_Option::add_field( 'option',  array(
		'type'        => 'textarea',
		'settings'    => 'nav_position_text',
		'transport'   => flatsome_customizer_transport(),
		'label'       => __( 'HTML 5', 'flatsome-admin' ),
		'description' => __( 'Add Any HTML or Shortcode here...', 'flatsome-admin' ),
		'section'     => 'header_content',
		'sanitize_callback' => 'flatsome_custom_sanitize',
	));
}
add_action( 'init', 'flatsome_customizer_header_content_options' );

function flatsome_refresh_header_content_partials( WP_Customize_Manager $wp_customize ) {

	if ( ! isset( $wp_customize->selective_refresh ) ) {
	      return;
	  }

	$wp_customize->selective_refresh->add_partial( 'top_right_text', array(
	    'selector' => '.html_top_right_text',
	    'settings' => array('top_right_text'),
	    'render_callback' => function() {
	        return flatsome_option('top_right_text');
	    },
	) );

	$wp_customize->selective_refresh->add_partial( 'nav_position_text_top', array(
	    'selector' => '.html_nav_position_text_top',
	    'settings' => array('nav_position_text_top'),
	    'render_callback' => function() {
	        return flatsome_option('nav_position_text_top');
	    },
	) );

	$wp_customize->selective_refresh->add_partial( 'topbar_left', array(
	    'selector' => '.html_topbar_left',
	    'settings' => array('topbar_left'),
	    'render_callback' => function() {
	        return flatsome_option('topbar_left');
	    },
	) );

	$wp_customize->selective_refresh->add_partial( 'topbar_right', array(
	    'selector' => '.html_topbar_right',
	    'settings' => array('topbar_right'),
	    'render_callback' => function() {
	        return flatsome_option('topbar_right');
	    },
	) );

	$wp_customize->selective_refresh->add_partial( 'nav_position_text', array(
	    'selector' => '.html_nav_position_text',
	    'settings' => array('nav_position_text'),
	    'render_callback' => function() {
	        return flatsome_option('nav_position_text');
	    },
	) );


	// Header block
	$wp_customize->selective_refresh->add_partial( 'header-block-1', array(
	    'selector' => '.header-block-1',
	    'settings' => array('header-block-1'),
	    'render_callback' => function() {
	  		return do_shortcode('[block id="'.flatsome_option('header-block-1').'"]');
	    },
	) );

	$wp_customize->selective_refresh->add_partial( 'header-block-2', array(
	    'selector' => '.header-block-2',
	    'settings' => array('header-block-2'),
	    'render_callback' => function() {
	  		return do_shortcode('[block id="'.flatsome_option('header-block-2').'"]');
	    },
	) );
}
add_action( 'customize_register', 'flatsome_refresh_header_content_partials' );

Youez - 2016 - github.com/yon3zu
LinuXploit