Changeset 1319907
- Timestamp:
- 01/02/2016 02:18:37 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
r1319905 r1319907 146 146 147 147 // 1. using file 148 // $list = file_get_contents(plugin_dir_path( __FILE__ ) . "list/allplugins.json"); 149 $list = file_get_contents("list/allplugins.json"); 150 // $list_ori = wp_remote_get(plugin_dir_path( __FILE__ ) . "list/allplugins.json"); 151 // $list = wp_remote_retrieve_body( $list_ori ); 148 $list = file_get_contents("".plugin_dir_path( __FILE__ ) . "list/allplugins.json"); 152 149 153 150 $return = json_decode($list); … … 208 205 function thunder_get_exist() { 209 206 // 1. using files 210 // $html2 = file_get_contents(plugin_dir_path( __FILE__ ) . "list/exist.json"); 211 $html2 = file_get_contents("list/exist.json"); 212 // $html2_ori = wp_remote_get(plugin_dir_path( __FILE__ ) . "list/exist.json"); 213 // $html2 = wp_remote_retrieve_body( $html2_ori ); 207 $html2 = file_get_contents("".plugin_dir_path( __FILE__ ) . "list/exist.json"); 208 214 209 $string2 = json_decode($html2); 215 210 … … 551 546 foreach($thelist as $list) { 552 547 553 $json = file_get_contents(plugin_dir_path( __FILE__ ).'json/'.$list); 554 $json = file_get_contents('json/'.$list); 555 // $json_ori = wp_remote_get(plugin_dir_path( __FILE__ ).'json/'.$list); 556 // $json = wp_remote_retrieve_body( $json_ori ); 548 $json = file_get_contents(''.plugin_dir_path( __FILE__ ).'json/'.$list.''); 549 557 550 $string = json_decode($json); 558 551 $string = $string[0]; … … 1574 1567 1575 1568 $list = $plugins.'.json'; 1576 1577 // $json = file_get_contents(''.plugin_dir_url( __FILE__ ) . '/json/'.$list); 1578 $json = file_get_contents('json/'.$list); 1579 $json_ori = wp_remote_get(plugin_dir_path( __FILE__ ).'json/'.$list); 1580 $json = wp_remote_retrieve_body( $json_ori ); 1581 1569 $json = file_get_contents(''.plugin_dir_path( __FILE__ ) . 'json/'.$list.''); 1570 1582 1571 $string = json_decode($json); 1583 1572 $string = $string[0];
Note: See TracChangeset
for help on using the changeset viewer.