Plugin Directory

Changeset 2782934


Ignore:
Timestamp:
09/11/2022 09:04:40 AM (3 years ago)
Author:
pmpr
Message:

update codebase

Location:
pmpr-ir
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pmpr-ir/tags/1.2.1/src/Pmpr/Plugin/Pmpr/Component/Base.php

    r2782718 r2782934  
    133133        $this->addAction('init', [$this, 'init'])
    134134             ->addAction($this->getScheduleHook(), [$this, 'checkComponentsUpdate'])
    135              ->addAction("pmpr_{$this->getType()}_component_updated", [$this, 'deleteComponentsCache'])
     135             ->addAction("pmpr_{$this->getType()}_component_updated", [$this, 'deleteTransients'])
    136136             ->addAction("pmpr_check_{$this->getName()}_components_update_done", [$this, 'deleteTransients']);
    137137
     
    163163    {
    164164        delete_transient($this->getBubbleNotificationKey());
    165         $this->deleteComponentsCache();
    166     }
    167 
    168     public function deleteComponentsCache()
    169     {
    170165        delete_transient(Manipulate::getComponentsCacheKey($this->getType()));
    171166    }
     
    205200    public function adminInit()
    206201    {
     202        if ($this->isCurrentPage()) {
     203
     204            $this->deleteTransients();
     205        }
     206
    207207        $this->componentUpdateRows();
    208208        $transient = $this->getBubbleNotificationKey();
     
    213213
    214214                $value = 0;
    215                 $this->deleteComponentsCache();
     215                $this->deleteTransients();
    216216
    217217                foreach ($items as $item) {
  • pmpr-ir/trunk/src/Pmpr/Plugin/Pmpr/Component/Base.php

    r2782718 r2782934  
    133133        $this->addAction('init', [$this, 'init'])
    134134             ->addAction($this->getScheduleHook(), [$this, 'checkComponentsUpdate'])
    135              ->addAction("pmpr_{$this->getType()}_component_updated", [$this, 'deleteComponentsCache'])
     135             ->addAction("pmpr_{$this->getType()}_component_updated", [$this, 'deleteTransients'])
    136136             ->addAction("pmpr_check_{$this->getName()}_components_update_done", [$this, 'deleteTransients']);
    137137
     
    163163    {
    164164        delete_transient($this->getBubbleNotificationKey());
    165         $this->deleteComponentsCache();
    166     }
    167 
    168     public function deleteComponentsCache()
    169     {
    170165        delete_transient(Manipulate::getComponentsCacheKey($this->getType()));
    171166    }
     
    205200    public function adminInit()
    206201    {
     202        if ($this->isCurrentPage()) {
     203
     204            $this->deleteTransients();
     205        }
     206
    207207        $this->componentUpdateRows();
    208208        $transient = $this->getBubbleNotificationKey();
     
    213213
    214214                $value = 0;
    215                 $this->deleteComponentsCache();
     215                $this->deleteTransients();
    216216
    217217                foreach ($items as $item) {
Note: See TracChangeset for help on using the changeset viewer.