_get_widget_id_base( string $id ): string

In this article

Retrieves the widget ID base value.

Parameters

$idstringrequired
Widget ID.

Return

string Widget ID base.

Source

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

Changelog

VersionDescription
2.8.0Introduced.

User Contributed Notes

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