Add ACF JSON support for field groups sync
This commit is contained in:
parent
7db29d1a38
commit
08a1040b59
49
wp-content/themes/dekart/acf-json/group_6981398f2b552.json
Normal file
49
wp-content/themes/dekart/acf-json/group_6981398f2b552.json
Normal file
@ -0,0 +1,49 @@
|
||||
{
|
||||
"key": "group_6981398f2b552",
|
||||
"title": "SEO метаданные",
|
||||
"fields": [
|
||||
{
|
||||
"key": "field_698139906b2db",
|
||||
"label": "meta_keywords",
|
||||
"name": "meta_keywords",
|
||||
"aria-label": "",
|
||||
"type": "text",
|
||||
"instructions": "",
|
||||
"required": 0,
|
||||
"conditional_logic": 0,
|
||||
"wrapper": {
|
||||
"width": "",
|
||||
"class": "",
|
||||
"id": ""
|
||||
},
|
||||
"default_value": "<meta name=\"keywords\" content=\"частная школа щелково, школа декарт щелково, платная школа щелково, образовательный центр декарт, обучение детей щелково, частная школа фрязино, лицензированная школа щелково\" \/>",
|
||||
"maxlength": "",
|
||||
"allow_in_bindings": 0,
|
||||
"placeholder": "",
|
||||
"prepend": "",
|
||||
"append": ""
|
||||
}
|
||||
],
|
||||
"location": [
|
||||
[
|
||||
{
|
||||
"param": "page_template",
|
||||
"operator": "==",
|
||||
"value": "front-page.php"
|
||||
}
|
||||
]
|
||||
],
|
||||
"menu_order": 0,
|
||||
"position": "normal",
|
||||
"style": "default",
|
||||
"label_placement": "top",
|
||||
"instruction_placement": "label",
|
||||
"hide_on_screen": "",
|
||||
"active": true,
|
||||
"description": "",
|
||||
"show_in_rest": 0,
|
||||
"display_title": "",
|
||||
"allow_ai_access": false,
|
||||
"ai_description": "",
|
||||
"modified": 1778178038
|
||||
}
|
||||
@ -895,3 +895,27 @@ function dekart_add_preload_hints() {
|
||||
}
|
||||
add_action('wp_head', 'dekart_add_preload_hints', 1);// Тестовая строка для проверки деплоя 2026-05-06
|
||||
// Updated via WordPress admin 2026-05-07
|
||||
|
||||
// === ACF JSON Auto-save ===
|
||||
// Автоматически сохраняет группы полей в JSON при редактировании
|
||||
add_filter('acf/settings/save_json', function($path) {
|
||||
return get_stylesheet_directory() . '/acf-json';
|
||||
});
|
||||
|
||||
// Загружает группы полей из JSON
|
||||
add_filter('acf/settings/load_json', function($paths) {
|
||||
$paths[] = get_stylesheet_directory() . '/acf-json';
|
||||
return $paths;
|
||||
});
|
||||
|
||||
// === ACF JSON Auto-save ===
|
||||
// Автоматически сохраняет группы полей в JSON при редактировании
|
||||
add_filter('acf/settings/save_json', function($path) {
|
||||
return get_stylesheet_directory() . '/acf-json';
|
||||
});
|
||||
|
||||
// Загружает группы полей из JSON
|
||||
add_filter('acf/settings/load_json', function($paths) {
|
||||
$paths[] = get_stylesheet_directory() . '/acf-json';
|
||||
return $paths;
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user