From a14d289755fa2376148c935dbcd0e929409a3c89 Mon Sep 17 00:00:00 2001 From: dd32 Date: Wed, 30 Jun 2010 00:05:18 +0000 Subject: [PATCH] Alot more tabs. Props jacobsantos & Viper007bond. See #14147 git-svn-id: http://svn.automattic.com/wordpress/trunk@15355 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/capabilities.php | 2 +- wp-includes/category-template.php | 4 ++-- wp-includes/comment-template.php | 14 ++++++------- wp-includes/cron.php | 8 ++++---- wp-includes/formatting.php | 2 +- wp-includes/functions.php | 6 +++--- wp-includes/general-template.php | 2 +- wp-includes/link-template.php | 2 +- wp-includes/post-thumbnail-template.php | 2 +- wp-includes/post.php | 10 +++++----- wp-includes/taxonomy.php | 26 ++++++++++++------------- wp-includes/user.php | 4 ++-- wp-includes/wp-db.php | 4 ++-- 13 files changed, 43 insertions(+), 43 deletions(-) diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index ea8ba0ed1..22974b6f4 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -1079,7 +1079,7 @@ function current_user_can( $capability ) { function current_user_can_for_blog( $blog_id, $capability ) { $current_user = wp_get_current_user(); - if ( is_multisite() && is_super_admin() ) + if ( is_multisite() && is_super_admin() ) return true; if ( empty( $current_user ) ) diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index db55a12c7..4f8e03ea4 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -731,9 +731,9 @@ function wp_generate_tag_cloud( $tags, $args = '' ) { break; endswitch; - if ( $filter ) + if ( $filter ) return apply_filters( 'wp_generate_tag_cloud', $return, $tags, $args ); - else + else return $return; } diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 4bc9edb8d..ecc39162f 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -678,9 +678,9 @@ function get_comment_type( $comment_ID = 0 ) { * @param string $pingbacktxt The string to display for pingback type */ function comment_type($commenttxt = false, $trackbacktxt = false, $pingbacktxt = false) { - if ( false === $commenttxt ) $commenttxt = _x( 'Comment', 'noun' ); - if ( false === $trackbacktxt ) $trackbacktxt = __( 'Trackback' ); - if ( false === $pingbacktxt ) $pingbacktxt = __( 'Pingback' ); + if ( false === $commenttxt ) $commenttxt = _x( 'Comment', 'noun' ); + if ( false === $trackbacktxt ) $trackbacktxt = __( 'Trackback' ); + if ( false === $pingbacktxt ) $pingbacktxt = __( 'Pingback' ); $type = get_comment_type(); switch( $type ) { case 'trackback' : @@ -946,10 +946,10 @@ function comments_popup_script($width=400, $height=400, $file='') { function comments_popup_link( $zero = false, $one = false, $more = false, $css_class = '', $none = false ) { global $id, $wpcommentspopupfile, $wpcommentsjavascript; - if ( false === $zero ) $zero = __( 'No Comments' ); - if ( false === $one ) $one = __( '1 Comment' ); - if ( false === $more ) $more = __( '% Comments' ); - if ( false === $none ) $none = __( 'Comments Off' ); + if ( false === $zero ) $zero = __( 'No Comments' ); + if ( false === $one ) $one = __( '1 Comment' ); + if ( false === $more ) $more = __( '% Comments' ); + if ( false === $none ) $none = __( 'Comments Off' ); $number = get_comments_number( $id ); diff --git a/wp-includes/cron.php b/wp-includes/cron.php index 921f8c866..312636290 100644 --- a/wp-includes/cron.php +++ b/wp-includes/cron.php @@ -90,10 +90,10 @@ function wp_reschedule_event( $timestamp, $recurrence, $hook, $args = array()) { $now = time(); - if ( $timestamp >= $now ) - $timestamp = $now + $interval; - else - $timestamp = $now + ($interval - (($now - $timestamp) % $interval)); + if ( $timestamp >= $now ) + $timestamp = $now + $interval; + else + $timestamp = $now + ($interval - (($now - $timestamp) % $interval)); wp_schedule_event( $timestamp, $recurrence, $hook, $args ); } diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 0004673c6..b20fb6c07 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -2826,7 +2826,7 @@ function sanitize_text_field($str) { * @since 3.0.0 */ function capital_P_dangit( $text ) { - return str_replace( 'Wordpress', 'WordPress', $text ); + return str_replace( 'Wordpress', 'WordPress', $text ); } ?> diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 3b7cf1a04..9a54c0837 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -669,7 +669,7 @@ function delete_option( $option ) { function delete_transient( $transient ) { global $_wp_using_ext_object_cache; - do_action( 'delete_transient_' . $transient, $transient ); + do_action( 'delete_transient_' . $transient, $transient ); if ( $_wp_using_ext_object_cache ) { $result = wp_cache_delete( $transient, 'transient' ); @@ -757,7 +757,7 @@ function get_transient( $transient ) { function set_transient( $transient, $value, $expiration = 0 ) { global $_wp_using_ext_object_cache; - $value = apply_filters( 'pre_set_transient_' . $transient, $value ); + $value = apply_filters( 'pre_set_transient_' . $transient, $value ); if ( $_wp_using_ext_object_cache ) { $result = wp_cache_set( $transient, $value, 'transient', $expiration ); @@ -3784,7 +3784,7 @@ function get_site_transient( $transient ) { function set_site_transient( $transient, $value, $expiration = 0 ) { global $_wp_using_ext_object_cache; - $value = apply_filters( 'pre_set_site_transient_' . $transient, $value ); + $value = apply_filters( 'pre_set_site_transient_' . $transient, $value ); if ( $_wp_using_ext_object_cache ) { $result = wp_cache_set( $transient, $value, 'site-transient', $expiration ); diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index b3712425d..306c9a092 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -1542,7 +1542,7 @@ function the_weekday() { * * @param string $before Optional Output before the date. * @param string $after Optional Output after the date. - */ + */ function the_weekday_date($before='',$after='') { global $wp_locale, $post, $day, $previousweekday; $the_weekday_date = ''; diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 0b92174d0..9e37cd4a2 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -2228,7 +2228,7 @@ function wp_shortlink_wp_head() { * @uses wp_get_shortlink() */ function wp_shortlink_header() { - if ( headers_sent() ) + if ( headers_sent() ) return; $shortlink = wp_get_shortlink(0, 'query'); diff --git a/wp-includes/post-thumbnail-template.php b/wp-includes/post-thumbnail-template.php index 547d4e170..e15e29354 100644 --- a/wp-includes/post-thumbnail-template.php +++ b/wp-includes/post-thumbnail-template.php @@ -57,7 +57,7 @@ function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) { * @param int $post_id Optional. Post ID. * @param string $size Optional. Image size. Defaults to 'thumbnail'. * @param string|array $attr Optional. Query string or array of attributes. - */ + */ function get_the_post_thumbnail( $post_id = NULL, $size = 'post-thumbnail', $attr = '' ) { global $id; $post_id = ( NULL === $post_id ) ? $id : $post_id; diff --git a/wp-includes/post.php b/wp-includes/post.php index 00d7ac6f5..986d3ba65 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -3505,7 +3505,7 @@ function wp_delete_attachment( $post_id, $force_delete = false ) { foreach ( $backup_sizes as $size ) { $del_file = path_join( dirname($meta['file']), $size['file'] ); $del_file = apply_filters('wp_delete_file', $del_file); - @ unlink( path_join($uploadpath['basedir'], $del_file) ); + @ unlink( path_join($uploadpath['basedir'], $del_file) ); } } @@ -3578,10 +3578,10 @@ function wp_get_attachment_url( $post_id = 0 ) { if ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) { //Get upload directory if ( 0 === strpos($file, $uploads['basedir']) ) //Check that the upload base exists in the file location $url = str_replace($uploads['basedir'], $uploads['baseurl'], $file); //replace file location with url location - elseif ( false !== strpos($file, 'wp-content/uploads') ) - $url = $uploads['baseurl'] . substr( $file, strpos($file, 'wp-content/uploads') + 18 ); - else - $url = $uploads['baseurl'] . "/$file"; //Its a newly uploaded file, therefor $file is relative to the basedir. + elseif ( false !== strpos($file, 'wp-content/uploads') ) + $url = $uploads['baseurl'] . substr( $file, strpos($file, 'wp-content/uploads') + 18 ); + else + $url = $uploads['baseurl'] . "/$file"; //Its a newly uploaded file, therefor $file is relative to the basedir. } } diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 69f9c2863..4c501af5e 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -981,22 +981,22 @@ function &get_terms($taxonomies, $args = '') { $selects = array(); switch ( $fields ) { - case 'all': - $selects = array('t.*', 'tt.*'); - break; - case 'ids': + case 'all': + $selects = array('t.*', 'tt.*'); + break; + case 'ids': case 'id=>parent': - $selects = array('t.term_id', 'tt.parent', 'tt.count'); - break; - case 'names': - $selects = array('t.term_id', 'tt.parent', 'tt.count', 't.name'); - break; - case 'count': + $selects = array('t.term_id', 'tt.parent', 'tt.count'); + break; + case 'names': + $selects = array('t.term_id', 'tt.parent', 'tt.count', 't.name'); + break; + case 'count': $orderby = ''; $order = ''; - $selects = array('COUNT(*)'); - } - $select_this = implode(', ', apply_filters( 'get_terms_fields', $selects, $args )); + $selects = array('COUNT(*)'); + } + $select_this = implode(', ', apply_filters( 'get_terms_fields', $selects, $args )); $query = "SELECT $select_this FROM $wpdb->terms AS t INNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ($in_taxonomies) $where $orderby $order $limit"; diff --git a/wp-includes/user.php b/wp-includes/user.php index 66d5d2e96..2157c92cf 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -752,11 +752,11 @@ function _fill_many_users( &$users ) { $ids[] = $user_object->ID; } - $metas = get_user_metavalues($ids); + $metas = get_user_metavalues($ids); foreach($users as $user_object) { if (isset($metas[$user_object->ID])) { - _fill_single_user($user_object, $metas[$user_object->ID]); + _fill_single_user($user_object, $metas[$user_object->ID]); } } } diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 6630efcf3..790c3a9b4 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -790,8 +790,8 @@ class wpdb { /** * Escape data. Works on arrays. * - * @uses wpdb::_escape() - * @uses wpdb::_real_escape() + * @uses wpdb::_escape() + * @uses wpdb::_real_escape() * @since 2.8 * @access private *