get_nonauthor_user_ids

Definition:
function get_nonauthor_user_ids() {}

Source code

function get_nonauthor_user_ids() {

	global $wpdb;



	if ( !is_multisite() )

		$level_key = $wpdb->get_blog_prefix() . 'user_level';

	else

		$level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmu site admins don't have user_levels



	return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key) );

}

1504

get_next_posts_page_link

Definition:
function get_next_posts_page_link($max_page = 0) {}

Retrieve next posts page link.
Backported from 2.1.3 to 2.0.10.

Parameters

  • int $max_page: Optional. Max pages.

Source code

function get_next_posts_page_link($max_page = 0) {

	global $paged;



	if ( !is_single() ) {

		if ( !$paged )

			$paged = 1;

		$nextpage = intval($paged) + 1;

		if ( !$max_page || $max_page >= $nextpage )

			return get_pagenum_link($nextpage);

	}

}

1502

get_next_posts_link

Definition:
function get_next_posts_link( $label = null, $max_page = 0 ) {}

Return the next posts page link.

Parameters

  • string $label: Content for link text.
  • int $max_page: Optional. Max pages.

Defined filters

  • next_posts_link_attributes
    apply_filters( 'next_posts_link_attributes', '' )

Source code

function get_next_posts_link( $label = null, $max_page = 0 ) {

	global $paged, $wp_query;



	if ( !$max_page )

		$max_page = $wp_query->max_num_pages;



	if ( !$paged )

		$paged = 1;



	$nextpage = intval($paged) + 1;



	if ( null === $label )

		$label = __( 'Next Page »' );



	if ( !is_single() && ( $nextpage <= $max_page ) ) {

		$attr = apply_filters( 'next_posts_link_attributes', '' );

		return '<a href="' . next_posts( $max_page, false ) . "\" $attr>" . preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&$1', $label) . '</a>';

	}

}

1500

get_next_post

Definition:
function get_next_post($in_same_cat = false, $excluded_categories = '') {}

Retrieve next post that is adjacent to current post.

Parameters

  • bool $in_same_cat: Optional. Whether post should be in a same category.
  • array|string $excluded_categories: Optional. Array or comma-separated list of excluded category IDs.

Return values

returns:Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists.

Source code

function get_next_post($in_same_cat = false, $excluded_categories = '') {

	return get_adjacent_post($in_same_cat, $excluded_categories, false);

}

1498

get_next_comments_link

Definition:
function get_next_comments_link( $label = '', $max_page = 0 ) {}

Return the link to next comments page.

Parameters

  • string $label: Optional. Label for link text.
  • int $max_page: Optional. Max page.

Defined filters

  • next_comments_link_attributes
    apply_filters( 'next_comments_link_attributes', '' )

Source code

function get_next_comments_link( $label = '', $max_page = 0 ) {

	global $wp_query;



	if ( !is_singular() || !get_option('page_comments') )

		return;



	$page = get_query_var('cpage');



	$nextpage = intval($page) + 1;



	if ( empty($max_page) )

		$max_page = $wp_query->max_num_comment_pages;



	if ( empty($max_page) )

		$max_page = get_comment_pages_count();



	if ( $nextpage > $max_page )

		return;



	if ( empty($label) )

		$label = __('Newer Comments &raquo;');



	return '<a href="' . esc_url( get_comments_pagenum_link( $nextpage, $max_page ) ) . '" ' . apply_filters( 'next_comments_link_attributes', '' ) . '>'. preg_replace('/&([^#])(?![a-z]{1,8};)/i', '&$1', $label) .'</a>';

}

1496