定制 kostyandrew/aspect-post 二次开发

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

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

kostyandrew/aspect-post

最新稳定版本:1.0.0

Composer 安装命令:

composer require kostyandrew/aspect-post

包简介

PHP Class for WordPress which help create type of post, taxonomies and metabox

README 文档

README

PHP Class for WordPress which help create type of post, taxonomies and metabox

You can use standard arguments and labels setting WordPress using setArgument and setLabel methods

Creating post type:

use \Aspect\Type;
$slides = new Type('slide');
$slides
  ->addSupport('thumbnail') // add support thumbnail
  ->setArgument('public', true) // public argument
  ->setArgument('show_in_nav_menus', false); // hide in creating menu

Creating taxonomy:

use \Aspect\Taxonomy;
$slides_type = new Taxonomy('type');
$slides_type
  ->attachTo($slides); // post type where will be created taxonomy

Creating metabox:

use \Aspect\Box;
$slides_settings = new Box('slide setting');
$slides_settings
  ->attachTo($slides); // post type

Creating metabox input:

use \Aspect\Input;
$text_color = new Input('text color');
$text_color
  ->attachTo($slides_settings) // metabox
  ->attach('white', 'black') // values for select
  ->setType('select') // type of input
  ->setArgument('default', 'black'); // default

Get value of metabox field:

$text_color = Input::get('text color')->getValue($slide_id, 'attr', Box::get('slide setting'));

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固