-
Notifications
You must be signed in to change notification settings - Fork 806
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Blocks: convert to a module Co-authored-by: Brad Jorsch <[email protected]>
- Loading branch information
Showing
6 changed files
with
75 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: enhancement | ||
|
||
Blocks: transition from an option to a module to improve caching |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
/** | ||
* Module Name: Blocks | ||
* Module Description: Add additional blocks to your site and post editors. | ||
* Sort Order: 5 | ||
* First Introduced: 13.9-a.8 | ||
* Requires Connection: No | ||
* Auto Activate: Yes | ||
* Module Tags: blocks | ||
* Feature: Writing | ||
* | ||
* @package automattic/jetpack | ||
*/ | ||
|
||
add_action( 'jetpack_activate_module_blocks', 'jetpack_blocks_activate_module' ); | ||
|
||
/** | ||
* Actions needed upon activating the blocks module. | ||
* | ||
* There is a legacy option to disable Jetpack blocks that we'll delete when this module is activated. | ||
* Via jetpack_get_default_modules filter, we remove blocks from the default if the option is true. | ||
* We'll leave that in place so _until the module is activated_ we will be sure to respect the previous | ||
* setting. | ||
* | ||
* @since $$next-version$$ | ||
* @return void | ||
*/ | ||
function jetpack_blocks_activate_module() { | ||
delete_option( 'jetpack_blocks_disabled' ); // The function will check and return early if not present. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters