Make WordPress Core

Ticket #25671: 25671.1.patch

File 25671.1.patch, 891 bytes (added by spacedmonkey, 9 years ago)
  • wp-includes/theme.php

    diff --git a/wp-includes/theme.php b/wp-includes/theme.php
    index 130b90e..ea6d510 100644
    a b function validate_current_theme() { 
    800800 * @return array|void Theme modifications.
    801801 */
    802802function get_theme_mods() {
     803
     804        /**
     805         * Filter the value of the existing theme mods before it is retrieved.
     806         *
     807         * Passing a truthy value to the filter will short-circuit retrieving
     808         * the theme mod value, returning the passed value instead.
     809         *
     810         * @since 4.4.0
     811         *
     812         * @param bool|mixed $pre_theme_mods Value to return instead of the theme mods.
     813         *                                   Default false to skip it.
     814         */
     815        $pre = apply_filters( 'theme_mods', false );
     816        if ( false !== $pre )
     817                return $pre;
     818
    803819        $theme_slug = get_option( 'stylesheet' );
    804820        $mods = get_option( "theme_mods_$theme_slug" );
    805821        if ( false === $mods ) {