Make WordPress Core

Ticket #33123: theme-mod-default.patch

File theme-mod-default.patch, 876 bytes (added by greenshady, 10 years ago)
  • theme.php

     
    951951        if ( is_string( $default ) )
    952952                $default = sprintf( $default, get_template_directory_uri(), get_stylesheet_directory_uri() );
    953953
     954        /**
     955         * Filter the theme modification default value.
     956         *
     957         * The dynamic portion of the hook name, `$name`, refers to
     958         * the key name of the modification array. For example,
     959         * 'header_textcolor', 'header_image', and so on depending
     960         * on the theme options.
     961         *
     962         * @since 4.3.0
     963         *
     964         * @param string $default The default value of the current theme modification.
     965         */
     966        $default = apply_filters( "theme_mod_{$name}_default", $default );
     967
    954968        /** This filter is documented in wp-includes/theme.php */
    955969        return apply_filters( "theme_mod_{$name}", $default );
    956970}