WordPress.org

Make WordPress Core

Changeset 14639


Ignore:
Timestamp:
05/14/10 16:46:53 (5 years ago)
Author:
westi
Message:

Introduce return_zero() and use it instead of create_function in the login header.
Also add version info to
return_true and return_false.

Location:
trunk
Files:
2 edited

Legend:

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

    r14581 r14639  
    41294129 * Useful for returning true to filters easily 
    41304130 * 
     4131 * @since 3.0.0 
    41314132 * @see __return_false() 
    41324133 * @return bool true 
     
    41414142 * Useful for returning false to filters easily 
    41424143 * 
     4144 * @since 3.0.0 
    41434145 * @see __return_true() 
    41444146 * @return bool false 
     
    41464148function __return_false() { 
    41474149    return false; 
     4150} 
     4151 
     4152/** 
     4153 * Returns 0 
     4154 * 
     4155 * Useful for returning 0 to filters easily 
     4156 * 
     4157 * @since 3.0.0 
     4158 * @see __return_zero() 
     4159 * @return int 0 
     4160 */ 
     4161function __return_zero() { 
     4162    return 0; 
    41484163} 
    41494164 
  • trunk/wp-login.php

    r14556 r14639  
    4343 
    4444    // Don't index any of these forms 
    45     add_filter( 'pre_option_blog_public', create_function( '$a', 'return 0;' ) ); 
     45    add_filter( 'pre_option_blog_public', '__return_zero' ); 
    4646    add_action( 'login_head', 'noindex' ); 
    4747 
Note: See TracChangeset for help on using the changeset viewer.