Comments (4)
Yes, it looks like inside Yoast, the oembed data is filtered.
#45 is essentially what I did to get the error out of my logs, so I approved it. Thank you for being on top of this so quickly.
I do like the idea of bringing https://core.trac.wordpress.org/ticket/24330 back up for discussion
from shortnotes.
This is odd. It would seem as though get_post
is returning null, even though we are inside the_content
. I wonder if in these circumstances it would be best to just return $the_content
?
from shortnotes.
@aaronjorbin good catch, thanks for reporting it! I'm guessing (hoping) you're filtering the oembed response to include an excerpt. Once I did that I was able to reproduce the issue.
The oembed handler figures out what the $post
is based on the link, and then passes that around rather than set it globally. This leads to wp_trim_excerpt()
not passing $post
to its application of the_content
.
So, I think you're right: best to just return $the_content
when $post
is not available. I've got a PR up for this in #45 if you want to take a look.
Aside: It looks like we almost had an expectation of $post_id
as available context with https://core.trac.wordpress.org/ticket/24330, but it was pulled out. Thanks, Nacin. There is a remainder in do_trackbacks()
though... Maybe it's time to bring the idea back now that blocks are flying all around.
from shortnotes.
Shipped in #45 and released in 1.6.2. Thanks again! 🍺
from shortnotes.
Related Issues (20)
- Add support for other very simple core blocks
- A reply to another note should be a reply to "this note" rather than "this post"
- It should be possible to like and bookmark other thinks rather than just reply HOT 1
- Update everything to show compatibility with WordPress 5.7 HOT 1
- Add full support for requests handled by Micropub
- A note with an image before a paragraph should still generate a proper title
- Filter "Share on Mastodon" to include status ID when replying to a Mastodon post HOT 2
- Generate titles for scheduled notes HOT 1
- Convert embed block to URL string when sharing to Mastodon
- Convert quote block to quoted text when posted to Mastodon HOT 1
- Generate note title from quote content
- Add option to change post type to post HOT 1
- Pass alt text with images to Mastodon HOT 1
- Improve new line formatting when sharing preformatted block on Mastodon HOT 1
- Remove trailing dash when posting a quote without a citation to Mastodon HOT 1
- Allow lists and list items HOT 1
- Notes that start with quotes have titles that include everything
- Prefix an @ mention when a note is shared on Mastodon if a reply to a post
- Introduce filter to allow limiting filter_status_text to certain post types.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shortnotes.