Changes between Initial Version and Version 1 of Ticket #42814, comment 64
- Timestamp:
- 11/05/2018 08:11:36 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #42814, comment 64
initial v1 3 3 The reason: I want WordPress to apply the filters normally applied to post_content to the post my code has grabbed in hopes of "normalizing" my function's output to match other content on the site. 4 4 5 This is also tricky in that `get_the_excerpt` does not fail if there is content in `post_excerpt`. I call `get_the_excerpt` often in hopes that I get back content even if `post_excerpt` is empty via its "grab some post content if excerpt is empty" feature.5 This is also tricky in that `get_the_excerpt` does not fail if there is content in `post_excerpt`. I call `get_the_excerpt` sometimes in hopes that I get back content even if `post_excerpt` is empty via its "grab some post content" feature. 6 6 7 7 My opinion, worth exactly what you're paying for it, is that there ideally should not be any "within the loop" only functions, just like there should be no functions which ''only'' `echo` content without option to get back the results... 8 9 Edited to add that I've been doing this for years, mind you without having read every line of WP's source, but I've always had the (mistaken) understanding that `get_the` functions exist specifically to get desired content outside of the loop context. The `get_the` naming does lend itself to my interpretation, though.