-
Notifications
You must be signed in to change notification settings - Fork 28
Fix for oEmbed cache not clearing on update. #35
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
Conversation
Replaced do_shortcode() with apply_filters( 'the_content' in method delete_gist_transients in class GistPress. do_shortcode() does not does not process oEmbeds, which prevented the shortcode method from being executed and clearing the cache.
|
Instead of applying the $GLOBALS['wp_embed']->autoembed( $post_before->post_content );
$GLOBALS['wp_embed']->autoembed( $post_after->post_content );I'm not sure if that would work, but it would seem more direct than running through all of |
|
I agree with Gary that I think the updated lines would be I'll confirm and create a new pull request within the next 24 hours. |
|
I agree on not running the |
|
Worth looking at the WP_Embed class itself as well. It filters At this stage, assuming @salcode's updated lines work, lets get that committed, a bug fix release potentially made live, then look afterwards at if it can be improved. |
|
I'll wait a bit for @salcode to update the PR. It's been lingering for a few months, so a few hours won't hurt, then we can push the fix live. |
Replaced do_shortcode() with $GLOBALS['wp_embed']->autoembed() in method delete_gist_transients in class GistPress. do_shortcode() does not does not process oEmbeds, which prevented the shortcode method from being executed and clearing the cache. This is an improvement over my previous pull request, which used apply_filters( 'the_content' and therefore applied signficantly more filters than necessary. Thank you to GaryJones for this improvement.
|
Thank you @bradyvercher and @GaryJones for GistPress, for allowing me to take part, and for being patient with my updated pull request. It has been a pleasure. |
…ress Replace $rawattr with $attrs in method rebuild_shortcode in class GistPress as per @bradyvercher's comment in [Issue 34](#34) Old Erroneous Behavior: [gist 7243951 1] New Corrected Behavior: [gist id="7243951"]
|
Thank you @salcode for checking the plugin out and taking the time to find a fix a bug we'd missed. Just a quick note: It looks like everything worked fine this time, but in the future, pull requests should be submitted against the |
|
@bradyvercher If you go to the Settings page for this repo, then you can change the default branch to develop - all future PRs will then be to this branch by default. |
|
@bradyvercher To clarify, are you suggesting my PRs should come from the I realize now my PRs were into |
|
Yes, that's what he's saying. Otherwise, you can't make any more changes to your Have a read of http://nvie.com/posts/a-successful-git-branching-model/ - in this case, you would have created a branch from |
Patch for issue #34
Replaced do_shortcode() with apply_filters( 'the_content' in method delete_gist_transients in class GistPress. do_shortcode() does not does not process oEmbeds, which prevented the shortcode method from being executed and clearing the cache.
Improved as per @GaryJones by using
Corrected
$attrsinstead of$rawattras pointed out by @bradyvercher in comments on #34