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