#6349 closed defect (bug) (fixed)
Widget titles can be repetitive
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.5.1 | Priority: | normal |
Severity: | normal | Version: | 2.5 |
Component: | General | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
If you add a new widget, you'll often get a repetitive title in the admin.
Meta: Meta
We should test for this duplication and nip it in the bud.
Attachments (3)
Change History (13)
#2
@
17 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Shouldn't the patch be this?
if ( $widget_title && $widget_title != $sidebar_args['widget_name'] )
The original patch fixes it for the default plugins, but it's still possible to get the repetitive title bug if $widget_title != $control['name']
but $widget_title == sidebar_args['widget_name']
, which it does with what I'm doing.
#3
follow-up:
↓ 4
@
17 years ago
Hm... Actually - I think the references in those few lines to $sidebar_args['widget_name']
are incorrect; they should reference $control['name']
, shouldn't they?
When are those two different?
#4
in reply to:
↑ 3
@
17 years ago
Replying to mdawaffe:
When are those two different?
They are different with the dashboard widgets apparently.
My plugin which results in the double titles: http://files.viper007bond.com/wordpress/dashboard-widget-manager_1.0.0beta.zip
We're comparing variables A and B and then displaying variables A and C. We should either compare A and C or display A and B, i.e compare and display the same variables.
#5
@
17 years ago
- Keywords has-patch commit added
It looks like we're displaying the widget name everywhere rather than the widget control name. This is probably an oversight, but it's too late to change for 2.5 now.
Attached makes everything consistent by using the widget name.
#6
@
17 years ago
6349.c.diff incorporates all of 6349.b.diff and fixes a bug when adding new multi-widgets (extant titles were erroneously being appended to new instances of multi-widgets).
(In [7467]) Don't dupe widget titles. Fixes #6349. Hat tip: mdawaffe.