Created
October 11, 2023 17:47
-
-
Save terrylinooo/8a430294f4f526d0977476987baf88d8 to your computer and use it in GitHub Desktop.
airyseo_custom_menu_page
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
/** | |
* 鐵人賽頁面設定選單:最上層選單 | |
*/ | |
function airyseo_custom_menu_page() { | |
add_menu_page( | |
'示範頁面標題', | |
'示範選單文字', | |
'manage_options', | |
'airyseo_custom_menu_page', | |
'airyseo_custom_menu_page_content' | |
); | |
add_submenu_page( | |
'airyseo_custom_menu_page', | |
'示範子選單頁面標題', | |
'示範子選單文字', | |
'manage_options', | |
'airyseo_custom_submenu_page', | |
'airyseo_custom_submenu_page_content' | |
); | |
} | |
/** | |
* 鐵人賽示範頁:設定頁的內容 | |
*/ | |
function airyseo_custom_menu_page_content() { | |
echo '<h1>這是示範設定頁的標題</h1>'; | |
echo '<p>這是示範設定頁的內容</p>'; | |
} | |
/** | |
* 鐵人賽示範頁:設定子頁的內容 | |
*/ | |
function airyseo_custom_submenu_page_content() { | |
echo '<h1>這是示範設定子選單頁的標題</h1>'; | |
echo '<p>這是示範設定子選單頁的內容</p>'; | |
} | |
add_action( 'admin_menu', 'airyseo_custom_menu_page' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment