“wp_customalize_image_control” Réponses codées

wp_customalize_image_control

$wp_customize->add_setting( 'logo', array(
    'capability'        => 'edit_theme_options',
    'default'           => '',
    'sanitize_callback' => 'ic_sanitize_image',
) );
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'logo',
    array(
        'label'    => __( 'Logo', 'text-domain' ),
        'section'  => 'general',
        'settings' => 'logo',
    )
) );
Tired Tuatara

Image WP_Custommize

$wp_customize->add_control(
       new WP_Customize_Image_Control(
           $wp_customize,
           'logo',
           array(
               'label'      => __( 'Upload a logo', 'theme_name' ),
               'section'    => 'your_section_id',
               'settings'   => 'your_setting_id',
               'context'    => 'your_setting_context'
           )
       )
   );
Tired Tuatara

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code