A WordPress-centric search engine for devs and theme authors



_get_widget_id_base ›

Since2.8.0
Deprecatedn/a
_get_widget_id_base ( $id )
Parameters:
  • (string) $id Widget ID.
    Required: Yes
Returns:
  • (string) Widget ID base.
Defined at:
Codex:

Retrieves the widget ID base value.



Source

function _get_widget_id_base( $id ) {
	return preg_replace( '/-[0-9]+$/', '', $id );
}