-
Notifications
You must be signed in to change notification settings - Fork 4
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
PRESS10-42 Fix/transients filters #109
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the filters and actions used in the WP Transient have been reproduced in the Transient.php class, I just added few things to make sure PHPCS was applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any reasons why the delete transient method (includes/Helpers/Transient.php:109) has no WP actions?
I think it should be something like:
public static function delete( $key ): bool {
if ( self::should_use_transients() ) {
return \delete_transient( $key );
}
do_action( "delete_transient_{$key}", $key );
if ( \delete_option( $key ) ) {
do_action( 'deleted_transient', $key );
return true;
}
return false;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GiuseppeArcifa - I left a comment. However, we should also review the comment by @fralicandro regarding the delete function also needing some filters.
…hod to match the expected filters when testing an expired transient
Proposed changes
https://jira.newfold.com/browse/PRESS10-42
Type of Change
Video
Checklist
Further comments