WordPress.org

Make WordPress Core

Ticket #14721: 14721-r23302.diff

File 14721-r23302.diff, 665 bytes (added by ssmathias, 5 years ago)

Patch against revision 23302 in trunk (cleaned and revised)

  • wp-includes/theme.php

     
    796796function set_theme_mod( $name, $value ) {
    797797        $mods = get_theme_mods();
    798798
     799        $value = apply_filters('set_theme_mod', $value, $name, $mods[ $name ]);
     800        $value = apply_filters("set_theme_mod_$name", $value, $mods[ $name ]);
     801
    799802        $mods[ $name ] = $value;
    800803
    801804        $theme = get_option( 'stylesheet' );
    802805        update_option( "theme_mods_$theme", $mods );
     806
     807        do_action('post_set_theme_mod', $mods, $name, $value);
     808        do_action("post_set_theme_mod_$name", $mods, $value);
    803809}
    804810
    805811/**