Last active
October 25, 2021 13:37
-
-
Save BhargavBhandari90/0342f92192aab75bf853b77cb7ef2bd6 to your computer and use it in GitHub Desktop.
Add Setting page for ACF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add Setting page for ACF | |
* | |
* @return void | |
*/ | |
function buntywp_acf_setting_pages() { | |
// Bail, if anything goes wrong. | |
if ( ! function_exists( 'acf_add_options_sub_page' ) ) { | |
return; | |
} | |
acf_add_options_sub_page( | |
array( | |
'page_title' => __( 'Bunty ACF Settings', 'default' ), | |
'menu_title' => __( 'Bunty ACF Settings', 'default' ), | |
'parent_slug' => 'options-general.php', | |
) | |
); | |
} | |
// Add admin menu for custom ACF setting. | |
add_action( 'admin_menu', 'buntywp_acf_setting_pages', 90 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment