Plugin Directory

Changeset 1319905


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

fix bug

File:
1 edited

Legend:

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

    r1319903 r1319905  
    147147    // 1. using file
    148148    // $list = file_get_contents(plugin_dir_path( __FILE__ ) . "list/allplugins.json");
    149     $list_ori =  wp_remote_get(plugin_dir_path( __FILE__ ) . "list/allplugins.json");
    150     $list = wp_remote_retrieve_body( $list_ori );
     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 );
    151152
    152153    $return = json_decode($list);
     
    208209    // 1. using files
    209210    // $html2 = file_get_contents(plugin_dir_path( __FILE__ ) . "list/exist.json");     
    210     $html2_ori =  wp_remote_get(plugin_dir_path( __FILE__ ) . "list/exist.json");
    211     $html2 = wp_remote_retrieve_body( $html2_ori );
     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 );
    212214    $string2 = json_decode($html2);
    213215
     
    549551        foreach($thelist as $list) {
    550552           
    551             // $json = file_get_contents(plugin_dir_path( __FILE__ ).'json/'.$list);       
    552             $json_ori =  wp_remote_get(plugin_dir_path( __FILE__ ).'json/'.$list);
    553             $json = wp_remote_retrieve_body( $json_ori );
     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 );
    554557            $string = json_decode($json);
    555558            $string = $string[0];
     
    15731576           
    15741577            // $json = file_get_contents(''.plugin_dir_url( __FILE__ ) . '/json/'.$list);       
     1578            $json = file_get_contents('json/'.$list);       
    15751579            $json_ori =  wp_remote_get(plugin_dir_path( __FILE__ ).'json/'.$list);
    15761580            $json = wp_remote_retrieve_body( $json_ori );
Note: See TracChangeset for help on using the changeset viewer.