-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Data Views] User patterns: Use excerpt as description (#60549)
* [Data Views] User patterns: Use excerpt as description Enable excerpts on the w_block post type. On the Site Editor Pattern pages, use the excerpt as the description for user created patterns. * CS fix: Remove duplicate empty line * Place the description before the instructions. * Remove the incorrect instructions from ariaDescribedBy - Removes the instructions from `ariaDescribedBy`, since they were not working and are not needed anymore. - Because only one piece of content is added to `ariaDescribedBy`, the `ariaDescriptions` array and the `.map()` are not needed anymore, and are removed. * Try using the button and the description for all pattern types. - Remove the condition that hides the item description on non user patterns. - Use the button for all pattern types and for parts. Disable the button for patterns that are not editable. - Add a title attribute on the non user patterns, to try to avoid confusion for sighted users that clicks the disabled button. * Remove title attribute and replace cursor style Rename blocks.php to post.php. Remove the title attribute from the button. Reset the cursor style to the default when the button is disabled. * CS fix: Add empty line at end of file * Fix pattern preview dimensions * Update dimensions to match templates --------- Co-authored-by: carolinan <poena@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> Co-authored-by: unscripted <cwhitmore@git.wordpress.org>
- Loading branch information
1 parent
6527034
commit 2bbae36
Showing
5 changed files
with
40 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/** | ||
* Temporary compatibility shims for block APIs present in Gutenberg. | ||
* | ||
* @package gutenberg | ||
*/ | ||
|
||
/** | ||
* Adds support for excerpt to the wp_block post type. | ||
*/ | ||
function gutenberg_add_excerpt_support_to_wp_block() { | ||
add_post_type_support( 'wp_block', 'excerpt' ); | ||
} | ||
|
||
add_action( 'init', 'gutenberg_add_excerpt_support_to_wp_block' ); |
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