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 | |
// NOTE: You'd have to create /acf-json/components/ foler in the theme manually first, | |
// just like how you'd manutally create the acf-json folder | |
/** | |
* In /includes/json.php:17, is where the acf_json write the local json file. | |
* So this hook has to be 9, just before acf write the file. | |
*/ |
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 | |
add_filter('acf/load_value/type=gallery', 'acf_load_translated_attachment_ids'); | |
function acf_load_translated_attachment_ids($value) { | |
// if the current language is the default language, | |
// then we don't need to fetch the translated ids | |
if (acf_get_setting('default_language') == acf_get_setting('current_language')) { | |
return $value; | |
} |
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
/** | |
* User Defined Values | |
*/ | |
const agreedDisclaimer = false; | |
const apiToken = ''; | |
/** | |
* Dont need to touch anything below | |
*/ | |
const readline = require('readline'); |
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
{ | |
"html": { | |
"allowed_file_extensions": ["php", "htm", "html", "xhtml", "shtml", "xml", "svg"], | |
"max_preserve_newlines" : 1 | |
} | |
} |