The "link" control

Learn how to create controls using Kirki

Back to Controls

Returnsstring

Can't find what you're looking for? Check the github issues or edit this page to add what's missing.

The link control is a simple text-input control, with URL sanitization. Values are sanitized using the esc_url_raw() function.

Example:

Kirki::add_field( 'theme_config_id', [
	'type'     => 'link',
	'settings' => 'my_setting',
	'label'    => __( 'Link Control', 'kirki' ),
	'section'  => 'section_id',
	'default'  => 'https://wplemon.com/',
	'priority' => 10,
] );
Edit this page