Created
February 5, 2018 20:06
-
-
Save greatislander/65c8c2db065211e1d7da85bcb26ad031 to your computer and use it in GitHub Desktop.
Demonstration of the new action hooks in Book 2.0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Append content to the end of the cover page book header block. | |
add_action( 'pb_book_cover_after_book_header', function() { | |
printf( '<p>%s</p>', 'Content goes here.' ); | |
} ); | |
// Append content to the end of the cover page table of contents block. | |
add_action( 'pb_book_cover_after_toc', function() { | |
printf( '<p>%s</p>', 'Content goes here.' ); | |
} ); | |
// Append content to the end of the cover page book information block. | |
add_action( 'pb_book_cover_after_book_info', function() { | |
printf( '<p>%s</p>', 'Content goes here.' ); | |
} ); | |
// Append content to the end of the cover page metadata block. | |
add_action( 'pb_book_cover_after_metadata', function() { | |
printf( '<p>%s</p>', 'Content goes here.' ); | |
} ); | |
// Insert content before the cover page footer. | |
add_action( 'pb_book_cover_before_footer', function() { | |
printf( '<p>%s</p>', 'Content goes here.' ); | |
} ); | |
// Insert content before a single (front matter, part, chapter, back matter) page footer. | |
add_action( 'pb_book_content_before_footer', function() { | |
printf( '<p>%s</p>', 'Content goes here.' ); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment