Hello,
I recently created a plugin to create a column called "date_closed".
Code is here: https://github.com/priyam759/MantisBT-P ... /tree/main
When going into manage columns, I want the field name there to look like "date_closed" just like "date_submitted" is. However, an "_" is being added automatically to the end of the field name there. (See attached).
There is nothing in MantisColumn class or MantisPlugin class to change this, and when I checked core/plugin_api.php I saw some code that I believe is the reason this is occurring (see function below)
function plugin_config_get( $p_option, $p_default = null, $p_global = false, $p_user = null, $p_project = null ) {
$t_basename = plugin_get_current();
$t_full_option = 'plugin_' . $t_basename . '_' . $p_option;
if( $p_global ) {
return config_get_global( $t_full_option, $p_default );
} else {
return config_get( $t_full_option, $p_default, $p_user, $p_project );
}
}
Is there any way to override this or another function that is responsible for the "_" being added automatically in Manage Columns in my plugin?
Thank you
Manage Columns Name
Moderators: Developer, Contributor
Manage Columns Name
- Attachments
-
- ManageConfiguration.PNG (23.86 KiB) Viewed 3526 times
Re: Manage Columns Name
You are looking @ the config of the plugin.
For what you are doing, check out function columns_get_plugin_columns(), this one you can find in core/columns_api
For what you are doing, check out function columns_get_plugin_columns(), this one you can find in core/columns_api

Re: Manage Columns Name
Thank you for that info.
Am I able to call that function in my plugin and override it to remove adding the "_"? Or would I have to override the function outside of the plugin (affects whole website)?
Am I able to call that function in my plugin and override it to remove adding the "_"? Or would I have to override the function outside of the plugin (affects whole website)?
Re: Manage Columns Name
I did not really check the function so you need to dig a bit