[wp-trac] [WordPress Trac] #14960: Add More bulk actions to the link manager

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 22 22:03:01 UTC 2011


#14960: Add More bulk actions to the link manager
-------------------------------------+-----------------------------
 Reporter:  teraom                   |       Owner:  edwardw
     Type:  enhancement              |      Status:  accepted
 Priority:  low                      |   Milestone:  Future Release
Component:  General                  |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |
-------------------------------------+-----------------------------
Changes (by nacin):

 * keywords:  has-patch dev-feedback => has-patch needs-refresh
 * priority:  normal => low


Comment:

 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 $actions['show'] if 'N' == $link->link_visible, and only add
 $actions['hide'] 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.)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14960#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list