its <=> it's in documentation, along with a rogue the, The, and looses. props trepmal. fixes #22665.

git-svn-id: http://core.svn.wordpress.org/trunk@23191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Helen Hou-Sandí 2012-12-20 15:55:32 +00:00
parent 4e7abbf87b
commit b1f1579604
22 changed files with 31 additions and 31 deletions

View File

@ -203,7 +203,7 @@ class WP_Filesystem_Base {
continue; //We want this to be caught by the next code block. continue; //We want this to be caught by the next code block.
//Working from /home/ to /user/ to /wordpress/ see if that file exists within the current folder, //Working from /home/ to /user/ to /wordpress/ see if that file exists within the current folder,
// If its found, change into it and follow through looking for it. // If it's found, change into it and follow through looking for it.
// If it cant find WordPress down that route, it'll continue onto the next folder level, and see if that matches, and so on. // If it cant find WordPress down that route, it'll continue onto the next folder level, and see if that matches, and so on.
// If it reaches the end, and still cant find it, it'll return false for the entire function. // If it reaches the end, and still cant find it, it'll return false for the entire function.
if ( isset($files[ $key ]) ){ if ( isset($files[ $key ]) ){

View File

@ -229,7 +229,7 @@ class WP_Filesystem_Direct extends WP_Filesystem_Base {
if ( ! $recursive && $this->is_dir($file) ) if ( ! $recursive && $this->is_dir($file) )
return @rmdir($file); return @rmdir($file);
//At this point its a folder, and we're in recursive mode //At this point it's a folder, and we're in recursive mode
$file = trailingslashit($file); $file = trailingslashit($file);
$filelist = $this->dirlist($file, true); $filelist = $this->dirlist($file, true);

View File

@ -97,7 +97,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
if ( ! $this->ftp->fget($temphandle, $file) ) { if ( ! $this->ftp->fget($temphandle, $file) ) {
fclose($temphandle); fclose($temphandle);
unlink($temp); unlink($temp);
return ''; //Blank document, File does exist, Its just blank. return ''; //Blank document, File does exist, It's just blank.
} }
fseek($temphandle, 0); //Skip back to the start of the file being written to fseek($temphandle, 0); //Skip back to the start of the file being written to

View File

@ -72,7 +72,7 @@ class WP_List_Table {
var $_pagination; var $_pagination;
/** /**
* Constructor. The child class should call this constructor from it's own constructor * Constructor. The child class should call this constructor from its own constructor
* *
* @param array $args An associative array with information about the current table * @param array $args An associative array with information about the current table
* @access protected * @access protected

View File

@ -40,7 +40,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
$tabs = apply_filters( 'install_plugins_tabs', $tabs ); $tabs = apply_filters( 'install_plugins_tabs', $tabs );
$nonmenu_tabs = apply_filters( 'install_plugins_nonmenu_tabs', $nonmenu_tabs ); $nonmenu_tabs = apply_filters( 'install_plugins_nonmenu_tabs', $nonmenu_tabs );
// If a non-valid menu tab has been selected, And its not a non-menu action. // If a non-valid menu tab has been selected, And it's not a non-menu action.
if ( empty( $tab ) || ( !isset( $tabs[ $tab ] ) && !in_array( $tab, (array) $nonmenu_tabs ) ) ) if ( empty( $tab ) || ( !isset( $tabs[ $tab ] ) && !in_array( $tab, (array) $nonmenu_tabs ) ) )
$tab = key( $tabs ); $tab = key( $tabs );

View File

@ -51,7 +51,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
$tabs = apply_filters( 'install_themes_tabs', $tabs ); $tabs = apply_filters( 'install_themes_tabs', $tabs );
$nonmenu_tabs = apply_filters( 'install_themes_nonmenu_tabs', $nonmenu_tabs ); $nonmenu_tabs = apply_filters( 'install_themes_nonmenu_tabs', $nonmenu_tabs );
// If a non-valid menu tab has been selected, And its not a non-menu action. // If a non-valid menu tab has been selected, And it's not a non-menu action.
if ( empty( $tab ) || ( ! isset( $tabs[ $tab ] ) && ! in_array( $tab, (array) $nonmenu_tabs ) ) ) if ( empty( $tab ) || ( ! isset( $tabs[ $tab ] ) && ! in_array( $tab, (array) $nonmenu_tabs ) ) )
$tab = key( $tabs ); $tab = key( $tabs );

View File

@ -194,7 +194,7 @@ class WP_Upgrader {
$source = trailingslashit($source) . trailingslashit($source_files[0]); $source = trailingslashit($source) . trailingslashit($source_files[0]);
elseif ( count($source_files) == 0 ) elseif ( count($source_files) == 0 )
return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], __( 'The plugin contains no files.' ) ); //There are no files? return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], __( 'The plugin contains no files.' ) ); //There are no files?
else //Its only a single file, The upgrader will use the foldername of this file as the destination folder. foldername is based on zip filename. else //It's only a single file, the upgrader will use the foldername of this file as the destination folder. foldername is based on zip filename.
$source = trailingslashit($source); $source = trailingslashit($source);
//Hook ability to change the source file location.. //Hook ability to change the source file location..
@ -615,11 +615,11 @@ class Plugin_Upgrader extends WP_Upgrader {
$plugins_dir = $wp_filesystem->wp_plugins_dir(); $plugins_dir = $wp_filesystem->wp_plugins_dir();
$this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin) ); $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin) );
if ( ! $wp_filesystem->exists($this_plugin_dir) ) //If its already vanished. if ( ! $wp_filesystem->exists($this_plugin_dir) ) //If it's already vanished.
return $removed; return $removed;
// If plugin is in its own directory, recursively delete the directory. // If plugin is in its own directory, recursively delete the directory.
if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory separator AND that its not the root plugin folder if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory separator AND that it's not the root plugin folder
$deleted = $wp_filesystem->delete($this_plugin_dir, true); $deleted = $wp_filesystem->delete($this_plugin_dir, true);
else else
$deleted = $wp_filesystem->delete($plugins_dir . $plugin); $deleted = $wp_filesystem->delete($plugins_dir . $plugin);
@ -1597,7 +1597,7 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
} }
/** /**
* Upgrade Skin helper for File uploads. This class handles the upload process and passes it as if its a local file to the Upgrade/Installer functions. * Upgrade Skin helper for File uploads. This class handles the upload process and passes it as if it's a local file to the Upgrade/Installer functions.
* *
* @TODO More Detailed docs, for methods as well. * @TODO More Detailed docs, for methods as well.
* *
@ -1615,7 +1615,7 @@ class File_Upload_Upgrader {
if ( empty($_FILES[$form]['name']) && empty($_GET[$urlholder]) ) if ( empty($_FILES[$form]['name']) && empty($_GET[$urlholder]) )
wp_die(__('Please select a file')); wp_die(__('Please select a file'));
//Handle a newly uploaded file, Else assume its already been uploaded //Handle a newly uploaded file, Else assume it's already been uploaded
if ( ! empty($_FILES) ) { if ( ! empty($_FILES) ) {
$overrides = array( 'test_form' => false, 'test_type' => false ); $overrides = array( 'test_form' => false, 'test_type' => false );
$file = wp_handle_upload( $_FILES[$form], $overrides ); $file = wp_handle_upload( $_FILES[$form], $overrides );

View File

@ -260,7 +260,7 @@ class WP_Users_List_Table extends WP_List_Table {
$actions = apply_filters( 'user_row_actions', $actions, $user_object ); $actions = apply_filters( 'user_row_actions', $actions, $user_object );
$edit .= $this->row_actions( $actions ); $edit .= $this->row_actions( $actions );
// Set up the checkbox ( because the user is editable, otherwise its empty ) // Set up the checkbox ( because the user is editable, otherwise it's empty )
$checkbox = '<label class="screen-reader-text" for="cb-select-' . $user_object->ID . '">' . sprintf( __( 'Select %s' ), $user_object->user_login ) . '</label>' $checkbox = '<label class="screen-reader-text" for="cb-select-' . $user_object->ID . '">' . sprintf( __( 'Select %s' ), $user_object->user_login ) . '</label>'
. "<input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' />"; . "<input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' />";

View File

@ -926,7 +926,7 @@ function request_filesystem_credentials($form_post, $type = '', $error = false,
$credentials['connection_type'] = 'ftps'; $credentials['connection_type'] = 'ftps';
else if ( !empty($_POST['connection_type']) ) else if ( !empty($_POST['connection_type']) )
$credentials['connection_type'] = stripslashes($_POST['connection_type']); $credentials['connection_type'] = stripslashes($_POST['connection_type']);
else if ( !isset($credentials['connection_type']) ) //All else fails (And its not defaulted to something else saved), Default to FTP else if ( !isset($credentials['connection_type']) ) //All else fails (And it's not defaulted to something else saved), Default to FTP
$credentials['connection_type'] = 'ftp'; $credentials['connection_type'] = 'ftp';
if ( ! $error && if ( ! $error &&

View File

@ -728,7 +728,7 @@ function delete_plugins($plugins, $redirect = '' ) {
$this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin_file) ); $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin_file) );
// If plugin is in its own directory, recursively delete the directory. // If plugin is in its own directory, recursively delete the directory.
if ( strpos($plugin_file, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory separator AND that its not the root plugin folder if ( strpos($plugin_file, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory separator AND that it's not the root plugin folder
$deleted = $wp_filesystem->delete($this_plugin_dir, true); $deleted = $wp_filesystem->delete($this_plugin_dir, true);
else else
$deleted = $wp_filesystem->delete($plugins_dir . $plugin_file); $deleted = $wp_filesystem->delete($plugins_dir . $plugin_file);

View File

@ -30,7 +30,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
* *
* @param array An array of standard parameters for widgets in this theme * @param array An array of standard parameters for widgets in this theme
* @param array An array of settings for this widget instance * @param array An array of settings for this widget instance
* @return void Echoes it's output * @return void Echoes its output
**/ **/
function widget( $args, $instance ) { function widget( $args, $instance ) {
$cache = wp_cache_get( 'widget_twentyeleven_ephemera', 'widget' ); $cache = wp_cache_get( 'widget_twentyeleven_ephemera', 'widget' );

View File

@ -134,7 +134,7 @@ class WP_Http {
unset( $homeURL ); unset( $homeURL );
// If we are streaming to a file but no filename was given drop it in the WP temp dir // If we are streaming to a file but no filename was given drop it in the WP temp dir
// and pick it's name using the basename of the $url // and pick its name using the basename of the $url
if ( $r['stream'] && empty( $r['filename'] ) ) if ( $r['stream'] && empty( $r['filename'] ) )
$r['filename'] = get_temp_dir() . basename( $url ); $r['filename'] = get_temp_dir() . basename( $url );
@ -530,7 +530,7 @@ class WP_Http {
if ( !empty($wildcard_regex) ) if ( !empty($wildcard_regex) )
return !preg_match($wildcard_regex, $check['host']); return !preg_match($wildcard_regex, $check['host']);
else else
return !in_array( $check['host'], $accessible_hosts ); //Inverse logic, If its in the array, then we can't access it. return !in_array( $check['host'], $accessible_hosts ); //Inverse logic, If it's in the array, then we can't access it.
} }
@ -555,7 +555,7 @@ class WP_Http {
// Start off with the Absolute URL path // Start off with the Absolute URL path
$path = ! empty( $url_parts['path'] ) ? $url_parts['path'] : '/'; $path = ! empty( $url_parts['path'] ) ? $url_parts['path'] : '/';
// If the it's a root-relative path, then great // If it's a root-relative path, then great
if ( ! empty( $relative_url_parts['path'] ) && '/' == $relative_url_parts['path'][0] ) { if ( ! empty( $relative_url_parts['path'] ) && '/' == $relative_url_parts['path'][0] ) {
$path = $relative_url_parts['path']; $path = $relative_url_parts['path'];

View File

@ -1673,7 +1673,7 @@ function discover_pingback_server_uri( $url, $deprecated = '' ) {
if ( preg_match('#(image|audio|video|model)/#is', wp_remote_retrieve_header( $response, 'content-type' )) ) if ( preg_match('#(image|audio|video|model)/#is', wp_remote_retrieve_header( $response, 'content-type' )) )
return false; return false;
// Now do a GET since we're going to look in the html headers (and we're sure its not a binary file) // Now do a GET since we're going to look in the html headers (and we're sure it's not a binary file)
$response = wp_remote_get( $url, array( 'timeout' => 2, 'httpversion' => '1.0' ) ); $response = wp_remote_get( $url, array( 'timeout' => 2, 'httpversion' => '1.0' ) );
if ( is_wp_error( $response ) ) if ( is_wp_error( $response ) )

View File

@ -394,7 +394,7 @@ function user_can_edit_user($user_id, $other_user) {
* @param string $cat_name Optional. The category name to use. If no match is found uses all. * @param string $cat_name Optional. The category name to use. If no match is found uses all.
* @param string $before Optional. The html to output before the link. * @param string $before Optional. The html to output before the link.
* @param string $after Optional. The html to output after the link. * @param string $after Optional. The html to output after the link.
* @param string $between Optional. The html to output between the link/image and it's description. Not used if no image or $show_images is true. * @param string $between Optional. The html to output between the link/image and its description. Not used if no image or $show_images is true.
* @param bool $show_images Optional. Whether to show images (if defined). * @param bool $show_images Optional. Whether to show images (if defined).
* @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner. * @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner.
* If you start the name with an underscore the order will be reversed. You can also specify 'rand' as the order which will return links in a * If you start the name with an underscore the order will be reversed. You can also specify 'rand' as the order which will return links in a
@ -547,7 +547,7 @@ function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
* @param string $cat_name The category name to use. If no match is found uses all * @param string $cat_name The category name to use. If no match is found uses all
* @param string $before The html to output before the link * @param string $before The html to output before the link
* @param string $after The html to output after the link * @param string $after The html to output after the link
* @param string $between The html to output between the link/image and it's description. Not used if no image or show_images is true * @param string $between The html to output between the link/image and its description. Not used if no image or show_images is true
* @param bool $show_images Whether to show images (if defined). * @param bool $show_images Whether to show images (if defined).
* @param string $orderby the order to output the links. E.g. 'id', 'name', 'url', * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
* 'description', or 'rating'. Or maybe owner. If you start the name with an * 'description', or 'rating'. Or maybe owner. If you start the name with an
@ -575,7 +575,7 @@ function get_linksbyname_withrating($cat_name = "noname", $before = '', $after =
* @param int $category The category to use. If no category supplied uses all * @param int $category The category to use. If no category supplied uses all
* @param string $before The html to output before the link * @param string $before The html to output before the link
* @param string $after The html to output after the link * @param string $after The html to output after the link
* @param string $between The html to output between the link/image and it's description. Not used if no image or show_images == true * @param string $between The html to output between the link/image and its description. Not used if no image or show_images == true
* @param bool $show_images Whether to show images (if defined). * @param bool $show_images Whether to show images (if defined).
* @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url',
* 'description', or 'rating'. Or maybe owner. If you start the name with an * 'description', or 'rating'. Or maybe owner. If you start the name with an

View File

@ -75,7 +75,7 @@ if ( have_comments() ) : while ( have_comments() ) : the_comment();
<thr:in-reply-to ref="<?php the_guid(); ?>" href="<?php the_permalink_rss() ?>" type="<?php bloginfo_rss('html_type'); ?>" /> <thr:in-reply-to ref="<?php the_guid(); ?>" href="<?php the_permalink_rss() ?>" type="<?php bloginfo_rss('html_type'); ?>" />
<?php else : // This comment is in reply to another comment <?php else : // This comment is in reply to another comment
$parent_comment = get_comment($comment->comment_parent); $parent_comment = get_comment($comment->comment_parent);
// The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, its more important that they both use the same system // The rel attribute below and the id tag above should be GUIDs, but WP doesn't create them for comments (unlike posts). Either way, it's more important that they both use the same system
?> ?>
<thr:in-reply-to ref="<?php comment_guid($parent_comment) ?>" href="<?php echo get_comment_link($parent_comment) ?>" type="<?php bloginfo_rss('html_type'); ?>" /> <thr:in-reply-to ref="<?php comment_guid($parent_comment) ?>" href="<?php echo get_comment_link($parent_comment) ?>" type="<?php bloginfo_rss('html_type'); ?>" />
<?php endif; <?php endif;

View File

@ -5,7 +5,7 @@
cursor: crosshair; cursor: crosshair;
} }
/* an extra classname is applied for Opera < 9.0 to fix it's lack of opacity support */ /* an extra classname is applied for Opera < 9.0 to fix its lack of opacity support */
.imgCrop_wrap.opera8 .imgCrop_overlay, .imgCrop_wrap.opera8 .imgCrop_overlay,
.imgCrop_wrap.opera8 .imgCrop_clickArea { .imgCrop_wrap.opera8 .imgCrop_clickArea {
background-color: transparent; background-color: transparent;

View File

@ -155,7 +155,7 @@ var tinyMCEPopup = {
/** /**
* Stores the current editor selection for later restoration. This can be useful since some browsers * Stores the current editor selection for later restoration. This can be useful since some browsers
* looses it's selection if a control element is selected/focused inside the dialogs. * loses its selection if a control element is selected/focused inside the dialogs.
* *
* @method storeSelection * @method storeSelection
*/ */
@ -165,7 +165,7 @@ var tinyMCEPopup = {
/** /**
* Restores any stored selection. This can be useful since some browsers * Restores any stored selection. This can be useful since some browsers
* looses it's selection if a control element is selected/focused inside the dialogs. * loses its selection if a control element is selected/focused inside the dialogs.
* *
* @method restoreSelection * @method restoreSelection
*/ */

View File

@ -2,7 +2,7 @@
tinymce.create('tinymce.plugins.wpLink', { tinymce.create('tinymce.plugins.wpLink', {
/** /**
* Initializes the plugin, this will be executed after the plugin has been created. * Initializes the plugin, this will be executed after the plugin has been created.
* This call is done before the editor instance has finished it's initialization so use the onInit event * This call is done before the editor instance has finished its initialization so use the onInit event
* of the editor instance to intercept that event. * of the editor instance to intercept that event.
* *
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in. * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.

View File

@ -84,7 +84,7 @@ function get_blogaddress_by_domain( $domain, $path ) {
} }
/** /**
* Given a blog's (subdomain or directory) slug, retrieve it's id. * Given a blog's (subdomain or directory) slug, retrieve its id.
* *
* @since MU * @since MU
* *

View File

@ -2079,7 +2079,7 @@ class WP_Query {
if ( $q['day'] ) if ( $q['day'] )
$where .= " AND DAYOFMONTH($wpdb->posts.post_date)='" . $q['day'] . "'"; $where .= " AND DAYOFMONTH($wpdb->posts.post_date)='" . $q['day'] . "'";
// If we've got a post_type AND its not "any" post_type. // If we've got a post_type AND it's not "any" post_type.
if ( !empty($q['post_type']) && 'any' != $q['post_type'] ) { if ( !empty($q['post_type']) && 'any' != $q['post_type'] ) {
foreach ( (array)$q['post_type'] as $_post_type ) { foreach ( (array)$q['post_type'] as $_post_type ) {
$ptype_obj = get_post_type_object($_post_type); $ptype_obj = get_post_type_object($_post_type);

View File

@ -422,7 +422,7 @@ function fetch_rss ($url) {
else { else {
// Flow // Flow
// 1. check cache // 1. check cache
// 2. if there is a hit, make sure its fresh // 2. if there is a hit, make sure it's fresh
// 3. if cached obj fails freshness check, fetch remote // 3. if cached obj fails freshness check, fetch remote
// 4. if remote fails, return stale object, or error // 4. if remote fails, return stale object, or error

View File

@ -631,7 +631,7 @@ function preview_theme_ob_filter( $content ) {
*/ */
function preview_theme_ob_filter_callback( $matches ) { function preview_theme_ob_filter_callback( $matches ) {
if ( strpos($matches[4], 'onclick') !== false ) if ( strpos($matches[4], 'onclick') !== false )
$matches[4] = preg_replace('#onclick=([\'"]).*?(?<!\\\)\\1#i', '', $matches[4]); //Strip out any onclicks from rest of <a>. (?<!\\\) means to ignore the '" if its escaped by \ to prevent breaking mid-attribute. $matches[4] = preg_replace('#onclick=([\'"]).*?(?<!\\\)\\1#i', '', $matches[4]); //Strip out any onclicks from rest of <a>. (?<!\\\) means to ignore the '" if it's escaped by \ to prevent breaking mid-attribute.
if ( if (
( false !== strpos($matches[3], '/wp-admin/') ) ( false !== strpos($matches[3], '/wp-admin/') )
|| ||