|
@@ 837-840 (lines=4) @@
|
| 834 |
|
return true; |
| 835 |
|
} |
| 836 |
|
|
| 837 |
|
if ( ! WP_Filesystem( $creds ) ) { |
| 838 |
|
request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, array() ); // Setup WP_Filesystem. |
| 839 |
|
return true; |
| 840 |
|
} |
| 841 |
|
|
| 842 |
|
/* If we arrive here, we have the filesystem. */ |
| 843 |
|
|
|
@@ 2898-2900 (lines=3) @@
|
| 2895 |
|
$method = ''; // Leave blank so WP_Filesystem can populate it as necessary. |
| 2896 |
|
$fields = array_keys( $_POST ); // Extra fields to pass to WP_Filesystem. |
| 2897 |
|
|
| 2898 |
|
if ( false === ( $creds = request_filesystem_credentials( esc_url_raw( $url ), $method, false, false, $fields ) ) ) { |
| 2899 |
|
return true; // Stop the normal page form from displaying, credential request form will be shown. |
| 2900 |
|
} |
| 2901 |
|
|
| 2902 |
|
// Now we have some credentials, setup WP_Filesystem. |
| 2903 |
|
if ( ! WP_Filesystem( $creds ) ) { |
|
@@ 2903-2908 (lines=6) @@
|
| 2900 |
|
} |
| 2901 |
|
|
| 2902 |
|
// Now we have some credentials, setup WP_Filesystem. |
| 2903 |
|
if ( ! WP_Filesystem( $creds ) ) { |
| 2904 |
|
// Our credentials were no good, ask the user for them again. |
| 2905 |
|
request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, $fields ); |
| 2906 |
|
|
| 2907 |
|
return true; |
| 2908 |
|
} |
| 2909 |
|
|
| 2910 |
|
/* If we arrive here, we have the filesystem */ |
| 2911 |
|
|