Manage -> Add Pheedo Author: Daisy Olsen Version: 1.0 Author URI: http://daisyolsen.com/ */ /* Based on 'sig2feed' by Brendan Borlase - http://www.smackfoo.com/ */ // Setup defaults if options do not exist add_option('pheedo_data', ''); // Default Signature data add_option('pheedo_sfeed', FALSE); // Disable Add Pheedo by default function pheedo_add_option_pages() { if (function_exists('add_options_page')) { add_management_page('Configure Add Pheedo', 'Add Pheedo', 8, __FILE__, 'pheedo_options_page'); } } function pheedo_trim_sig($sig) { return trim($sig, "*"); } function pheedo_options_page() { if (isset($_POST['info_update'])) { ?>

Add Pheedo

Add Pheedo will add the necessary code, once it's been entered below, to the main RSS feed(s), You can also enter HTML or Text to provide a custom tag-line, or direct readers back to your blog.

To enable the Ads/signature in all feed items enable the check box in the options section of this page. Alternatively, if you wish to add post-by-post control, disable the checkbox below and insert <!-- pheedo --> in any post you wish to trigger Pheedo or your signature on.

To check for new versions or to view more information on my work, please visit the official Add Pheedo plugin page.

">

Signature



Notes: The following variables are available to simplify or customise the signature:

Options

/>    Enable Pheedo Ad code and/or custom Signature and display in RSS feeds?

If you found the Add Pheedo plugin useful, please consider making a donation to support it's development. Thank you!

'); if ($found) { $show_sig = TRUE; } if (!$show_sig) { return $content; } // Get author information $a_login = get_the_author_login(); // %%LOGIN%% $a_first = get_the_author_firstname(); // %%FIRST% % $a_last = get_the_author_lastname(); // %%LAST%% $a_nick = get_the_author_nickname(); // %%NICK%% $a_email = get_the_author_email(); //% %EMAIL%% $a_url = get_the_author_url(); // %%URL%% $a_desc = get_the_author_description(); // %%DESC%% // Process signature $the_sig = stripslashes(nl2br(pheedo_trim_sig($pheedo_data))); $the_sig = str_replace("%%LOGIN%%", $a_login, $the_sig); $the_sig = str_replace("%%FIRST%%", $a_first, $the_sig); $the_sig = str_replace("%%LAST%%", $a_last, $the_sig); $the_sig = str_replace("%%NICK%%", $a_nick, $the_sig); $the_sig = str_replace("%%EMAIL%%", $a_email, $the_sig); $the_sig = str_replace("%%URL%%", $a_url, $the_sig); $the_sig = str_replace("%%DESC%%", $a_desc, $the_sig); $the_sig = str_replace("%%UNIQUEID%%", $id, $the_sig); // Look for trigger if ($found_trigger) { // If trigger found, process $content = str_replace('', $the_sig, $content); } else { $content .= $the_sig; } return $content; } add_filter('the_content', 'pheedo_generate'); add_action('admin_menu', 'pheedo_add_option_pages'); ?>