Created
September 29, 2011 14:57
-
-
Save beastaugh/1250906 to your computer and use it in GitHub Desktop.
WordPress plugin to move Tarski's comments link from the post metadata to the end of the post.
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 | |
/* | |
Plugin Name: Move Comment Link | |
Plugin URI: http://tarskitheme.com/help/hooks/example-plugins/ | |
Description: Move the Tarski theme's comments link from the post metadata to the end of the post. | |
Author: Benedict Eastaugh | |
Version: 1.0 | |
Author URI: http://extralogical.net/ | |
*/ | |
function mcl_print_comments_link() { | |
echo "<p>" . substr(tarski_comments_link(""), 3) . "</p>"; | |
} | |
function mcl_remove_comments_link() { | |
remove_filter('th_post_metadata', 'tarski_comments_link'); | |
} | |
add_action('th_postend', 'mcl_print_comments_link'); | |
add_action('wp_head', 'mcl_remove_comments_link', 11); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment