Opened 15 months ago

Last modified 15 months ago

#20166 new enhancement

Function url_shorten() enhancement

Reported by: mulvane Owned by:
Priority: normal Milestone: Awaiting Review
Component: Formatting Version:
Severity: normal Keywords: has-patch
Cc:

Description

The function url_open is included in the wp_admin/includes/misc.php and is not usable unless loaded. This is not loaded by default so not available site wide. Also, the function is very static as of right now in its use with no defined options. Options to set length of the shortened url and the ability to turn on off the cutting of the leading "http://www" and the trailing slashes are included in this patch.

Attachments (1)

url_shorten.patch (1.9 KB) - added by mulvane 15 months ago.

Download all attachments as: .zip

Change History (3)

  • Component changed from General to Formatting
  • Keywords has-patch added
  • Summary changed from Function url_open() enhancement to Function url_shorten() enhancement

Makes sense to move it to a more neutral location perhaps, but I'd suggest that adding anything other than the length cutoff isn't needed for core.

I mostly agree but there are more than a few sites where cutting off the www or removing the trailing slash will break the link. For visual purposes, its nice to see them when they are required.

Note: See TracTickets for help on using tickets.