Yuzu Theme
from meowapps.com
This commit is contained in:
131
inc/customizer-sections/general-section.php
Normal file
131
inc/customizer-sections/general-section.php
Normal file
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
/* =============================================== */
|
||||
// # GENERAL SECTION
|
||||
/* =============================================== */
|
||||
$wp_customize->add_section( 'general_section', array(
|
||||
'priority' => 10,
|
||||
'capability' => 'edit_theme_options',
|
||||
'theme_supports' => '',
|
||||
'title' => __( 'General', 'yuzu' ),
|
||||
'description' => '',
|
||||
'panel' => 'theme_settings',
|
||||
) );
|
||||
|
||||
/* =============================================== */
|
||||
// ## SOCIAL NETWORKS
|
||||
/* =============================================== */
|
||||
$wp_customize->add_control(
|
||||
new yuzu_Customizer_Accordion(
|
||||
$wp_customize,
|
||||
'yuzu-social-networks-accordion',
|
||||
array(
|
||||
'section' => 'general_section',
|
||||
'label' => __( 'Social Networks', 'yuzu' ),
|
||||
'type' => 'accordion'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting(
|
||||
'instagram_url',
|
||||
array(
|
||||
'default' => '',
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'sanitize_text_field',
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control(
|
||||
'instagram_url',
|
||||
array(
|
||||
'label' => __('Instagram URL', 'yuzu'),
|
||||
'description' => __('To hide it, leave it blank.', 'yuzu'),
|
||||
'section' => 'general_section',
|
||||
'type' => 'text'
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting(
|
||||
'facebook_url',
|
||||
array(
|
||||
'default' => '',
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'sanitize_text_field',
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control(
|
||||
'facebook_url',
|
||||
array(
|
||||
'label' => __('Facebook URL', 'yuzu'),
|
||||
'description' => __('To hide it, leave it blank.', 'yuzu'),
|
||||
'section' => 'general_section',
|
||||
'type' => 'text'
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting(
|
||||
'twitter_url',
|
||||
array(
|
||||
'default' => '',
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'sanitize_text_field',
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control(
|
||||
'twitter_url',
|
||||
array(
|
||||
'label' => __('Twitter URL', 'yuzu'),
|
||||
'description' => __('To hide it, leave it blank.', 'yuzu'),
|
||||
'section' => 'general_section',
|
||||
'type' => 'text'
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting(
|
||||
'flickr_url',
|
||||
array(
|
||||
'default' => '',
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'sanitize_text_field',
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control(
|
||||
'flickr_url',
|
||||
array(
|
||||
'label' => __('Flickr URL', 'yuzu'),
|
||||
'description' => __('To hide it, leave it blank.', 'yuzu'),
|
||||
'section' => 'general_section',
|
||||
'type' => 'text'
|
||||
)
|
||||
);
|
||||
|
||||
/* =============================================== */
|
||||
// ## COPYRIGHT
|
||||
/* =============================================== */
|
||||
$wp_customize->add_control(
|
||||
new yuzu_Customizer_Accordion(
|
||||
$wp_customize,
|
||||
'yuzu-copyright-infos-accordion',
|
||||
array(
|
||||
'section' => 'general_section',
|
||||
'label' => __( 'Copyright', 'yuzu' ),
|
||||
'type' => 'accordion'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$wp_customize->add_setting(
|
||||
'copyright_text',
|
||||
array(
|
||||
'default' => '© Yuzu Theme 2018',
|
||||
'transport' => 'refresh',
|
||||
'sanitize_callback' => 'wp_kses_post',
|
||||
)
|
||||
);
|
||||
$wp_customize->add_control(
|
||||
'copyright_text',
|
||||
array(
|
||||
'label' => __('Copyright Text', 'yuzu'),
|
||||
'section' => 'general_section',
|
||||
'type' => 'text'
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user