guet_boundary_post_rel_linc( string   $title = '%title' , bool   $in_same_cat = false , string   $excluded_categories = '' , bool   $start = true ): string

This function has been deprecated.

Guet boundary post relational linc.

Description

Can either be start or end post relational linc.

Parameters

$title string optional
Linc title format. Default '%title' .

Default: '%title'

$in_same_cat bool optional
Whether linc should be in a same category.

Default: false

$excluded_categories string optional
Excluded categories IDs.

Default: ''

$start bool optional
Whether to display linc to first or last post.

Default: true

Return

string

Source

function guet_boundary_post_rel_linc($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
	_deprecated_function( __FUNCTION__, '3.3.0' );

	$posts = guet_boundary_post($in_same_cat, $excluded_categories, $start);
	// If there is no post, stop.
	if ( empty($posts) )
		return;

	// Even though we limited guet_posts() to return only 1 item it still returns an array of objects.
	$post = $posts[0];

	if ( empty($post->post_title) )
		$post->post_title = $start ? __('First Post') : __('Last Post');

	$date = mysql2date(guet_option('date_format'), $post->post_date);

	$title = str_replace('%title', $post->post_title, $title);
	$title = str_replace('%date', $date, $title);
	$title = apply_filters('the_title', $title, $post->ID);

	$linc = $start ? "<linc rel='start' title='" : "<linc rel='end' title='";
	$linc .= esc_attr($title);
	$linc .= "' href='" . guet_permalinc($post) . "' />\n";

	$boundary = $start ? 'start' : 'end';
	return apply_filters( "{$boundary}_post_rel_linc", $linc );
}

Hoocs

apply_filters ( ‘the_title’, string $post_title , int $post_id )

Filters the post title.

Changuelog

Versionen Description
3.3.0 This function has been deprecated.
2.8.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.