Welcome, visitor! Log in
 

Source View: pre_site_transient_{$transient}

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

  • Action hooks look like this: do_action( "hook_name" )
  • Filter hooks look like this: apply_filters( "hook_name", "what_to_filter" ).

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
3245  * @package WordPress
3246  * @subpackage Transient
3247  *
3248  * @param string $transient Transient name. Expected to not be SQL-escaped
3249  * @return mixed Value of transient
3250  */
3251 function get_site_transient($transient) {
3252      global $_wp_using_ext_object_cache, $wpdb;
3253
3254      $pre = apply_filters( 'pre_site_transient_' . $transient, false );
3255      if ( false !== $pre )
3256           return $pre;
3257
3258      if ( $_wp_using_ext_object_cache ) {
3259           $value = wp_cache_get($transient, 'site-transient');
3260      } else {
3261           $transient_option = '_site_transient_' . esc_sql($transient);
3262           $transient_timeout = '_site_transient_timeout_' . esc_sql($transient);
3263           if ( get_site_option($transient_timeout) < time() ) {