Plugin Directory

Changeset 3175339


Ignore:
Timestamp:
10/24/2024 09:10:32 PM (17 months ago)
Author:
calj
Message:

1.5 fix wp_remote_get

Location:
calj/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • calj/trunk/CalJPlugin.php

    r3175332 r3175339  
    141141
    142142        $city =  self::getoptopt('city', '');
    143         $response = file_get_contents('https://api.calj.net/wp/1/shabbat.json?city='.$city.'&key='.$key);
     143        // Fixed by idokd ( ido@yalla-ya.com ): instead of file_get_contents
     144        $url = 'https://api.calj.net/wp/1/shabbat.json?city='.$city.'&key='.$key;
     145        $response = wp_remote_get( $url );
     146        $response = wp_remote_retrieve_body( $response );
    144147
    145148        $response = json_decode($response, true);
  • calj/trunk/calj.php

    r3175332 r3175339  
    66 * Plugin URI: https://calj.net
    77 * Description: Add the Shabbat times on your site.
    8  * Version: 1.4.3
     8 * Version: 1.5
    99 * Author: Gabriel Zerbib <gabriel@calj.net>
    1010 * Author URI: https://calj.net
  • calj/trunk/readme.txt

    r3175296 r3175339  
    146146== Changelog ==
    147147
     148= 1.5 =
     149Fix by @idokd for wp_remote_get
     150
    148151= 1.4.2 =
    149152Better error handling
Note: See TracChangeset for help on using the changeset viewer.