PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.13.1
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.13.1
2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 All 80 releases
← All changes | ablocks.php +22 -3 2.11.02.13.1 View file →
@@ -3,9 +3,9 @@
3 3 * Plugin Name: aBlocks
4 4 * Description: The WordPress plugin for creating beautiful and functional websites using the Gutenberg editor, with a variety of customizable blocks to design website pages.
5 5 * Requires at least: 6.8
6 6 * Requires PHP: 7.4
7 - * Version: 2.11.0
7 + * Version: 2.13.1
8 8 * Author: Kodezen LLC
9 9 * Author URI: https://ablocks.pro/
10 10 * License: GPL-3.0+
11 11 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -44,9 +44,9 @@
44 44 /**
45 45 * Define the plugin constants
46 46 */
47 47 private function define_constants() {
48 - define( 'ABLOCKS_VERSION', '2.11.0' );
48 + define( 'ABLOCKS_VERSION', '2.13.1' );
49 49 define( 'ABLOCKS_PLUGIN_SLUG', 'ablocks' );
50 50 define( 'ABLOCKS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
51 51 define( 'ABLOCKS_ROOT_URL', plugin_dir_url( __FILE__ ) );
52 52 define( 'ABLOCKS_ASSETS_URL', ABLOCKS_ROOT_URL . 'assets/' );
@@ -94,9 +94,16 @@
94 94 }
95 95
96 96 public function set_global_settings() {
97 97 $GLOBALS['ablocks_fonts'] = json_decode( get_option( ABLOCKS_FONTS_SETTINGS_NAME, '{}' ), true );
98 - $GLOBALS['ablocks_blocks'] = json_decode( get_option( ABLOCKS_BLOCKS_VISIBILITY_SETTINGS_NAME, '{}' ) );
98 + // Merge the saved visibility over the default registry so blocks added in
99 + // a new version default to enabled (the user's saved toggles still win).
100 + $saved_blocks = json_decode( get_option( ABLOCKS_BLOCKS_VISIBILITY_SETTINGS_NAME, '{}' ), true );
101 + $default_blocks = \ABlocks\Admin\Settings\Blocks::get_default_data();
102 + $GLOBALS['ablocks_blocks'] = (object) array_merge(
103 + is_array( $default_blocks ) ? $default_blocks : [],
104 + is_array( $saved_blocks ) ? $saved_blocks : []
105 + );
99 106 $GLOBALS['ablocks_settings'] = json_decode( get_option( ABLOCKS_SETTINGS_NAME, '{}' ) );
100 107 $GLOBALS['ablocks_addons'] = json_decode( get_option( ABLOCKS_ADDONS_SETTINGS_NAME, '{}' ) );
101 108 }
102 109
@@ -113,13 +120,25 @@
113 120 }
114 121
115 122 public function init_plugin() {
116 123 ABlocks\Migration::init();
124 + // Before anything that registers a menu, an ajax action or a REST route,
125 + // so the capabilities those gate on already answer correctly.
126 + ABlocks\Permissions::init();
117 127 ABlocks\PermalinkRewrite::init();
118 128 ABlocks\Addons::init();
129 + // Ahead of every block registration on `init` — aBlocks' own and any
130 + // other plugin's — so the attribute the editor adds to every block is
131 + // on the server's copy of it too.
132 + ABlocks\Classes\FlexItem::init();
133 + // Keeps the server-side previews of dynamic blocks rendering when another
134 + // plugin adds attributes to every block in JavaScript only.
135 + ABlocks\Classes\BlockRendererAttributes::init();
119 136 ABlocks\Blocks::init();
120 137 ABlocks\Assets::init();
121 138 ABlocks\Classes\CoreFontRegistry::init();
139 + ABlocks\Classes\GlobalClasses::init();
140 + ABlocks\Classes\Breakpoints::init();
122 141 ABlocks\Performance\Optimizations::init();
123 142 ABlocks\Performance\DelayJs::init();
124 143 ABlocks\Performance\DeferJs::init();
125 144 ABlocks\Performance\ImageOptimizer::init();