芝麻web文件管理V1.00
编辑当前文件:/home/r5772835/public_html/hayablog.ycreate.jp/wp-content/plugins/seo-simple-pack/class/menu.php
__( 'Basic setting', 'loos-ssp' ), // 基本設定 'post_type' => __( 'Post page', 'loos-ssp' ), // 投稿ページ 'taxonomy' => __( 'Taxonomy archive', 'loos-ssp' ), // タクソノミーアーカイブ 'archive' => __( 'Other archives', 'loos-ssp' ), // その他アーカイブ 'analytics' => __( 'Google Analytics', 'loos-ssp' ), // Googleアナリティクス 'webmaster' => __( 'Webmaster tools', 'loos-ssp' ), // ウェブマスターツール ]; self::$ogp_menu_tabs = [ 'basic' => __( 'Basic setting', 'loos-ssp' ), 'facebook' => 'Facebook', 'twitter' => 'Twitter', ]; add_action( 'admin_menu', ['SSP_Menu', 'add_menus' ] ); } /** * メニューの追加 */ public static function add_menus() { // トップレベルメニュー $top_menu_title = 'SEO SIMPLE PACK'; // ページのタイトルタグに表示されるテキスト $top_menu_slug = 'ssp_main_setting'; // このメニューを参照するスラッグ名 $top_menu_cb = ['SSP_Menu', 'ssp_top_menu' ]; // 呼び出す関数名 add_menu_page( $top_menu_title, 'SEO PACK', 'manage_options', // 必要な権限 $top_menu_slug, $top_menu_cb, 'dashicons-list-view', 81 // 位置 ); add_submenu_page( $top_menu_slug, $top_menu_title, __( 'General settings', 'loos-ssp' ), // サブ側の名前 'administrator', // 権限 $top_menu_slug, $top_menu_cb ); // サブメニュー:OGP設定 add_submenu_page( 'ssp_main_setting', __( 'OGP settings', 'loos-ssp' ), // 'OGP設定', __( 'OGP settings', 'loos-ssp' ), // 'OGP設定', 'administrator', 'ssp_ogp_setting', ['SSP_Menu', 'ssp_ogp_menu' ] ); // サブメニュー:HELP add_submenu_page( 'ssp_main_setting', 'HELP', 'HELP', 'administrator', 'ssp_help', ['SSP_Menu', 'ssp_help_menu' ] ); } /** * トップレベルメニュー 内容 */ public static function ssp_top_menu() { require_once SSP_PATH . 'inc/page_top.php'; } // サブメニュー [OGP] 内容 public static function ssp_ogp_menu() { require_once SSP_PATH . 'inc/page_ogp.php'; } // サブメニュー [HELP] 内容 public static function ssp_help_menu() { // require_once SSP_PATH.'inc/page_ogp.php'; require_once SSP_PATH . 'inc/page_help.php'; } /** * 設定保存時のメッセージ */ public static function output_saved_message() { ?>
$label ) { $nav_class = ( reset( $tabs ) === $label ) ? 'nav-tab act_' : 'nav-tab'; echo '
' . esc_html( $label ) . '
'; } } /** * 設定タブコンテンツの出力 */ public static function output_setting_tab_content( $tabs, $page_type ) { foreach ( $tabs as $key => $label ) { $tab_class = ( reset( $tabs ) === $label ) ? 'tab-contents act_' : 'tab-contents'; echo '
'; // タブコンテンツ用ファイルの読み込み if ( file_exists( SSP_PATH . 'inc/tab/' . $page_type . '_' . $key . '.php' ) ) { require_once SSP_PATH . 'inc/tab/' . $page_type . '_' . $key . '.php'; } echo '
'; } } }