iworks / sierotki

This is a WordPress plugin which fixes orphans position and replaces space after orphan with hard space, to avoid line-breaking incorrect position.
http://iworks.pl/tag/sierotka/
3 stars 1 forks source link

Add notice depend on WPLANG value #11

Open iworks opened 13 hours ago

iworks commented 13 hours ago
  1. Add warning notice to admin dashboard when WPLANG is empty.
  2. Add info notice on plugin settings page when WPLANG is not pl_PL or cz_CZ.

Props for @ellmann-creative

ellmann-creative commented 12 hours ago

I would also like to make two suggestions here:

1) please make the warning configurable, so that it can be disabled if the user "knows what they're doing" - so that those that don't want "nuisance alerts" can get rid of it without addressing the problem (it would also be good to mention that the warning can be disabled in Settings somewhere in the warning itself - something like "This warning can be disabled in Settings")

2) (based on my experiences with Polylang's developer) please keep in mind that WP can also be invoked from CLI (either with wp-cli, or through including wp-load.php directly). As such, if you are going to include any warnings there - please do so only if the user actually invokes any output functions that would require WPLANG to be set in order to work correctly. Sometimes you want to load WP to alter settings or make changes to the database, and if you happen to be like me and treat all warnings/notices as errors, such "useless" warnings will actually break execution (as Exceptions) and will need to be handled out.

Thank you. :)