-
Notifications
You must be signed in to change notification settings - Fork 813
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gutenberg: Add a Related Posts block (#10132)
* Add server rendering for Related Posts block * Setting block attributes properly * Use a custom block rendering markup * Add some semicolons * Remove headline from server side rendering * Default to off for displayContext Requires Calypso-side change: Automattic/wp-calypso#27924 * Pass render callback to jetpack_register_block() * Exclude previously visited post properly * Do not load posts when they have loaded already * Add excerpt to title attribute * Prevent the customizer from modifying block output * Remove legacy wrapper if we have a Related Posts block in the content * Conditionally add jp-relatedposts-items-visual class * Some phpcs fixes * Simplify block attribute retrieval * Add some spacing * Disable customize controls when content has a related posts block * Add disclaimer that blocks are not affected to Settings * Add disclaimer that blocks are not affected to Jetpack Traffic settings * Support for WP < 5.0 * Improve how we disable the legacy widget when block is present in content * Introduce a parse_numeric_get_arg helper * Fixup
- Loading branch information
Showing
4 changed files
with
200 additions
and
21 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
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