Visit Website'); // Signature data function tssig_add_option_pages() { if (function_exists('add_options_page')) { add_options_page("3 Sheep Signatures", '3 Sheep Signatures', '', __FILE__, 'tssig_options_page'); } } function tssig_trim_sig($sig) { return trim($sig, "*"); } function tssig_alterCount($oldCount, $newCount) { if ($oldCount < $newCount) { for ($pos = $oldCount; $pos < $newCount; ++$pos) { add_option('tssig_data' . $pos ,'Written by %FIRST% %LAST% - Visit Website'); // Signature data update_option('tssig_data' . $pos ,'Written by %FIRST% %LAST% - Visit Website'); // Signature data } } else if ($oldCount > $newCount) { for ($pos = $newCount; $pos < $oldCount; ++$pos) { delete_option('tssig_data' . $pos); } } } function tssig_options_page() { global $tssig_version; $oldSigCount = get_option('tssig_count'); if (isset($_POST['set_defaults'])) { echo '

'; update_option('tssig_count', 1); update_option('tssig_data0', 'Written by %FIRST% %LAST% - Visit Website'); // Signature data echo 'Default Options Loaded!'; echo '

'; } else if (isset($_POST['info_update'])) { $sig_count = (int)$_POST["tssig_count"]; echo '

'; update_option('tssig_count', $sig_count); update_option('tssig_data0', '*' . (string)$_POST["tssig_data0"] . '*'); for ($pos = 1; $pos < $sig_count; ++$pos) { update_option('tssig_data' . $pos, '*' . (string)$_POST["tssig_data" . $pos] . '*'); } echo 'Configuration Updated!'; echo '

'; } tssig_alterCount($oldSigCount, get_option('tssig_count')); ?>

3 Sheep Signatures v

">

Signatures

Primary Signature - Trigger with [tssig]

Signature - Trigger with [tssig id=""]

Notes:

- HTML is allowed
- All newlines will be turned into line breaks
- CSS can be added to customize the look

You can use the following variables to display author information:

- %LOGIN% - Login name
- %FIRST% - First name
- %LAST% - Last name
- %NICK% - Nickname
- %EMAIL% - Email address
- %URL% - Website
- %DESC% - Description/Bio

Usage

'1'), $content)); if ($id >= 1 && $id <= get_option('tssig_count')) { // Load options $tssig_data = get_option('tssig_data' . ($id - 1)); // 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(tssig_trim_sig($tssig_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 = '
' . do_shortcode($the_sig) . '
'; } return $the_sig; } add_action('admin_menu', 'tssig_add_option_pages'); add_shortcode( 'tssig', 'tssig_generate'); ?>