Changeset 1319903
- Timestamp:
- 01/02/2016 01:56:59 PM (10 years ago)
- File:
-
- 1 edited
-
thunder-port/trunk/thunder_port.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
thunder-port/trunk/thunder_port.php
r1319898 r1319903 147 147 // 1. using file 148 148 // $list = file_get_contents(plugin_dir_path( __FILE__ ) . "list/allplugins.json"); 149 $list = wp_remote_get(plugin_dir_path( __FILE__ ) . "list/allplugins.json");150 $list = wp_remote_retrieve_body( $list );149 $list_ori = wp_remote_get(plugin_dir_path( __FILE__ ) . "list/allplugins.json"); 150 $list = wp_remote_retrieve_body( $list_ori ); 151 151 152 152 $return = json_decode($list); … … 208 208 // 1. using files 209 209 // $html2 = file_get_contents(plugin_dir_path( __FILE__ ) . "list/exist.json"); 210 $html2 = wp_remote_get(plugin_dir_path( __FILE__ ) . "list/exist.json");211 $html2 = wp_remote_retrieve_body( $html2 );210 $html2_ori = wp_remote_get(plugin_dir_path( __FILE__ ) . "list/exist.json"); 211 $html2 = wp_remote_retrieve_body( $html2_ori ); 212 212 $string2 = json_decode($html2); 213 213 … … 550 550 551 551 // $json = file_get_contents(plugin_dir_path( __FILE__ ).'json/'.$list); 552 $json = wp_remote_get(plugin_dir_path( __FILE__ ).'json/'.$list);553 $json = wp_remote_retrieve_body( $json );552 $json_ori = wp_remote_get(plugin_dir_path( __FILE__ ).'json/'.$list); 553 $json = wp_remote_retrieve_body( $json_ori ); 554 554 $string = json_decode($json); 555 555 $string = $string[0]; … … 1573 1573 1574 1574 // $json = file_get_contents(''.plugin_dir_url( __FILE__ ) . '/json/'.$list); 1575 $json = wp_remote_get(plugin_dir_path( __FILE__ ).'json/'.$list);1576 $json = wp_remote_retrieve_body( $json );1575 $json_ori = wp_remote_get(plugin_dir_path( __FILE__ ).'json/'.$list); 1576 $json = wp_remote_retrieve_body( $json_ori ); 1577 1577 1578 1578 $string = json_decode($json);
Note: See TracChangeset
for help on using the changeset viewer.