Ticket #37412: 37412.diff
| File 37412.diff, 7.3 KB (added by , 10 years ago) |
|---|
-
src/wp-admin/includes/class-automatic-upgrader-skin.php
22 22 protected $messages = array(); 23 23 24 24 /** 25 * Determines whether the upgrader needs FTP/SSH details in order to connect 26 * to the filesystem. 25 27 * 26 * @param bool $error 27 * @param string $context 28 * @param bool $allow_relaxed_file_ownership 29 * @return bool 28 * @since 3.7.0 29 * @since 4.6.0 The `$context` parameter default changed from `false` to an empty string. 30 * 31 * @see request_filesystem_credentials() 32 * 33 * @param bool $error Optional. Whether the current request has failed to connect. 34 * Default false. 35 * @param string $context Optional. Full path to the directory that is tested 36 * for being writable. Default empty. 37 * @param bool $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false. 38 * @return bool True on success, false on failure. 30 39 */ 31 40 public function request_filesystem_credentials( $error = false, $context = '', $allow_relaxed_file_ownership = false ) { 32 41 if ( $context ) { -
src/wp-admin/includes/class-wp-upgrader-skin.php
59 59 } 60 60 61 61 /** 62 * Displays a form to the user to request for their FTP/SSH details in order 63 * to connect to the filesystem. 62 64 * 63 * @param bool $error 64 * @param string $context 65 * @param bool $allow_relaxed_file_ownership 66 * @return type 65 * @since 2.8.0 66 * @since 4.6.0 The `$context` parameter default changed from `false` to an empty string. 67 * 68 * @see request_filesystem_credentials() 69 * 70 * @param bool $error Optional. Whether the current request has failed to connect. 71 * Default false. 72 * @param string $context Optional. Full path to the directory that is tested 73 * for being writable. Default empty. 74 * @param bool $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false. 75 * @return bool False on failure, true on success. 67 76 */ 68 public function request_filesystem_credentials( $error = false, $context = false, $allow_relaxed_file_ownership = false ) {77 public function request_filesystem_credentials( $error = false, $context = '', $allow_relaxed_file_ownership = false ) { 69 78 $url = $this->options['url']; 70 79 if ( ! $context ) { 71 80 $context = $this->options['context']; -
src/wp-admin/includes/file.php
957 957 * 958 958 * @param array $args Optional. Connection details. Default empty array. 959 959 * @param string $context Optional. Full path to the directory that is tested 960 * for being writable. Default false.960 * for being writable. Default empty. 961 961 * @param bool $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. 962 962 * Default false. 963 963 * @return string The transport to use, see description for valid return values. 964 964 */ 965 function get_filesystem_method( $args = array(), $context = false, $allow_relaxed_file_ownership = false ) {965 function get_filesystem_method( $args = array(), $context = '', $allow_relaxed_file_ownership = false ) { 966 966 $method = defined('FS_METHOD') ? FS_METHOD : false; // Please ensure that this is either 'direct', 'ssh2', 'ftpext' or 'ftpsockets' 967 967 968 968 if ( ! $context ) { … … 1027 1027 * Displays a form to the user to request for their FTP/SSH details in order 1028 1028 * to connect to the filesystem. 1029 1029 * 1030 * All chosen/entered details are saved, Excluding the Password.1030 * All chosen/entered details are saved, excluding the password. 1031 1031 * 1032 1032 * Hostnames may be in the form of hostname:portnumber (eg: wordpress.org:2467) 1033 1033 * to specify an alternate FTP/SSH port. 1034 1034 * 1035 * Plugins may override this form by returning true|false via the 1036 * {@see 'request_filesystem_credentials'} filter. 1035 * Plugins may override this form by returning true|false via the {@see 'request_filesystem_credentials'} filter. 1037 1036 * 1038 * @since 2.5. 1037 * @since 2.5.0 1038 * @since 4.6.0 The `$context` parameter default changed from `false` to an empty string. 1039 1039 * 1040 1040 * @global string $pagenow 1041 1041 * … … 1043 1043 * @param string $type Optional. Chosen type of filesystem. Default empty. 1044 1044 * @param bool $error Optional. Whether the current request has failed to connect. 1045 1045 * Default false. 1046 * @param string $context Optional. Full path to the directory that is tested 1047 * for being writable. Default false. 1048 * @param array $extra_fields Optional. Extra POST fields which should be checked for 1049 * to be included in the post. Default null. 1050 * @param bool $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. 1051 * Default false. 1046 * @param string $context Optional. Full path to the directory that is tested for being 1047 * writable. Default empty. 1048 * @param array $extra_fields Optional. Extra `POST` fields to be checked for inclusion in 1049 * the post. Default null. 1050 * @param bool $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false. 1052 1051 * 1053 1052 * @return bool False on failure, true on success. 1054 1053 */ 1055 function request_filesystem_credentials( $form_post, $type = '', $error = false, $context = false, $extra_fields = null, $allow_relaxed_file_ownership = false ) {1054 function request_filesystem_credentials( $form_post, $type = '', $error = false, $context = '', $extra_fields = null, $allow_relaxed_file_ownership = false ) { 1056 1055 global $pagenow; 1057 1056 1058 1057 /** … … 1062 1061 * output of the filesystem credentials form, returning that value instead. 1063 1062 * 1064 1063 * @since 2.5.0 1064 * @since 4.6.0 The `$context` parameter default changed from `false` to an empty string. 1065 1065 * 1066 1066 * @param mixed $output Form output to return instead. Default empty. 1067 1067 * @param string $form_post The URL to post the form to. … … 1160 1160 * Filters the connection types to output to the filesystem credentials form. 1161 1161 * 1162 1162 * @since 2.9.0 1163 * @since 4.6.0 The `$context` parameter default changed from `false` to an empty string. 1163 1164 * 1164 1165 * @param array $types Types of connections. 1165 1166 * @param array $credentials Credentials to connect with.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)