WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

_get_page_link() WP 2.1.0

Retrieves the page permalink.

Ignores page_on_front. Internal use only.

  • Global. WP_Rewrite. $wp_rewrite
Хуки из функции
Возвращает

Строку. The page permalink.

Использование

_get_page_link( $post, $leavename, $sample );
$post(число/WP_Post)
Post ID or object.
По умолчанию: uses the global $post
$leavename(true/false)
Whether to keep the page name.
По умолчанию: false
$sample(true/false)
Whether it should be treated as a sample permalink.
По умолчанию: false

Код get page link: wp-includes/link-template.php VER 5.1.1

<?php
function _get_page_link( $post = false, $leavename = false, $sample = false ) {
	global $wp_rewrite;

	$post = get_post( $post );

	$draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) );

	$link = $wp_rewrite->get_page_permastruct();

	if ( ! empty( $link ) && ( ( isset( $post->post_status ) && ! $draft_or_pending ) || $sample ) ) {
		if ( ! $leavename ) {
			$link = str_replace( '%pagename%', get_page_uri( $post ), $link );
		}

		$link = home_url( $link );
		$link = user_trailingslashit( $link, 'page' );
	} else {
		$link = home_url( '?page_id=' . $post->ID );
	}

	/**
	 * Filters the permalink for a non-page_on_front page.
	 *
	 * @since 2.1.0
	 *
	 * @param string $link    The page's permalink.
	 * @param int    $post_id The ID of the page.
	 */
	return apply_filters( '_get_page_link', $link, $post->ID );
}