Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

PHP Sync issue

$
0
0

Replies: 0

Hi there,

So i tried to add this code to my plugin:

add_filter('acfe/settings/php_save/key=group_6125011e58c70', 'my_acfe_php_save_point', 10, 2);
function my_acfe_php_save_point($path, $field_group){
    
    return plugin_dir_path(__DIR__).'my-settings/inc';
    
}

Where ‘group_6125011e58c70’ is of course the id of my fields group, and the folder is my folder of choice to save php to. Also i checked the “PHP” checkbox on that fields group “Advenced Settings” metabox.

Now i was expecting that when i update this fields group it would save a php file to this folder (am i wrong to expect this behaviour?) but nothing happend when i updated the fields group.

*When hovering the “PHP” Checkbox is see this error:
“Awaiting save. Save path not found in theme: /acfe-php”

Do i have to add this folder to the current theme? (I Need this php file in my plugin’s folder…)

Thanks,
Ben

  • This topic was modified 30 minutes ago by Begin.
  • This topic was modified 27 minutes ago by Begin.
  • This topic was modified 26 minutes ago by Begin.

Viewing all articles
Browse latest Browse all 59525

Trending Articles