Plugin Directory

Changeset 2236603


Ignore:
Timestamp:
01/31/2020 06:08:36 PM (6 years ago)
Author:
rgjo7n
Message:

prevent warnings

Location:
remote-snippets/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • remote-snippets/trunk/readme.txt

    r2236220 r2236603  
    44Requires at least: 4.4
    55Tested up to: 5.3.2
    6 Stable tag: 1.0.2
     6Stable tag: 1.0.3
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • remote-snippets/trunk/remote-snippets.php

    r2236220 r2236603  
    55 * Description:     Import JSON and CSV data and display it using a Twig template. Consume API's and Webservices and display live data on your Wordpress site.
    66 * Author:          rgjo7n
    7  * Version:         1.0.2
     7 * Version:         1.0.3
    88 *
    99 * @package         Remote_Snippets
  • remote-snippets/trunk/src/Remote.php

    r2236216 r2236603  
    5252        $userData = (array)wp_get_current_user()->data;
    5353        unset($userData->user_pass);
    54         $userMeta = get_user_meta($userData['ID']);
    55         unset($userMeta['session_tokens']);
    56         $data['wp_user'] = array_merge($userData, $userMeta);
     54       
     55        if (isset($userData['ID'])) {
     56            $userMeta = get_user_meta($userData['ID']);
     57            unset($userMeta['session_tokens']);
     58            $data['wp_user'] = array_merge($userData, $userMeta);
     59        }
    5760
    5861        $postData = get_post(get_the_ID());
  • remote-snippets/trunk/src/ShortCode.php

    r2236216 r2236603  
    110110             }
    111111
    112              if ($settings->remotesnippet_cache_enable == 'Y') {
     112             if (isset($settings->remotesnippet_cache_enable) && ($settings->remotesnippet_cache_enable == 'Y')) {
    113113                 $timeout = (int)$settings->remotesnippet_cache_timeout;
    114114                 if ($timeout > 0) {
  • remote-snippets/trunk/src/SingleTemplate.php

    r2236216 r2236603  
    55class SingleTemplate
    66{
    7     public function remotesnippet_single_template($path)
     7    public static function remotesnippet_single_template($path)
    88    {
    99        global $post;
     
    1717    }
    1818
    19     public function remotesnippet_the_content($content)
     19    public static function remotesnippet_the_content($content)
    2020    {
    2121        if (is_singular('remotesnippets')) {
Note: See TracChangeset for help on using the changeset viewer.