wppaste
WordPress

apply_filters( "theme_mod_{$name}", mixed $current_mod )

Since
2.2.0
Filters the theme modification, or 'theme_mod', value.

Description

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.

Parameters

$current_modmixed
The value of the active theme modification.

Fired at · 2

  • wp-includes/theme.php:1082get_theme_mod()
  • wp-includes/theme.php:1095get_theme_mod()

Source

		 * and so on depending on the theme options.		 *		 * @since 2.2.0		 *		 * @param mixed $current_mod The value of the active theme modification.		 */		return apply_filters( "theme_mod_{$name}", $mods[ $name ] );	} 	if ( is_string( $default_value ) ) {		// Only run the replacement if an sprintf() string format pattern was found.		if ( preg_match( '#(?<!%)%(?:\d+\$?)?s#', $default_value ) ) {			// Remove a single trailing percent sign.

History

Introduced in 2.2.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.