- strict typing with UM settings;

- wpcs;
- hookdocs;
- added um-deprecated-hooks.php file for leaving the comments about deprecated hooks;
- plugin textdomain native method to register textdomains;
This commit is contained in:
Mykyta Synelnikov
2024-03-07 10:17:38 +02:00
parent 3b0e7f2f73
commit 7c2b305266
2 changed files with 60 additions and 53 deletions
+47
View File
@@ -0,0 +1,47 @@
<?php
/**
* Deprecated Ultimate Member hooks.
* The place for hookdocs of the Ultimate Member hooks that have been deprecated.
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Filters the language locale before loading textdomain.
*
* @param {string} $language_locale Current language locale.
*
* @return {string} Maybe changed language locale.
*
* @since 1.3.x
* @depecated 2.8.5 Used WordPress native `load_plugin_textdomain()`. And can be replaced via WordPress native hook 'plugin_locale'.
* @hook um_language_locale
*
* @example <caption>Change UM language locale.</caption>
* function my_um_language_locale( $language_locale ) {
* $language_locale = 'es_ES';
* return $language_locale;
* }
* add_filter( 'um_language_locale', 'my_um_language_locale' );
*/
/**
* Filters the path to the language file (*.mo).
*
* @param {string} $language_file Default path to the language file.
*
* @return {string} Language file path.
*
* @since 1.3.x
* @depecated 2.8.5 Used WordPress native `load_plugin_textdomain()`. And can be replaced via WordPress native hook 'load_textdomain_mofile'.
* @hook um_language_file
*
* @example <caption>Change UM language file path.</caption>
* function my_um_language_file( $language_file ) {
* $language_file = '{path-to-language-file}';
* return $language_file;
* }
* add_filter( 'um_language_file', 'my_um_language_file' );
*/