Make WordPress Core

Ticket #30591: 30591.diff

File 30591.diff, 12.3 KB (added by coffee2code, 10 years ago)

Patch mentioned in ticket description.

  • src/wp-admin/includes/class-wp-filesystem-direct.php

     
    4949        /**
    5050         * Write a string to a file
    5151         *
    52          * @param string $file Remote path to the file where to write the data.
     52         * @param string $file     Remote path to the file where to write the data.
    5353         * @param string $contents The data to write.
    54          * @param int $mode (optional) The file permissions as octal number, usually 0644.
     54         * @param int    $mode     Optional. The file permissions as octal number, usually 0644.
    5555         * @return bool False upon failure.
    5656         */
    5757        public function put_contents( $file, $contents, $mode = false ) {
     
    9999        /**
    100100         * Changes file group
    101101         *
    102          * @param string $file Path to the file.
    103          * @param mixed $group A group name or number.
    104          * @param bool $recursive (optional) If set True changes file group recursively. Defaults to False.
     102         * @param string $file      Path to the file.
     103         * @param mixed  $group    A group name or number.
     104         * @param bool   $recursive Optional. If set True changes file group recursively. Default false.
    105105         * @return bool Returns true on success or false on failure.
    106106         */
    107107        public function chgrp($file, $group, $recursive = false) {
     
    123123        /**
    124124         * Changes filesystem permissions
    125125         *
    126          * @param string $file Path to the file.
    127          * @param int $mode (optional) The permissions as octal number, usually 0644 for files, 0755 for dirs.
    128          * @param bool $recursive (optional) If set True changes file group recursively. Defaults to False.
     126         * @param string $file      Path to the file.
     127         * @param int    $mode      Optional. The permissions as octal number, usually 0644 for files, 0755 for dirs.
     128         * @param bool   $recursive Optional. If set True changes file group recursively. Default false.
    129129         * @return bool Returns true on success or false on failure.
    130130         */
    131131        public function chmod($file, $mode = false, $recursive = false) {
     
    152152        /**
    153153         * Changes file owner
    154154         *
    155          * @param string $file Path to the file.
    156          * @param mixed $owner A user name or number.
    157          * @param bool $recursive (optional) If set True changes file owner recursively. Defaults to False.
     155         * @param string $file      Path to the file.
     156         * @param mixed  $owner    A user name or number.
     157         * @param bool   $recursive Optional. If set True changes file owner recursively. Default false.
    158158         * @return bool Returns true on success or false on failure.
    159159         */
    160160        public function chown($file, $owner, $recursive = false) {
  • src/wp-admin/includes/file.php

     
    9797 *
    9898 * @since 2.6.0
    9999 *
    100  * @param string $folder Full path to folder
    101  * @param int $levels (optional) Levels of folders to follow, Default: 100 (PHP Loop limit).
     100 * @param string $folder Full path to folder.
     101 * @param int    $levels Optional. Levels of folders to follow, Default 100 (PHP Loop limit).
    102102 * @return bool|array False on failure, Else array of files
    103103 */
    104104function list_files( $folder = '', $levels = 100 ) {
     
    137137 *
    138138 * @since 2.6.0
    139139 *
    140  * @param string $filename (optional) Filename to base the Unique file off
    141  * @param string $dir (optional) Directory to store the file in
     140 * @param string $filename Optional. Filename to base the Unique file off. Default ''.
     141 * @param string $dir      Optional. Directory to store the file in. Default ''.
    142142 * @return string a writable filename
    143143 */
    144144function wp_tempnam($filename = '', $dir = '') {
     
    809809 *
    810810 * @since 2.5.0
    811811 *
    812  * @param array $args (optional) Connection args, These are passed directly to the WP_Filesystem_*() classes.
    813  * @param string $context (optional) Context for get_filesystem_method(), See function declaration for more information.
    814  * @param bool $allow_relaxed_file_ownership Whether to allow Group/World writable.
     812 * @param array  $args    Optional. Connection args, These are passed directly to the WP_Filesystem_*() classes. Default false.
     813 * @param string $context Optional. Context for get_filesystem_method(), See function declaration for more information. Default false.
     814 * @param bool   $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false.
    815815 * @return null|boolean false on failure, true on success
    816816 */
    817817function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_ownership = false ) {
  • src/wp-admin/includes/post.php

     
    11201120 *
    11211121 * @since 2.5.0
    11221122 *
    1123  * @param integer $id    Post ID or post object.
    1124  * @param string $title (optional) Title
    1125  * @param string $name (optional) Name
     1123 * @param int    $id    Post ID or post object.
     1124 * @param string $title Optional. Title.
     1125 * @param string $name  Optional. Name.
    11261126 * @return array With two entries of type string
    11271127 */
    11281128function get_sample_permalink($id, $title = null, $name = null) {
     
    11851185 *
    11861186 * @since 2.5.0
    11871187 *
    1188  * @param integer $id Post ID or post object.
     1188 * @param int    $id        Post ID or post object.
    11891189 * @param string $new_title Optional. New title.
    1190  * @param string $new_slug Optional. New slug.
     1190 * @param string $new_slug  Optional. New slug.
    11911191 * @return string The HTML of the sample permalink slug editor.
    11921192 */
    11931193function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
  • src/wp-includes/class.wp-scripts.php

     
    5151         *
    5252         * Prints the scripts passed to it or the print queue. Also prints all necessary dependencies.
    5353         *
    54          * @param mixed $handles (optional) Scripts to be printed. (void) prints queue, (string) prints that script, (array of strings) prints those scripts.
    55          * @param int $group (optional) If scripts were queued in groups prints this group number.
     54         * @param mixed $handles Optional. Scripts to be printed. (void) prints queue, (string) prints that script, (array of strings) prints those scripts.
     55         * @param int   $group   Optional. If scripts were queued in groups prints this group number.
    5656         * @return array Scripts that have been printed
    5757         */
    5858        public function print_scripts( $handles = false, $group = false ) {
  • src/wp-includes/deprecated.php

     
    12141214 *
    12151215 * @param string $username The user's username.
    12161216 * @param string $password The user's password.
    1217  * @param string $email The user's email (optional).
     1217 * @param string $email    Optional. The user's email.
    12181218 * @return int The new user's ID.
    12191219 */
    12201220function create_user($username, $password, $email) {
  • src/wp-includes/link-template.php

     
    25922592 *
    25932593 * @since 3.0.0
    25942594 *
    2595  * @param  string $path   (optional) Path relative to the home url.
    2596  * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https', or 'relative'.
     2595 * @param  string $path   Optional. Path relative to the home url.
     2596 * @param  string $scheme Optional. Scheme to give the home url context. Currently 'http', 'https', or 'relative'.
    25972597 * @return string Home url link with optional path appended.
    25982598*/
    25992599function home_url( $path = '', $scheme = null ) {
     
    26092609 *
    26102610 * @since 3.0.0
    26112611 *
    2612  * @param  int $blog_id   (optional) Blog ID. Defaults to current blog.
    2613  * @param  string $path   (optional) Path relative to the home url.
    2614  * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https', or 'relative'.
    2615  * @return string Home url link with optional path appended.
     2612 * @param  int         $blog_id     Optional. Blog ID. Defaults to current blog. Default null.
     2613 * @param  string      $path        Optional. Path relative to the home URL. Default ''.
     2614 * @param  string|null $orig_scheme Optional. Scheme to give the home URL context. Default null.
     2615 *                                  Accepts 'http', 'https', 'relative', or null.
     2616 * @return string Home URL link with optional path appended.
    26162617*/
    26172618function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
    26182619        $orig_scheme = $scheme;
     
    26762677 *
    26772678 * @since 3.0.0
    26782679 *
    2679  * @param int $blog_id (optional) Blog ID. Defaults to current blog.
     2680 * @param int $blog_id Optional. Blog ID. Defaults to current blog.
    26802681 * @param string $path Optional. Path relative to the site url.
    26812682 * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', 'admin', or 'relative'.
    26822683 * @return string Site url link with optional path appended.
     
    27272728 *
    27282729 * @since 3.0.0
    27292730 *
    2730  * @param int $blog_id (optional) Blog ID. Defaults to current blog.
    2731  * @param string $path Optional path relative to the admin url.
    2732  * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
     2731 * @param int    $blog_id Optional. Blog ID. Defaults to current blog.
     2732 * @param string $path    Optional. Path relative to the admin url. Default ''.
     2733 * @param string $scheme  Optional. The scheme to use. Default 'admin', which obeys force_ssl_admin() and is_ssl().
     2734 *                        Accepts 'http' or 'https', to force those schemes.
    27332735 * @return string Admin url link with optional path appended.
    27342736*/
    27352737function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {
     
    29042906 *
    29052907 * @since 3.0.0
    29062908 *
    2907  * @param  string $path   (optional) Path relative to the home url.
    2908  * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https', or 'relative'.
     2909 * @param  string $path   Optional. Path relative to the home url.
     2910 * @param  string $scheme Optional. Scheme to give the home url context. Currently 'http', 'https', or 'relative'.
    29092911 * @return string Home url link with optional path appended.
    29102912*/
    29112913function network_home_url( $path = '', $scheme = null ) {
  • src/wp-includes/meta.php

     
    850850 * @param string $type Type of meta
    851851 * @param string $primary_table
    852852 * @param string $primary_id_column
    853  * @param object $context (optional) The main query object
     853 * @param object $context Optional. The main query object
    854854 * @return array( 'join' => $join_sql, 'where' => $where_sql )
    855855 */
    856856function get_meta_sql( $meta_query, $type, $primary_table, $primary_id_column, $context = null ) {
  • src/wp-includes/user.php

     
    20222022 *
    20232023 * @param string $username The user's username.
    20242024 * @param string $password The user's password.
    2025  * @param string $email The user's email (optional).
     2025 * @param string $email    Optional. The user's email. Default ''.
    20262026 * @return int The new user's ID.
    20272027 */
    20282028function wp_create_user($username, $password, $email = '') {
  • src/wp-includes/wp-db.php

     
    735735         * @since 3.1.0
    736736         *
    737737         * @param resource $dbh     The resource given by mysql_connect
    738          * @param string   $charset The character set (optional)
    739          * @param string   $collate The collation (optional)
     738         * @param string   $charset Optional. The character set.
     739         * @param string   $collate Optional. The collation.
    740740         */
    741741        public function set_charset( $dbh, $charset = null, $collate = null ) {
    742742                if ( ! isset( $charset ) )