Subdomain Posts
PHP | 52 min ago
PHP | 52 min ago
PHP | 53 min ago
PHP | 54 min ago
PHP | 12 hours ago
PHP | 12 hours ago
PHP | 1 day ago
PHP | 3 days ago
PHP | 3 days ago
PHP | 4 days ago
Recent Posts
C# | 27 sec ago
None | 29 sec ago
None | 33 sec ago
None | 37 sec ago
C++ | 50 sec ago
None | 50 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
Java | 1 min ago
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
By azizhp on the 21st of Aug 2009 10:38:10 AM
Download |
Raw |
Embed |
Report
<?php
/*
Plugin Name: AHP Tags to Hashtags
Plugin URI: http://metablog.us
Description: when active, automatically appends all tags to the post as hashtags to the post title in the output RSS feed.
Version: 1.0
Author: Aziz H. Poonawalla
Author URI: http://metablog.us
Copyright 2009 AZIZ POONAWALLA (email : APOONAWA dash BLOG at YAHOO dot COM)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
function ahp_tags2hashtags($title) {
$taglist = "";
$posttags = get_the_tags();
if ($posttags) {
# for each tag,
foreach($posttags as $tag) {
# get tag name
$tagname = $tag->name;
# remove spaces from tag
# prepend # symbol and append to hashtag list
$taglist = $taglist . " #" . $tagname;
}
}
$title = $title . $taglist;
return $title;
}
add_filter('the_title_rss', 'ahp_tags2hashtags');
?>
Submit a correction or amendment below.
Make A New Post