A modern API for WordPress.
UserNotFoundException
Model::find(id)
retrieval method
\Silk\Silk::VERSION
Version constanttightenco/collect
Collection librarySilk\Post\Model::fromWpPost
Silk\Term\Model::fromWpTerm
Silk\Contracts\Query\BuildsQueries
interfaceThis release brings the following features and enhancements:
User\Model
User\QueryBuilder
url
methods on Post\Model
& Term\Model
Term\Model->children()
Model::make()
named constructorobjectAliases
property, allowing for $model->aliasName == $model->object->targetProperty
$postModel->{name} == $postModel->object->post_{name}
(opt-in via trait)Hook
callbacks now automatically return the first argument passed if nothing is returned.ObjectMeta
now has a fluent set(key, value)
method.Post\Model::fromWpPost()
and Term\Model::fromWpTerm()
(use ::make()
instead)Model->save()
, ->delete()
and ->refresh()
Fixes a strict notice on PHP 5.
This release is a big update (166 commits since 0.9) with a focus on bringing the same functionality and workflow for Post Types and Post Models to Taxonomies and Terms. The Term Query Builder was also introduced, along with the beginnings of some relationship-oriented methods (eg: Taxonomy->terms()
and Taxonomy->postTypes()
).
There were very few breaking changes with the previous release, mostly namespace changes (see the changelog for details).