@@ 174-191 (lines=18) @@ | ||
171 | * |
|
172 | * @param int|WP_Post $post Optional. Post ID or post object. Default is global $post. |
|
173 | */ |
|
174 | function the_guid( $post = 0 ) { |
|
175 | $post = get_post( $post ); |
|
176 | ||
177 | $guid = isset( $post->guid ) ? get_the_guid( $post ) : ''; |
|
178 | $id = isset( $post->ID ) ? $post->ID : 0; |
|
179 | ||
180 | /** |
|
181 | * Filters the escaped Global Unique Identifier (guid) of the post. |
|
182 | * |
|
183 | * @since 4.2.0 |
|
184 | * |
|
185 | * @see get_the_guid() |
|
186 | * |
|
187 | * @param string $guid Escaped Global Unique Identifier (guid) of the post. |
|
188 | * @param int $id The post ID. |
|
189 | */ |
|
190 | echo apply_filters( 'the_guid', $guid, $id ); |
|
191 | } |
|
192 | ||
193 | /** |
|
194 | * Retrieve the Post Global Unique Identifier (guid). |
|
@@ 205-220 (lines=16) @@ | ||
202 | * @param int|WP_Post $post Optional. Post ID or post object. Default is global $post. |
|
203 | * @return string |
|
204 | */ |
|
205 | function get_the_guid( $post = 0 ) { |
|
206 | $post = get_post( $post ); |
|
207 | ||
208 | $guid = isset( $post->guid ) ? $post->guid : ''; |
|
209 | $id = isset( $post->ID ) ? $post->ID : 0; |
|
210 | ||
211 | /** |
|
212 | * Filters the Global Unique Identifier (guid) of the post. |
|
213 | * |
|
214 | * @since 1.5.0 |
|
215 | * |
|
216 | * @param string $guid Global Unique Identifier (guid) of the post. |
|
217 | * @param int $id The post ID. |
|
218 | */ |
|
219 | return apply_filters( 'get_the_guid', $guid, $id ); |
|
220 | } |
|
221 | ||
222 | /** |
|
223 | * Display the post content. |