PluginProbe
Admin Options Pages / trunk
Admin Options Pages vtrunk
trunk 0.0.8 0.5.0 0.7.0 0.9.0 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5 0.9.6 0.9.7 0.9.8 0.9.9
admin-options-pages / App / File.php

File.php in Admin Options Pages trunk, at App/File.php

34 lines 622 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace AOP\App;
4
5 use Illuminate\Contracts\Filesystem\Filesystem;
6
7 class File
8 {
9 public static function filesystem()
10 {
11 global $wp_filesystem;
12
13 require_once ( ABSPATH . '/wp-admin/includes/file.php' );
14 WP_Filesystem();
15
16 return $wp_filesystem;
17 }
18
19 public static function get($file)
20 {
21 return self::filesystem()->get_contents( $file );
22 }
23
24 public static function exists($file)
25 {
26 return self::filesystem()->exists($file);
27 }
28
29 public static function getJsonDecoded($file)
30 {
31 return json_decode(static::get($file));
32 }
33 }
34