Plugin Directory

Changeset 1319907


Ignore:
Timestamp:
01/02/2016 02:18:37 PM (10 years ago)
Author:
vividlteam
Message:

fix bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • thunder-port/trunk/thunder_port.php

    r1319905 r1319907  
    146146   
    147147    // 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");
    152149
    153150    $return = json_decode($list);
     
    208205function thunder_get_exist() {
    209206    // 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   
    214209    $string2 = json_decode($html2);
    215210
     
    551546        foreach($thelist as $list) {
    552547           
    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           
    557550            $string = json_decode($json);
    558551            $string = $string[0];
     
    15741567       
    15751568            $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           
    15821571            $string = json_decode($json);
    15831572            $string = $string[0];
Note: See TracChangeset for help on using the changeset viewer.