Make WordPress Core

Opened 14 years ago

Closed 9 years ago

#14960 closed enhancement (wontfix)

Add More bulk actions to the link manager

Reported by: teraom's profile teraom Owned by: edwardw's profile edwardw
Milestone: Priority: low
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: Cc:

Description

Currently, the link manager supports only one bulk action, which is delete.
If there are a lot of links, making links visible and invisible is now a tedious process. A bulk action for "make visible" and "make hidden" would be a good enhancement, IMHO.

Attachments (2)

patch14960.diff (3.4 KB) - added by edwardw 13 years ago.
[PATCH] Add features to bulk show/hide links
patch14960_v2.diff (4.3 KB) - added by edwardw 13 years ago.
[PATCH] Add features to bulk show/hide links

Download all attachments as: .zip

Change History (13)

#1 @scribu
14 years ago

  • Milestone changed from Awaiting Review to Future Release

An even better enhancement would be to transform links into a custom post type.

#2 @scribu
14 years ago

That said, it's pretty easy for plugins to add additional bulk actions in WP 3.1.

@edwardw
13 years ago

[PATCH] Add features to bulk show/hide links

#3 @edwardw
13 years ago

  • Keywords has-patch dev-feedback added
  • Owner set to edwardw
  • Status changed from new to accepted
  • Version 3.1 deleted

#4 @SergeyBiryukov
13 years ago

  • Keywords links link manager removed

#5 @nacin
13 years ago

  • Keywords needs-refresh added; dev-feedback removed
  • Priority changed from normal to low

This patch seems like a good first step.

Coding standards:

  • Needs more spaces, especially in wp-admin/link.php and in link-manager.php.
  • Use single quotes rather than double quotes when able, in the list table code.
  • In link-manager.php, convert the $doaction if/elseif/elseif to a switch with breaks.

Code itself:

  • Use esc_url( wp_nonce_url( admin_url() ) ), rather than wp_nonce_url() and &. esc_url() will do that conversion for you, and further, wp_nonce_url() will reverse & anyway, so it's ending up unescaped in the existing patch.
  • Namespace the nonces. Rather than show_$id, hide_$id, consider show-bookmark_$id and hide-bookmark_$id.
  • Only add $actionsshow? if 'N' == $link->link_visible, and only add $actionshide? if Y' == $link->link_visible. (Note this is not a simple if/else construct, but rather if/elseif, as I think a plugin could override link_visible to be another value. So better to be specific that these actions only work for the boolean values.)

Translations:

  • Translators will probably want these links to be contextualized. So _x( 'Show', 'link' ), and _x( 'Hide', 'link' ). We don't seem to be very good at contextualizing action links here and elsewhere though, so you can skip this step.

Ultimately, links are such a little-used feature that this patch will never be a priority. But once we branch off 3.3 and trunk becomes 3.4, if someone drops a comment I will come by and handle. (Assuming the patch is updated.)

@edwardw
13 years ago

[PATCH] Add features to bulk show/hide links

#6 @edwardw
13 years ago

  • Keywords dev-feedback added; needs-refresh removed

Updated as per suggestions - thanks nacin.

#7 @iseulde
11 years ago

  • Keywords has-patch dev-feedback removed
  • Resolution set to wontfix
  • Status changed from accepted to closed

wontfix since the link manager is now hidden?

#8 @markoheijnen
11 years ago

  • Keywords has-patch added
  • Resolution wontfix deleted
  • Status changed from closed to reopened

I disagree on the reason. It is hidden but still our code. This should be open till everything is moved to a plugin. We can then see if this is wontfix or not.

#9 @iseulde
11 years ago

Sorry, thought enhancements would no longer be added.

#10 @kpdesign
11 years ago

The link manager is only hidden from new installs (3.5 and after). Older installs that utilized the link manager prior to 3.5 still have it showing, so this code still needs to be maintained. Whether we should enhance the existing core code to include this functionality is up for discussion.

If this enhancement is included, then the Link Manager plugin should have the same functionality included in it (http://wordpress.org/plugins/link-manager/).

#11 @chriscct7
9 years ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from reopened to closed

No interest in 2 years and as Kim pointed out the link manager doesn't show anymore. Closing as wontfix

Note: See TracTickets for help on using tickets.