have_posts()) { $post->the_post(); if ($redirect == 301) header("HTTP/1.1 301 Moved Permanently"); elseif ($redirect == 302) header("HTTP/1.1 302 Found"); header("Location: ".get_permalink()); } } } function twitter_friendly_links_menu() { add_options_page('Twitter Friendly Links', 'Twitter Friendly Links', 8, __FILE__, 'twitter_friendly_links_options'); } function twitter_friendly_links_options() { $options = get_option("twitter_friendly_links"); if (!isset($options["style"])) { $options["style"] = "go"; $options["redirect"] = 302; } if (isset($_POST["twitter-friendly-links-submit"])) { $options["style"] = $_POST["style"]; $options["redirect"] = $_POST["redirect"]; update_option("twitter_friendly_links", $options); } $style = $options["style"]; $redirect = $options["redirect"]; $selected[$redirect] = " selected=\"selected\""; ?>
Make sure you get this right from the first time because changing this afterward will affect all your previous twitter friendly links and you're most likely to get 404 error messages on your old links. For more information please visit Twitter Friendly Links. Oh and make sure you save changes before copying any links from the table below.
| Title | Friendly Link |
|---|---|
| Title | Friendly Link |
| the_title();?> |
= $friendly_link; ?> |