定制 blackdevs/wp-starter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

blackdevs/wp-starter

最新稳定版本:v1.0.9

Composer 安装命令:

composer create-project blackdevs/wp-starter

包简介

WordPress plugin starter kit — run `php bin/setup.php` to scaffold your plugin.

README 文档

README

A boilerplate WordPress plugin designed to help developers kickstart new projects quickly.

Features

  • Standardized plugin structure
  • Composer support for dependency management
  • Easy integration via composer create-project
  • Built-in bdevs CLI for scaffolding classes, widgets, and assets
  • Ready-to-extend codebase for custom functionality

Installation

composer create-project blackdevs/wp-starter my-plugin

CLI — bdevs

The bdevs CLI tool scaffolds classes, Elementor widgets, and asset files — and automatically wires everything into the plugin.

Setup (one-time)

Add the following function to your PowerShell profile ($PROFILE):

function bdevs { php "D:\plugins\wp-starter\bin\bdevs" @args }

Usage

bdevs <command> [arguments]

bdevs class

Creates a PHP class file and auto-wires it into the plugin.

bdevs class <ClassName> [folder]
Folder Result
(default) classes Plain class → wired into includes() + init_plugin()
includes Plain class → wired into includes() + init_plugin()
widgets Elementor widget stub → wired into widgets/init.php
# Creates classes/my-feature.php
bdevs class MyFeature

# Creates includes/post-types.php
bdevs class PostTypes includes

# Creates widgets/my-slider.php (Elementor widget)
bdevs class My_Slider widgets

When folder is not widgets, automatically:

  1. Creates the class with the correct namespace
  2. Adds require_once inside includes() in the main plugin file
  3. Adds new ClassName() inside init_plugin()

When folder is widgets, automatically:

  1. Creates an Elementor Widget_Base stub with get_name(), get_title(), register_controls(), render()
  2. Adds require_once inside init_widgets() in widgets/init.php
  3. Registers the widget via $widgets_manager->register()

bdevs css / bdevs js

Creates an asset file and enqueues it in AssetsManager.

bdevs css <filename> [admin]
bdevs js  <filename> [admin]
Flag Hook
(none) wp_enqueue_scriptsenqueue_scripts()
admin admin_enqueue_scriptsenqueue_admin_scripts()
# Frontend CSS/JS
bdevs css my-feature
bdevs js  my-feature

# Admin CSS/JS
bdevs css admin-styles admin
bdevs js  admin-panel  admin

bdevs help

bdevs help

Project Structure

bin/
  bdevs          # CLI dispatcher
  setup.php      # Interactive setup wizard
classes/         # Your custom classes (default bdevs target)
includes/        # Core plugin includes
  assets-manager.php  # Enqueue frontend & admin scripts/styles
widgets/         # Elementor widget classes
  init.php       # Widget registration
assets/
  css/
  js/
  img/

统计信息

  • 总下载量: 19
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-03-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固