atwellpub / resend-welcome-email

WordPress plugin that helps quickly regenerate a new passwords & send a new welcome email to a user.
17 stars 15 forks source link

Major refactor. I tried separate in the commits. #5

Closed afragen closed 8 years ago

afragen commented 8 years ago

Refactored to use non-static methods. Escaped all translatable strings for security. Removed unused constants and global. Fixed logic in display of admin notice. Added multisite compatibility for admin notice. Updated readme. Spacing mostly per WP Coding Guidelines. Updated DocBlocks.

afragen commented 8 years ago

Please let me know what questions you may have or if I can explain why I did certain things.

atwellpub commented 8 years ago

Why the adversion to use private static? I've never seen it as as anything but __CLASS__ and self:: versus $this and the way the variables are declared. I admit I do not hold a full understanding, but I've had good success in the format I've worked with and rarely run into errors. Can you tell me more?

My other question is the removal of the constants. Those come in handy, even though they are not currently leveraged. Are we sure we want to remove them?

Please will youadd yourself and 'ramiy' back to the contributors list and I'll merge it, increment it and tag it and get it out?

Cheers

afragen commented 8 years ago

self v $this ends up being a matter of state. Static methods and variables being stateless. My understanding is that using static methods makes testing very difficult as well. I guess it comes down to a personal preference, and I apologize for inflicting mine on you. :wink: In this case there's really no difference and I will revert. I really did go overboard.

I'll also return the constants so they will be there if you need them in the future.

I will add the other contributors to the readme too.

afragen commented 8 years ago

I think this should be more in character with the original. I picked a version number of 1.1.0 as it seemed like more changes than just 1.0.4.

I did up the WP requirement to 4.3.1 as this is the release that has the latest changes to wp_new_user_notification()

Cheers, and thanks for the great plugin! :+1: