Ticket #7818 (closed enhancement: fixed)

Opened 3 months ago

Last modified 3 months ago

Require new filter hook for sidebars_widgets array

Reported by: gortsleigh Assigned to: anonymous
Priority: normal Milestone: 2.7
Component: General Version: 2.6.1
Severity: normal Keywords: widget filter reorder
Cc:

Description

We need to alter the order of widgets on a sidebar based on a user preference. There is currently no hook available to affect the ordering of widgets.

Please add a new hook for the $sidebars_widgets array, as shown in the following 2.6.2 Wordpress code

File is wp-includes/widgets.php

Index: widgets.php
===================================================================
--- widgets.php	(revision 658)
+++ widgets.php	(working copy)
@@ -361,6 +361,7 @@
 
 	unset($sidebars_widgets['array_version']);
 
+	$sidebars_widgets = apply_filters('sidebars_widgets', $sidebars_widgets);
 	return $sidebars_widgets;
 }

Change History

10/06/08 16:57:31 changed by ryan

  • status changed from new to closed.
  • resolution set to fixed.

(In [9088]) sidebars_widgets fiter from gortsleigh. fixes #7818