|
|
1行目: |
1行目: |
− | <div id="Description">
| + | #redirect[[関数リファレンス/wp remove object terms]] |
− | == 説明 ==
| + | |
− | </div>
| + | |
− | オブジェクトからtermを削除する関数です。
| + | |
− | | + | |
− | <div id="Parameters">
| + | |
− | == パラメータ ==
| + | |
− | </div>
| + | |
− | {{Parameter|$object_id|int| Termを削除するオブジェクトのID。}}
| + | |
− | {{Parameter|$terms|array, int, string|削除されるtermのスラッグまたはID。配列、整数、文字列が使用可能。}}
| + | |
− | {{Parameter|$taxonomy|array, string|タクソノミーの名前。配列または文字列が使用可能。}}
| + | |
− | | + | |
− | <div id="Return">
| + | |
− | == 戻り値 ==
| + | |
− | </div>
| + | |
− | {{Return||mixed|成功した場合は <tt>true</tt>。失敗した場合は <tt>false</tt> または <tt>WP_Error</tt>。}}
| + | |
− | | + | |
− | <div id="Usage">
| + | |
− | == 使用法 ==
| + | |
− | </div>
| + | |
− | <?php wp_remove_object_terms( $id, $terms, $taxonomy ); ?>
| + | |
− | | + | |
− | <div id="Example">
| + | |
− | == 使用例 ==
| + | |
− | </div>
| + | |
− | 投稿からタグを削除する場合。
| + | |
− | <pre>
| + | |
− | wp_remove_object_terms( $post_id, 'sweet', 'post_tag' );
| + | |
− | </pre>
| + | |
− | | + | |
− | <div id="Change Log">
| + | |
− | == 改訂履歴 ==
| + | |
− | </div>
| + | |
− | * [[Version 3.6|3.6.0]] にて導入されました。
| + | |
− | | + | |
− | <div id="Source File">
| + | |
− | == ソースファイル ==
| + | |
− | </div>
| + | |
− | <!-- Need links to current source code files -->
| + | |
− | <tt>wp_remove_object_terms()</tt> は {{Trac|wp-includes/taxonomy.php}} にあります。
| + | |
− | | + | |
− | <div id="Related">
| + | |
− | == 関連項目 ==
| + | |
− | </div>
| + | |
− | [[Function_Reference/wp_add_object_terms|wp_add_object_terms()]]
| + | |
− | [[Function_Reference/wp_set_object_terms|wp_set_object_terms()]]
| + | |
− | | + | |
− | | + | |
− | {{原文|wp remove object terms|134554}}<!-- 12:27, 15 August 2013 Djkaz 版 -->
| + | |
− | | + | |
− | [[Category:Functions]]
| + | |