Changes in Filters and Actions in Version 5.0

NOTE: This only applies to users who have used custom code to customize how Mooberry Book Manager works on their site. As such, this is a technical article meant for the developers who implemented this custom code.

When writing Mooberry Book Manager version 5.0, I tried to minimize the breaking changes as much as possible. However, changing the underlying meta data library not only changed some areas of code but also the structure of the data in the database.

I tried to note every change, but it's possible I missed something. Please back up your site before upgrading to version 5.0 just in case. If you run into any issues upgrading to version 5.0 please contact me at support@mooberrydreams.com with information about the error.

Changes with meta boxes and meta fields including CPTs, Terms, and Settings

The biggest change is in any filter that applies to a custom post type's metabox settings. This is due to the change in libraries. MBM Version 5.0 uses Metabox.io for its underlying meta field handling. So, the configuration array passed in the filters will follow that library's settings. Here is the documentation for Metabox.io.


Specific Filter/Action Changes

mbdb_summary_metabox => renamed mbmb_summary_metabox (and see above note about metabox changes)

mbdb_editions_metabox=> renamed mbmb_editions_metabox (and see above note about metabox changes)

mbdb_excerpt_metabox=> renamed mbmb_excerpt_metabox (and see above note about metabox changes)

mbdb_reviews_metabox=> renamed mbmb_reviews_metabox (and see above note about metabox changes)

mbdb_additional_info_metabox=> renamed mbmb_additional_info_metabox (and see above note about metabox changes)

mbdb_cover_image_metabox=> renamed mbmb_cover_image_metabox (and see above note about metabox changes)

mbdb_bookinfo_metabox=> renamed mbmb_bookinfo_metabox (and see above note about metabox changes)

mbdb_buylinks_metabox=> renamed mbmb_buylinks_metabox (and see above note about metabox changes)

mbdb_downloadlinks_metabox => removed

mbdb_book_page_after_summary => added $book as last argument to access book's data

mbdb_book_pre_mbdb_{column}_column => removed (where {column} applies to any meta field that was displayed in the admin columns)

mbdb_buy_links_retailer_pre_affiliate_code => removed

mbdb_before_validate_editions => removed $field arguments

mbdb_validate_editions_before_msg => removed $field and $flag arguments, added $message argument

mbdb_validate_editions_after_msg => removed $field and $flag arguments, added $message argument

mbdb_validate_reviews_before_msg => removed $field and $flag arguments, added $message argument

mbdb_validate_reviews_after_msg => removed $field and $flag arguments, added $message argument

mbdb_buy_links_pre_affiliate_code => removed

mbdb_buy_links_post_affiliate_code => removed

mbdb_widget_{widget_type}_book_list => argument is now an array of MBM_Base_Book objects instead of a Book_List object (where widget_type is "newest", "coming_soon", "specific" or "random")

mbdb_book_grid_heading => added arguments: $taxonomy_short_name, $taxonomy, $term, $level, $book_grid

mbdb_book_grid_publisher_heading => new

mbdb_book_grid_uncategorized_heading => added arguments: $taxonomy_short_name, $taxonomy, $level, $book_grid

mbdb_book_grid_untagged_heading => added arguments: $taxonomy_short_name, $taxonomy, $level, $book_grid

mbdb_book_grid_standalones_heading => added arguments: 'series', $level, $book_grid

mbdb_book_grid_pre_get_group => array structure of $group_by argument has changed

mbdb_book_grid_post_get_group => array structure of $group_by argument has changed

mbdb_book_grid_pre_get_group => array structure of $group_by argument has changed

mbdb_book_grid_book_ids_filter => array structure of $group_by argument has changed

mbdb_book_grid_get_group_books => array structure of $group_by argument has changed

mbdb_book_grid_no_books_found => added arguments: $books, $level, $book_grid

mbdb_book_grid_books_not_found => added arguments: $books, $level, $book_grid

mbdb_book_grid_pre_div => added arguments: $books, $book_grid

mbdb_book_grid_post_div => added arguments: $books, $book_grid

mbdb_book_grid_pre_image => changed last argument from Book Grid ID to Book Grid Object

mbdb_book_grid_pre_placeholder_image => changed last argument from Book Grid ID to Book Grid Object

mbdb_book_grid_additional_height => removed

mbdb_export_data_book_object => removed last argument

mbdb_export_data_all_books_csv => $books argument now array of MBM_Base_Book objects not WP_Post objects

Still need help? Contact Us Contact Us