File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ class Stackable_Editor_Settings {
1212 * Add our hooks.
1313 */
1414 function __construct () {
15+ // Migrate settings.
16+ add_action ( 'admin_init ' , array ( $ this , 'migrate_block_states ' ) );
17+ add_action ( 'rest_api_init ' , array ( $ this , 'migrate_block_states ' ) );
18+
1519 // Register settings.
1620 add_action ( 'admin_init ' , array ( $ this , 'register_settings ' ) );
1721 add_action ( 'rest_api_init ' , array ( $ this , 'register_settings ' ) );
@@ -315,8 +319,8 @@ function migrate_block_states() {
315319
316320 if ( is_array ( $ old_disabled_blocks ) ) {
317321 foreach ( $ old_disabled_blocks as $ block_name ) {
318- // In the block_states, disabled is 1 and hidden is 2
319- $ new_block_states [ $ block_name ] = 1 ;
322+ // In the block_states, hidden is 2 and disabled is 3
323+ $ new_block_states [ $ block_name ] = 2 ;
320324 }
321325 }
322326
You can’t perform that action at this time.
0 commit comments