Created
May 14, 2010 02:07
-
-
Save olore/400727 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My modifications to Blair Williams' awesome Pretty Link WP plugin | |
http://blairwilliams.com/pretty-link-bookmarklet/ | |
I wanted a bookmarklet that let me define the short url. To do this you have to modify the bookmarklet itsef and prli-bookmarklet.php as follows: | |
updated bookmarklet: | |
javascript:void(slug=prompt('Enter a short url, or leave blank for a random one.'));location.href='http://brian.olore.net/wp/wp-content/plugins/pretty-link/prli-bookmarklet.php?k=**MY_KEY**&target_url=' + escape(location.href) + '&slug=' + slug; | |
updated pretty-link/prli-bookmarklet.php : | |
$slug = ((isset($_GET['slug']) and $_GET['slug'] != '-1')?$_GET['slug']:''); | |
$result = prli_create_pretty_link( $_GET['target_url'], $slug, '', '', $group, $track, '', $redirect_type ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment