Skip to content

Instantly share code, notes, and snippets.

@drewbaker
drewbaker / simian-sync.php
Last active September 6, 2023 03:07
A script that creates a Video CPT that gets synced to your Simian
<?php
/*
* This file contains code to create a Video CPT, and a "Download" button in the admin header.
* When clicking that download button, it creates a Video post with all the meta data saved as `simian_data`.
*
* Requires a site options field for `simian_api_key` that is the API key from Simian.
* Eg: This must work: get_field("simian_api_key", "option");
*
* Also need an option field for `simian_api_url` that is something like `https://clientNameHere.gosimian.com/api/simian/get_media`
*