The main plugin for our headless wp integration
This plugin is not intended for regular admin users. It is only used by the developers to sync content from the draft to the live site. To activate the UI, you need to click in the bottom left corner of the wordpress sidebar. If you hover your mouse over the corner, you will see it turn orange. Click that area 10 times to reveal the tab for Cerberus.
Run npm install
to install all dependencies, then run make dev
to start the development server.
Run make prod
to build the plugin for production. The build will be located in the js-dist
folder.
When you run this command the make command will also commit and push the changes to the repo.
In you theme, just add a filter:
// Add additional endpoi9nts specific for this site to draftf sync
function rawb_add_additional_endpoints($list) {
array_push($list, array('footer', '/json/api/general/footer'));
array_push($list, array('header', '/json/api/general/header'));
array_push($list, array('translations', '/json/api/general/translations'));
array_push($list, array('general', '/json/api/general/general'));
array_push($list, array('gtm', '/json/api/general/gtm'));
array_push($list, array('rate-calculator', '/json/api/general/rate-calculator'));
return $list;
}
add_filter('dls_additional_endpoints', 'rawb_add_additional_endpoints', 10, 1);
- Hide Cerberus plugin for normal users with activation mechanism
- Added support for auth token for all requests to the content service
- Fixed a double import in ajax/check-sync.php
- Added filters for publish/unpublish and sync check in for live (used by SONY documentation service)