get_boundary_post

SummerySummery

Retrieves the boundary post.

Syntax

get_boundary_post( bool $in_same_term = false, array|string $excluded_terms = '', bool $start = true, string $taxonomy = 'category' )

DescriptionDescription

Boundary being either the first or last post by publish date within the constraints specified by $in_same_term or $excluded_terms.

ParametersParameters

$in_same_term

(bool) (Optional) Whether returned post should be in a same taxonomy term.

Default value: false

$excluded_terms

(array|string) (Optional) Array or comma-separated list of excluded term IDs.

Default value: ''

$start

(bool) (Optional) Whether to retrieve first or last post. Default true

Default value: true

$taxonomy

(string) (Optional) Taxonomy, if $in_same_term is true.

Default value: 'category'

ReturnReturn

(null|array) Array containing the boundary post object if successful, null otherwise.

SourceSource

File: wp-includes/link-template.php


			

ChangelogChangelog

Changelog
Version Description
2.8.0 Introduced.
Scroll to Top