Plugin Updates
This commit is contained in:
@@ -99,10 +99,21 @@ function render_block_core_post_navigation_link( $attributes, $content ) {
|
||||
}
|
||||
}
|
||||
|
||||
// The dynamic portion of the function name, `$navigation_type`,
|
||||
// refers to the type of adjacency, 'next' or 'previous'.
|
||||
/*
|
||||
* The dynamic portion of the function name, `$navigation_type`,
|
||||
* Refers to the type of adjacency, 'next' or 'previous'.
|
||||
*
|
||||
* @see https://developer.wordpress.org/reference/functions/get_previous_post_link/
|
||||
* @see https://developer.wordpress.org/reference/functions/get_next_post_link/
|
||||
*/
|
||||
$get_link_function = "get_{$navigation_type}_post_link";
|
||||
$content = $get_link_function( $format, $link );
|
||||
|
||||
if ( ! empty( $attributes['taxonomy'] ) ) {
|
||||
$content = $get_link_function( $format, $link, true, '', $attributes['taxonomy'] );
|
||||
} else {
|
||||
$content = $get_link_function( $format, $link );
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'<div %1$s>%2$s</div>',
|
||||
$wrapper_attributes,
|
||||
|
||||
Reference in New Issue
Block a user