I’ve just added several filters to the book page with version 4.1.22:
All these filters have the following arguments, in the following order:
- $book_page_layout – this is a string of HTML that will ultimately be displayed on the screen
- $book_object – a reference to the object that contains all the book information
- $attr – the attributes sent in with the shortcode
Here is the list of filters, hopefully it’s easy to tell where they fall by their names:
- mbdb_before_book_page
- mbdb_book_page_before_subtitle
- mbdb_book_page_after_subtitle
- mbdb_book_page_before_book_cover
- mbdb_book_page_after_cook_cover
- mbdb_book_page_before_buy_links
- mbdb_book_page_before_download_links
- mbdb_book_page_after_download_links
- mbdb_book_page_before_series
- mbdb_book_page_before_editions
- mbdb_book_page_before_goodreads
- mbdb_book_page_after_goodreads
- mbdb_book_page_before_summary
- mbdb_book_page_after_summary
- mbdb_book_page_before_details_section
- mbdb_book_page_before_pubdate
- mbdb_book_page_before_publisher
- mbdb_book_page_before_editor
- mbdb_book_page_before_illustrators
- mbdb_book_page_before_cover_artist
- mbdb_book_page_before_genre
- mbdb_book_page_before_tag
- mbdb_extra_book_details
- mbdb_book_page_before_excerpt
- mbdb_book_page_after_excerpt
- mbdb_book_page_before_reviews
- mbdb_book_page_before_additional_info
- mbdb_book_page_before_bottom_links
- mbdb_book_page_after_bottom_links
Hope this helps with what you were looking for
Thanks for doing that so quickly. Would it be possible to add the following:
mbdb_book_page_after_buy_links
So that I can insert stuff after the buy links.
Thanks again.
mbdb_book_page_before_download_links is right where after_buy_links would go so that should work for you.
Thanks that’s brilliant 🙂
Hi, I am trying to alter (using a filter) the “About the Author” section but can’t find a hook that allows me to do this. Everything else is working great. Please could you add this. Thanks
If you are using only the free Mooberry Book Manager base plugin, then your theme is outputting the “About the Author” section and you will need to look into what your theme provides.
If you have the Multi-Author extension, there is a filter mbdbma_book_content
that can be used to add content after the About the Author section. (or in it, using regular expressions.) If you are looking for a filter in there, where would you like it?