📜  查找块样式古腾堡 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:08.383000             🧑  作者: Mango

代码示例1
wp.domReady(() => {
    // find blocks styles
    wp.blocks.getBlockTypes().forEach((block) => {
        if (_.isArray(block['styles'])) {
            console.log(block.name, _.pluck(block['styles'], 'name'));
        }
    });
});