WP_Customize_Widgets::_sort_name_callback( array $widget_a, array $widget_b )

Naturally orders available widgets by name.

Parameters Parameters


(array) (Required) The first widget to compare.


(array) (Required) The second widget to compare.

Top ↑

Return Return

(int) Reorder position for the current widget comparison.

Top ↑

Source Source

File: wp-includes/class-wp-customize-widgets.php

	protected function _sort_name_callback( $widget_a, $widget_b ) {
		return strnatcasecmp( $widget_a['name'], $widget_b['name'] );

Top ↑

Changelog Changelog

Version Description
3.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.