WordPress.org

Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#2354 closed enhancement (invalid)

Support for empty URI in links

Reported by: hypercubed Owned by:
Milestone: Priority: low
Severity: normal Version: 2.0
Component: Administration Keywords:
Focuses: Cc:

Description

These is some use to creating links (via link manager) with empty URIs. If the URI is empty then the link tag itself should not be included in the get_links() output.

Attachments (1)

2354.diff (794 bytes) - added by davidhouse 9 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 @hypercubed9 years ago

  • Version changed from 1.2 to 2.0

comment:2 @hypercubed9 years ago

  • Keywords bg|2nd-opinion bg|has-patch added

I do this by adding

if ($the_link != 'http://')

to lines 243 and 245 in wp-admin/links.php

@davidhouse9 years ago

comment:3 @davidhouse9 years ago

I'd do it this way. Would not displaying empty links harm anyone?

comment:4 @davidhouse9 years ago

I'd do it this way. Would not displaying empty links harm anyone?

comment:5 @hypercubed9 years ago

No, please don't do it that way. I use links with empty URI as a place to store a list. For example if I wanted a list of images or something that don't need to be associated with a link. I also use the built in ability to show a random "link" to display a random quote. I'd just like it if the empty link was removed but the text and description still appear.

comment:6 @robmiller9 years ago

For example if I wanted a list of images or something that don't need to be associated with a link. I also use the built in ability to show a random "link" to display a random quote.

Yeuch. Should totally non-standard stuff like this really be supported? Surely it would be far better to install one of the zillion "Random Quote" plugins than it would to abuse the link system like this?

comment:7 @skeltoac9 years ago

  • Keywords bg|2nd-opinion bg|has-patch removed
  • Resolution set to invalid
  • Status changed from new to closed

No. Links are connections to other URLs.

hypercubed, your uses for Links are creative and interesting but core isn't built for that. Use plugins or theme edits to make your sidebar do whatever you want.

comment:8 @Nazgul8 years ago

  • Milestone 2.1 deleted
Note: See TracTickets for help on using tickets.