get_boundary_post_rel_link [ WordPress Function ]
get_boundary_post_rel_link ( $title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: get_parent_post_rel_link, get_boundary_post, start_post_rel_link, get_post_reply_link, get_adjacent_post_rel_link
Get boundary post relational link.
Can either be start or end post relational link.
Source
<?php
function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
_deprecated_function( __FUNCTION__, '3.3' );
$posts = get_boundary_post($in_same_cat, $excluded_categories, $start);
// If there is no post stop.
if ( empty($posts) )
return;
// Even though we limited get_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(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 = $start ? "<link rel='start' title='" : "<link rel='end' title='";
$link .= esc_attr($title);
$link .= "' href='" . get_permalink($post) . "' />\n";
$boundary = $start ? 'start' : 'end';
return apply_filters( "{$boundary}_post_rel_link", $link );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- get_boundary_post_rel_link (WordPress Function) - WPSeek.com
WordPress lookup for get_boundary_post_rel_link, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - get_boundary_post_rel_link | A HitchHackers guide through ...
Feb 12, 2011 ... Source code. function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) { $posts ...
hitchhackerguide.com - php - Speeding up a (slow) huge wordpress database - Stack Overflow
... locate_template, load_template, require_once, wp_head, do_action, call_user_func_array, start_post_rel_link, get_boundary_post_rel_link, ...
stackoverflow.com - #11490 (Notice: Undefined offset: 0 in link-manager.php ...
Status changed from new to closed; Resolution set to fixed. (In [12457]) Fix notice in get_boundary_post_rel_link when there is no post to link. Fixes #11490 ...
core.trac.wordpress.org