→ Adding a Customizer Control Upload¶
To add a file uploader field in your Customizer type wpC
in the Sublime Text and choose the option for wpCustomizerAddControlUpload
.
The WordPress Customizer snippets outputs the following code:
1 2 3 4 5 6 7 8 9 10 11 | <?php // Control: Name. $wp_customize->add_control( new WP_Customize_Upload_Control( $wp_customize, 'prefix_id', array( 'label' => __( 'Upload!', 'TEXT_DOMAIN' ), 'section' => 'prefix_section_id', 'settings' => 'prefix_id', ) ) ); |