Skip to content
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

Fix Purge Cache menu caching issue in the front-end #173

merged 5 commits into from Feb 25, 2019


None yet
3 participants
Copy link

commented Feb 20, 2019

I have fixed the Purge Cache menu caching issue in front-end.
I have changed the name of Purge Cache menu button in the front to 'Purge Current Page'
When the 'Purge Current Page' menu button on the front end is now clicked, it only clears the page cache.

Fixes #171

imranhsayed added some commits Feb 12, 2019

Change Purge Cache button name and 'nginx-helper_urls' query argument…
… value on front-end admin bar.

Conditionally display the purge cache button name as 'Purge Cache' for admin dashboard and 'Purge Current Page' on front-end admin bar.
Conditionally set query argument 'nginx_helper_urls' value to 'all' for admin dashaboard purge cache button and 'current-url' for front-end admin bar button
Purge current page cache on front end
Change hook from 'admin_init' to 'admin_bar_init' so that purge_all() is called when purge button is clicked on both admin dashboard and front end admin bar.
Check if the user is on front end when set the call purge_url() and purge the current page cache on case basis.
Copy link

left a comment

Tested the PR. Working as described in the description.

Show resolved Hide resolved admin/class-nginx-helper-admin.php Outdated
Show resolved Hide resolved admin/class-nginx-helper-admin.php Outdated
Put correct value for meta key and remove escaping where not required
Put the correct value for the 'meta key' of add_menu() and remove escaping from purge_url() on line 688 as already escaped at the end

@imranhsayed imranhsayed requested a review from chandrapatel Feb 25, 2019

@chandrapatel chandrapatel merged commit 377c2c1 into rtCamp:master Feb 25, 2019

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
WIP Ready for review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.