WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 10 years ago

Last modified 9 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 11 years ago.

Download all attachments as: .zip

Change History (9)

#1 @hypercubed
11 years ago

  • Version changed from 1.2 to 2.0

#2 @hypercubed
11 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

@davidhouse
11 years ago

#3 @davidhouse
11 years ago

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

#4 @davidhouse
11 years ago

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

#5 @hypercubed
11 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.

#6 @robmiller
10 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?

#7 @skeltoac
10 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.

#8 @Nazgul
9 years ago

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