Changeset 2782934
- Timestamp:
- 09/11/2022 09:04:40 AM (3 years ago)
- Location:
- pmpr-ir
- Files:
-
- 2 edited
-
tags/1.2.1/src/Pmpr/Plugin/Pmpr/Component/Base.php (modified) (4 diffs)
-
trunk/src/Pmpr/Plugin/Pmpr/Component/Base.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pmpr-ir/tags/1.2.1/src/Pmpr/Plugin/Pmpr/Component/Base.php
r2782718 r2782934 133 133 $this->addAction('init', [$this, 'init']) 134 134 ->addAction($this->getScheduleHook(), [$this, 'checkComponentsUpdate']) 135 ->addAction("pmpr_{$this->getType()}_component_updated", [$this, 'delete ComponentsCache'])135 ->addAction("pmpr_{$this->getType()}_component_updated", [$this, 'deleteTransients']) 136 136 ->addAction("pmpr_check_{$this->getName()}_components_update_done", [$this, 'deleteTransients']); 137 137 … … 163 163 { 164 164 delete_transient($this->getBubbleNotificationKey()); 165 $this->deleteComponentsCache();166 }167 168 public function deleteComponentsCache()169 {170 165 delete_transient(Manipulate::getComponentsCacheKey($this->getType())); 171 166 } … … 205 200 public function adminInit() 206 201 { 202 if ($this->isCurrentPage()) { 203 204 $this->deleteTransients(); 205 } 206 207 207 $this->componentUpdateRows(); 208 208 $transient = $this->getBubbleNotificationKey(); … … 213 213 214 214 $value = 0; 215 $this->delete ComponentsCache();215 $this->deleteTransients(); 216 216 217 217 foreach ($items as $item) { -
pmpr-ir/trunk/src/Pmpr/Plugin/Pmpr/Component/Base.php
r2782718 r2782934 133 133 $this->addAction('init', [$this, 'init']) 134 134 ->addAction($this->getScheduleHook(), [$this, 'checkComponentsUpdate']) 135 ->addAction("pmpr_{$this->getType()}_component_updated", [$this, 'delete ComponentsCache'])135 ->addAction("pmpr_{$this->getType()}_component_updated", [$this, 'deleteTransients']) 136 136 ->addAction("pmpr_check_{$this->getName()}_components_update_done", [$this, 'deleteTransients']); 137 137 … … 163 163 { 164 164 delete_transient($this->getBubbleNotificationKey()); 165 $this->deleteComponentsCache();166 }167 168 public function deleteComponentsCache()169 {170 165 delete_transient(Manipulate::getComponentsCacheKey($this->getType())); 171 166 } … … 205 200 public function adminInit() 206 201 { 202 if ($this->isCurrentPage()) { 203 204 $this->deleteTransients(); 205 } 206 207 207 $this->componentUpdateRows(); 208 208 $transient = $this->getBubbleNotificationKey(); … … 213 213 214 214 $value = 0; 215 $this->delete ComponentsCache();215 $this->deleteTransients(); 216 216 217 217 foreach ($items as $item) {
Note: See TracChangeset
for help on using the changeset viewer.