wphooks.info - pre_set_theme_mod_{$name}

pre_set_theme_mod_{$name}

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-includes/theme.php:
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
	 *
	 * The dynamic portion of the hook name, `$name`, refers to the key name of
	 * the modification array. For example, 'header_textcolor', 'header_image',
	 * and so on depending on the theme options.
	 *
	 * @since 3.9.0
	 *
	 * @param string $value     The new value of the theme mod.
	 * @param string $old_value The current value of the theme mod.
	 */
	$mods[ $name ] = apply_filters( "pre_set_theme_mod_{$name}", $value, $old_value );

	$theme = get_option( 'stylesheet' );
	update_option( "theme_mods_$theme", $mods );
}

/**
 * Remove theme modification name from current theme list.
 *
 * If removing the name also removes all elements, then the entire option will