settings["style"] = $_POST["style"]; $this->settings["format"] = $_POST["format"]; $this->settings["redirect"] = $_POST["redirect"]; $this->settings["posts_enabled"] = ($_POST["posts_enabled"] == "checked") ? true : false; $this->settings["pages_enabled"] = ($_POST["pages_enabled"] == "checked") ? true : false; $this->settings["attachments_enabled"] = ($_POST["attachments_enabled"] == "checked") ? true : false; $this->settings["twitter_tools_fix"] = ($_POST["twitter_tools_fix"] == "checked") ? true : false; $this->settings["askapache_google_404"] = ($_POST["askapache_google_404"] == "checked") ? true : false; $this->settings["tweet_this_fix"] = ($_POST["tweet_this_fix"] == "checked") ? true : false; $this->settings["sociable_fix"] = ($_POST["sociable_fix"] == "checked") ? true : false; $this->settings["ga_tracking"] = $_POST["ga_tracking"]; $this->settings["html_shortlink_rel"] = ($_POST["html_shortlink_rel"] == "checked") ? true : false; $this->settings["http_shortlink_rel"] = ($_POST["http_shortlink_rel"] == "checked") ? true : false; $this->settings["rel_canonical"] = ($_POST["rel_canonical"] == "checked") ? true : false; update_option("twitter_friendly_links", $this->settings); } $style = $this->settings["style"]; $format = $this->settings["format"]; $redirect = $this->settings["redirect"]; $posts_enabled = ($this->settings["posts_enabled"]) ? "checked" : ""; $pages_enabled = ($this->settings["pages_enabled"]) ? "checked" : ""; $attachments_enabled = ($this->settings["attachments_enabled"]) ? "checked" : ""; $twitter_tools_fix = ($this->settings["twitter_tools_fix"]) ? "checked" : ""; $askapache_google_404 = ($this->settings["askapache_google_404"]) ? "checked" : ""; $tweet_this_fix = ($this->settings["tweet_this_fix"]) ? "checked" : ""; $sociable_fix = ($this->settings["sociable_fix"]) ? "checked" : ""; $ga_tracking = $this->settings["ga_tracking"]; $html_shortlink_rel = ($this->settings["html_shortlink_rel"]) ? "checked" : ""; $http_shortlink_rel = ($this->settings["http_shortlink_rel"]) ? "checked" : ""; $rel_canonical = ($this->settings["rel_canonical"]) ? "checked" : ""; $selected[$redirect] = " selected=\"selected\""; $selected[$format] = " selected=\"selected\""; if ($format == "generic") $link_preview = "123"; elseif ($format = "base32") $link_preview = "7e1"; ?>

Twitter Friendly Links

General Settings

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.

/prefix (blank by default)
Generic by default
id="posts_enabled" name="posts_enabled"/> Posts
id="pages_enabled" name="pages_enabled"/> Pages
id="attachments_enabled" name="attachments_enabled"/> Attachments
302 by default

You can tag your destination links for Google Analytics Tracking. For example: utm_source=twitter&utm_medium=shortlink&utm_campaign=shortlinks. You can generate a tagged link using the Google Analytics URL Builder. Do not include the website address in the input box above. Start from utm_source. This string will be appended to the destination address. Leave blank to disable.

Link Relations

Search engines and URL shorteners. Bunch of thoughts on linking relations, so here are the main options.

id="html_shortlink_rel" name="html_shortlink_rel" /> Adds a link rel="shortlink" to the head section of your posts and (if enabled) pages. Specification.
id="http_shortlink_rel" name="http_shortlink_rel" /> Passes a link rel="shortlink" along with the HTTP responses of your posts and (if enabled) pages. Specification.
id="rel_canonical" name="rel_canonical" /> Adds a link rel="canonical" href="permalink" to your HTML head in posts and (if enabled) pages.

Compatibility

If you use any of the plugins listed below and you are experiencing problems with short linking, enable the fixes. If there's no fix for a plugin you're using you may request it on the Twitter Friendly Links page.

I would also like to thank Josh Jones for his great implementation of TFL into his awesome SexyBookmarks plugin. Well done Josh!

id="twitter_tools_fix" name="twitter_tools_fix"/> Linking fix for the Twitter Tools plugin. Described here
id="tweet_this_fix" name="tweet_this_fix"/> Linking fix for the Tweet This plugin.
id="askapache_google_404" name="askapache_google_404"/> Fix for the AskApache Google 404 plugin.
id="sociable_fix" name="sociable_fix"/> Fix for the Sociable plugin.

List of short links

publish; $count_pages = wp_count_posts('page'); $total_pages = $count_pages->publish; $count_attachments = wp_count_posts('attachment'); $total_attachments = $count_attachments->inherit; ?>
Posts / '; else echo 'Posts (disabled) / '; if ($pages_enabled == "checked") echo ' / '; else echo 'Pages (disabled) / '; if ($attachments_enabled == "checked") echo ''; else echo 'Attachments (disabled)'; ?>
Displaying 1-15 of
have_posts()) { $query->the_post(); $friendly_link = twitter_link($query->post->ID); $i++; ?>
  Title Friendly Link
  Title Friendly Link
Posts are disabled
.