Make WordPress Core


Ignore:
Timestamp:
05/14/2012 04:45:32 PM (13 years ago)
Author:
ryan
Message:

Add filters for the default to get_option() and get_site_option(). Provide default overrides in the customizer. Props Otto42. see #20448

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/option.php

    r20287 r20783  
    4444    if ( defined( 'WP_SETUP_CONFIG' ) )
    4545        return false;
     46
     47    $default = apply_filters( 'default_option_' . $option, $default );
    4648
    4749    if ( ! defined( 'WP_INSTALLING' ) ) {
     
    755757        return $pre;
    756758
     759    $default = apply_filters( 'default_site_option_' . $option, $default );
     760
    757761    if ( !is_multisite() ) {
    758762        $value = get_option($option, $default);
Note: See TracChangeset for help on using the changeset viewer.