On this page
apply_filters( 'get_the_guid', string $post_guid, int $post_id )
Filters the Global Unique Identifier (guid) of the post.
Parameters
$post_guidstring-
Global Unique Identifier (guid) of the post.
$post_idint-
The post ID.
More Information
Note that the filter callback function must return the guid after it is finished processing, or any code using the guid (for example: RSS feeds) will break, and other plugins also filtering the guid may generate errors.
Source
File: wp-includes/post-template.php. View all references
return apply_filters( 'get_the_guid', $post_guid, $post_id );
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Revisions_Controller::prepare_item_for_response() wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php | Prepares the revision for the REST response. |
| WP_REST_Posts_Controller::prepare_item_for_response() wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php | Prepares a single post output for response. |
| get_the_guid() wp-includes/post-template.php | Retrieves the Post Global Unique Identifier (guid). |
Changelog
| Version | Description |
|---|---|
| 1.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/get_the_guid