Last active
August 29, 2015 14:06
-
-
Save NateJacobs/4b126a2c850b0aa04b68 to your computer and use it in GitHub Desktop.
Filter Examples for the TNG RSS to WordPress Post plugin
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 | |
function ngtj_change_tng_rss_user_id($author_id) { | |
return 2; | |
} | |
add_filter('tng_wp_rss_post_author_id', 'ngtj_change_tng_rss_user_id'); | |
function ngtj_change_tng_rss_title($title) { | |
return 'This is the new title'; | |
} | |
add_filter('tng_wp_rss_post_title', 'ngtj_change_tng_rss_title'); | |
function ngtj_change_tng_rss_ul_class($class) { | |
return 'list-inline'; | |
} | |
add_filter('tng_wp_rss_list_class', 'ngtj_change_tng_rss_ul_class'); | |
function ngtj_add_content_before($content) { | |
return '<table class="table"><thead><th>Header 1</th><th>Header 2</th></thead><tbody><tr><td>Hello 1</td><td>Hello 2</td></tr><tr><td>Goodbye 1</td><td>Goodbye 2</td></tr></tbody></table>'; | |
} | |
add_filter('tng_wp_rss_before_content', 'ngtj_add_content_before'); | |
function ngtj_add_content_after($content) { | |
return 'After list content'; | |
} | |
add_filter('tng_wp_rss_after_content', 'ngtj_add_content_after'); | |
function ngtj_filter_post_content($content) { | |
return 'This has been replaced completely.'; | |
} | |
add_filter('tng_wp_rss_post_content', 'ngtj_filter_post_content'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment