Download the PHP package rockschtar/wordpress-metarevisions without Composer
On this page you can find all versions of the php package rockschtar/wordpress-metarevisions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rockschtar/wordpress-metarevisions
More information about rockschtar/wordpress-metarevisions
Files in rockschtar/wordpress-metarevisions
Package wordpress-metarevisions
Short Description Library for use with roots/bedrock based WordPress projects. Enables meta-data revisions.
License MIT
Informations about the package wordpress-metarevisions
rockschtar/wordpress-metarevision
Description
WordPress Must Use Plugin. Enables meta-data revisions via simplified hooks/filters for usage with composer based based WordPress projects (roots/bedrock or johnpbloch/wordpress).
Requirements
- PHP 7.1+
- Composer to install
Install
License
rockschtar/wordpress-metarevisions is open source and released under MIT license. See LICENSE.md file for more info.
Usage
This library allows you to store changes in post meta fields to the built in WordPress Revision Management System.
MetaRevisions::init();
add_filter('rswpmr_revision_meta_fields', function($fields) {
$fields['your_post_type_name']['your_post_meta_field'] = __('Your Meta Field Title');
return $fields;
});
add_filter('rswpmr_revision_meta_fields_callbacks', function($field_callbacks) {
$field_callbacks[] = array('field' => 'your_post_meta_field', 'callback' => function($value, $field) {
//option to convert your post meta value to a readable value
return $value;
});
return $field_callbacks;
});
Question? Issues?
rockschtar/wordpress-metarevisions is hosted on GitHub. Feel free to open issues there for suggestions, questions and real issues.