• 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細

このWikiはいつでも誰でも編集できます

「関数リファレンス/register nav menus」の版間の差分

提供: WordPress Codex 日本語版
移動先: 案内検索
(en:Function Reference/register_nav_menus 12:23, 15 September 2010 bono 版を翻訳用にコピー)
 
(テンプレートタグガイド・カテゴリ挿入、リンク調整等/翻訳者募集中)
1行目: 1行目:
 +
{{NeedTrans}}
 +
{{テンプレートタグガイド|PHP}}
 +
 
== Description ==
 
== Description ==
 
Registers ''multiple'' [[Navigation Menus|custom navigation menus]] in the new custom menu editor of WordPress 3.0. This allows for creation of custom menus in the dashboard for use in your theme.
 
Registers ''multiple'' [[Navigation Menus|custom navigation menus]] in the new custom menu editor of WordPress 3.0. This allows for creation of custom menus in the dashboard for use in your theme.
  
See [[Function_Reference/register_nav_menu|register_nav_menu()]] for creating a single menu, and [[Navigation_Menus|Navigation Menus]] for adding theme support.
+
See [[関数リファレンス/register_nav_menu|register_nav_menu()]] for creating a single menu, and [[Navigation_Menus|Navigation Menus]] for adding theme support.
  
 
== Usage ==
 
== Usage ==
  
%%% <?php register_nav_menus( $locations ); ?> %%%
+
<?php register_nav_menus( $locations ); ?>
  
 
== Parameters ==
 
== Parameters ==
38行目: 41行目:
 
}
 
}
 
</pre>
 
</pre>
* Use [[Function_Reference/wp_nav_menu|wp_nav_menu()]] to display your custom menu.
+
* Use [[関数リファレンス/wp_nav_menu|wp_nav_menu()]] to display your custom menu.
  
== Change Log ==
+
== Changelog ==
  
 
* Since: [[Version 3.0|3.0.0]]
 
* Since: [[Version 3.0|3.0.0]]
58行目: 61行目:
 
{{原文|Function Reference/register_nav_menus|92982}}<!-- 12:23, 15 September 2010 bono 版 -->
 
{{原文|Function Reference/register_nav_menus|92982}}<!-- 12:23, 15 September 2010 bono 版 -->
  
[[Category:Functions]]
+
{{DEFAULTSORT:}}
 +
[[Category:関数]]
 +
[[Category:コーディング基準]]<!-- 試験的カテゴリ -->
 +
[[Category:wp3.0]]
  
 
[[en:Function Reference/register_nav_menus]]
 
[[en:Function Reference/register_nav_menus]]

2010年9月15日 (水) 21:30時点における版

このページ「関数リファレンス/register nav menus」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています

Description

Registers multiple custom navigation menus in the new custom menu editor of WordPress 3.0. This allows for creation of custom menus in the dashboard for use in your theme.

See register_nav_menu() for creating a single menu, and Navigation Menus for adding theme support.

Usage

<?php register_nav_menus( $locations ); ?>

Parameters

$locations
array) (必須) An associated array of menu location slugs and descriptions.
初期値: なし

Return Values

None.

Examples

if ( function_exists( 'register_nav_menus' ) ) {
	register_nav_menus(
		array(
		  'pluginbuddy_mobile' => 'PluginBuddy Mobile Navigation Menu',
		  'foot_menu' => 'My Custom Footer Menu'
		)
	);
}

Notes

  • This function automatically registers custom menu support for the theme therefore you do not need to call add_theme_support( 'menus' );
  • Verify the function exists prior to usage to provide backwards compatibility before WordPress 3.0.0:
if ( function_exists( 'register_nav_menus' ) ) {
	...
}

Changelog

Source File

Related

ナビゲーションメニュー: register_nav_menus(), register_nav_menu(), unregister_nav_menu() /en , has_nav_menu(), wp_nav_menu(), wp_get_nav_menu_items()


関数リファレンステンプレートタグ目次もご覧ください。


最新英語版: WordPress Codex » Function Reference/register_nav_menus最新版との差分