next_widget_id_number()

 

File: wp-admin/includes/widgets.php

function next_widget_id_number( $id_base ) {
	global $wp_registered_widgets;
	$number = 1;

	foreach ( $wp_registered_widgets as $widget_id => $widget ) {
		if ( preg_match( '/' . $id_base . '-([0-9]+)$/', $widget_id, $matches ) ) {
			$number = max( $number, $matches[1] );
		}
	}
	$number++;

	return $number;
}

参数:next_widget_id_number( string $id_base )

(int)

$id_base

(string)
(Required)

{acontent3}

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

16.67% (1) 次Baidu访问
16.67% (1) 次Google访问
66.67% (4) 次Sogou访问
  • 蜘蛛:Baidu,1次,更新时间:2019-04-24 20:35:56
  • 蜘蛛:Google,1次,更新时间:2019-05-13 06:13:50
  • 蜘蛛:Sogou,4次,更新时间:2019-05-13 01:33:50

参与评论