Closed andrezrv closed 7 years ago
Quick review, but looks sensible. Thanks!
@andrezrv The travis error had nothing to do with your PR and has been fixed in the mean time. Would you mind rebasing the PR so we can get a passing build ? Thanks! I'll test the PR after that and will merge it if I don't find any problems with it (I don't expect any issues).
@jrfnl Done, and I added one more commit to fix the end of line issue reported by Travis.
change this function to this
https://gist.github.com/Sharifur/cdf71a63fb402eb8f38f6fbe03e0522b
change this function to this
https://gist.github.com/Sharifur/cdf71a63fb402eb8f38f6fbe03e0522b
thank you!
WordPress 4.8 inserts the "read more" link in the update success message automatically. In this process,
sprintf()
receives only one replacement argument, so PHP throws a warning when two strings are expected to be replaced.This is the commit in core where the modifications were made: https://github.com/WordPress/WordPress/commit/bab7eb143e3e3651cbb4165a9e904401dd2ed6de#diff-0e5737a4947b2884a63b3a50a59a9d3f.
This issue was already reported in #669, and a fix was proposed. However, I think that checking for the installed version of WordPress is better to keep backwards compatibility.