mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
User lowercase true, false, null instead of uppercase. Props c3mdigital, mfields. fixes #16302
git-svn-id: http://svn.automattic.com/wordpress/trunk@19687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
965a71033e
commit
83b131f8e3
@ -12,16 +12,16 @@
|
||||
* @since 2.3.2
|
||||
*/
|
||||
if ( ! defined('WP_ADMIN') )
|
||||
define('WP_ADMIN', TRUE);
|
||||
define('WP_ADMIN', true);
|
||||
|
||||
if ( ! defined('WP_NETWORK_ADMIN') )
|
||||
define('WP_NETWORK_ADMIN', FALSE);
|
||||
define('WP_NETWORK_ADMIN', false);
|
||||
|
||||
if ( ! defined('WP_USER_ADMIN') )
|
||||
define('WP_USER_ADMIN', FALSE);
|
||||
define('WP_USER_ADMIN', false);
|
||||
|
||||
if ( ! WP_NETWORK_ADMIN && ! WP_USER_ADMIN ) {
|
||||
define('WP_BLOG_ADMIN', TRUE);
|
||||
define('WP_BLOG_ADMIN', true);
|
||||
}
|
||||
|
||||
if ( isset($_GET['import']) && !defined('WP_LOAD_IMPORTERS') )
|
||||
|
@ -104,7 +104,7 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
|
||||
global $_wp_additional_image_sizes;
|
||||
|
||||
foreach ( get_intermediate_image_sizes() as $s ) {
|
||||
$sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => FALSE );
|
||||
$sizes[$s] = array( 'width' => '', 'height' => '', 'crop' => false );
|
||||
if ( isset( $_wp_additional_image_sizes[$s]['width'] ) )
|
||||
$sizes[$s]['width'] = intval( $_wp_additional_image_sizes[$s]['width'] ); // For theme-added sizes
|
||||
else
|
||||
|
@ -863,7 +863,7 @@ function uninstall_plugin($plugin) {
|
||||
*
|
||||
* @return string The resulting page's hook_suffix
|
||||
*/
|
||||
function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = NULL ) {
|
||||
function add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = null ) {
|
||||
global $menu, $admin_page_hooks, $_registered_pages, $_parent_pages;
|
||||
|
||||
$menu_slug = plugin_basename( $menu_slug );
|
||||
|
@ -1142,7 +1142,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
|
||||
* @param int $thumbnail_id ID of the attachment used for thumbnail
|
||||
* @return string html
|
||||
*/
|
||||
function _wp_post_thumbnail_html( $thumbnail_id = NULL ) {
|
||||
function _wp_post_thumbnail_html( $thumbnail_id = null ) {
|
||||
global $content_width, $_wp_additional_image_sizes, $post_ID;
|
||||
$set_thumbnail_link = '<p class="hide-if-no-js"><a title="' . esc_attr__( 'Set featured image' ) . '" href="' . esc_url( get_upload_iframe_src('image') ) . '" id="set-post-thumbnail" class="thickbox">%s</a></p>';
|
||||
$content = sprintf($set_thumbnail_link, esc_html__( 'Set featured image' ));
|
||||
|
@ -1198,7 +1198,7 @@ function add_settings_error( $setting, $code, $message, $type = 'error' ) {
|
||||
* @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
|
||||
* @return array Array of settings errors
|
||||
*/
|
||||
function get_settings_errors( $setting = '', $sanitize = FALSE ) {
|
||||
function get_settings_errors( $setting = '', $sanitize = false ) {
|
||||
global $wp_settings_errors;
|
||||
|
||||
// If $sanitize is true, manually re-run the sanitizisation for this option
|
||||
@ -1250,7 +1250,7 @@ function get_settings_errors( $setting = '', $sanitize = FALSE ) {
|
||||
* @param boolean $sanitize Whether to re-sanitize the setting value before returning errors.
|
||||
* @param boolean $hide_on_update If set to true errors will not be shown if the settings page has already been submitted.
|
||||
*/
|
||||
function settings_errors( $setting = '', $sanitize = FALSE, $hide_on_update = FALSE ) {
|
||||
function settings_errors( $setting = '', $sanitize = false, $hide_on_update = false ) {
|
||||
|
||||
if ($hide_on_update AND $_GET['settings-updated']) return;
|
||||
|
||||
@ -1587,7 +1587,7 @@ function compression_test() {
|
||||
* Defaults to no other attributes. Other attributes can also be provided as a
|
||||
* string such as 'tabindex="1"', though the array format is typically cleaner.
|
||||
*/
|
||||
function submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = NULL ) {
|
||||
function submit_button( $text = null, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = null ) {
|
||||
echo get_submit_button( $text, $type, $name, $wrap, $other_attributes );
|
||||
}
|
||||
|
||||
@ -1608,7 +1608,7 @@ function submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap
|
||||
* Defaults to no other attributes. Other attributes can also be provided as a
|
||||
* string such as 'tabindex="1"', though the array format is typically cleaner.
|
||||
*/
|
||||
function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = NULL ) {
|
||||
function get_submit_button( $text = null, $type = 'primary', $name = 'submit', $wrap = true, $other_attributes = null ) {
|
||||
switch ( $type ) :
|
||||
case 'primary' :
|
||||
case 'secondary' :
|
||||
@ -1620,7 +1620,7 @@ function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit', $
|
||||
default :
|
||||
$class = $type; // Custom cases can just pass in the classes they want to be used
|
||||
endswitch;
|
||||
$text = ( NULL == $text ) ? __( 'Save Changes' ) : $text;
|
||||
$text = ( null == $text ) ? __( 'Save Changes' ) : $text;
|
||||
|
||||
// Default the id attribute to $name unless an id was specifically provided in $other_attributes
|
||||
$id = $name;
|
||||
|
@ -1404,7 +1404,7 @@ function __get_option($setting) {
|
||||
$option = preg_replace('|/+$|', '', $option);
|
||||
|
||||
@ $kellogs = unserialize($option);
|
||||
if ($kellogs !== FALSE)
|
||||
if ($kellogs !== false)
|
||||
return $kellogs;
|
||||
else
|
||||
return $option;
|
||||
|
@ -7,7 +7,7 @@
|
||||
* @since 3.1.0
|
||||
*/
|
||||
|
||||
define( 'WP_NETWORK_ADMIN', TRUE );
|
||||
define( 'WP_NETWORK_ADMIN', true );
|
||||
|
||||
/** Load WordPress Administration Bootstrap */
|
||||
require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );
|
||||
|
@ -86,7 +86,7 @@ case 'update':
|
||||
if (is_writeable($file)) {
|
||||
//is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable
|
||||
$f = fopen($file, 'w+');
|
||||
if ($f !== FALSE) {
|
||||
if ($f !== false) {
|
||||
fwrite($f, $newcontent);
|
||||
fclose($f);
|
||||
$location = "theme-editor.php?file=$file&theme=$theme&a=te&scrollto=$scrollto";
|
||||
|
@ -7,7 +7,7 @@
|
||||
* @since 3.1.0
|
||||
*/
|
||||
|
||||
define('WP_USER_ADMIN', TRUE);
|
||||
define('WP_USER_ADMIN', true);
|
||||
|
||||
require_once( dirname(dirname(__FILE__)) . '/admin.php');
|
||||
|
||||
|
12
wp-app.php
12
wp-app.php
@ -615,7 +615,7 @@ EOD;
|
||||
$slug = substr( md5( uniqid( microtime() ) ), 0, 7);
|
||||
$ext = preg_replace( '|.*/([a-z0-9]+)|', '$1', $_SERVER['CONTENT_TYPE'] );
|
||||
$slug = sanitize_file_name( "$slug.$ext" );
|
||||
$file = wp_upload_bits( $slug, NULL, $bits);
|
||||
$file = wp_upload_bits( $slug, null, $bits);
|
||||
|
||||
log_app('wp_upload_bits returns:',print_r($file,true));
|
||||
|
||||
@ -1073,10 +1073,10 @@ EOD;
|
||||
|
||||
log_app('function',"total_count(# $wp_query->max_num_pages #)");
|
||||
$last_page = $wp_query->max_num_pages;
|
||||
$next_page = (($page + 1) > $last_page) ? NULL : $page + 1;
|
||||
$prev_page = ($page - 1) < 1 ? NULL : $page - 1;
|
||||
$last_page = ((int)$last_page == 1 || (int)$last_page == 0) ? NULL : (int) $last_page;
|
||||
$self_page = $page > 1 ? $page : NULL;
|
||||
$next_page = (($page + 1) > $last_page) ? null : $page + 1;
|
||||
$prev_page = ($page - 1) < 1 ? null : $page - 1;
|
||||
$last_page = ((int)$last_page == 1 || (int)$last_page == 0) ? null : (int) $last_page;
|
||||
$self_page = $page > 1 ? $page : null;
|
||||
?><feed xmlns="<?php echo $this->ATOM_NS ?>" xmlns:app="<?php echo $this->ATOMPUB_NS ?>" xml:lang="<?php echo get_option('rss_language'); ?>" <?php do_action('app_ns'); ?> >
|
||||
<id><?php $this->the_entries_url() ?></id>
|
||||
<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT'), false); ?></updated>
|
||||
@ -1527,7 +1527,7 @@ EOD;
|
||||
global $post;
|
||||
$post = wp_get_single_post($this->params[1]);
|
||||
$wp_last_modified = get_post_modified_time('D, d M Y H:i:s', true);
|
||||
$post = NULL;
|
||||
$post = null;
|
||||
break;
|
||||
case $this->ENTRIES_PATH:
|
||||
$wp_last_modified = mysql2date('D, d M Y H:i:s', get_lastpostmodified('GMT'), 0).' GMT';
|
||||
|
@ -496,7 +496,7 @@ class WP_Object_Cache {
|
||||
if ( empty ($group) )
|
||||
$group = 'default';
|
||||
|
||||
if ( NULL === $data )
|
||||
if ( null === $data )
|
||||
$data = '';
|
||||
|
||||
if ( is_object($data) )
|
||||
|
@ -395,7 +395,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
||||
$requested_url = preg_replace_callback('|%[a-fA-F0-9][a-fA-F0-9]|', 'lowercase_octets', $requested_url);
|
||||
}
|
||||
|
||||
// Note that you can use the "redirect_canonical" filter to cancel a canonical redirect for whatever reason by returning FALSE
|
||||
// Note that you can use the "redirect_canonical" filter to cancel a canonical redirect for whatever reason by returning false
|
||||
$redirect_url = apply_filters('redirect_canonical', $redirect_url, $requested_url);
|
||||
|
||||
if ( !$redirect_url || $redirect_url == $requested_url ) // yes, again -- in case the filter aborted the request
|
||||
|
@ -1490,7 +1490,7 @@ class WP_Http_Cookie {
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param string $url URL you intend to send this cookie to
|
||||
* @return boolean TRUE if allowed, FALSE otherwise.
|
||||
* @return boolean true if allowed, false otherwise.
|
||||
*/
|
||||
function test( $url ) {
|
||||
// Expires - if expired then nothing else matters
|
||||
|
@ -3078,7 +3078,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
$name = "wpid{$old_file->ID}-{$filename}";
|
||||
}
|
||||
|
||||
$upload = wp_upload_bits($name, NULL, $bits);
|
||||
$upload = wp_upload_bits($name, null, $bits);
|
||||
if ( ! empty($upload['error']) ) {
|
||||
$errorString = sprintf(__('Could not write file %1$s (%2$s)'), $name, $upload['error']);
|
||||
logIO('O', '(MW) ' . $errorString);
|
||||
|
@ -769,7 +769,7 @@ function trackback_rdf( $deprecated = '' ) {
|
||||
* @param int $post_id An optional post ID to check instead of the current post.
|
||||
* @return bool True if the comments are open
|
||||
*/
|
||||
function comments_open( $post_id=NULL ) {
|
||||
function comments_open( $post_id = null ) {
|
||||
|
||||
$_post = get_post($post_id);
|
||||
|
||||
@ -786,7 +786,7 @@ function comments_open( $post_id=NULL ) {
|
||||
* @param int $post_id An optional post ID to check instead of the current post.
|
||||
* @return bool True if pings are accepted
|
||||
*/
|
||||
function pings_open( $post_id = NULL ) {
|
||||
function pings_open( $post_id = null ) {
|
||||
|
||||
$_post = get_post($post_id);
|
||||
|
||||
@ -899,10 +899,10 @@ function comments_template( $file = '/comments.php', $separate_comments = false
|
||||
$comments_by_type = &$wp_query->comments_by_type;
|
||||
}
|
||||
|
||||
$overridden_cpage = FALSE;
|
||||
$overridden_cpage = false;
|
||||
if ( '' == get_query_var('cpage') && get_option('page_comments') ) {
|
||||
set_query_var( 'cpage', 'newest' == get_option('default_comments_page') ? get_comment_pages_count() : 1 );
|
||||
$overridden_cpage = TRUE;
|
||||
$overridden_cpage = true;
|
||||
}
|
||||
|
||||
if ( !defined('COMMENTS_TEMPLATE') || !COMMENTS_TEMPLATE)
|
||||
@ -1191,7 +1191,7 @@ function comment_id_fields( $id = 0 ) {
|
||||
* @param string $replytext Optional. Text to display when replying to a comment. Accepts "%s" for the author of the comment being replied to.
|
||||
* @param string $linktoparent Optional. Boolean to control making the author's name a link to their comment.
|
||||
*/
|
||||
function comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = TRUE ) {
|
||||
function comment_form_title( $noreplytext = false, $replytext = false, $linktoparent = true ) {
|
||||
global $comment;
|
||||
|
||||
if ( false === $noreplytext ) $noreplytext = __( 'Leave a Reply' );
|
||||
|
@ -1134,7 +1134,7 @@ function wp_get_comment_status($comment_id) {
|
||||
|
||||
$approved = $comment->comment_approved;
|
||||
|
||||
if ( $approved == NULL )
|
||||
if ( $approved == null )
|
||||
return false;
|
||||
elseif ( $approved == '1' )
|
||||
return 'approved';
|
||||
|
@ -673,7 +673,7 @@ function _http_build_query($data, $prefix=null, $sep=null, $key='', $urlencode=t
|
||||
$k = $prefix.$k;
|
||||
if ( !empty($key) )
|
||||
$k = $key . '%5B' . $k . '%5D';
|
||||
if ( $v === NULL )
|
||||
if ( $v === null )
|
||||
continue;
|
||||
elseif ( $v === FALSE )
|
||||
$v = '0';
|
||||
@ -686,7 +686,7 @@ function _http_build_query($data, $prefix=null, $sep=null, $key='', $urlencode=t
|
||||
array_push($ret, $k.'='.$v);
|
||||
}
|
||||
|
||||
if ( NULL === $sep )
|
||||
if ( null === $sep )
|
||||
$sep = ini_get('arg_separator.output');
|
||||
|
||||
return implode($sep, $ret);
|
||||
|
@ -45,7 +45,7 @@ function wp_print_scripts( $handles = false ) {
|
||||
* @param string $handle Script name
|
||||
* @param string $src Script url
|
||||
* @param array $deps (optional) Array of script names on which this script depends
|
||||
* @param string|bool $ver (optional) Script version (used for cache busting), set to NULL to disable
|
||||
* @param string|bool $ver (optional) Script version (used for cache busting), set to null to disable
|
||||
* @param bool $in_footer (optional) Whether to enqueue the script before </head> or before </body>
|
||||
* @return null
|
||||
*/
|
||||
|
@ -74,7 +74,7 @@ function wp_add_inline_style( $handle, $data ) {
|
||||
* @param string|bool $src Path to the stylesheet from the root directory of WordPress. Example: '/css/mystyle.css'.
|
||||
* @param array $deps Array of handles of any stylesheet that this stylesheet depends on.
|
||||
* (Stylesheets that must be loaded before this stylesheet.) Pass an empty array if there are no dependencies.
|
||||
* @param string|bool $ver String specifying the stylesheet version number. Set to NULL to disable.
|
||||
* @param string|bool $ver String specifying the stylesheet version number. Set to null to disable.
|
||||
* Used to ensure that the correct version is sent to the client regardless of caching.
|
||||
* @param string $media The media for which this stylesheet has been defined.
|
||||
*/
|
||||
|
@ -2065,7 +2065,7 @@ function wp_admin_css_uri( $file = 'wp-admin' ) {
|
||||
* "Intelligently" decides to enqueue or to print the CSS file. If the
|
||||
* 'wp_print_styles' action has *not* yet been called, the CSS file will be
|
||||
* enqueued. If the wp_print_styles action *has* been called, the CSS link will
|
||||
* be printed. Printing may be forced by passing TRUE as the $force_echo
|
||||
* be printed. Printing may be forced by passing true as the $force_echo
|
||||
* (second) parameter.
|
||||
*
|
||||
* For backward compatibility with WordPress 2.3 calling method: If the $file
|
||||
|
@ -763,7 +763,7 @@ function wp_kses_hair($attr, $allowed_protocols) {
|
||||
{
|
||||
$working = 1;
|
||||
$mode = 0;
|
||||
if(FALSE === array_key_exists($attrname, $attrarr)) {
|
||||
if(false === array_key_exists($attrname, $attrarr)) {
|
||||
$attrarr[$attrname] = array ('name' => $attrname, 'value' => '', 'whole' => $attrname, 'vless' => 'y');
|
||||
}
|
||||
$attr = preg_replace('/^\s+/', '', $attr);
|
||||
@ -780,7 +780,7 @@ function wp_kses_hair($attr, $allowed_protocols) {
|
||||
if ( in_array(strtolower($attrname), $uris) )
|
||||
$thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
|
||||
|
||||
if(FALSE === array_key_exists($attrname, $attrarr)) {
|
||||
if(false === array_key_exists($attrname, $attrarr)) {
|
||||
$attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname=\"$thisval\"", 'vless' => 'n');
|
||||
}
|
||||
$working = 1;
|
||||
@ -796,7 +796,7 @@ function wp_kses_hair($attr, $allowed_protocols) {
|
||||
if ( in_array(strtolower($attrname), $uris) )
|
||||
$thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
|
||||
|
||||
if(FALSE === array_key_exists($attrname, $attrarr)) {
|
||||
if(false === array_key_exists($attrname, $attrarr)) {
|
||||
$attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname='$thisval'", 'vless' => 'n');
|
||||
}
|
||||
$working = 1;
|
||||
@ -812,7 +812,7 @@ function wp_kses_hair($attr, $allowed_protocols) {
|
||||
if ( in_array(strtolower($attrname), $uris) )
|
||||
$thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
|
||||
|
||||
if(FALSE === array_key_exists($attrname, $attrarr)) {
|
||||
if(false === array_key_exists($attrname, $attrarr)) {
|
||||
$attrarr[$attrname] = array ('name' => $attrname, 'value' => $thisval, 'whole' => "$attrname=\"$thisval\"", 'vless' => 'n');
|
||||
}
|
||||
# We add quotes to conform to W3C's HTML spec.
|
||||
@ -831,7 +831,7 @@ function wp_kses_hair($attr, $allowed_protocols) {
|
||||
}
|
||||
} # while
|
||||
|
||||
if ($mode == 1 && FALSE === array_key_exists($attrname, $attrarr))
|
||||
if ($mode == 1 && false === array_key_exists($attrname, $attrarr))
|
||||
# special case, for when the attribute list ends with a valueless
|
||||
# attribute like "selected"
|
||||
$attrarr[$attrname] = array ('name' => $attrname, 'value' => '', 'whole' => $attrname, 'vless' => 'y');
|
||||
@ -938,7 +938,7 @@ function wp_kses_bad_protocol($string, $allowed_protocols) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes any NULL characters in $string.
|
||||
* Removes any null characters in $string.
|
||||
*
|
||||
* @since 1.0.0
|
||||
*
|
||||
|
@ -2363,7 +2363,7 @@ function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) {
|
||||
$text = __('This is the short link.');
|
||||
|
||||
if ( empty( $title ) )
|
||||
$title = the_title_attribute( array( 'echo' => FALSE ) );
|
||||
$title = the_title_attribute( array( 'echo' => false ) );
|
||||
|
||||
$shortlink = wp_get_shortlink( $post->ID );
|
||||
|
||||
|
@ -1418,7 +1418,7 @@ function wp_hash_password($password) {
|
||||
if ( empty($wp_hasher) ) {
|
||||
require_once( ABSPATH . 'wp-includes/class-phpass.php');
|
||||
// By default, use the portable hash from phpass
|
||||
$wp_hasher = new PasswordHash(8, TRUE);
|
||||
$wp_hasher = new PasswordHash(8, true);
|
||||
}
|
||||
|
||||
return $wp_hasher->HashPassword($password);
|
||||
@ -1466,7 +1466,7 @@ function wp_check_password($password, $hash, $user_id = '') {
|
||||
if ( empty($wp_hasher) ) {
|
||||
require_once( ABSPATH . 'wp-includes/class-phpass.php');
|
||||
// By default, use the portable hash from phpass
|
||||
$wp_hasher = new PasswordHash(8, TRUE);
|
||||
$wp_hasher = new PasswordHash(8, true);
|
||||
}
|
||||
|
||||
$check = $wp_hasher->CheckPassword($password, $hash);
|
||||
|
@ -2928,7 +2928,7 @@ class WP_Query {
|
||||
if ( isset($this->queried_object) )
|
||||
return $this->queried_object;
|
||||
|
||||
$this->queried_object = NULL;
|
||||
$this->queried_object = null;
|
||||
$this->queried_object_id = 0;
|
||||
|
||||
if ( $this->is_category || $this->is_tag || $this->is_tax ) {
|
||||
|
@ -235,7 +235,7 @@ function do_shortcode_tag( $m ) {
|
||||
return $m[1] . call_user_func( $shortcode_tags[$tag], $attr, $m[5], $tag ) . $m[6];
|
||||
} else {
|
||||
// self-closing tag
|
||||
return $m[1] . call_user_func( $shortcode_tags[$tag], $attr, NULL, $tag ) . $m[6];
|
||||
return $m[1] . call_user_func( $shortcode_tags[$tag], $attr, null, $tag ) . $m[6];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1279,7 +1279,7 @@ function switch_theme($template, $stylesheet) {
|
||||
*
|
||||
* Does not check the default theme, which is the fallback and should always exist.
|
||||
* Will switch theme to the fallback theme if current theme does not validate.
|
||||
* You can use the 'validate_current_theme' filter to return FALSE to
|
||||
* You can use the 'validate_current_theme' filter to return false to
|
||||
* disable this functionality.
|
||||
*
|
||||
* @since 1.5.0
|
||||
|
@ -153,7 +153,7 @@ function wp_authenticate_cookie($user, $username, $password) {
|
||||
function count_user_posts($userid) {
|
||||
global $wpdb;
|
||||
|
||||
$where = get_posts_by_author_sql('post', TRUE, $userid);
|
||||
$where = get_posts_by_author_sql('post', true, $userid);
|
||||
|
||||
$count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts $where" );
|
||||
|
||||
@ -853,7 +853,7 @@ function count_users($strategy = 'time') {
|
||||
// Build a CPU-intensive query that will return concise information.
|
||||
$select_count = array();
|
||||
foreach ( $avail_roles as $this_role => $name ) {
|
||||
$select_count[] = "COUNT(NULLIF(`meta_value` LIKE '%" . like_escape($this_role) . "%', FALSE))";
|
||||
$select_count[] = "COUNT(NULLIF(`meta_value` LIKE '%" . like_escape($this_role) . "%', false))";
|
||||
}
|
||||
$select_count = implode(', ', $select_count);
|
||||
|
||||
|
@ -603,7 +603,7 @@ default:
|
||||
$errors->add('test_cookie', __("<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href='http://www.google.com/cookies.html'>enable cookies</a> to use WordPress."));
|
||||
|
||||
// Some parts of this script use the main login form to display a message
|
||||
if ( isset($_GET['loggedout']) && TRUE == $_GET['loggedout'] )
|
||||
if ( isset($_GET['loggedout']) && true == $_GET['loggedout'] )
|
||||
$errors->add('loggedout', __('You are now logged out.'), 'message');
|
||||
elseif ( isset($_GET['registration']) && 'disabled' == $_GET['registration'] )
|
||||
$errors->add('registerdisabled', __('User registration is currently not allowed.'));
|
||||
|
Loading…
Reference in New Issue
Block a user