Make WordPress Core

Changeset 4842


Ignore:
Timestamp:
01/30/2007 06:34:18 PM (17 years ago)
Author:
ryan
Message:

Add pre_option_* filter that allows plugins to short-circuit fetches.

File:
1 edited

Legend:

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

    r4831 r4842  
    203203function get_option($setting) {
    204204    global $wpdb;
     205
     206    // Allow plugins to short-circuit options.
     207    $pre = apply_filters( 'pre_option_' . $setting, false );
     208    if ( $pre )
     209        return $pre;
    205210
    206211    $value = wp_cache_get($setting, 'options');
Note: See TracChangeset for help on using the changeset viewer.