[wp-trac] [WordPress Trac] #35021: Dashboard widgets doubled "Configure" link

WordPress Trac noreply at wordpress.org
Fri Dec 11 19:56:49 UTC 2015


#35021: Dashboard widgets doubled "Configure" link
-------------------------------------------------+-------------------------
 Reporter:  afercia                              |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Widgets                              |  Review
 Severity:  normal                               |     Version:  4.4
 Keywords:  has-screenshots needs-patch good-    |  Resolution:
  first-bug                                      |     Focuses:  ui,
                                                 |  accessibility
-------------------------------------------------+-------------------------
Changes (by swissspidy):

 * keywords:  has-screenshots => has-screenshots needs-patch good-first-bug


Comment:

 I've been playing with using `wp_strip_all_tags()` in `do_meta_boxes` for
 a bit.

 It doesn't work too bad, but there are widgets that to some strange
 strings. The Quick Draft meta box for example has the following title:

 `<span class="hide-if-no-js">Quick Draft</span> <span class="hide-if-
 js">Drafts</span>`

 It would be more safe to allow people passing a separate title that can be
 used for that button to `wp_add_dashboard_widget()`. Example:

 {{{#!php
 wp_add_dashboard_widget(
         'dashboard_quick_press',
         $quick_draft_title,
         'wp_dashboard_quick_press',
         null,
         array(
                 'button_title' => 'test',
         )
 );
 }}}

 The data in the `$callback_args` array can be checked for the existence of
 this title. If it doesn't exist, the widget title can be used as usual.

 Just needs a better name instead of `button_title`, some docs and perhaps
 a review of what else this could be used for.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35021#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list