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 filter for request timeout #529

Merged

Conversation

aahovhannisyan
Copy link
Contributor

@aahovhannisyan aahovhannisyan commented Feb 21, 2020

Add filter for request timeout to modify it according to needs.
Closes #523 .

*
* @return {int} The timeout to use for the remote post.
*/
'timeout' => apply_filters( 'dt_subscription_post_timeout', 5 ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about adding $post as an argument of this filter, this may help some edge cases (I haven't think about) and make this filter align with dt_push_post_timeout filter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dinhtungdu thanks for review. Added.

@jeffpaul jeffpaul added the type:enhancement New feature or request. label Feb 24, 2020
@jeffpaul jeffpaul added this to the 2.0.0 milestone Feb 24, 2020
Copy link
Contributor

@dinhtungdu dinhtungdu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@armdev17 thanks for your work! LGTM 👍

@jeffpaul jeffpaul merged commit 1179930 into 10up:develop Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add filter for request timeout
3 participants