Ticket #18560: 18560.diff

File 18560.diff, 26.3 KB (added by duck_, 21 months ago)
  • wp-includes/taxonomy.php

     
    17851785 * @uses wp_delete_term() 
    17861786 * 
    17871787 * @param int $cat_ID 
    1788  * @return mixed Returns true if completes delete action; false if term doesnt exist; 
     1788 * @return mixed Returns true if completes delete action; false if term doesn't exist; 
    17891789 *      Zero on attempted deletion of default Category; WP_Error object is also a possibility. 
    17901790 */ 
    17911791function wp_delete_category( $cat_ID ) { 
  • wp-includes/pomo/translations.php

     
    8181        /** 
    8282         * Given the number of items, returns the 0-based index of the plural form to use 
    8383         * 
    84          * Here, in the base Translations class, the commong logic for English is implmented: 
     84         * Here, in the base Translations class, the common logic for English is implemented: 
    8585         *      0 if there is one element, 1 otherwise 
    8686         * 
    8787         * This function should be overrided by the sub-classes. For example MO/PO can derive the logic 
  • wp-includes/js/tinymce/plugins/wpdialogs/js/popup.dev.js

     
    6767         * Returns a window argument/parameter by name. 
    6868         * 
    6969         * @method getWindowArg 
    70          * @param {String} n Name of the window argument to retrive. 
     70         * @param {String} n Name of the window argument to retrieve. 
    7171         * @param {String} dv Optional default value to return. 
    7272         * @return {String} Argument value or default value if it wasn't found. 
    7373         */ 
     
    8181         * Returns a editor parameter/config option value. 
    8282         * 
    8383         * @method getParam 
    84          * @param {String} n Name of the editor config option to retrive. 
     84         * @param {String} n Name of the editor config option to retrieve. 
    8585         * @param {String} dv Optional default value to return. 
    8686         * @return {String} Parameter value or default value if it wasn't found. 
    8787         */ 
  • wp-includes/media.php

     
    260260} 
    261261 
    262262/** 
    263  * Calculates the new dimentions for a downsampled image. 
     263 * Calculates the new dimensions for a downsampled image. 
    264264 * 
    265265 * If either width or height are empty, no constraint is applied on 
    266266 * that dimension. 
  • wp-includes/http.php

     
    130130 * 
    131131 * @param array $response 
    132132 * @param string $header Header name to retrieve value from. 
    133  * @return string The header value. Empty string on if incorrect parameter given, or if the header doesnt exist. 
     133 * @return string The header value. Empty string on if incorrect parameter given, or if the header doesn't exist. 
    134134 */ 
    135135function wp_remote_retrieve_header(&$response, $header) { 
    136136        if ( is_wp_error($response) || ! isset($response['headers']) || ! is_array($response['headers'])) 
  • wp-admin/includes/plugin-install.php

     
    3535                $args->per_page = 24; 
    3636 
    3737        // Allows a plugin to override the WordPress.org API entirely. 
    38         // Use the filter 'plugins_api_result' to mearly add results. 
     38        // Use the filter 'plugins_api_result' to merely add results. 
    3939        // Please ensure that a object is returned from the following filters. 
    4040        $args = apply_filters('plugins_api_args', $args, $action); 
    4141        $res = apply_filters('plugins_api', false, $action, $args); 
     
    9797        if ( is_wp_error($api_tags) ) { 
    9898                echo $api_tags->get_error_message(); 
    9999        } else { 
    100                 //Set up the tags in a way which can be interprated by wp_generate_tag_cloud() 
     100                //Set up the tags in a way which can be interpreted by wp_generate_tag_cloud() 
    101101                $tags = array(); 
    102102                foreach ( (array)$api_tags as $tag ) 
    103103                        $tags[ $tag['name'] ] = (object) array( 
     
    175175 * @since 3.0.0 
    176176 */ 
    177177function install_plugin_install_status($api, $loop = false) { 
    178         // this function is called recursivly, $loop prevents futhur loops. 
     178        // this function is called recursively, $loop prevents further loops. 
    179179        if ( is_array($api) ) 
    180180                $api = (object) $api; 
    181181 
  • wp-admin/includes/file.php

     
    363363} 
    364364 
    365365/** 
    366  * Handle sideloads, which is the process of retriving a media item from another server instead of 
     366 * Handle sideloads, which is the process of retrieving a media item from another server instead of 
    367367 * a traditional media upload.  This process involves sanitizing the filename, checking extensions 
    368368 * for mime type, and moving the file to the appropriate directory within the uploads directory. 
    369369 * 
     
    519519} 
    520520 
    521521/** 
    522  * Unzip's a specified ZIP file to a location on the Filesystem via the WordPress Filesystem Abstraction. 
     522 * Unzips a specified ZIP file to a location on the Filesystem via the WordPress Filesystem Abstraction. 
    523523 * Assumes that WP_Filesystem() has already been called and set up. Does not extract a root-level __MACOSX directory, if present. 
    524524 * 
    525525 * Attempts to increase the PHP Memory limit to 256M before uncompressing, 
     
    833833                return false; 
    834834 
    835835        if ( !$wp_filesystem->connect() ) 
    836                 return false; //There was an erorr connecting to the server. 
     836                return false; //There was an error connecting to the server. 
    837837 
    838838        // Set the permission constants if not already set. 
    839839        if ( ! defined('FS_CHMOD_DIR') ) 
     
    846846 
    847847/** 
    848848 * Determines which Filesystem Method to use. 
    849  * The priority of the Transports are: Direct, SSH2, FTP PHP Extension, FTP Sockets (Via Sockets class, or fsoxkopen()) 
     849 * The priority of the Transports are: Direct, SSH2, FTP PHP Extension, FTP Sockets (Via Sockets class, or fsockopen()) 
    850850 * 
    851851 * Note that the return value of this function can be overridden in 2 ways 
    852852 *  - By defining FS_METHOD in your <code>wp-config.php</code> file 
  • wp-admin/includes/update.php

     
    2626 * Get available core updates 
    2727 * 
    2828 * @param array $options Set $options['dismissed'] to true to show dismissed upgrades too, 
    29  *      set $options['available'] to false to skip not-dimissed updates. 
     29 *      set $options['available'] to false to skip not-dismissed updates. 
    3030 * @return array Array of the update objects 
    3131 */ 
    3232function get_core_updates( $options = array() ) { 
  • wp-admin/includes/class-wp-filesystem-base.php

     
    153153                                if ( defined($constant) && $folder === $dir ) 
    154154                                        return trailingslashit(constant($constant)); 
    155155                } elseif ( 'direct' == $this->method ) { 
    156                         $folder = str_replace('\\', '/', $folder); //Windows path sanitiation 
     156                        $folder = str_replace('\\', '/', $folder); //Windows path sanitisation 
    157157                        return trailingslashit($folder); 
    158158                } 
    159159 
    160                 $folder = preg_replace('|^([a-z]{1}):|i', '', $folder); //Strip out windows driveletter if its there. 
    161                 $folder = str_replace('\\', '/', $folder); //Windows path sanitiation 
     160                $folder = preg_replace('|^([a-z]{1}):|i', '', $folder); //Strip out windows drive letter if it's there. 
     161                $folder = str_replace('\\', '/', $folder); //Windows path sanitisation 
    162162 
    163163                if ( isset($this->cache[ $folder ] ) ) 
    164164                        return $this->cache[ $folder ]; 
     
    223223                } 
    224224                if ( $loop ) 
    225225                        return false; //Prevent this function from looping again. 
    226                 //As an extra last resort, Change back to / if the folder wasnt found. This comes into effect when the CWD is /home/user/ but WP is at /var/www/.... mainly dedicated setups. 
     226                //As an extra last resort, Change back to / if the folder wasn't found. This comes into effect when the CWD is /home/user/ but WP is at /var/www/.... mainly dedicated setups. 
    227227                return $this->search_for_folder($folder, '/', true); 
    228228 
    229229        } 
  • wp-admin/includes/post.php

     
    612612        add_post_meta( $post_ID, '_edit_last', $GLOBALS['current_user']->ID ); 
    613613 
    614614        // Reunite any orphaned attachments with their parent 
    615         // Does this need to be udpated? ~ Mark 
     615        // Does this need to be updated? ~ Mark 
    616616        if ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) ) 
    617617                $draft_ids = array(); 
    618618        if ( $draft_temp_id = (int) array_search( $post_ID, $draft_ids ) ) 
  • wp-admin/includes/upgrade.php

     
    576576 
    577577        if (!$got_gmt_fields) { 
    578578 
    579                 // Add or substract time to all dates, to get GMT dates 
     579                // Add or subtract time to all dates, to get GMT dates 
    580580                $add_hours = intval($diff_gmt_weblogger); 
    581581                $add_minutes = intval(60 * ($diff_gmt_weblogger - $add_hours)); 
    582582                $wpdb->query("UPDATE $wpdb->posts SET post_date_gmt = DATE_ADD(post_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)"); 
     
    16071607                return false; 
    16081608 
    16091609        // Copy files from the old locations to the site theme. 
    1610         // TODO: This does not copy arbitarary include dependencies.  Only the 
     1610        // TODO: This does not copy arbitrary include dependencies.  Only the 
    16111611        // standard WP files are copied. 
    16121612        $files = array('index.php' => 'index.php', 'wp-layout.css' => 'style.css', 'wp-comments.php' => 'comments.php', 'wp-comments-popup.php' => 'comments-popup.php'); 
    16131613 
  • wp-admin/includes/class-wp-list-table.php

     
    326326         * @access protected 
    327327         * 
    328328         * @param array $actions The list of actions 
    329          * @param bool $always_visible Wether the actions should be always visible 
     329         * @param bool $always_visible Whether the actions should be always visible 
    330330         * @return string 
    331331         */ 
    332332        function row_actions( $actions, $always_visible = false ) { 
  • wp-admin/includes/dashboard.php

     
    10231023 * Checks to see if all of the feed url in $check_urls are cached. 
    10241024 * 
    10251025 * If $check_urls is empty, look for the rss feed url found in the dashboard 
    1026  * widget optios of $widget_id. If cached, call $callback, a function that 
     1026 * widget options of $widget_id. If cached, call $callback, a function that 
    10271027 * echoes out output for this widget. If not cache, echo a "Loading..." stub 
    10281028 * which is later replaced by AJAX call (see top of /wp-admin/index.php) 
    10291029 * 
  • wp-admin/includes/deprecated.php

     
    3737} 
    3838 
    3939/** 
    40  * Calculates the new dimentions for a downsampled image. 
     40 * Calculates the new dimensions for a downsampled image. 
    4141 * 
    4242 * @since 2.0.0 
    4343 * @deprecated 3.0.0 
  • wp-admin/includes/class-wp-upgrader.php

     
    212212                } 
    213213 
    214214                if ( $clear_destination ) { 
    215                         //We're going to clear the destination if theres something there 
     215                        //We're going to clear the destination if there's something there 
    216216                        $this->skin->feedback('remove_old'); 
    217217                        $removed = true; 
    218218                        if ( $wp_filesystem->exists($remote_destination) ) 
     
    224224                        else if ( ! $removed ) 
    225225                                return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']); 
    226226                } elseif ( $wp_filesystem->exists($remote_destination) ) { 
    227                         //If we're not clearing the destination folder and something exists there allready, Bail. 
     227                        //If we're not clearing the destination folder and something exists there already, Bail. 
    228228                        //But first check to see if there are actually any files in the folder. 
    229229                        $_files = $wp_filesystem->dirlist($remote_destination); 
    230230                        if ( ! empty($_files) ) { 
     
    304304 
    305305                $delete_package = ($download != $package); // Do not delete a "local" file 
    306306 
    307                 //Unzip's the file into a temporary directory 
     307                //Unzips the file into a temporary directory 
    308308                $working_dir = $this->unpack_package( $download, $delete_package ); 
    309309                if ( is_wp_error($working_dir) ) { 
    310310                        $this->skin->error($working_dir); 
     
    325325                        $this->skin->error($result); 
    326326                        $this->skin->feedback('process_failed'); 
    327327                } else { 
    328                         //Install Suceeded 
     328                        //Install Succeeded 
    329329                        $this->skin->feedback('process_success'); 
    330330                } 
    331331                $this->skin->after(); 
     
    434434 
    435435                add_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade'), 10, 2); 
    436436                add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4); 
    437                 //'source_selection' => array(&$this, 'source_selection'), //theres a track ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins. 
     437                //'source_selection' => array(&$this, 'source_selection'), //there's a trac ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins. 
    438438 
    439439                $this->run(array( 
    440440                                        'package' => $r->package, 
     
    446446                                        ) 
    447447                                )); 
    448448 
    449                 // Cleanup our hooks, incase something else does a upgrade on this connection. 
     449                // Cleanup our hooks, in case something else does a upgrade on this connection. 
    450450                remove_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade')); 
    451451                remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin')); 
    452452 
     
    531531 
    532532                $this->skin->footer(); 
    533533 
    534                 // Cleanup our hooks, incase something else does a upgrade on this connection. 
     534                // Cleanup our hooks, in case something else does a upgrade on this connection. 
    535535                remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin')); 
    536536 
    537537                // Force refresh of plugin update information 
     
    812812 
    813813                $this->skin->footer(); 
    814814 
    815                 // Cleanup our hooks, incase something else does a upgrade on this connection. 
     815                // Cleanup our hooks, in case something else does a upgrade on this connection. 
    816816                remove_filter('upgrader_pre_install', array(&$this, 'current_before'), 10, 2); 
    817817                remove_filter('upgrader_post_install', array(&$this, 'current_after'), 10, 2); 
    818818                remove_filter('upgrader_clear_destination', array(&$this, 'delete_old_theme'), 10, 4); 
     
    873873                        return $return; 
    874874 
    875875                //Ensure stylesheet name hasnt changed after the upgrade: 
    876                 // @TODO: Note, This doesnt handle the Template changing, or the Template name changing. 
     876                // @TODO: Note, This doesn't handle the Template changing, or the Template name changing. 
    877877                if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) { 
    878878                        $theme_info = $this->theme_info(); 
    879879                        $stylesheet = $this->result['destination_name']; 
     
    916916} 
    917917 
    918918/** 
    919  * Core Upgrader class for WordPress. It allows for WordPress to upgrade itself in combiantion with the wp-admin/includes/update-core.php file 
     919 * Core Upgrader class for WordPress. It allows for WordPress to upgrade itself in combination with the wp-admin/includes/update-core.php file 
    920920 * 
    921921 * @TODO More Detailed docs, for methods as well. 
    922922 * 
     
    15621562 
    15631563                return true; 
    15641564        } 
    1565 } 
    1566  No newline at end of file 
     1565} 
  • wp-admin/includes/meta-boxes.php

     
    155155</div><?php // /misc-pub-section ?> 
    156156 
    157157<?php 
    158 // translators: Publish box date formt, see http://php.net/date 
     158// translators: Publish box date format, see http://php.net/date 
    159159$datef = __( 'M j, Y @ G:i' ); 
    160160if ( 0 != $post->ID ) { 
    161161        if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date 
  • wp-admin/includes/widgets.php

     
    160160                $query_arg['key'] = $key; 
    161161        } 
    162162 
    163         // We aren't showing a widget control, we're outputing a template for a mult-widget control 
     163        // We aren't showing a widget control, we're outputting a template for a multi-widget control 
    164164        if ( isset($sidebar_args['_display']) && 'template' == $sidebar_args['_display'] && $widget_number ) { 
    165165                // number == -1 implies a template where id numbers are replaced by a generic '__i__' 
    166166                $control['params'][0]['number'] = -1; 
  • wp-admin/includes/template.php

     
    897897                        // If no priority given and id already present, use existing priority 
    898898                        if ( empty($priority) ) { 
    899899                                $priority = $a_priority; 
    900                         // else if we're adding to the sorted priortiy, we don't know the title or callback. Glab them from the previously added context/priority. 
     900                        // else if we're adding to the sorted priority, we don't know the title or callback. Glab them from the previously added context/priority. 
    901901                        } elseif ( 'sorted' == $priority ) { 
    902902                                $title = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['title']; 
    903903                                $callback = $wp_meta_boxes[$page][$a_context][$a_priority][$id]['callback']; 
     
    11091109 * do_settings_fields() in do_settings-sections() 
    11101110 * 
    11111111 * The $callback argument should be the name of a function that echoes out the 
    1112  * html input tags for this setting field. Use get_option() to retrive existing 
     1112 * html input tags for this setting field. Use get_option() to retrieve existing 
    11131113 * values to show. 
    11141114 * 
    11151115 * @since 2.7.0 
     
    11201120 * @param string $title Formatted title of the field. Shown as the label for the field during output. 
    11211121 * @param string $callback Function that fills the field with the desired form inputs. The function should echo its output. 
    11221122 * @param string $page The slug-name of the settings page on which to show the section (general, reading, writing, ...). 
    1123  * @param string $section The slug-name of the section of the settingss page in which to show the box (default, ...). 
     1123 * @param string $section The slug-name of the section of the settings page in which to show the box (default, ...). 
    11241124 * @param array $args Additional arguments 
    11251125 */ 
    11261126function add_settings_field($id, $title, $callback, $page, $section = 'default', $args = array()) { 
     
    12741274                sanitize_option( $setting, get_option($setting)); 
    12751275 
    12761276        // If settings were passed back from options.php then use them 
    1277         // Ignore transients if $sanitize is true, we dont' want the old values anyway 
     1277        // Ignore transients if $sanitize is true, we don't want the old values anyway 
    12781278        if ( isset($_GET['settings-updated']) && $_GET['settings-updated'] && get_transient('settings_errors') ) { 
    12791279                $settings_errors = get_transient('settings_errors'); 
    12801280                delete_transient('settings_errors'); 
     
    21592159 *                         false otherwise. Defaults to true 
    21602160 * @param array|string $other_attributes Other attributes that should be output with the button, 
    21612161 *                     mapping attributes to their values, such as array( 'tabindex' => '1' ). 
    2162  *                     These attributes will be ouput as attribute="value", such as tabindex="1". 
     2162 *                     These attributes will be output as attribute="value", such as tabindex="1". 
    21632163 *                     Defaults to no other attributes. Other attributes can also be provided as a 
    21642164 *                     string such as 'tabindex="1"', though the array format is typically cleaner. 
    21652165 */ 
     
    21802180 *                         false otherwise. Defaults to true 
    21812181 * @param array|string $other_attributes Other attributes that should be output with the button, 
    21822182 *                     mapping attributes to their values, such as array( 'tabindex' => '1' ). 
    2183  *                     These attributes will be ouput as attribute="value", such as tabindex="1". 
     2183 *                     These attributes will be output as attribute="value", such as tabindex="1". 
    21842184 *                     Defaults to no other attributes. Other attributes can also be provided as a 
    21852185 *                     string such as 'tabindex="1"', though the array format is typically cleaner. 
    21862186 */ 
  • wp-admin/includes/user.php

     
    196196 * 
    197197 * Simple function who's main purpose is to allow filtering of the 
    198198 * list of roles in the $wp_roles object so that plugins can remove 
    199  * innappropriate ones depending on the situation or user making edits. 
     199 * inappropriate ones depending on the situation or user making edits. 
    200200 * Specifically because without filtering anyone with the edit_users 
    201201 * capability can edit others to be administrators, even if they are 
    202202 * only editors or authors. This filter allows admins to delegate 
     
    329329        if ( ! get_user_option('default_password_nag') ) //Short circuit it. 
    330330                return; 
    331331 
    332         //get_user_setting = JS saved UI setting. else no-js-falback code. 
     332        //get_user_setting = JS saved UI setting. else no-js-fallback code. 
    333333        if ( 'hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag'] ) { 
    334334                delete_user_setting('default_password_nag'); 
    335335                update_user_option($user_ID, 'default_password_nag', false, true); 
  • wp-admin/includes/image.php

     
    138138} 
    139139 
    140140/** 
    141  * Calculated the new dimentions for a downsampled image. 
     141 * Calculated the new dimensions for a downsampled image. 
    142142 * 
    143143 * @since 2.0.0 
    144144 * @see wp_constrain_dimensions() 
  • wp-admin/includes/class-wp-filesystem-direct.php

     
    8989         * 
    9090         * @param string $file Path to the file. 
    9191         * @param mixed $group A group name or number. 
    92          * @param bool $recursive (optional) If set True changes file group recursivly. Defaults to False. 
     92         * @param bool $recursive (optional) If set True changes file group recursively. Defaults to False. 
    9393         * @return bool Returns true on success or false on failure. 
    9494         */ 
    9595        function chgrp($file, $group, $recursive = false) { 
     
    112112         * 
    113113         * @param string $file Path to the file. 
    114114         * @param int $mode (optional) The permissions as octal number, usually 0644 for files, 0755 for dirs. 
    115          * @param bool $recursive (optional) If set True changes file group recursivly. Defaults to False. 
     115         * @param bool $recursive (optional) If set True changes file group recursively. Defaults to False. 
    116116         * @return bool Returns true on success or false on failure. 
    117117         */ 
    118118        function chmod($file, $mode = false, $recursive = false) { 
     
    140140         * 
    141141         * @param string $file Path to the file. 
    142142         * @param mixed $owner A user name or number. 
    143          * @param bool $recursive (optional) If set True changes file owner recursivly. Defaults to False. 
     143         * @param bool $recursive (optional) If set True changes file owner recursively. Defaults to False. 
    144144         * @return bool Returns true on success or false on failure. 
    145145         */ 
    146146        function chown($file, $owner, $recursive = false) { 
  • wp-admin/includes/class-wp-filesystem-ftpext.php

     
    338338                } 
    339339 
    340340                $pwd = @ftp_pwd($this->link); 
    341                 if ( ! @ftp_chdir($this->link, $path) ) // Cant change to folder = folder doesnt exist 
     341                if ( ! @ftp_chdir($this->link, $path) ) // Cant change to folder = folder doesn't exist 
    342342                        return false; 
    343343                $list = @ftp_rawlist($this->link, '-a', false); 
    344344                @ftp_chdir($this->link, $pwd); 
  • wp-admin/includes/class-wp-filesystem-ssh2.php

     
    306306        } 
    307307 
    308308        function touch($file, $time = 0, $atime = 0) { 
    309                 //Not implmented. 
     309                //Not implemented. 
    310310        } 
    311311 
    312312        function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { 
  • wp-admin/edit-form-comment.php

     
    5454 
    5555<div class="misc-pub-section curtime misc-pub-section-last"> 
    5656<?php 
    57 // translators: Publish box date formt, see http://php.net/date 
     57// translators: Publish box date format, see http://php.net/date 
    5858$datef = __( 'M j, Y @ G:i' ); 
    5959$stamp = __('Submitted on: <b>%1$s</b>'); 
    6060$date = date_i18n( $datef, strtotime( $comment->comment_date ) ); 
  • wp-admin/menu.php

     
    134134                        $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php' ); 
    135135} 
    136136 
    137 // Add 'Editor' to the bottom of the Appearence menu. 
     137// Add 'Editor' to the bottom of the Appearance menu. 
    138138if ( ! is_multisite() ) 
    139139        add_action('admin_menu', '_add_themes_utility_last', 101); 
    140140function _add_themes_utility_last() {