Created
April 13, 2010 03:30
-
-
Save tenman/364283 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* wordPress taxonomy sample | |
* | |
* theme/functions.php | |
**/ | |
register_taxonomy( | |
'sky',#項目追加 | |
'attachment:image',#コンテンツの種類 | |
array( | |
'label' => '天気',#項目ラベル | |
'helps' => '天気を入力して下さい。'#項目説明 | |
) | |
); | |
register_taxonomy( | |
'place',#項目追加 | |
'attachment:image',#コンテンツの種類 | |
array( | |
'label' => '場所',#項目ラベル | |
'helps' => '車じゃないといけない、バスで行ける、電車でいける、'#項目説明 | |
) | |
); | |
register_taxonomy( | |
'animal', | |
'post', | |
array( | |
'hierarchical' => true, 'label' => '動物', | |
'update_count_callback' => '_update_post_term_count') | |
); | |
register_taxonomy( | |
'taste', | |
'post', | |
array( | |
'hierarchical' => false, | |
'label' => 'おいしさ', | |
'update_count_callback' => '_update_post_term_count') | |
); | |
?> |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment