Plugin Directory

Changeset 2124147


Ignore:
Timestamp:
07/16/2019 06:50:19 PM (7 years ago)
Author:
pinpoll
Message:

Updated from GitHub

Location:
pinpoll/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • pinpoll/trunk/admin/api/pinpoll-api.php

    r1766923 r2124147  
    509509    function call_with_refresh_token_and_signin($callback) {
    510510      $response= $callback();
     511      // handle unknown error
     512      if (is_wp_error($response)) {
     513        $refresh = $this->pinpoll_refresh_sign_in();
     514        if ($refresh['bool']){
     515          return $callback();
     516        } else {
     517          printf( '<div class="wrap"><div class="error notice notice-error is-dismissible"> <p> %s </p><p><b>Details:</b></br> %s </p> </div></div>', esc_html__($this->texts['errorfatal'], 'pinpoll'), $response->get_error_message() );
     518          die;
     519        }
     520      }
    511521      $responseBody = json_decode( wp_remote_retrieve_body( $response ), true );
    512       if(!empty($response) && ($response['response']['code'] != 200)) {
     522      if(!empty($response) && is_array($response) && ($response['response']['code'] != 200)) {
     523        // handle token expired
    513524        if (!empty($responseBody) && (array_key_exists('error', $responseBody) && $responseBody['error'] === 'token_expired')) {
    514525          $refreshResponse = $this->pinpoll_refresh_token();
     
    517528          }
    518529        }
     530        // handle token invalid
    519531        if( (isset($refreshResponse) && !$refreshResponse['success']) || (!empty($responseBody) && array_key_exists('error', $responseBody) && $responseBody['error'] === 'token_invalid')) {
    520532          $refresh = $this->pinpoll_refresh_sign_in();
  • pinpoll/trunk/admin/pinpoll-dashboard.php

    r1895186 r2124147  
    6969                </h2>
    7070                <div class="pp-inside">
    71                       <h1><span class="pp-count-votes"><?php printf( $data['body']['votes'] ); ?></span></h1>
     71                      <h1><span class="pp-count-votes"><?php if(isset($data['body']['votes'])) printf( $data['body']['votes'] ); ?></span></h1>
    7272                      <small><?php printf( $texts['votestotal'] ); ?></small>
    7373                </div>
     
    126126                <div class="pp-inside">
    127127                  <div class="main">
    128                       <h1><span class="pp-count-votes"><?php printf( $data['body']['votes_month'] ); ?></span></h1>
     128                      <h1><span class="pp-count-votes"><?php if(isset($data['body']['votes_month'])) printf( $data['body']['votes_month'] ); ?></span></h1>
    129129                      <small><?php printf( $texts['votestotal'] ); ?></small>
    130130                  </div>
  • pinpoll/trunk/admin/pinpoll-poll-detail.php

    r1953203 r2124147  
    220220                </h2>
    221221                <div class="pp-details-inside">
    222                   <div data-pinpoll-id="<?php printf( $id ); ?>" <?php (PINPOLL_JS_URL!=='https://pinpoll.com') ? printf("data-location=\"". PINPOLL_JS_URL. "\"") : printf("") ?> data-trackmode="preview" data-cdn=""></div>
     222                  <div data-pinpoll-id="<?php printf( $id ); ?>" <?php (PINPOLL_JS_URL!=='https://pinpoll.com') ? printf("data-location=\"". PINPOLL_JS_URL. "\"") : printf("") ?> data-editmode="on" data-cdn=""></div>
    223223                </div>
    224224              </div>
  • pinpoll/trunk/pinpoll.php

    r1953203 r2124147  
    1212 * Domain Path: /lang
    1313 * Description: Create fun polls & understand your audience!
    14  * Version: 3.0.14
     14 * Version: 3.0.15
    1515 * Min WP Version: 3.3.0
    1616 * Author: Pinpoll
  • pinpoll/trunk/readme.txt

    r1953203 r2124147  
    44Tags: free, marketing, survey, poll, analytics, feedback, advertising, polls, user engagement, engagement, content generation, analysis, polling, statistics, stats, retargeting, remarketing, profiling, opinion, advertise, audience, conversion, recommendation, page impressions, ads, secure, responsive, mobile responsive, mobile, quiz, quizzes, feedback, customer satisfaction, lead, lead generation, support
    55Requires at least: 3.3.0
    6 Tested up to: 4.9.2
     6Tested up to: 5.2.2
    77Stable tag: trunk
    88License: GPLv2 or later
     
    173173= 3.0.14 =
    174174* Fixed error on poll detail page
     175
     176= 3.0.15 =
     177* Improved error handling
     178* Fixed Edit-Poll Bug
Note: See TracChangeset for help on using the changeset viewer.