-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
add_reasons_to_defaults()
from general initialization (#627)
* Remove `add_reasons_to_defaults()` from general initialization The `add_reasons_to_defaults()` adds the translatable strings to the `$default`. Those `reasons` are only needed inside the `send_mail_notification()` method, which also calls the `add_reasons_to_defaults()` function. Therefore, the function call can be removed from the general `init()` function. * Remove `load_plugin_lang()` function and utilize `_load_textdomain_just_in_time()` This function is calling the `load_plugin_textdomain()`, which eventually become deprecated soon. Since this plugin is also using the "Text Domain" plugin header, it is not necessary to call this function at all. By removing this function, the `_load_textdomain_just_in_time()` function will be used, when the first string needs to be translated. * Add an action to load the reasons on `init` * Raise "Requires at least" version to 4.6 Since we don't explicitly load the translation files anymore this will make sure that the necessary function is there. * Fix PHPCS issues
- Loading branch information
Showing
2 changed files
with
10 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters