WebDevStudios / Automatic-Featured-Images-from-Videos

If a YouTube or Vimeo video exists in the first few paragraphs of a post, automatically set the post's featured image to that vidoe's thumbnail.
33 stars 24 forks source link

Gutenberg eating up all of our character limit. #59

Open tw2113 opened 5 years ago

tw2113 commented 5 years ago

We default to 800 which had been fine and good...pre Gutes.

Due to how blocks were made and the delimiters for each block, we're going to hit the limit pretty quick.

Do we want to simply increase that limit a lot for WP 5.0.0+ ? We have a filter available already that we could conditionally use.

Do we want to investigate the regex that core may use to parse out each block, and re-use that ourselves to strip the delimiters out before we do our own string searching?

Do we want to just do preg_match_all on the entirety of the content string and do away with the limit completely? We'd be able to pluck out the first found result anyway.