Plugin Directory

Changeset 1824682


Ignore:
Timestamp:
02/19/2018 03:27:14 PM (8 years ago)
Author:
TheGP
Message:

sync works only if users access plugin from admin panel

Location:
jumpout/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • jumpout/trunk/class.php

    r1665806 r1824682  
    3535    private
    3636        $settings_default, $jo_url, $popupfiles_domain,
    37         $version = '3.2.0';
    38 
    39     function JumpOut()
     37        $version = '3.2.1';
     38
     39    function JumpOut($is_admin = FALSE)
    4040    {
    4141        $this->settings_default = array(
     
    6060
    6161        // if last sync was more than 2 days ago, auto syncing
    62         if (time() - 60 * 60 * 24 > $this->settings['last_sync'] && NULL !== $this->settings['session_token']) {
     62        if ($is_admin && time() - 60 * 60 * 24 > $this->settings['last_sync'] && NULL !== $this->settings['session_token']) {
    6363            $this->syncScripts();
    6464        }
  • jumpout/trunk/launch.php

    r1665806 r1824682  
    3434
    3535
    36 $JumpOut = new JumpOut();
    37 $GLOBALS['JumpOutClass'] = &$JumpOut;
    38 
    3936// Действуем в зависимости от того в админке мы или нет
    4037if (is_admin()) {
     38
     39    $JumpOut = new JumpOut(TRUE);
     40    $GLOBALS['JumpOutClass'] = &$JumpOut;
     41
    4142    ob_start();
    4243    add_action('admin_menu', array($JumpOut, 'createMenuItem'));
    4344    add_action('admin_init', array($JumpOut, 'addScripts'));
    4445} else {
     46    $JumpOut = new JumpOut(FALSE);
     47    $GLOBALS['JumpOutClass'] = &$JumpOut;
    4548    //echo $_SERVER['REQUEST_URI'];
    4649
  • jumpout/trunk/readme.txt

    r1665806 r1824682  
    33Tags: popup, jumpout
    44Requires at least: 2.5.0
    5 Tested up to: 4.7.3
     5Tested up to: 4.9.4
    66Stable tag: trunk
    77License: GPLv2 or later
     
    3434
    3535== Changelog ==
     36= 3.2.1 =
     37* Sync works only if plugin accessed from admin panel
    3638= 3.2.0 =
    3739* OneCode can be inserted via textarea, if plugin fails sync
Note: See TracChangeset for help on using the changeset viewer.