GC_Customize_Widgets::_sort_name_callback()

最后更新于:2021-11-27 13:01:25

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

Naturally orders available widgets by name.

参数

$widget_a

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

$widget_b

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

响应

(int) Reorder position for the current widget comparison.

源文件

文件: gc-includes/class-gc-customize-widgets.php

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