Closed tyrann0us closed 6 years ago
Yes, this is a good idea. I noticed same when I read the code, but I didn't want to change the API at that time. But now I agree. It would be much better with a single method. I guess you can check what event you are on with the PackageEvent object, but I haven't done any research about that.
A referenced script is a great idea.
This is now implemented.
install_t10ns()
andupdate_t10ns()
have almost identical function bodies. IMO they should be merged in one method (with a conditional check what hook the method is currently added to). This would allow users to add the same function call to both the install and update hook, or use a referenced script like it's used in WP Starter'scomposer.json
.