WPupdatePHP / wp-update-php

Library to be bundled with WordPress plugins to enforce users to upgrade to supported PHP versions.
GNU General Public License v2.0
79 stars 11 forks source link

add generic 'this plugin' if no $name passed #23

Closed afragen closed 9 years ago

afragen commented 9 years ago

create method to accept plugin name

afragen commented 9 years ago

@coenjacobs hold on this. I think I have a better idea. Will update when I get out of operating room and back to computer.

afragen commented 9 years ago

My better idea wasn't better. Let me know what you think of this?

afragen commented 9 years ago

Much of what I'm trying to figure out here is how to create translatable strings and this would include "this plugin". That's why I originally had that as the default for $plugin_name though that won't work as it's not translatable in that location.

We could add $this->plugin_name = __( 'this plugin' ); to the constructor and then the name set function would be a lot simpler. Then the admin notices could have default or actual plugin names.

If you want me to adjust this PR or create a new one to show you let me know. My goal is to make the strings i18n.

afragen commented 9 years ago

I think #27 is a better construct. Set $plugin_name in constructor and refactor notices.