Changeset 52042 for trunk/src/wp-includes/blocks/query-pagination.php
- Timestamp:
- 11/08/2021 02:26:27 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks/query-pagination.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/query-pagination.php
r50929 r52042 7 7 8 8 /** 9 * Renders the `core/query-pagination` block on the server. 10 * 11 * @param array $attributes Block attributes. 12 * @param string $content Block default content. 13 * 14 * @return string Returns the wrapper for the Query pagination. 15 */ 16 function render_block_core_query_pagination( $attributes, $content ) { 17 if ( empty( trim( $content ) ) ) { 18 return ''; 19 } 20 21 return sprintf( 22 '<div %1$s>%2$s</div>', 23 get_block_wrapper_attributes(), 24 $content 25 ); 26 } 27 28 /** 9 29 * Registers the `core/query-pagination` block on the server. 10 30 */ 11 31 function register_block_core_query_pagination() { 12 32 register_block_type_from_metadata( 13 __DIR__ . '/query-pagination' 33 __DIR__ . '/query-pagination', 34 array( 35 'render_callback' => 'render_block_core_query_pagination', 36 ) 14 37 ); 15 38 }
Note: See TracChangeset
for help on using the changeset viewer.