Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack/modules
File: blocks.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Module Name: Blocks
[2] Fix | Delete
* Module Description: Expand your editor with custom Jetpack blocks for rich content and layout options.
[3] Fix | Delete
* Sort Order: 5
[4] Fix | Delete
* First Introduced: 13.9-a.8
[5] Fix | Delete
* Requires Connection: No
[6] Fix | Delete
* Auto Activate: Yes
[7] Fix | Delete
* Module Tags: blocks
[8] Fix | Delete
* Feature: Writing
[9] Fix | Delete
*
[10] Fix | Delete
* @package automattic/jetpack
[11] Fix | Delete
*/
[12] Fix | Delete
[13] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[14] Fix | Delete
exit( 0 );
[15] Fix | Delete
}
[16] Fix | Delete
[17] Fix | Delete
add_action( 'jetpack_activate_module_blocks', 'jetpack_blocks_activate_module' );
[18] Fix | Delete
[19] Fix | Delete
/**
[20] Fix | Delete
* Actions needed upon activating the blocks module.
[21] Fix | Delete
*
[22] Fix | Delete
* There is a legacy option to disable Jetpack blocks that we'll delete when this module is activated.
[23] Fix | Delete
* Via jetpack_get_default_modules filter, we remove blocks from the default if the option is true.
[24] Fix | Delete
* We'll leave that in place so _until the module is activated_ we will be sure to respect the previous
[25] Fix | Delete
* setting.
[26] Fix | Delete
*
[27] Fix | Delete
* @since 13.9
[28] Fix | Delete
* @return void
[29] Fix | Delete
*/
[30] Fix | Delete
function jetpack_blocks_activate_module() {
[31] Fix | Delete
delete_option( 'jetpack_blocks_disabled' ); // The function will check and return early if not present.
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
Jetpack_Gutenberg::load_block_editor_extensions();
[35] Fix | Delete
Jetpack_Gutenberg::load_independent_blocks();
[36] Fix | Delete
Jetpack_Gutenberg::register_block_metadata_collection();
[37] Fix | Delete
[38] Fix | Delete
/**
[39] Fix | Delete
* We've switched from enqueue_block_editor_assets to enqueue_block_assets in WP-Admin because the assets with the former are loaded on the main site-editor.php.
[40] Fix | Delete
*
[41] Fix | Delete
* With the latter, the assets are now loaded in the SE iframe; the implementation is now faster because Gutenberg doesn't need to inject the assets in the iframe on client-side.
[42] Fix | Delete
*/
[43] Fix | Delete
if ( is_admin() ) {
[44] Fix | Delete
add_action( 'enqueue_block_assets', array( 'Jetpack_Gutenberg', 'enqueue_block_editor_assets' ) );
[45] Fix | Delete
} else {
[46] Fix | Delete
add_action( 'enqueue_block_editor_assets', array( 'Jetpack_Gutenberg', 'enqueue_block_editor_assets' ) );
[47] Fix | Delete
}
[48] Fix | Delete
add_filter( 'render_block', array( 'Jetpack_Gutenberg', 'display_deprecated_block_message' ), 10, 2 );
[49] Fix | Delete
[50] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function