atamj/wp-custom-post 问题修复 & 功能扩展

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

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

atamj/wp-custom-post

Composer 安装命令:

composer require atamj/wp-custom-post

包简介

Class that allows you to create custom posts easily

README 文档

README

Class that allows you to create custom posts easily

Parameters:

/**
 * @param string $post_type     Post type key. Must not exceed 20 characters and may only contain lowercase alphanumeric characters, dashes, and underscores.
 * @param string $menu_name     Name of the post type shown in the menu. Usually plural. Default is value of $labels['name']. Also used for $args['label'].
 * @param array $supports       Core feature(s) the post type supports (['title', 'editor', 'comments', 'revisions', 'trackbacks', 'author', 'excerpt', 'page-attributes', 'thumbnail', 'custom-fields', 'post-formats']). Default all support. Used for $args['supports'].
 * @param array $args           (Optional) Array of arguments for registering a post type.Dafault $args = ['has_archive'=>true, 'public'=>true, 'exclude_from_search'=>true, 'rewrite'=>$menu_name]. See https://developer.wordpress.org/reference/functions/register_post_type
 */

Example for all support and best default args:

 new CustomPost('test', 'Tests');

Example for custom support and best default args:

new CustomPost('test', 'Tests', ['title', 'editor', 'thumbnail', 'custom-fields'])

Example fo custom support and custom args:

new CustomPost('test', 'Tests', ['title', 'editor', 'thumbnail', 'custom-fields'], ['exclude_from_search'=>false])

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-03-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固