Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function add_my_media_controls($wp_customize) {
- $wp_customize->add_section( 'theme_banner_image', array(
- 'title' => __( 'Banner Image', 'theme_banner_image' ),
- 'priority' => 35,
- ) );
- $wp_customize->add_setting('banner_image', array(
- 'type' => 'theme_mod',
- 'capability' => 'edit_theme_options',
- 'sanitize_callback' => 'absint'
- ));
- $wp_customize->add_control(new WP_Customize_Cropped_Image_Control($wp_customize, 'banner_image', array(
- 'section' => 'theme_banner_image',
- 'label' => 'Banner Image',
- 'width' => 2000,
- 'height' => 1200
- )));
- }
- add_action('customize_register', 'add_my_media_controls');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement