@wordpress/block-library
Version:
Block library for the WordPress editor.
14 lines (13 loc) • 487 B
JavaScript
// packages/block-library/src/template-part/edit/utils/create-template-part-id.js
/**
* Generates a template part Id based on slug and theme inputs.
*
* @param {string} theme the template part's theme.
* @param {string} slug the template part's slug
* @return {string|null} the template part's Id.
*/
function createTemplatePartId(theme, slug) {
return theme && slug ? theme + "//" + slug : null;
}
export { createTemplatePartId };
//# sourceMappingURL=create-template-part-id.mjs.map