Launch Offer – Kirki PRO is now available! 🚀Get it while it lasts!

Upload

The Upload control is identical to the Image control, the only difference is that it allows uploading more file types.

Example

new \Kirki\Field\Upload(
	[
		'settings'    => 'upload_setting',
		'label'       => esc_html__( 'Upload Control', 'kirki' ),
		'description' => esc_html__( 'The saved value will the URL.', 'kirki' ),
		'section'     => 'section_id',
	]
);

Usage

<?php
	$file_url = get_theme_mod( 'upload_setting', '' );
	printf( esc_html__( 'URL of uploaded file: %s', 'kirki' ), $file_url );
?>

Last updated on: January 21st, 2022

Scroll to Top

Download

Subscribe & be the first to be informed about
new features & updates!