Skip to content

Commit

Permalink
Add acf.php
Browse files Browse the repository at this point in the history
  • Loading branch information
osgsm committed Dec 26, 2024
1 parent d609361 commit 715002e
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
53 changes: 53 additions & 0 deletions wp-content/plugins/galactictalk/acf-json/group_676d39d348a0f.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"key": "group_676d39d348a0f",
"title": "タイトルの英語表記",
"fields": [
{
"key": "field_676d39d3c828d",
"label": "",
"name": "english_title",
"aria-label": "",
"type": "text",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"maxlength": "",
"allow_in_bindings": 0,
"placeholder": "",
"prepend": "",
"append": ""
}
],
"location": [
[
{
"param": "post_type",
"operator": "==",
"value": "course"
}
],
[
{
"param": "post_type",
"operator": "==",
"value": "tutor"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "label",
"hide_on_screen": "",
"active": true,
"description": "",
"show_in_rest": 0,
"modified": 1735211727
}
1 change: 1 addition & 0 deletions wp-content/plugins/galactictalk/galactictalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @package GalacticTalk
*/

require_once __DIR__ . '/includes/acf.php';
require_once __DIR__ . '/includes/admin.php';
require_once __DIR__ . '/includes/archive-title.php';
require_once __DIR__ . '/includes/block-pattern.php';
Expand Down
26 changes: 26 additions & 0 deletions wp-content/plugins/galactictalk/includes/acf.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
/**
* Advanced Custom Fields
*
* @package GalacticTalk
*/

add_filter(
'acf/settings/save_json',
function () {
return __DIR__ . '/../acf-json';
}
);

add_filter(
'acf/settings/load_json',
function ( $paths ) {
// Remove the original path (optional).
unset( $paths[0] );

// Append the new path and return it.
$paths[] = __DIR__ . '/../acf-json';

return $paths;
}
);

0 comments on commit 715002e

Please sign in to comment.