ACF custom option page having parent a custom plugin
Question
Is it possible to add ACF option page under an existing custom plugin?
I checked the documentation but I did not found a way how to do it
add_action('acf/init', 'my_acf_op_init');
function my_acf_op_init() {
// Check function exists.
if( function_exists('acf_add_options_page') ) {
// parent.
$parent = 'should be the custom plugin entry'
// Add sub page.
$child = acf_add_options_page(array(
'page_title' => __('Social Settings'),
'menu_title' => __('Social'),
'parent_slug' => $parent['menu_slug'],
));
}
}
0
customization, options, pages
3 years
2020-04-08T04:50:54-05:00
2020-04-08T04:50:54-05:00 0 Answers
99 views
0
Leave an answer