I am trying to add a checkbox control in the image details popup (when editing image in a post). I have added the following code in my template function.php
but I can't manage to display the checkbox in the popup. What am I missing?
function bluesolutions_customize_register($wp_customize) {
$wp_customize->add_section('bluesolutions_use_lighbox_section', array(
'title' => __('Lightbox', 'mytheme'),
'description' => '',
'priority' => 120,
));
$wp_customize->add_setting('mytheme_use_lighbox_setting', array(
'default' => 0,
'capability' => '',
'type' => 'checkbox',
));
$wp_customize->add_control(new WP_Customize_Image_Control(
$wp_customize, 'use_lighbox', array(
'label' => __('Usen lightbox', 'mytheme'),
'section' => 'advanced',
'settings' => 'mytheme_use_lighbox_setting',
'priority' => 1,
'type' => 'checkbox',
)
));
}
add_action( 'customize_register', 'bluesolutions_customize_register' );
customize_register
is meant for the theme customization page... not the editor "edit image" window. I'm not sure which hook to use for the "Image Details" window. Perhaps someone else can chime in here?