Contributors: norcross
Website Link: http://andrewnorcross.com/plugins/yourls-link-creator/
Donate link: https://andrewnorcross.com/donate
Tags: YOURLS, shortlink, custom URL
Requires at least: 3.6
Tested up to: 4.4
Stable tag: 2.1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Creates a custom short URL when saving posts. Requires your own YOURLS install.
Creates a YOURLS generated shortlink on demand or when saving posts.
Features:
- Optional custom keyword for link creation.
- Will retrieve existing URL if one has already been created.
- Click count appears on post menu
- Available for standard posts and custom post types.
- Optional filter for wp_shortlink
- Built in cron job will fetch updated click counts every hour.
This section describes how to install the plugin and get it working.
- Upload
yourls-link-creator
to the/wp-content/plugins/
directory. - Activate the plugin through the 'Plugins' menu in WordPress.
- Navigate to the "YOURLS Settings" option in the Settings Menu.
- Enter your YOURLS custom URL and API key
- Enjoy!
This plugin creates a shortlink (stored in the post meta table) for each post that can be used in sharing buttons, etc.
YOURLS is a self-hosted PHP based application that allows you to make your own custom shortlinks, similar to bit.ly and j.mp. Learn more about it here
Place the following code in your theme file (usually single.php) <?php yourls_display_box(); ?>
This is a limitation with the YOURLS API, as there is not a method yet to delete a link. The delete function has been added to the plugin to allow users to get the updated URL that they may have changed in the YOURLS admin panel
- added
yourls_run_cron_jobs
filter to allow users to disable the cron job
- added
yourls_after_url_save
action to post transitioning from future to publish (scheduled posts)
- added
yourls_after_url_save
action to fire when the custom URL is generated and stored
- added ability to set custom keyword prior to save
- added
yourls_user_cap
filter for modifying default user capability - added
yourls_settings_cap
filter for modifying settings page capability - added
yourls_keyword_filter
filter for changing default keyword sanitation - added new legacy file to pick up old functions from Ozh's plugin
- added GitHub plugin updater support
- fixed bug with post row actions missing on drafts
- updated cron job scheduling
- added scheduled posts to available post status
- added
yourls_post_status
filter to modify these (although not sure why you'd want to) - added function to create a link when a post is moved from 'scheduled' to 'publish' if one doesn't exist (requires setting update)
- added API status check sidebox to the settings page
- fixed API URL construction to account for installs in a subfolder
- added filter
yourls_strip_urls
to allow trailing slash removal (default is false)
- fixed API query args getting malformed before call
- fixed content title sanitation encoding
- forced POST method for API call and removed setting
- added bulk import function for existing data
- added
yourls_display_box
template tag to display front end box - added
get_yourls_shortlink
to return or echo the shortlink - added
wp_ozh_yourls_raw_url
to match previous plugin from Ozh
- added API key field show / hide to (hopefully) account for Chrome being aggressive on the field
- removed 'future' from array of post types to create items on save
- fixed bug with creating link on post save
- added post title submission to API call
- added option for using POST method instead of GET method to address API permission issues
- nonce ALL THE THINGS
- COMPLETELY REFACTORED
- updated UI to match current WP setup
- rewrote javascript for better security
- added post action row items for creating and updating counts
- added check for possible 404 return on YOURLS server
- a whole lot more
- bugfixes related to certain hosting configurations
- minor JS cleanup
- change to allow scheduled posts to process URL call. props @ethitter
- better sanitizing of personal YOURLS URL
- code cleanup
- included template tag for theme use. (See FAQs for usage)
- added a 'delete' button for single links (See FAQs for details)
- The YOURLS metabox will not appear until a post has been published.
- added a conversion tool from Ozh's plugin to this one
- refactoring the wp_shortlink functionality
- Bugfix for post type checking
- Option for adding to specific post types
- delay link creation until status is published
- internationalization support
- Added option to create link on post save
- code cleanup
- First release!
- The YOURLS metabox will not appear until a post has been published. This is to prevent empty or otherwise incorrect URLs from getting created.
- First release!