| Conditions | 4 |
| Paths | 6 |
| Total Lines | 21 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 43 | public static function file_system_write_access() { |
||
| 44 | if ( ! function_exists( 'get_filesystem_method' ) ) { |
||
| 45 | require_once( ABSPATH . 'wp-admin/includes/file.php' ); |
||
| 46 | } |
||
| 47 | |||
| 48 | require_once( ABSPATH . 'wp-admin/includes/template.php' ); |
||
| 49 | |||
| 50 | $filesystem_method = get_filesystem_method(); |
||
| 51 | if ( $filesystem_method === 'direct' ) { |
||
| 52 | return true; |
||
| 53 | } |
||
| 54 | |||
| 55 | ob_start(); |
||
| 56 | $filesystem_credentials_are_stored = request_filesystem_credentials( self_admin_url() ); |
||
| 57 | ob_end_clean(); |
||
| 58 | if ( $filesystem_credentials_are_stored ) { |
||
| 59 | return true; |
||
| 60 | } |
||
| 61 | |||
| 62 | return false; |
||
| 63 | } |
||
| 64 | |||
| 69 | } |