Conditions | 3 |
Paths | 2 |
Total Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
73 | function load() { |
||
74 | |||
75 | // vars |
||
76 | $this->view = array( |
||
77 | 'json' => array(), |
||
78 | ); |
||
79 | |||
80 | |||
81 | // load json |
||
82 | $request = wp_remote_post( 'http://assets.advancedcustomfields.com/add-ons/add-ons.json' ); |
||
83 | |||
84 | // validate |
||
85 | if( is_wp_error($request) || wp_remote_retrieve_response_code($request) != 200) |
||
86 | { |
||
87 | acf_add_admin_notice(__('<b>Error</b>. Could not load add-ons list', 'acf'), 'error'); |
||
88 | } |
||
89 | else |
||
90 | { |
||
91 | $this->view['json'] = json_decode( $request['body'], true ); |
||
92 | } |
||
93 | |||
94 | } |
||
95 | |||
124 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.