Quantcast
Channel: A HitchHackers guide through WordPress » Filters by letter p
Viewing all articles
Browse latest Browse all 10

get_parent_post_rel_link

$
0
0

Definition:
function get_parent_post_rel_link($title = '%title') {}

Get parent post relational link.

Parameters

  • string $title: Optional. Link title format.

Defined filters

  • the_title
    apply_filters('the_title', $title, $post->ID)
  • parent_post_rel_link
    apply_filters( "parent_post_rel_link", $link )

Source code

function get_parent_post_rel_link($title = '%title') {

	_deprecated_function( __FUNCTION__, '3.3' );



	if ( ! empty( $GLOBALS['post'] ) && ! empty( $GLOBALS['post']->post_parent ) )

		$post = & get_post($GLOBALS['post']->post_parent);



	if ( empty($post) )

		return;



	$date = mysql2date(get_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);



	$link = "<link rel='up' title='";

	$link .= esc_attr( $title );

	$link .= "' href='" . get_permalink($post) . "' />\n";



	return apply_filters( "parent_post_rel_link", $link );

}

16313


Filed under: /wp-includes/deprecated.php, Documentation, Files, Filters, Filters by letter p, Filters by letter t, Functions, Functions by letter g Tagged: get_parent_post_rel_link, id91db3a023affa08b248f6536ec993289, parent_post_rel_link, the_title

Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles



Latest Images