Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function moto_section($wp_customize){
- // Showcase Section
- $wp_customize->add_section('section-1', array(
- 'title' => __('Sekcja I', 'moto_cms'),
- 'description' => sprintf(__('Modyfikacja karuzeli','moto_cms')),
- 'priority' => 130
- ));
- $wp_customize->add_setting('graphic-1', array(
- 'default' => get_bloginfo('template_directory').'/img/slider-1.jpg',
- 'type' => 'theme_mod'
- ));
- $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'graphic-1', array(
- 'label' => __('Grafika I', 'moto_cms'),
- 'section' => 'section-1',
- 'settings' => 'graphic-1',
- 'priority' => 90
- )));
- $wp_customize->add_setting('title-1', array(
- 'default' => _x('WITAM SERDECZNIE NA STRONIE', 'moto_cms'),
- 'type' => 'theme_mod'
- ));
- $wp_customize->add_control('title-1', array(
- 'label' => __('Tytuł grafiki', 'moto_cms'),
- 'section' => 'section-1',
- 'priority' => 100
- ));
- $wp_customize->add_setting('text-1', array(
- 'default' => _x('Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, iste.', 'moto_cms'),
- 'type' => 'theme_mod'
- ));
- $wp_customize->add_control('text-1', array(
- 'label' => __('Opis/podtytuł', 'moto_cms'),
- 'section' => 'section-1',
- 'priority' => 110
- ));
- $wp_customize->add_setting('graphic-2', array(
- 'default' => get_bloginfo('template_directory').'/img/slider-2.jpg',
- 'type' => 'theme_mod'
- ));
- $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'graphic-2', array(
- 'label' => __('Grafika II', 'moto_cms'),
- 'section' => 'section-1',
- 'settings' => 'graphic-2',
- 'priority' => 120
- )));
- $wp_customize->add_setting('title-2', array(
- 'default' => _x('WITAM SERDECZNIE NA STRONIE', 'moto_cms'),
- 'type' => 'theme_mod'
- ));
- $wp_customize->add_control('title-2', array(
- 'label' => __('Tytuł grafiki', 'moto_cms'),
- 'section' => 'section-1',
- 'priority' => 130
- ));
- $wp_customize->add_setting('text-2', array(
- 'default' => _x('Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, iste.', 'moto_cms'),
- 'type' => 'theme_mod'
- ));
- $wp_customize->add_control('text-2', array(
- 'label' => __('Opis/podtytuł', 'moto_cms'),
- 'section' => 'section-1',
- 'priority' => 140
- ));
- $wp_customize->add_setting('graphic-3', array(
- 'default' => get_bloginfo('template_directory').'/img/slider-3.jpg',
- 'type' => 'theme_mod'
- ));
- $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'graphic-3', array(
- 'label' => __('Grafika III', 'moto_cms'),
- 'section' => 'section-1',
- 'settings' => 'graphic-3',
- 'priority' => 150
- )));
- $wp_customize->add_setting('title-3', array(
- 'default' => _x('WITAM SERDECZNIE NA STRONIE', 'moto_cms'),
- 'type' => 'theme_mod'
- ));
- $wp_customize->add_control('title-3', array(
- 'label' => __('Tytuł grafiki', 'moto_cms'),
- 'section' => 'section-1',
- 'priority' => 160
- ));
- $wp_customize->add_setting('text-3', array(
- 'default' => _x('Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, iste.', 'moto_cms'),
- 'type' => 'theme_mod'
- ));
- $wp_customize->add_control('text-3', array(
- 'label' => __('Opis/podtytuł', 'moto_cms'),
- 'section' => 'section-1',
- 'priority' => 170
- ));
- $wp_customize->add_section(
- 'section-2',
- array(
- 'title' => esc_html__('Sekcja II', 'moto_cms'),
- 'priority' => 140,
- 'description' => __('Tutaj jest dowolny tekst', 'moto_cms'),
- )
- );
- $wp_customize->add_setting('text-4', array(
- 'default' => _x('Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, iste.', 'moto_cms'),
- 'type' => 'theme_mod'
- ));
- $wp_customize->add_control('text-4', array(
- 'label' => __('Opis/podtytuł', 'moto_cms'),
- 'section' => 'section-2',
- 'priority' => 170 ));
- }
- add_action('customize_register', 'moto_section');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement