Syntax Syntax
Parameters Parameters
- $id_base
-
(Required)
Return Return
(int)
Source Source
File: wp-admin/includes/widgets.php
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; }