Thanks for your response and for your consideration of the issues I raised.
I have already released a new version of MLA (v2.24) that accommodates the change you made in Admin Columns 2.4.9. If you change things back you will break my code and the “current screen bug” will return. Here’s my current code:
/**
* Define the Media/Assistant submenu screen to the Admin Columns plugin
*
* @since 2.22
*
* @param array $storage_models List of storage model class instances ( [key] => [CPAC_Storage_Model object] )
* @param object $cpac CPAC, the root CodePress Admin Columns object
*/
public static function admin_columns_support( $storage_models, $cpac ) {
require_once( MLA_PLUGIN_PATH . 'includes/class-mla-admin-columns-support.php' );
MLACore::$admin_columns_storage_model = new CPAC_Storage_Model_MLA();
/*
* Put MLA before/after WP Media Library so is_columns_screen() will work
*/
$new_models = array();
foreach ( $storage_models as $key => $model ) {
if ( 'wp-media' == $key ) {
if ( version_compare( CPAC_VERSION, '2.4.9', '>=' ) ) {
$new_models[ $key ] = $model;
$new_models[ MLACore::$admin_columns_storage_model->key ] = MLACore::$admin_columns_storage_model;
} else {
$new_models[ MLACore::$admin_columns_storage_model->key ] = MLACore::$admin_columns_storage_model;
$new_models[ $key ] = $model;
}
} else {
$new_models[ $key ] = $model;
}
}
/*
* If we didn't find wp-media, add our entry to the end
*/
if ( count( $storage_models ) == count( $new_models ) ) {
$new_models[ $storage_model->key ] = MLACore::$admin_columns_storage_model;
}
return $new_models;
}
It would be much better for my plugin if you left your v2.4.9 code in place until you work out a comprehensive way to accommodate submenu items added with the WordPress add_submenu_page()
function.
Your plan to “good use of the WordPress deprecated functions” will address the is_columns_screen()
has become is_current_screen()
issue, but the root cause of the HTTP 500 Errors was the addition of the new init_manage_columns()
functions without a default implementation in the base class. That’s a separate issue.
I added Admin Columns support to MLA by following the instructions you gave me in this earlier topic on your support forum:
Making Admin Columns available in Media Library Assistant
In that topic you posted a link to:
Extendable for WP_list_tables?
which gave me the information I needed. I wouldn’t be surprised if others have found the information and added support as well.
Thanks again for your response. Please let me know if you are changing your get_current_storage_model
back to the v2.4.9 implementation; it will save me from doing another emergency MLA release.