New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added WordPress post formatting #2 #292
base: 2.7
Are you sure you want to change the base?
Conversation
Hi @goodbytes-gb thanks for the hard work. I'm going to take a look on this and give you a feedback. Thanks! |
Is this good to go? We definitely need it to automatically insert |
@goodbytes-gb can you fix this last conflict, please? |
@goodbytes-gb When WordPress is formatting code, before or after parsing shortcodes? |
@Dartui Currently it grabs post content with already parsed shortcodes, then formats the output. (i.e. before) |
@goodbytes-gb This is a list of all default filters for the_content:
After wpautop there is shortcode_unautop which I guess is missing in this PR and may cause some unexpected behaviour What is more, please look at this: // Shortcodes
add_filter( 'the_content', 'do_shortcode', 11 ); // AFTER wpautop() |
@Dartui Thanks for the info, will look into it now. |
@Dartui It appears I confused myself... On closer inspection, it looks like running 'shortcode_unautop' is not necessary as it specifically refers to shortcodes added from the WP side, which Corcel would never be able to process as it does not have access to the shortcode callbacks. Corcel already handles processing of shortcodes that have been added from Corcels implementation. I have slightly refactored and can now confirm shortcodes are processed after the post content is formatted. Hope this makes sense. |
Will this be included in a release soon? |
Once now we're working with different Laravel versions (L5.5 for Corcel 2.5, for example), I'm gonna add this to the |
Hello guys, Any news on that PR? That would definitely help me, I need paragraphs!! 😄 Thanks |
Hey, yep this PR's gonna be merged soon. I have been a little busy theses last months but this is gonna be merged shortly. Thanks for the patience. 😉 |
This would be really useful for a project I'm working on. Can it be merged now, or is there more work needed? |
+1 |
+1 |
Can it be merged now, or is there more work needed? |
Will this support the new Wordpress editor - https://wordpress.org/gutenberg/ ? |
@stanwarri Probably not, it will need updating or may not be needed at all. Have not tested it yet. |
@gdbytes gonna merge this PR ASAP. can you just merge the current |
@jgrossi can you advise how to achieve this? Thanks |
@gdbytes hey thanks for answering. the point is we have changed some code during the time on
if you need some help you can give me push permission to your thanks 👏👍 |
@jgrossi thanks I am struggling with this, unfortunately, where is best to catch you? Skype? |
hey @gdbytes feel free to ping me on skype: |
@jgrossi I've contacted you on discord (lunah#1208) ... Apologies for the delay, I've been mega busy. |
This is still not merged due to 4 issues to fix? |
I believe @jgrossi was fixing the issues but nothing as of yet. I'm not sure how viable this is now with Gutenberg, it hasn't been tested. |
Gutenberg block will not be generated by this, but at least it will be compatible with standard post_content filtered output. IMHO it should be merged and later it could be possible to implement Gutenberg blocks into this. |
@PayteR This is how Gutenberg post looks like: https://github.com/WordPress/gutenberg/blob/master/post-content.php. There is no need to additionally parse it. |
I have updated my pull request.
(I'm not sure why my push didn't update original pull request #254 - Maybe because I changed from master to dev?)
Let me know your thoughts.
If all is good we can close the old pull request.
Thanks