This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// core WP titles | |
add_filter('the_title', 'do_shortcode'); | |
add_filter('wp_title', 'do_shortcode'); | |
// add to Yoast generated titles | |
// page title | |
add_filter('wpseo_title', 'do_shortcode'); | |
// schema -> webpage title | |
add_filter('wpseo_schema_webpage', function ($data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/schema#", | |
"id": "http://advancedcustomfields.com/json-schema/field_group", | |
"type": "object", | |
"definitions": { | |
"empty": { | |
"type": "string", | |
"maxLength": 0 | |
}, | |
"intOrEmpty": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function renderForm ($endpoint) { | |
// get the data from the API and convert it to a PHP object | |
$formResult = file_get_contents($endpoint); | |
$formContent = json_decode($formResult); | |
$formFields = $formContent->fields; | |
// start building the DOM | |
$dom = new DOMDocument(); | |
$form = $dom->createElement('form'); |