Created
August 2, 2016 13:24
-
-
Save greenhornet79/d2649fa488e7cc76b49fad3b0f864653 to your computer and use it in GitHub Desktop.
some example use cases for using filters with IssueM Issue-to-PDF
This file contains hidden or 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 | |
| add_filter( 'issuem_pdf_toc_title', 'zeen101_toc_title' ); | |
| function zeen101_toc_title( $toc ) { | |
| return 'List of Articles'; | |
| } | |
| add_filter( 'issuem_pdf_styles', 'zeen101_pdf_styles' ); | |
| function zeen101_pdf_styles( $styles ) { | |
| $new_styles = 'h2 { color: red; }'; | |
| return $styles . $new_styles; | |
| } | |
| add_filter( 'issuem_pdf_html', 'zeen101_new_pdf_html', 10, 3 ); | |
| function zeen101_new_pdf_html( $results, $term, $issue_id ) { | |
| return '<h2>Some new html</h2>' . $results; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'd love to use issuem_pdf_html to strip out some shortcode that's appearing in my PDFs, and also to hide the author and issue title from appearing at the top of each article.
Example is here: http://prettycool.site/example.pdf
Specifically I'm asking for help with how to properly write "anywhere you see the '[' character, ignore it and everything after it until you see the ']' character."
Thank you.