|
@@ 826-829 (lines=4) @@
|
| 823 |
|
return true; |
| 824 |
|
} |
| 825 |
|
|
| 826 |
|
if ( ! WP_Filesystem( $creds ) ) { |
| 827 |
|
request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, array() ); // Setup WP_Filesystem. |
| 828 |
|
return true; |
| 829 |
|
} |
| 830 |
|
|
| 831 |
|
/* If we arrive here, we have the filesystem. */ |
| 832 |
|
|
|
@@ 2873-2875 (lines=3) @@
|
| 2870 |
|
$method = ''; // Leave blank so WP_Filesystem can populate it as necessary. |
| 2871 |
|
$fields = array_keys( $_POST ); // Extra fields to pass to WP_Filesystem. |
| 2872 |
|
|
| 2873 |
|
if ( false === ( $creds = request_filesystem_credentials( esc_url_raw( $url ), $method, false, false, $fields ) ) ) { |
| 2874 |
|
return true; // Stop the normal page form from displaying, credential request form will be shown. |
| 2875 |
|
} |
| 2876 |
|
|
| 2877 |
|
// Now we have some credentials, setup WP_Filesystem. |
| 2878 |
|
if ( ! WP_Filesystem( $creds ) ) { |
|
@@ 2878-2883 (lines=6) @@
|
| 2875 |
|
} |
| 2876 |
|
|
| 2877 |
|
// Now we have some credentials, setup WP_Filesystem. |
| 2878 |
|
if ( ! WP_Filesystem( $creds ) ) { |
| 2879 |
|
// Our credentials were no good, ask the user for them again. |
| 2880 |
|
request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, $fields ); |
| 2881 |
|
|
| 2882 |
|
return true; |
| 2883 |
|
} |
| 2884 |
|
|
| 2885 |
|
/* If we arrive here, we have the filesystem */ |
| 2886 |
|
|