wp_get_entity_view_config_hook_name( string $kind, string $name ): string

Builds the name of the dynamic filter that provides the view configuration for an entity.

Description

The entity kind and name are embedded in the hook name lowercased, so the hook follows the WordPress convention of lowercase hook names regardless of how the entity identifiers are spelled: the postType/page entity maps to the get_entity_view_config_posttype_page hook.

Parameters

$kindstringrequired
The entity kind (e.g. postType).
$namestringrequired
The entity name (e.g. page).

Return

string The filter name.

Source

function wp_get_entity_view_config_hook_name( $kind, $name ) {
	return strtolower( "get_entity_view_config_{$kind}_{$name}" );
}

Changelog

VersionDescription
7.1.0Introduced.

User Contributed Notes

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