wordpress / latest / functions / post_permalink.html

post_permalink( int|WP_Post $post ): string|false

This function has been deprecated. Use get_permalink() instead.

Retrieve permalink from post ID.

Description

See also

Parameters

$post int|WP_Post Optional
Post ID or WP_Post object. Default is global $post.

Return

string|false

Source

File: wp-includes/deprecated.php. View all references

function post_permalink( $post = 0 ) {
	_deprecated_function( __FUNCTION__, '4.4.0', 'get_permalink()' );

	return get_permalink( $post );
}

Uses

Uses Description

Changelog

Version Description
4.4.0 Use get_permalink()
1.0.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/post_permalink