Make WordPress Core

Ticket #14721: 14721.diff

File 14721.diff, 834 bytes (added by obenland, 11 years ago)
  • wp-includes/theme.php

     
    914914function set_theme_mod( $name, $value ) {
    915915        $mods = get_theme_mods();
    916916
    917         $mods[ $name ] = $value;
     917        /**
     918         * Filter the theme modification, or 'theme_mod', value.
     919         *
     920         * The dynamic portion of the hook name, $name, refers to the key name of
     921         * the modification array. For example, 'header_textcolor', 'header_image',
     922         * and so on depending on the theme options.
     923         *
     924         * @since unknown
     925         *
     926         * @param string $value The value of the current theme modification.
     927         */
     928        $mods[ $name ] = apply_filters( "set_theme_mod_$name", $value );
    918929
    919930        $theme = get_option( 'stylesheet' );
    920931        update_option( "theme_mods_$theme", $mods );