Whitespace cleanup for [4656]
git-svn-id: https://develop.svn.wordpress.org/trunk@4657 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
31c39f948d
commit
a011b23b47
@ -141,7 +141,7 @@ case 'add-cat' : // From Manage->Categories
|
||||
$cat_full_name = $_cat->cat_name . ' — ' . $cat_full_name;
|
||||
$level++;
|
||||
}
|
||||
$cat_full_name = attribute_escape( $cat_full_name);
|
||||
$cat_full_name = attribute_escape($cat_full_name);
|
||||
|
||||
$x = new WP_Ajax_Response( array(
|
||||
'what' => 'cat',
|
||||
|
@ -380,17 +380,17 @@ function wp_dropdown_roles( $default = false ) {
|
||||
|
||||
function get_user_to_edit( $user_id ) {
|
||||
$user = new WP_User( $user_id );
|
||||
$user->user_login = attribute_escape( $user->user_login);
|
||||
$user->user_email = attribute_escape( $user->user_email);
|
||||
$user->user_url = attribute_escape( $user->user_url);
|
||||
$user->first_name = attribute_escape( $user->first_name);
|
||||
$user->last_name = attribute_escape( $user->last_name);
|
||||
$user->display_name = attribute_escape( $user->display_name);
|
||||
$user->nickname = attribute_escape( $user->nickname);
|
||||
$user->aim = attribute_escape( $user->aim);
|
||||
$user->yim = attribute_escape( $user->yim);
|
||||
$user->jabber = attribute_escape( $user->jabber);
|
||||
$user->description = wp_specialchars( $user->description );
|
||||
$user->user_login = attribute_escape($user->user_login);
|
||||
$user->user_email = attribute_escape($user->user_email);
|
||||
$user->user_url = attribute_escape($user->user_url);
|
||||
$user->first_name = attribute_escape($user->first_name);
|
||||
$user->last_name = attribute_escape($user->last_name);
|
||||
$user->display_name = attribute_escape($user->display_name);
|
||||
$user->nickname = attribute_escape($user->nickname);
|
||||
$user->aim = attribute_escape($user->aim);
|
||||
$user->yim = attribute_escape($user->yim);
|
||||
$user->jabber = attribute_escape($user->jabber);
|
||||
$user->description = wp_specialchars($user->description);
|
||||
|
||||
return $user;
|
||||
}
|
||||
@ -527,14 +527,14 @@ function edit_user( $user_id = 0 ) {
|
||||
function get_link_to_edit( $link_id ) {
|
||||
$link = get_link( $link_id );
|
||||
|
||||
$link->link_url = attribute_escape( $link->link_url);
|
||||
$link->link_name = attribute_escape( $link->link_name);
|
||||
$link->link_image = attribute_escape( $link->link_image);
|
||||
$link->link_description = attribute_escape( $link->link_description);
|
||||
$link->link_notes = wp_specialchars( $link->link_notes );
|
||||
$link->link_rss = attribute_escape( $link->link_rss);
|
||||
$link->link_rel = attribute_escape( $link->link_rel);
|
||||
$link->post_category = $link->link_category;
|
||||
$link->link_url = attribute_escape($link->link_url);
|
||||
$link->link_name = attribute_escape($link->link_name);
|
||||
$link->link_image = attribute_escape($link->link_image);
|
||||
$link->link_description = attribute_escape($link->link_description);
|
||||
$link->link_rss = attribute_escape($link->link_rss);
|
||||
$link->link_rel = attribute_escape($link->link_rel);
|
||||
$link->link_notes = wp_specialchars($link->link_notes);
|
||||
$link->post_category = $link->link_category;
|
||||
|
||||
return $link;
|
||||
}
|
||||
@ -911,8 +911,8 @@ function list_meta( $meta ) {
|
||||
}
|
||||
|
||||
$key_js = js_escape( $entry['meta_key'] );
|
||||
$entry['meta_key'] = attribute_escape( $entry['meta_key']);
|
||||
$entry['meta_value'] = attribute_escape( $entry['meta_value']);
|
||||
$entry['meta_key'] = attribute_escape($entry['meta_key']);
|
||||
$entry['meta_value'] = attribute_escape($entry['meta_value']);
|
||||
$r .= "\n\t<tr id='meta-{$entry['meta_id']}' class='$style'>";
|
||||
$r .= "\n\t\t<td valign='top'><input name='meta[{$entry['meta_id']}][key]' tabindex='6' type='text' size='20' value='{$entry['meta_key']}' /></td>";
|
||||
$r .= "\n\t\t<td><textarea name='meta[{$entry['meta_id']}][value]' tabindex='6' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>";
|
||||
|
@ -7,7 +7,7 @@ function wp_upload_display( $dims = false, $href = '' ) {
|
||||
list($width,$height) = wp_shrink_dimensions($attachment_data['width'], $attachment_data['height'], 171, 128);
|
||||
ob_start();
|
||||
the_title();
|
||||
$post_title = attribute_escape( ob_get_contents());
|
||||
$post_title = attribute_escape(ob_get_contents());
|
||||
ob_end_clean();
|
||||
$post_content = apply_filters( 'content_edit_pre', $post->post_content );
|
||||
|
||||
@ -71,9 +71,9 @@ function wp_upload_view() {
|
||||
echo '[ ';
|
||||
echo '<a href="' . get_permalink() . '">' . __('view') . '</a>';
|
||||
echo ' | ';
|
||||
echo '<a href="' . attribute_escape( add_query_arg( 'action', 'edit' )) . '" title="' . __('Edit this file') . '">' . __('edit') . '</a>';
|
||||
echo '<a href="' . attribute_escape(add_query_arg('action', 'edit')) . '" title="' . __('Edit this file') . '">' . __('edit') . '</a>';
|
||||
echo ' | ';
|
||||
echo '<a href="' . attribute_escape( remove_query_arg( array('action', 'ID') )) . '" title="' . __('Browse your files') . '">' . __('cancel') . '</a>';
|
||||
echo '<a href="' . attribute_escape(remove_query_arg(array('action', 'ID'))) . '" title="' . __('Browse your files') . '">' . __('cancel') . '</a>';
|
||||
echo ' ]'; ?></span>
|
||||
</div>
|
||||
|
||||
@ -111,9 +111,9 @@ function wp_upload_form() {
|
||||
echo '[ ';
|
||||
echo '<a href="' . get_permalink() . '">' . __('view') . '</a>';
|
||||
echo ' | ';
|
||||
echo '<a href="' . attribute_escape( add_query_arg( 'action', 'view' )) . '">' . __('links') . '</a>';
|
||||
echo '<a href="' . attribute_escape(add_query_arg('action', 'view')) . '">' . __('links') . '</a>';
|
||||
echo ' | ';
|
||||
echo '<a href="' . attribute_escape( remove_query_arg( array('action','ID') )) . '" title="' . __('Browse your files') . '">' . __('cancel') . '</a>';
|
||||
echo '<a href="' . attribute_escape(remove_query_arg(array('action','ID'))) . '" title="' . __('Browse your files') . '">' . __('cancel') . '</a>';
|
||||
echo ' ]'; ?></span>
|
||||
</div>
|
||||
|
||||
|
@ -1081,7 +1081,7 @@ function js_escape($text) {
|
||||
return preg_replace("/\r?\n/", "\\n", addslashes($text));
|
||||
}
|
||||
|
||||
// Escaping for HTML attributes like
|
||||
// Escaping for HTML attributes
|
||||
function attribute_escape($text) {
|
||||
return wp_specialchars($text, true);
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ function get_option($setting) {
|
||||
}
|
||||
|
||||
function form_option($option) {
|
||||
echo attribute_escape( get_option($option));
|
||||
echo attribute_escape(get_option($option));
|
||||
}
|
||||
|
||||
function get_alloptions() {
|
||||
@ -1190,7 +1190,7 @@ function wp_nonce_ays($action) {
|
||||
foreach ( (array) $q as $a ) {
|
||||
$v = substr(strstr($a, '='), 1);
|
||||
$k = substr($a, 0, -(strlen($v)+1));
|
||||
$html .= "\t\t<input type='hidden' name='" . attribute_escape( urldecode($k)) . "' value='" . attribute_escape( urldecode($v)) . "' />\n";
|
||||
$html .= "\t\t<input type='hidden' name='" . attribute_escape(urldecode($k)) . "' value='" . attribute_escape(urldecode($v)) . "' />\n";
|
||||
}
|
||||
$html .= "\t\t<input type='hidden' name='_wpnonce' value='" . wp_create_nonce($action) . "' />\n";
|
||||
$html .= "\t\t<div id='message' class='confirm fade'>\n\t\t<p>" . wp_explain_nonce($action) . "</p>\n\t\t<p><a href='$adminurl'>" . __('No') . "</a> <input type='submit' value='" . __('Yes') . "' /></p>\n\t\t</div>\n\t</form>\n";
|
||||
|
@ -901,7 +901,7 @@ function the_editor($content, $id = 'content', $prev_id = 'title') {
|
||||
|
||||
function the_search_query() {
|
||||
global $s;
|
||||
echo attribute_escape( stripslashes($s));
|
||||
echo attribute_escape(stripslashes($s));
|
||||
}
|
||||
|
||||
function language_attributes() {
|
||||
@ -956,7 +956,7 @@ function paginate_links( $arg = '' ) {
|
||||
$link = str_replace('%#%', $current - 1, $link);
|
||||
if ( $add_args )
|
||||
$link = add_query_arg( $add_args, $link );
|
||||
$page_links[] = "<a class='prev page-numbers' href='" . attribute_escape( $link) . "'>$prev_text</a>";
|
||||
$page_links[] = "<a class='prev page-numbers' href='" . attribute_escape($link) . "'>$prev_text</a>";
|
||||
endif;
|
||||
for ( $n = 1; $n <= $total; $n++ ) :
|
||||
if ( $n == $current ) :
|
||||
@ -968,7 +968,7 @@ function paginate_links( $arg = '' ) {
|
||||
$link = str_replace('%#%', $n, $link);
|
||||
if ( $add_args )
|
||||
$link = add_query_arg( $add_args, $link );
|
||||
$page_links[] = "<a class='page-numbers' href='" . attribute_escape( $link) . "'>$n</a>";
|
||||
$page_links[] = "<a class='page-numbers' href='" . attribute_escape($link) . "'>$n</a>";
|
||||
$dots = true;
|
||||
elseif ( $dots && !$show_all ) :
|
||||
$page_links[] = "<span class='page-numbers dots'>...</span>";
|
||||
@ -981,7 +981,7 @@ function paginate_links( $arg = '' ) {
|
||||
$link = str_replace('%#%', $current + 1, $link);
|
||||
if ( $add_args )
|
||||
$link = add_query_arg( $add_args, $link );
|
||||
$page_links[] = "<a class='next page-numbers' href='" . attribute_escape( $link) . "'>$next_text</a>";
|
||||
$page_links[] = "<a class='next page-numbers' href='" . attribute_escape($link) . "'>$next_text</a>";
|
||||
endif;
|
||||
switch ( $type ) :
|
||||
case 'array' :
|
||||
|
@ -334,7 +334,7 @@ function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false)
|
||||
if ( ('attachment' != $_post->post_type) || ('' == $_post->guid) )
|
||||
return __('Missing Attachment');
|
||||
|
||||
$post_title = attribute_escape( $_post->post_title);
|
||||
$post_title = attribute_escape($_post->post_title);
|
||||
|
||||
if (! empty($_post->guid) ) {
|
||||
$innerHTML = get_attachment_innerHTML($_post->ID, $fullsize, $max_dims);
|
||||
@ -420,7 +420,7 @@ function get_attachment_icon($id = 0, $fullsize = false, $max_dims = false) {
|
||||
}
|
||||
}
|
||||
|
||||
$post_title = attribute_escape( $post->post_title);
|
||||
$post_title = attribute_escape($post->post_title);
|
||||
|
||||
$icon = "<img src='$src' title='$post_title' alt='$post_title' $constraint/>";
|
||||
|
||||
@ -435,7 +435,7 @@ function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false)
|
||||
|
||||
$post = & get_post($id);
|
||||
|
||||
$innerHTML = attribute_escape( $post->post_title);
|
||||
$innerHTML = attribute_escape($post->post_title);
|
||||
|
||||
return apply_filters('attachment_innerHTML', $innerHTML, $post->ID);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user