PluginProbe ʕ •ᴥ•ʔ
Blocks Animation: CSS Animations for Gutenberg Blocks / 3.2.0
Blocks Animation: CSS Animations for Gutenberg Blocks v3.2.0
3.2.0 3.1.11 3.1.10 2.2.5 2.2.6 2.2.7 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.0 2.6.1 2.6.10 2.6.11 2.6.12 2.6.13 2.6.2 2.6.3 2.6.4 2.6.5 2.6.6 2.6.7 2.6.8 2.6.9 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 trunk 1.0.0 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.7.1 1.7.2 1.7.3 1.7.4 1.7.5 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.14 2.0.15 2.0.16 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4
blocks-animation / vendor / codeinwp / themeisle-sdk / src / Modules / Abstract_Migration.php
blocks-animation / vendor / codeinwp / themeisle-sdk / src / Modules Last commit date
About_us.php 1 week ago Abstract_Migration.php 1 month ago Announcements.php 1 month ago Compatibilities.php 1 year ago Dashboard_widget.php 1 week ago Featured_plugins.php 1 month ago Float_widget.php 1 year ago Licenser.php 1 month ago Logger.php 8 months ago Migrator.php 1 month ago Notification.php 1 year ago Promotions.php 1 week ago Recommendation.php 1 year ago Review.php 8 months ago Rollback.php 1 year ago Script_loader.php 8 months ago Translate.php 1 year ago Translations.php 8 months ago Uninstall_feedback.php 1 week ago Welcome.php 1 year ago
Abstract_Migration.php
89 lines
1 <?php
2 /**
3 * The abstract migration class for ThemeIsle SDK.
4 *
5 * @package ThemeIsleSDK
6 * @subpackage Modules
7 * @copyright Copyright (c) 2024, Themeisle
8 * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9 * @since 3.3.50
10 */
11
12 namespace ThemeisleSDK\Modules;
13
14 // Exit if accessed directly.
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit;
17 }
18
19 /**
20 * Abstract base class for SDK migrations.
21 *
22 * Migration files should return an anonymous class instance extending this class:
23 *
24 * return new class extends \ThemeisleSDK\Modules\Abstract_Migration {
25 * public function up() { ... }
26 * };
27 */
28 abstract class Abstract_Migration {
29 /**
30 * WordPress database object.
31 *
32 * @var \wpdb
33 */
34 protected $wpdb;
35
36 /**
37 * WordPress table prefix.
38 *
39 * @var string
40 */
41 protected $prefix;
42
43 /**
44 * WordPress charset and collation string.
45 *
46 * @var string
47 */
48 protected $charset_collate;
49
50 /**
51 * Constructor. Populates database helpers.
52 */
53 public function __construct() {
54 global $wpdb;
55 $this->wpdb = $wpdb;
56 $this->prefix = $wpdb->prefix;
57 $this->charset_collate = $wpdb->get_charset_collate();
58 }
59
60 /**
61 * Run the migration.
62 */
63 abstract public function up();
64
65 /**
66 * Reverse the migration.
67 *
68 * Override in concrete migrations to undo what up() did. Called by
69 * Migrator::rollback() — never invoked automatically.
70 *
71 * @return void
72 */
73 public function down() {
74 // No-op by default. Override to implement rollback logic.
75 }
76
77 /**
78 * Determine whether this migration should run.
79 *
80 * Override to add a custom idempotency check beyond name-based tracking.
81 * Return false to skip the migration without recording it.
82 *
83 * @return bool
84 */
85 public function should_run() {
86 return true;
87 }
88 }
89