edit_tag_link

函式
edit_tag_link ( $link = '', $before = '', $after = '', $tag = null )
引數
  • (string) $link Optional. Anchor text. If empty, default is 'Edit This'. Default empty.
    Required:
    Default: (empty)
  • (string) $before Optional. Display before edit link. Default empty.
    Required:
    Default: (empty)
  • (string) $after Optional. Display after edit link. Default empty.
    Required:
    Default: (empty)
  • (WP_Term) $tag Optional. Term object. If null, the queried object will be inspected. Default null.
    Required:
    Default: null
定義位置
相關方法
get_tag_linkget_edit_tag_linkedit_linkedit_post_linkedit_term_link
引入
2.7.0
棄用
-

edit_tag_link: 此函式生成一個連結,用於在WordPress管理面板中編輯一個指定的標籤。

顯示或檢索帶有格式化的標籤的編輯連結。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function edit_tag_link( $link = '', $before = '', $after = '', $tag = null ) {
$link = edit_term_link( $link, '', '', $tag, false );
/**
* Filters the anchor tag for the edit link for a tag (or term in another taxonomy).
*
* @since 2.7.0
*
* @param string $link The anchor tag for the edit link.
*/
echo $before . apply_filters( 'edit_tag_link', $link ) . $after;
}
function edit_tag_link( $link = '', $before = '', $after = '', $tag = null ) { $link = edit_term_link( $link, '', '', $tag, false ); /** * Filters the anchor tag for the edit link for a tag (or term in another taxonomy). * * @since 2.7.0 * * @param string $link The anchor tag for the edit link. */ echo $before . apply_filters( 'edit_tag_link', $link ) . $after; }
function edit_tag_link( $link = '', $before = '', $after = '', $tag = null ) {
	$link = edit_term_link( $link, '', '', $tag, false );

	/**
	 * Filters the anchor tag for the edit link for a tag (or term in another taxonomy).
	 *
	 * @since 2.7.0
	 *
	 * @param string $link The anchor tag for the edit link.
	 */
	echo $before . apply_filters( 'edit_tag_link', $link ) . $after;
}

常見問題

FAQs
檢視更多 >