Skip to content

Commit e346249

Browse files
committed
Remove custom plugin_lang_get_defaulted()
Function was introduced in #215 to fix the problem in the plugin, until the update was implemented in MantisBT core (which happened in 2.24.0). Fixes #339
1 parent c41d37c commit e346249

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

Diff for: Source/Source.API.php

-27
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,6 @@
1010
* @author John Reese
1111
*/
1212

13-
if (!function_exists('plugin_lang_get_defaulted')) {
14-
/**
15-
* Get a language string for the plugin.
16-
* - If found, return the appropriate string.
17-
* - If not found, no default supplied, return the supplied string as is.
18-
* - If not found, default supplied, return default.
19-
* Automatically prepends plugin_<basename> to the string requested.
20-
* @param string $p_name Language string name.
21-
* @param string $p_default The default value to return.
22-
* @param string $p_basename Plugin basename.
23-
* @return string Language string
24-
*/
25-
function plugin_lang_get_defaulted( $p_name, $p_default = null, $p_basename = null ) {
26-
if( !is_null( $p_basename ) ) {
27-
plugin_push_current( $p_basename );
28-
}
29-
$t_basename = plugin_get_current();
30-
$t_name = 'plugin_' . $t_basename . '_' . $p_name;
31-
$t_string = lang_get_defaulted( $t_name, $p_default );
32-
33-
if( !is_null( $p_basename ) ) {
34-
plugin_pop_current();
35-
}
36-
return $t_string;
37-
}
38-
}
39-
4013
# branch mapping strategies
4114
define( 'SOURCE_EXPLICIT', 1 );
4215
define( 'SOURCE_NEAR', 2 );

0 commit comments

Comments
 (0)