mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-06 23:58:03 +00:00
Editor: update JavaScript packages
Also update default block categories Props youknowriad, gziolo, aduth. Fixes #50420, #50278. git-svn-id: https://develop.svn.wordpress.org/trunk@48177 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -92,57 +92,16 @@ function render_block_core_rss( $attributes ) {
|
||||
$class .= ' ' . $attributes['className'];
|
||||
}
|
||||
|
||||
return sprintf( "<ul class='%s'>%s</ul>", esc_attr( $class ), $list_items );
|
||||
return sprintf( '<ul class="%s">%s</ul>', esc_attr( $class ), $list_items );
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the `core/rss` block on server.
|
||||
*/
|
||||
function register_block_core_rss() {
|
||||
register_block_type(
|
||||
'core/rss',
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/rss',
|
||||
array(
|
||||
'attributes' => array(
|
||||
'align' => array(
|
||||
'type' => 'string',
|
||||
'enum' => array( 'left', 'center', 'right', 'wide', 'full' ),
|
||||
),
|
||||
'className' => array(
|
||||
'type' => 'string',
|
||||
),
|
||||
'columns' => array(
|
||||
'type' => 'number',
|
||||
'default' => 2,
|
||||
),
|
||||
'blockLayout' => array(
|
||||
'type' => 'string',
|
||||
'default' => 'list',
|
||||
),
|
||||
'feedURL' => array(
|
||||
'type' => 'string',
|
||||
'default' => '',
|
||||
),
|
||||
'itemsToShow' => array(
|
||||
'type' => 'number',
|
||||
'default' => 5,
|
||||
),
|
||||
'displayExcerpt' => array(
|
||||
'type' => 'boolean',
|
||||
'default' => false,
|
||||
),
|
||||
'displayAuthor' => array(
|
||||
'type' => 'boolean',
|
||||
'default' => false,
|
||||
),
|
||||
'displayDate' => array(
|
||||
'type' => 'boolean',
|
||||
'default' => false,
|
||||
),
|
||||
'excerptLength' => array(
|
||||
'type' => 'number',
|
||||
'default' => 55,
|
||||
),
|
||||
),
|
||||
'render_callback' => 'render_block_core_rss',
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user