<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ## 添加子菜單 要添加新的子菜單到WordPress管理,請使用add_submenu_page()函數。 ``` <?php add_submenu_page( string $parent_slug, string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = '' ); ``` ## 示例 假設我們要添加子菜單“WPOrg選項”到“工具”頂級菜單。 第一步將創建一個將輸出HTML的函數。 在此功能中,我們將執行必要的安全檢查,并使用Settings API呈現我們注冊的選項。 >[info] 注意:我們建議使用一個包裹類型的`<div>`包裝你的HTML。 ``` <?php function wporg_options_page_html() { // check user capabilities if (!current_user_can('manage_options')) { return; } ?> <div class="wrap"> <h1><?= esc_html(get_admin_page_title()); ?></h1> <form action="options.php" method="post"> <?php // output security fields for the registered setting "wporg_options" settings_fields('wporg_options'); // output setting sections and their fields // (sections are registered for "wporg", each field is registered to a specific section) do_settings_sections('wporg'); // output save settings button submit_button('Save Settings'); ?> </form> </div> <?php } ``` 第二步將注冊我們的WPOrg選項子菜單。 注冊需要在admin_menu操作鉤子中進行。 ``` <?php function wporg_options_page() { add_submenu_page( 'tools.php', 'WPOrg Options', 'WPOrg Options', 'manage_options', 'wporg', 'wporg_options_page_html' ); } add_action('admin_menu', 'wporg_options_page'); ``` 有關參數列表,請參閱引用中的add_submenu_page()。 ##自定義子菜單 如果我們有幫助函數來定義WordPress內置頂級菜單的$ parent_slug,并保存我們,通過源代碼手動搜索,那不是很好嗎? 以下是父lug a及其助手功能列表: - add_dashboard_page() – index.php - add_posts_page() – edit.php - add_media_page() – upload.php - add_pages_page() – edit.php?post_type=page - add_comments_page() – edit-comments.php - add_theme_page() – themes.php - add_plugins_page() – plugins.php - add_users_page() – users.php - add_management_page() – tools.php - add_options_page() – options-general.php - add_options_page() – settings.php - add_links_page() – link-manager.php – requires a plugin since WP 3.5+ - Custom Post Type – edit.php?post_type=wporg_post_type - Network Admin – settings.php ## 刪除子菜單 刪除子菜單的過程與刪除頂級菜單完全相同。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看