wp-kit/cleanoquent 问题修复 & 功能扩展

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

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

wp-kit/cleanoquent

最新稳定版本:1.0.2

Composer 安装命令:

composer require wp-kit/cleanoquent

包简介

A wp-kit component that serves clean Eloquent models for Wordpress

README 文档

README

This is a wp-kit component that serves clean Eloquent models for Wordpress.

Installation

If you're using Themosis, install via Composer in the root of your Themosis installation, otherwise install in your Composer driven theme folder:

composer require "wp-kit/cleanoquent"

Usage

Model

wp-kit/cleanoquent comes with various models which you can extend. For posts wp-kit/cleanoquent uses wp-kit/magic-meta to append and query for meta data.

namespace Theme\Models;

use WPKit\Cleanoquent\Model\Post;

class Address extends Post {
	
    /**
	     * The post_type associated with the model.
	     *
	     * @var string
	     */
		protected $post_type = 'wc-address';
		
		/**
	     * The magic_meta attributes that are mass assignable.
	     *
	     * @var array
	     */
		protected $magic_meta = [
			'_first_name' => 'first_name',
			'_last_name' => 'last_name',
			'_company' => 'company',
			'_address_1' => 'address_1',
			'_address_2' => 'address_2',
			'_city' => 'city',
			'_state' => 'state',
			'_postcode' => 'postcode',
			'_country' => 'country',
			'_email' => 'email',
			'_phone' => 'phone'
		];
    
}

Get Involved

To learn more about how to use wp-kit check out the docs:

View the Docs

Any help is appreciated. The project is open-source and we encourage you to participate. You can contribute to the project in multiple ways by:

  • Reporting a bug issue
  • Suggesting features
  • Sending a pull request with code fix or feature
  • Following the project on GitHub
  • Sharing the project around your community

For details about contributing to the framework, please check the contribution guide.

Requirements

Wordpress 4+

PHP 5.6+

License

wp-kit/cleanoquent is open-sourced software licensed under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-19