%PDF- %PDF-
Direktori : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/block-library/blocks/ |
Current File : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/block-library/blocks/query-pagination.php |
<?php /** * Server-side rendering of the `core/query-pagination` block. * * @package WordPress */ /** * Renders the `core/query-pagination` block on the server. * * @param array $attributes Block attributes. * @param string $content Block default content. * * @return string Returns the wrapper for the Query pagination. */ function gutenberg_render_block_core_query_pagination( $attributes, $content ) { if ( empty( trim( $content ) ) ) { return ''; } $wrapper_attributes = get_block_wrapper_attributes( array( 'aria-label' => __( 'Pagination' ), ) ); return sprintf( '<nav %1$s>%2$s</nav>', $wrapper_attributes, $content ); } /** * Registers the `core/query-pagination` block on the server. */ function gutenberg_register_block_core_query_pagination() { register_block_type_from_metadata( __DIR__ . '/query-pagination', array( 'render_callback' => 'gutenberg_render_block_core_query_pagination', ) ); } add_action( 'init', 'gutenberg_register_block_core_query_pagination', 20 );