WordPress at a glance

remove_theme_mods() WP 1.0

Remove theme modifications option for current theme.

Is the basis for: remove_theme_mod()
Works based on: delete_option()
✈ 1 time = 0.001967s = very slow | 50000 times = 17.67s = slow

No Hooks.

Return

Null. Nothing.

Usage

remove_theme_mods();

Changelog

Since 2.1.0 Introduced.

Code of remove theme mods: wp-includes/theme.php WP 5.2.4

<?php
function remove_theme_mods() {
	delete_option( 'theme_mods_' . get_option( 'stylesheet' ) );

	// Old style.
	$theme_name = get_option( 'current_theme' );
	if ( false === $theme_name ) {
		$theme_name = wp_get_theme()->get( 'Name' );
	}
	delete_option( 'mods_' . $theme_name );
}

Related Functions

From tag: Theme Modification API (theme mods options settings)

More from category: Other Theme Functions

No comments
    Hello, !     Log In . Register