WP_Block_Metadata_Registry::get_plugin_dir(): string

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Gets the normalized WordPress plugin directory path.

Return

string The normalized WordPress plugin directory path.

Source

/**
 * Default identifier function to determine the block identifier from a given path.
 *
 * This function extracts the block identifier from the path:
 * - For 'block.json' files, it uses the parent directory name.
 * - For directories, it uses the directory name itself.

Changelog

VersionDescription
6.7.0Introduced.

User Contributed Notes

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