azi/raskoh 问题修复 & 功能扩展

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

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

azi/raskoh

Composer 安装命令:

composer require azi/raskoh

包简介

Raskoh - easy wordpress CPT and Taxonomy registration

README 文档

README

Registring custom post types and taxonomies in wordpress is not a headache anymore. Raskoh will make your life simpler.

Usage in theme functions.php

Install

You can insall Raskoh as a wordpress plugin by downloading the package and pulling it in wp-content/plugins folder or using composer.

Paste this in composer.json file

{
   "require" : {
        "azi/raskoh" : "1.*"
   }
}

or just run this command in your project. $ composer require azi/raskoh

include composers autoloader in your theme's functions.php

require_once "vendor/autoloader.php";

Usage

Register a Post Type

to register a post type

$music = new Raskoh\PostType("Music");
$music->register();
Add a Taxonomy

register a taxonomy along with post type

$music = Raskoh\PostType::getInstance("Music");
$music->taxonomy('Singer')->register();
Restrict Posts by Term

if you want to add Terms dropdown on WordPress admin interface to restrict posts by terms. just pass a second boolean to php PostType::taxonomy($name, $filters = false) method.

$music = Raskoh\PostType::getInstance("Music");
$music->taxonomy('Singer', true)->register();
Register Multiple Taxonomies
$music = Raskoh\PostType::getInstance("Music");
$music->taxonomy(['singer','genre'])->register();
Set Icons

you can also set icons to your post type

$music = Raskoh\PostType::getInstance("Music");
$music->taxonomy('Singer')->setIcon('dashicons-format-audioy')->register();

you can pass all other arguments listed at Codex for wp_register_post_type() like this

$CPT = Raskoh\PostType::getInstance();
$CPT->set{ArgumentName}

azi/raskoh 适用场景与选型建议

azi/raskoh 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 179 次下载、GitHub Stars 达 14, 最近一次更新时间为 2015 年 05 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 azi/raskoh 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 azi/raskoh 我们能提供哪些服务?
定制开发 / 二次开发

基于 azi/raskoh 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 14
  • Watchers: 2
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-19