PluginProbe
Depicter — Popup & Slider Builder / 1.3.2
Depicter — Popup & Slider Builder v1.3.2
4.8.1 trunk 1.0.0 1.1.0 1.1.2 1.1.4 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.3.5 1.3.8 1.5.0 1.5.1 1.5.2 1.5.5 1.6.0 1.6.1 1.6.2 1.7.0 All 76 releases
depicter / app / src / Editor / Migrations / Version202203091150.php

Version202203091150.php in Depicter — Popup & Slider Builder 1.3.2, at app/src/Editor/Migrations/Version202203091150.php

28 lines 585 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Depicter\Editor\Migrations;
3
4
5 use Averta\WordPress\Utility\JSON;
6
7 class Version202203091150
8 {
9
10 public function up(){
11 $documents = \Depicter::documentRepository()->all();
12 if ( !empty( $documents ) && $documents->count() > 0 ) {
13 foreach( $documents as $document ) {
14 if ( empty( $document->content ) ) {
15 continue;
16 }
17
18 $content = JSON::decode( $document->content );
19 if ( isset( $content->computedValues ) ) {
20 unset( $content->computedValues );
21 $document->content = JSON::encode($content);
22 $document->update();
23 }
24 }
25 }
26 }
27 }
28