Strip trailing whitespace

git-svn-id: https://develop.svn.wordpress.org/trunk@10150 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-12-09 18:03:31 +00:00
parent f0f4bd82b2
commit baaaa352ba
96 changed files with 336 additions and 336 deletions

View File

@@ -97,7 +97,7 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
$target = ' target="' . $target . '"';
$output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';
$output .= $link_before;
if ( $bookmark->link_image != null && $show_images ) {
@@ -107,12 +107,12 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
$output .= "<img src=\"" . get_option('siteurl') . "$bookmark->link_image\" $alt $title />";
if ($show_name) $output .= $name;
} else {
$output .= $name;
} else {
$output .= $name;
}
$output .= $link_after;
$output .= '</a>';
if ( $show_updated && $bookmark->recently_updated )

View File

@@ -33,7 +33,7 @@ function get_bookmark($bookmark, $output = OBJECT, $filter = 'raw') {
$_bookmark = & $GLOBALS['link'];
} elseif ( ! $_bookmark = wp_cache_get($bookmark, 'bookmark') ) {
$_bookmark = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->links WHERE link_id = %d LIMIT 1", $bookmark));
$_bookmark->link_category = array_unique( wp_get_object_terms($_bookmark->link_id, 'link_category', 'fields=ids') );
$_bookmark->link_category = array_unique( wp_get_object_terms($_bookmark->link_id, 'link_category', 'fields=ids') );
wp_cache_add($_bookmark->link_id, $_bookmark, 'bookmark');
}
}

View File

@@ -292,7 +292,7 @@ class WP_Role {
* @access public
*
* @param string $cap Capability name.
* @param bool $grant Whether role has capability privilege.
* @param bool $grant Whether role has capability privilege.
*/
function add_cap( $cap, $grant = true ) {
global $wp_roles;

View File

@@ -304,7 +304,7 @@ function in_category( $category ) {
return true;
else
return false;
}
/**
@@ -432,7 +432,7 @@ function wp_dropdown_categories( $args = '' ) {
* 'orderby' (string) default is 'ID' - What column to use for ordering the
* categories.
* 'order' (string) default is 'ASC' - What direction to order categories.
* 'show_last_update' (bool|int) default is 0 - See {@link
* 'show_last_update' (bool|int) default is 0 - See {@link
* walk_category_dropdown_tree()}
* 'show_count' (bool|int) default is 0 - Whether to show how many posts are
* in the category.
@@ -615,8 +615,8 @@ function default_topic_count_text( $count ) {
*
* The 'topic_count_text_callback' argument is a function, which given the count
* of the posts with that tag returns a text for the tooltip of the tag link.
* @see default_topic_count_text
*
* @see default_topic_count_text
*
*
* @todo Complete functionality.
* @since 2.3.0
@@ -632,16 +632,16 @@ function wp_generate_tag_cloud( $tags, $args = '' ) {
'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC',
'topic_count_text_callback' => 'default_topic_count_text',
);
if ( !isset( $args['topic_count_text_callback'] ) && isset( $args['single_text'] ) && isset( $args['multiple_text'] ) ) {
$body = 'return sprintf (
$body = 'return sprintf (
__ngettext('.var_export($args['single_text'], true).', '.var_export($args['multiple_text'], true).', $count),
number_format_i18n( $count ));';
$args['topic_count_text_callback'] = create_function('$count', $body);
}
$args = wp_parse_args( $args, $defaults );
extract( $args );
if ( empty( $tags ) )

View File

@@ -40,7 +40,7 @@ function &get_categories( $args = '' ) {
$defaults = array( 'type' => 'category' );
$args = wp_parse_args( $args, $defaults );
$taxonomy = apply_filters( 'get_categories_taxonomy', 'category', $args );
$taxonomy = apply_filters( 'get_categories_taxonomy', 'category', $args );
if ( 'link' == $args['type'] )
$taxonomy = 'link_category';
$categories = (array) get_terms( $taxonomy, $args );

View File

@@ -731,7 +731,7 @@ class Walker {
var $db_fields;
/**
* Max number of pages walked by the paged walker
* Max number of pages walked by the paged walker
*
* @since 2.7.0
* @var int
@@ -913,8 +913,8 @@ class Walker {
*/
if ( empty($top_level_elements) ) {
$first = array_slice( $elements, 0, 1 );
$root = $first[0];
$first = array_slice( $elements, 0, 1 );
$root = $first[0];
$top_level_elements = array();
$children_elements = array();

View File

@@ -796,7 +796,7 @@ function wp_comment_form_unfiltered_html_nonce() {
* @uses $withcomments Will not try to get the comments if the post has none.
*
* @param string $file Optional, default '/comments.php'. The file to load
* @param bool $separate_comments Optional, whether to separate the comments by comment type. Default is false.
* @param bool $separate_comments Optional, whether to separate the comments by comment type. Default is false.
* @return null Returns null if no comments appear
*/
function comments_template( $file = '/comments.php', $separate_comments = false ) {
@@ -985,7 +985,7 @@ function get_comment_reply_link($args = array(), $comment = null, $post = null)
if ( get_option('comment_registration') && !$user_ID )
$link = '<a rel="nofollow" href="' . site_url('wp-login.php?redirect_to=' . get_permalink()) . '">' . $login_text . '</a>';
else
else
$link = "<a rel='nofollow' href='" . wp_specialchars( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\")'>$reply_text</a>";
return apply_filters('comment_reply_link', $before . $link . $after, $args, $comment, $post);
@@ -1010,13 +1010,13 @@ function comment_reply_link($args = array(), $comment = null, $post = null) {
* Retrieve HTML content for cancel comment reply link.
*
* @since 2.7.0
*
*
* @param string $text Optional. Text to display for cancel reply link.
*/
function get_cancel_comment_reply_link($text = '') {
if ( empty($text) )
$text = __('Click here to cancel reply.');
$style = isset($_GET['replytocom']) ? '' : ' style="display:none;"';
$link = wp_specialchars( remove_query_arg('replytocom') ) . '#respond';
return apply_filters('cancel_comment_reply_link', '<a rel="nofollow" id="cancel-comment-reply-link" href="' . $link . '"' . $style . '>' . $text . '</a>', $link, $text);

View File

@@ -1496,7 +1496,7 @@ function trackback($trackback_url, $title, $excerpt, $ID) {
);
$response = wp_remote_post($trackback_url, $options);
if ( is_wp_error( $response ) )
return;

View File

@@ -401,11 +401,11 @@ function rss_enclosure() {
if ($key == 'enclosure') {
foreach ( (array) $val as $enc ) {
$enclosure = split("\n", $enc);
//only get the the first element eg, audio/mpeg from 'audio/mpeg mpga mp2 mp3'
$t = split('[ \t]', trim($enclosure[2]) );
$type = $t[0];
$t = split('[ \t]', trim($enclosure[2]) );
$type = $t[0];
echo apply_filters('rss_enclosure', '<enclosure url="' . trim(htmlspecialchars($enclosure[0])) . '" length="' . trim($enclosure[1]) . '" type="' . $type . '" />' . "\n");
}
}
@@ -500,7 +500,7 @@ function prep_atom_text_construct($data) {
function self_link() {
$host = @parse_url(get_option('home'));
$host = $host['host'];
echo clean_url(
echo clean_url(
'http'
. ( (isset($_SERVER['https']) && $_SERVER['https'] == 'on') ? 's' : '' ) . '://'
. $host

View File

@@ -535,7 +535,7 @@ function sanitize_title_with_dashes($title) {
* @since 2.5.1
*
* @param string $orderby Order by string to be checked.
* @return string|false Returns the order by clause if it is a match, false otherwise.
* @return string|false Returns the order by clause if it is a match, false otherwise.
*/
function sanitize_sql_orderby( $orderby ){
preg_match('/^\s*([a-z0-9_]+(\s+(ASC|DESC))?(\s*,\s*|\s*$))+|^\s*RAND\(\s*\)\s*$/i', $orderby, $obmatches);
@@ -881,7 +881,7 @@ function untrailingslashit($string) {
* @since 0.71
*
* @param string $gpc The string returned from HTTP request data.
* @return string Returns a string escaped with slashes.
* @return string Returns a string escaped with slashes.
*/
function addslashes_gpc($gpc) {
global $wpdb;
@@ -912,8 +912,8 @@ function stripslashes_deep($value) {
/**
* Navigates through an array and encodes the values to be used in a URL.
*
* Uses a callback to pass the value of the array back to the function as a
* string.
* Uses a callback to pass the value of the array back to the function as a
* string.
*
* @since 2.2.0
*
@@ -1195,7 +1195,7 @@ function get_date_from_gmt($string) {
* @since 1.5.0
*
* @param string $timezone Either 'Z' for 0 offset or '±hhmm'.
* @return int|float The offset in seconds.
* @return int|float The offset in seconds.
*/
function iso8601_timezone_to_offset($timezone) {
// $timezone is either 'Z' or '[+|-]hhmm'
@@ -1689,7 +1689,7 @@ function clean_url( $url, $protocols = null, $context = 'display' ) {
// Replace ampersands and single quotes only when displaying.
if ( 'display' == $context ) {
$url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&#038;$1', $url);
$url = str_replace( "'", '&#039;', $url );
$url = str_replace( "'", '&#039;', $url );
}
if ( !is_array($protocols) )
@@ -1805,7 +1805,7 @@ function wp_make_link_relative( $link ) {
* Sanitises various option values based on the nature of the option.
*
* This is basically a switch statement which will pass $value through a number
* of functions depending on the $option.
* of functions depending on the $option.
*
* @since 2.0.5
*

View File

@@ -425,7 +425,7 @@ function form_option( $option ) {
*
* This is different from wp_load_alloptions() in that this function does not
* cache its results and will retrieve all options from the database every time
*
*
* it is called.
*
* @since 1.0.0
@@ -1750,7 +1750,7 @@ function wp_mkdir_p( $target ) {
// If the above failed, attempt to create the parent node, then try again.
if ( ( $target != '/' ) && ( wp_mkdir_p( dirname( $target ) ) ) )
return wp_mkdir_p( $target );
return false;
}
@@ -2889,11 +2889,11 @@ function wp_suspend_cache_invalidation($suspend = true) {
/**
* Copy an object.
*
*
* Returns a cloned copy of an object.
*
*
* @since 2.7.0
*
*
* @param object $object The object to clone
* @return object The cloned object
*/

View File

@@ -111,7 +111,7 @@ function get_search_form() {
$form = '<form method="get" id="searchform" action="' . get_option('home') . '/" >
<label class="hidden" for="s">' . __('Search for:') . '</label>
<div><input type="text" value="' . attribute_escape(apply_filters('the_search_query', get_search_query())) . '" name="s" id="s" />
<input type="submit" id="searchsubmit" value="'.attribute_escape(__('Search')).'" />
<input type="submit" id="searchsubmit" value="'.attribute_escape(__('Search')).'" />
</div>
</form>';
@@ -144,13 +144,13 @@ function wp_loginout() {
* @since 2.7
* @uses wp_nonce_url() To protect against CSRF
* @uses site_url() To generate the log in URL
*
*
* @param string $redirect Path to redirect to on logout.
*/
function wp_logout_url($redirect = '') {
if ( strlen($redirect) )
$redirect = "&redirect_to=$redirect";
return wp_nonce_url( site_url("wp-login.php?action=logout$redirect", 'login'), 'log-out' );
}
@@ -161,13 +161,13 @@ function wp_logout_url($redirect = '') {
*
* @since 2.7
* @uses site_url() To generate the log in URL
*
*
* @param string $redirect Path to redirect to on login.
*/
function wp_login_url($redirect = '') {
if ( strlen($redirect) )
$redirect = "?redirect_to=$redirect";
return site_url("wp-login.php$redirect", 'login');
}
@@ -176,7 +176,7 @@ function wp_login_url($redirect = '') {
*
* Display a link which allows the user to navigate to the registration page if
* not logged in and registration is enabled or to the dashboard if logged in.
*
*
* @since 1.5.0
* @uses apply_filters() Calls 'register' hook on register / admin link content.
*
@@ -448,9 +448,9 @@ function wp_title($sep = '&raquo;', $display = true, $seplocation = '') {
}
if ( is_404() ) {
$title = __('Page not found');
$title = __('Page not found');
}
$prefix = '';
if ( !empty($title) )
$prefix = " $sep ";
@@ -872,7 +872,7 @@ function wp_get_archives($args = '') {
if ( $echo )
echo $output;
else
return $output;
return $output;
}
/**
@@ -1093,7 +1093,7 @@ function get_calendar($initial = true) {
/**
* Purge the cached results of get_calendar.
*
*
* @see get_calendar
* @since 2.1.0
*/
@@ -1488,7 +1488,7 @@ function the_editor($content, $id = 'content', $prev_id = 'title', $media_button
$richedit = user_can_richedit();
$rows = "rows='$rows'";
if ( $richedit || $media_buttons ) { ?>
<div id="editor-toolbar">
<?php if ( $richedit ) {
@@ -1563,7 +1563,7 @@ function get_search_query() {
/**
* Display the contents of the search query variable.
*
*
* The search query string is passed through {@link attribute_escape()}
* to ensure that it is safe for placing in an html attribute.
*
@@ -1822,8 +1822,8 @@ function wp_admin_css( $file = 'wp-admin', $force_echo = false ) {
}
/**
* Enqueues the default ThickBox js and css.
*
* Enqueues the default ThickBox js and css.
*
* If any of the settings need to be changed, this can be done with another js
* file similar to media-upload.js and theme-preview.js. That file should
* require array('thickbox') to ensure it is loaded after.

View File

@@ -153,7 +153,7 @@ class WP_Http {
foreach ( array('streams', 'fsockopen', 'exthttp') as $transport ) {
if ( isset($working_transport[$transport]) )
$nonblocking_transport[] = &$working_transport[$transport];
}
}
}
if ( isset($args['blocking']) && !$args['blocking'] )
@@ -222,7 +222,7 @@ class WP_Http {
$r = wp_parse_args( $args, $defaults );
$r = apply_filters( 'http_request_args', $r );
if ( is_null( $r['headers'] ) )
$r['headers'] = array();

View File

@@ -389,7 +389,7 @@ function edInsertImage(myField) {
}
// Allow multiple instances.
// Allow multiple instances.
// Name = unique value, id = textarea id, container = container div.
// Can disable some buttons by passing comma delimited string as 4th param.
var QTags = function(name, id, container, disabled) {
@@ -399,7 +399,7 @@ var QTags = function(name, id, container, disabled) {
t.Links = [];
t.OpenTags = [];
t.Canvas = document.getElementById(id);
if ( ! t.Canvas || ! cont )
return;

View File

@@ -597,7 +597,7 @@ function wp_kses_hair($attr, $allowed_protocols) {
# "value"
{
$thisval = $match[1];
if ( in_array($attrname, $uris) )
if ( in_array($attrname, $uris) )
$thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
if(FALSE === array_key_exists($attrname, $attrarr)) {
@@ -613,7 +613,7 @@ function wp_kses_hair($attr, $allowed_protocols) {
# 'value'
{
$thisval = $match[1];
if ( in_array($attrname, $uris) )
if ( in_array($attrname, $uris) )
$thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
if(FALSE === array_key_exists($attrname, $attrarr)) {
@@ -629,7 +629,7 @@ function wp_kses_hair($attr, $allowed_protocols) {
# value
{
$thisval = $match[1];
if ( in_array($attrname, $uris) )
if ( in_array($attrname, $uris) )
$thisval = wp_kses_bad_protocol($thisval, $allowed_protocols);
if(FALSE === array_key_exists($attrname, $attrarr)) {

View File

@@ -957,7 +957,7 @@ function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_cate
$title = apply_filters('the_title', $title, $post);
$date = mysql2date(get_option('date_format'), $post->post_date);
$string = '<a href="'.get_permalink($post).'">';
$link = str_replace('%title', $title, $link);
$link = str_replace('%date', $date, $link);

View File

@@ -69,7 +69,7 @@ function image_constrain_size_for_editor($width, $height, $size = 'medium') {
}
list( $max_width, $max_height ) = apply_filters( 'editor_max_image_size', array( $max_width, $max_height ), $size );
return wp_constrain_dimensions( $width, $height, $max_width, $max_height );
}
@@ -158,7 +158,7 @@ function image_downsize($id, $size = 'medium') {
$width = $meta['width'];
$height = $meta['height'];
}
if ( $img_url) {
// we have the actual image size, but might need to further constrain it if content_width is narrower
list( $width, $height ) = image_constrain_size_for_editor( $width, $height, $size );
@@ -430,7 +430,7 @@ function image_make_intermediate_size($file, $width, $height, $crop=false) {
* will be used. If there is no direct match, then the nearest image size larger
* than the specified size will be used. If nothing is found, then the function
* will break out and return false.
*
*
* The metadata 'sizes' is used for compatible sizes that can be used for the
* parameter $size value.
*

View File

@@ -659,7 +659,7 @@ function wp_set_auth_cookie($user_id, $remember = false, $secure = '') {
setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, $cookie_domain, $secure);
setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, $cookie_domain);
if ( COOKIEPATH != SITECOOKIEPATH )
setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, $cookie_domain);
setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, SITECOOKIEPATH, $cookie_domain);
}
}
endif;
@@ -1446,7 +1446,7 @@ function wp_rand( $min = 0, $max = 0 ) {
if ( $max != 0 )
$value = $min + (($max - $min + 1) * ($value / (4294967295 + 1)));
return abs(intval($value));
return abs(intval($value));
}
endif;

View File

@@ -700,7 +700,7 @@ function wp_page_menu( $args = array() ) {
$menu = '<ul>' . $menu . '</ul>';
$menu = '<div class="' . $args['menu_class'] . '">' . $menu . "</div>\n";
$menu = apply_filters( 'wp_page_menu', $menu, $args );
$menu = apply_filters( 'wp_page_menu', $menu, $args );
if ( $args['echo'] )
echo $menu;
else

View File

@@ -203,7 +203,7 @@ function get_extended($post) {
*
* @param int|object $post Post ID or post object.
* @param string $output Optional, default is Object. Either OBJECT, ARRAY_A, or ARRAY_N.
* @param string $filter Optional, default is raw.
* @param string $filter Optional, default is raw.
* @return mixed Post data
*/
function &get_post(&$post, $output = OBJECT, $filter = 'raw') {
@@ -2161,10 +2161,10 @@ function &get_pages($args = '') {
$where .= $wpdb->prepare(" AND $wpdb->postmeta.meta_value = %s", $meta_value);
}
if ( $parent >= 0 )
$where .= $wpdb->prepare(' AND post_parent = %d ', $parent);
if ( $parent >= 0 )
$where .= $wpdb->prepare(' AND post_parent = %d ', $parent);
$query = "SELECT * FROM $wpdb->posts $join WHERE (post_type = 'page' AND post_status = 'publish') $where ";
$query .= $author_query;
$query .= " ORDER BY " . $sort_column . " " . $sort_order ;
@@ -2184,7 +2184,7 @@ function &get_pages($args = '') {
if ( !empty($exclude_tree) ) {
$exclude = array();
$exclude = (int) $exclude_tree;
$children = get_page_children($exclude, $pages);
$excludes = array();
@@ -2379,12 +2379,12 @@ function wp_insert_attachment($object, $file = false, $parent = 0) {
$wpdb->update( $wpdb->posts, $data, array( 'ID' => $post_ID ) );
} else {
// If there is a suggested ID, use it if not already present
if ( !empty($import_id) ) {
$import_id = (int) $import_id;
if ( ! $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE ID = %d", $import_id) ) ) {
$data['ID'] = $import_id;
}
}
if ( !empty($import_id) ) {
$import_id = (int) $import_id;
if ( ! $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE ID = %d", $import_id) ) ) {
$data['ID'] = $import_id;
}
}
$wpdb->insert( $wpdb->posts, $data );
$post_ID = (int) $wpdb->insert_id;

View File

@@ -182,7 +182,7 @@ function is_author ($author = '') {
* @since 1.5.0
* @uses $wp_query
*
* @param string|array $category Optional.
* @param string|array $category Optional.
* @return bool
*/
function is_category ($category = '') {

View File

@@ -572,7 +572,7 @@ class WP_Rewrite {
var $extra_permastructs = array();
/**
* Endpoints permalinks
* Endpoints permalinks
*
* @since unknown
* @access private

View File

@@ -556,7 +556,7 @@ function _fetch_remote_file ($url, $headers = "" ) {
}
/**
* Retrieve
* Retrieve
*
* @since unknown
* @package External

View File

@@ -236,7 +236,7 @@ function wp_default_scripts( &$scripts ) {
) );
$scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20081127' );
$scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20081125' );
$scripts->add( 'admin-widgets', '/wp-admin/js/widgets.js', array( 'interface' ), '20081120' );
$scripts->localize( 'admin-widgets', 'widgetsL10n', array(
'add' => __('Add'),

View File

@@ -529,27 +529,27 @@ function get_term_to_edit( $id, $taxonomy ) {
*
* hide_empty - Default is true. Will not return empty terms, which means
* terms whose count is 0 according to the given taxonomy.
*
*
* exclude - Default is an empty string. A comma- or space-delimited string
* of term ids to exclude from the return array. If 'include' is non-empty,
* of term ids to exclude from the return array. If 'include' is non-empty,
* 'exclude' is ignored.
*
* include - Default is an empty string. A comma- or space-delimited string
* of term ids to include in the return array.
*
*
* number - The maximum number of terms to return. Default is empty.
*
*
* offset - The number by which to offset the terms query.
*
* fields - Default is 'all', which returns an array of term objects.
* fields - Default is 'all', which returns an array of term objects.
* If 'fields' is 'ids' or 'names', returns an array of
* integers or strings, respectively.
*
* slug - Returns terms whose "slug" matches this value. Default is empty string.
*
*
* hierarchical - Whether to include terms that have non-empty descendants
* (even if 'hide_empty' is set to true).
*
*
* search - Returned terms' names will contain the value of 'search',
* case-insensitive. Default is an empty string.
*
@@ -563,14 +563,14 @@ function get_term_to_edit( $id, $taxonomy ) {
* returns terms regardless of ancestry or whether the terms are empty.
*
* The 'child_of' argument, when used, should be set to the integer of a term ID. Its default
* is 0. If set to a non-zero value, all returned terms will be descendants
* of that term according to the given taxonomy. Hence 'child_of' is set to 0
* if more than one taxonomy is passed in $taxonomies, because multiple taxonomies
* is 0. If set to a non-zero value, all returned terms will be descendants
* of that term according to the given taxonomy. Hence 'child_of' is set to 0
* if more than one taxonomy is passed in $taxonomies, because multiple taxonomies
* make term ancestry ambiguous.
*
* The 'parent' argument, when used, should be set to the integer of a term ID. Its default is
* the empty string '', which has a different meaning from the integer 0.
* If set to an integer value, all returned terms will have as an immediate
* If set to an integer value, all returned terms will have as an immediate
* ancestor the term whose ID is specified by that integer according to the given taxonomy.
* The 'parent' argument is different from 'child_of' in that a term X is considered a 'parent'
* of term Y only if term X is the father of term Y, not its grandfather or great-grandfather, etc.
@@ -781,7 +781,7 @@ function &get_terms($taxonomies, $args = '') {
}
}
reset ( $terms );
$_terms = array();
if ( 'ids' == $fields ) {
while ( $term = array_shift($terms) )
@@ -1952,7 +1952,7 @@ function _get_term_hierarchy($taxonomy) {
* @param int $term_id The ancestor term: all returned terms should be descendants of $term_id.
* @param array $terms The set of terms---either an array of term objects or term IDs---from which those that are descendants of $term_id will be chosen.
* @param string $taxonomy The taxonomy which determines the hierarchy of the terms.
* @return array The subset of $terms that are descendants of $term_id.
* @return array The subset of $terms that are descendants of $term_id.
*/
function &_get_term_children($term_id, $terms, $taxonomy) {
$empty_array = array();
@@ -2036,7 +2036,7 @@ function _pad_term_counts(&$terms, $taxonomy) {
$id = $term_ids[$row->term_taxonomy_id];
$term_items[$id][$row->object_id] = isset($term_items[$id][$row->object_id]) ? ++$term_items[$id][$row->object_id] : 1;
}
// Touch every ancestor's lookup row for each post in each term
foreach ( $term_ids as $term_id ) {
$child = $term_id;

View File

@@ -54,7 +54,7 @@ function get_stylesheet_directory_uri() {
/**
* Retrieve URI of current theme stylesheet.
*
* The stylesheet file name is 'style.css' which is appended to {@link
* The stylesheet file name is 'style.css' which is appended to {@link
* get_stylesheet_directory_uri() stylesheet directory URI} path.
*
* @since 1.5.0
@@ -771,7 +771,7 @@ function get_comments_popup_template() {
/**
* Retrieve the name of the highest priority template file that exists.
*
*
* Searches in the STYLESHEETPATH before TEMPLATEPATH so that themes which
* inherit from a parent theme can just overload one file.
*

View File

@@ -185,7 +185,7 @@ function wp_update_plugins() {
/**
* Check theme versions against the latest versions hosted on WordPress.org.
*
* A list of all themes installed in sent to WP. Checks against the
* A list of all themes installed in sent to WP. Checks against the
* WordPress server at api.wordpress.org. Will only check if WordPress isn't
* installing.
*

View File

@@ -429,7 +429,7 @@ function setup_userdata($user_id = '') {
* <li>order - Default is 'ASC'. Can also be 'DESC'.</li>
* <li>include - User IDs to include.</li>
* <li>exclude - User IDs to exclude.</li>
* <li>multi - Default is 'false'. Whether to skip the ID attribute on the 'select' element.</li>
* <li>multi - Default is 'false'. Whether to skip the ID attribute on the 'select' element.</li>
* <li>show - Default is 'display_name'. User table column to display. If the selected item is empty then the user_login will be displayed in parentesis</li>
* <li>echo - Default is '1'. Whether to display or retrieve content.</li>
* <li>selected - Which User ID is selected.</li>

View File

@@ -769,7 +769,7 @@ function wp_widget_search($args) {
// Use current theme search form if it exists
get_search_form();
echo $after_widget;
}
@@ -1615,9 +1615,9 @@ function wp_widget_rss_output( $rss, $args = array() ) {
}
if ( $link == '' ) {
echo "<li>$title{$date}{$summary}{$author}</li>";
echo "<li>$title{$date}{$summary}{$author}</li>";
} else {
echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$summary}{$author}</li>";
echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$summary}{$author}</li>";
}
}
echo '</ul>';