It’s a quick change to make this happen. Might be worth rolling into the core?
wti_like_post_site.php
line 7: // pass post ID
function GetWtiLikePost($arg = null, $post_id=NULL)
Line 9: // use loop ID if post ID not specified
if($post_id == NULL) $post_id = get_the_ID();
Line 33: // get categories for post ID
$category = get_the_category($post_id);
You can then call:
GetWtiLikePost(NULL, $post->ID); // echo the output
GetWtiLikePost(‘put’, $post->ID); // return the output string instead of echo
GetWtiLikePost(); // will do what it did before the mods
-
This reply was modified 10 years, 4 months ago by firefly.