-
Notifications
You must be signed in to change notification settings - Fork 224
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
Closes #6329: Deprecate RUCSS Hooks #6342
Conversation
Co-authored-by: Rémy Perona <[email protected]>
Co-authored-by: Michael Lee <[email protected]>
Co-authored-by: Rémy Perona <[email protected]> Co-authored-by: Rémy Perona <[email protected]>
@Tabrisrp when I worked with @jeawhanlee on that seemed like the function was a good but after a while and remembering @piotrbak idea seems like it looked like the moment to create a class for filters and actions. This would abstract the wiring between the old and new hooks at the level of the business logic and we would be able to add casting directly within the The idea is to create a Filter and an Action class. Then in the deprecated file we reuse that classes to make the link between old and new hooks with something like (This is possible as deprecated logic is loaded after the container is loaded): $filter->add_deprecated('old_hook', 'new_hook'); And inside the Filter and Action class we add an abstract logic to make the links based on an array and call the deprecated filter function.So inside the main logic we would have: $result = $this->filter->apply_filter('new_hook', $param); Concerning the casting issue we could create a method What do you think @Tabrisrp, @piotrbak ? |
@CrochetFeve0251 I like that idea so much, but I believe we need to use those new classes gradually because we have so many apply_filters and do_action in our code base. |
List of Deprecated Hooks
|
@piotrbak FYI. Do you need anything from the team about this? I think support and maybe public docs needs to be updated? |
…nt/6564-secure-ajax-endpoints
…ecate-rucss-hooks
Description
This PR deprecates the use of RUCSS hooks.
Fixes #6329
Type of change
Is the solution different from the one proposed during the grooming?
Please describe in this section if there is any change to the groomed solution, and why.
Checklists
Generic development checklist
Test summary
If not, detail what you could not test.
Please describe any additional tests you performed.