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

Filters the theme modification, or ‘theme_mod’, value.


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.

Top ↑


$current_mod mixed
The value of the active theme modification.

Top ↑


File: wp-includes/theme.php. View all references

return apply_filters( "theme_mod_{$name}", $mods[ $name ] );

Top ↑


Version Description
2.2.0 Introduced.

Top ↑

User Contributed Notes

  1. Skip to note 1 content
    Contributed by Niraj Gautam

    This filter will have an impact on the front-end, but not the value kept in the database.

    // filter to change the value of display_title_and_tagline in the customizer.
    add_filter( 'theme_mod_display_title_and_tagline', 'wpdocs_display_title_and_tagline' );
    function wpdocs_display_title_and_tagline( $display_title_and_tagline ) {
    	return false;

You must log in before being able to contribute a note or feedback.