creode/wordpress-blocks 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

creode/wordpress-blocks

最新稳定版本:3.0.0

Composer 安装命令:

composer require creode/wordpress-blocks

包简介

Block library and block development framework for WordPress blocks.

README 文档

README

This is a WordPress plugin which contains a few blocks to assist in starting out a new project. The blocks are built using the WordPress ACF and the block editor. This module also contains infrastructure to assist in the creation of template based blocks.

Installation

Installation of this can be done using composer: composer require creode/wordpress-blocks

Usage

This plugin once installed will be added to the mu-plugin folder so it is ready for it to be used in your project.

Creating new blocks

In order to create new blocks, you can add a new class to your theme or plugin and extend the Creode_Blocks\Block class.

If you are utilising WP_CLI for your project, you can use the following command to create a new block class:

wp make-block "Creode Footer" --theme="creode"

This will create a newly configured block class and template file within your theme, inside the blocks directory. The theme argument is optional and will default to the current theme.

It will also output a couple of lines that can be copy and pasted into your functions.php file to include the block class and get started quickly.

Creating child blocks

Child blocks are defined within your block class inside the child_blocks() function. You can just need to return an array of new Creode_Blocks\Child_Block instances from it.

Generating documentation locally

This package uses PHPDoc to generate documentation for the blocks. To generate the documentation for testing purposes, you can run the following docker command:

docker run --rm -v $(pwd):/data phpdoc/phpdoc

This will create a new build/docs folder so you can view the documentation locally.

Roadmap

  • Ongoing: Continue to expand the base offering of block classes
  • Implement a command to create new blocks in your theme using WP_CLI

统计信息

  • 总下载量: 1.81k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-07-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固