|
@@ 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 |
|
|
|
@@ 2777-2779 (lines=3) @@
|
| 2774 |
|
$method = ''; // Leave blank so WP_Filesystem can populate it as necessary. |
| 2775 |
|
$fields = array_keys( $_POST ); // Extra fields to pass to WP_Filesystem. |
| 2776 |
|
|
| 2777 |
|
if ( false === ( $creds = request_filesystem_credentials( esc_url_raw( $url ), $method, false, false, $fields ) ) ) { |
| 2778 |
|
return true; // Stop the normal page form from displaying, credential request form will be shown. |
| 2779 |
|
} |
| 2780 |
|
|
| 2781 |
|
// Now we have some credentials, setup WP_Filesystem. |
| 2782 |
|
if ( ! WP_Filesystem( $creds ) ) { |
|
@@ 2782-2787 (lines=6) @@
|
| 2779 |
|
} |
| 2780 |
|
|
| 2781 |
|
// Now we have some credentials, setup WP_Filesystem. |
| 2782 |
|
if ( ! WP_Filesystem( $creds ) ) { |
| 2783 |
|
// Our credentials were no good, ask the user for them again. |
| 2784 |
|
request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, $fields ); |
| 2785 |
|
|
| 2786 |
|
return true; |
| 2787 |
|
} |
| 2788 |
|
|
| 2789 |
|
/* If we arrive here, we have the filesystem */ |
| 2790 |
|
|