Some docs and corrections to _wp_link_page().
git-svn-id: https://develop.svn.wordpress.org/trunk@15617 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b75eb167cd
commit
003a617439
@ -616,18 +616,27 @@ function wp_link_pages($args = '') {
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for wp_link_pages().
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @access private
|
||||
*
|
||||
* @param $i Page number.
|
||||
* @return string Link.
|
||||
*/
|
||||
function _wp_link_page( $i ) {
|
||||
global $post, $wp_rewrite;
|
||||
|
||||
if ( 1 == $i ) {
|
||||
$url .= get_permalink();
|
||||
$url = get_permalink();
|
||||
} else {
|
||||
if ( '' == get_option('permalink_structure') || in_array($post->post_status, array('draft', 'pending')) )
|
||||
$url = add_query_arg( 'page', $i, get_permalink() );
|
||||
elseif ( 'page' == get_option('show_on_front') && get_option('page_on_front') == $post->ID )
|
||||
$url = trailingslashit(get_permalink()) . user_trailingslashit("$wp_rewrite->pagination_base/" . $i, 'single_paged');
|
||||
else
|
||||
$url .= trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged');
|
||||
$url = trailingslashit(get_permalink()) . user_trailingslashit($i, 'single_paged');
|
||||
}
|
||||
|
||||
return '<a href="' . $url . '">';
|
||||
|
Loading…
x
Reference in New Issue
Block a user