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

Add the current preloaded url to the rocket_preload_exclude_urls filter to make it easier for defining exclusions #6001

Closed
engahmeds3ed opened this issue Jun 21, 2023 · 0 comments · Fixed by #6003
Assignees
Labels
dev initiative needs: documentation Issues which need to create or update a documentation
Milestone

Comments

@engahmeds3ed
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The case is that we need an easy and performant way to exclude all urls except some urls and now we have this filter rocket_preload_exclude_urls

so it'd be easier to pass the current url to this filter to be like that

$regexes = (array) apply_filters( 'rocket_preload_exclude_urls', [ $pagination_regex ], $url );

so we can easily hook and compare the current url with the list of urls not to depend on the request url as this is not working properly in some cases like when called from CRON/AS.

Additional context

https://wp-media.slack.com/archives/C43T1AYMQ/p1686167812003059

and the ticket:

https://secure.helpscout.net/conversation/2266082107/423673?folderId=377611

@engahmeds3ed engahmeds3ed self-assigned this Jun 22, 2023
@piotrbak piotrbak added this to the 3.14.1 milestone Jun 23, 2023
@piotrbak piotrbak added the needs: documentation Issues which need to create or update a documentation label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev initiative needs: documentation Issues which need to create or update a documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants