HEX
Server: LiteSpeed
System: Linux premium260.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User: aliazzsr (627)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/aliazzsr/trn2.mesegroup.de/wp-content/themes/hardware-store/inc/customizer.php
<?php
/**
 * Storefront Child Theme Customizer
 * @description This file build option inside customizer menu options
 * @package storefront child
 */

function hardware_store_customize_register( $wp_customize ) {

	//add section for Storefront child
	$wp_customize->add_panel( 'sfc_panel', array(
		'title'          => __( 'HardWare Store Setting', 'hardware-store' ),
		'priority'       => 100,
	) );

	//add dropdown category selection
    $wp_customize->add_section( 'sfc_top_header', array(
		'title'	=> __( 'Top Header', 'hardware-store' ),
		'priority' => 1,
		'panel' => 'sfc_panel'
	) );

	//phone number
	$wp_customize->add_setting( 'contact_details', array(
		'default'        => esc_html__( 'xx-xx-xx', 'hardware-store' ),
		'sanitize_callback' => 'sanitize_text_field',
	) );

	$wp_customize->add_control( 'contact_details', array(
		'label'    => esc_html__( 'Contact Details', 'hardware-store' ),
		'section'  => 'sfc_top_header',		
		'type'     => 'text',
		'priority' => 1,
	) );

	//phone number
	$wp_customize->add_setting( 'contact_details_email', array(
		'default'        => esc_html__( '[email protected]', 'hardware-store' ),
		'sanitize_callback' => 'sanitize_email',
	) );

	$wp_customize->add_control( 'contact_details_email', array(
		'label'    => esc_html__( 'Email:Contact Details', 'hardware-store' ),
		'section'  => 'sfc_top_header',		
		'type'     => 'text',
		'priority' => 1,
	) );
	

	//add social media social icons
    $wp_customize->add_section( 'sfc_social_icons', array(
		'title'	=> __( 'Social Network', 'hardware-store' ),
		'priority' => 2,
		'panel' => 'sfc_panel'
	) );

	$social_network_links = array(
		'linkedin' => esc_html__( 'LinkedIn', 'hardware-store' ),
		'facebook' => esc_html__( 'Facebook', 'hardware-store' ),
		'twitter' => esc_html__( 'twitter', 'hardware-store' ),
		'google_plus' => esc_html__( 'Googel Plus', 'hardware-store' ),
	);
	foreach ($social_network_links as $socil_link_id => $name) {
		$wp_customize->add_setting( $socil_link_id, array(
			'sanitize_callback' => 'esc_url_raw',
		) );

		$wp_customize->add_control( $socil_link_id, array(
			'label'    => $name,
			'section'  => 'sfc_social_icons',		
			'type'     => 'url',
		) );
	}
} //end of hardware_store_customize_register
add_action( 'customize_register', 'hardware_store_customize_register' );