Here’s my code;
add_action('acf/init', 'va_acf_op_init');
function va_acf_op_init() {
// Check function exists.
if( function_exists('acf_add_options_sub_page') ) {
// Add parent.
$parent = acf_add_options_page(array(
'page_title' => __('Website Settings'),
'menu_title' => __('Website Settings'),
'icon-url' => 'dashicons-admin-tools',
'redirect' => true,
));
// Add sub page.
$child = acf_add_options_sub_page(array(
'page_title' => __('Website Links'),
'menu_title' => __('Website Links'),
'parent_slug' => $parent['menu_slug'],
));
// Add sub page.
$child = acf_add_options_sub_page(array(
'page_title' => __('Site Callout Row'),
'menu_title' => __('Site Callout Row'),
'parent_slug' => $parent['menu_slug'],
));
}
}
'icon-url'
should be 'icon_url'
Thank you. Can you tell me why it’s necessary to use _ instead of – here or point me in the right direction to learn more?