|
@@ 731-734 (lines=4) @@
|
| 728 |
|
return true; |
| 729 |
|
} |
| 730 |
|
|
| 731 |
|
if ( ! WP_Filesystem( $creds ) ) { |
| 732 |
|
request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, array() ); // Setup WP_Filesystem. |
| 733 |
|
return true; |
| 734 |
|
} |
| 735 |
|
|
| 736 |
|
/* If we arrive here, we have the filesystem. */ |
| 737 |
|
|
|
@@ 2758-2760 (lines=3) @@
|
| 2755 |
|
$method = ''; // Leave blank so WP_Filesystem can populate it as necessary. |
| 2756 |
|
$fields = array_keys( $_POST ); // Extra fields to pass to WP_Filesystem. |
| 2757 |
|
|
| 2758 |
|
if ( false === ( $creds = request_filesystem_credentials( esc_url_raw( $url ), $method, false, false, $fields ) ) ) { |
| 2759 |
|
return true; // Stop the normal page form from displaying, credential request form will be shown. |
| 2760 |
|
} |
| 2761 |
|
|
| 2762 |
|
// Now we have some credentials, setup WP_Filesystem. |
| 2763 |
|
if ( ! WP_Filesystem( $creds ) ) { |
|
@@ 2763-2768 (lines=6) @@
|
| 2760 |
|
} |
| 2761 |
|
|
| 2762 |
|
// Now we have some credentials, setup WP_Filesystem. |
| 2763 |
|
if ( ! WP_Filesystem( $creds ) ) { |
| 2764 |
|
// Our credentials were no good, ask the user for them again. |
| 2765 |
|
request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, $fields ); |
| 2766 |
|
|
| 2767 |
|
return true; |
| 2768 |
|
} |
| 2769 |
|
|
| 2770 |
|
/* If we arrive here, we have the filesystem */ |
| 2771 |
|
|