get_edit_term_link()获取一个分类的编辑链接

目录

描述

Retrieve edit term URL.

get_edit_term_link() 描述

用法

<?php get_edit_term_link$term$taxonomy$object_type ); ?>

get_edit_term_link() 用法

参数

$term_id

(int) (必填) Term ID

默认值: None

$taxonomy

(string) (必填) The slug of the taxonomy the term is in.

默认值: None

$object_type

(string) (必填) The object type the term is for. E.g., post, page, attachment, or a custom post type.

默认值: None

get_edit_term_link() 参数

示例

/* ----------------------------------
 * wordpress之魂 © http://wphun.com
 * ---------------------------------- */

$edit_link = esc_url( get_edit_term_link( $tag->term_id, $taxonomy, $this->screen->post_type ) );
/* ----------------------------------
 * wordpress之魂 © http://wphun.com
 * ---------------------------------- */

function get_edit_tag_link( $tag_id, $taxonomy = 'post_tag' ) {
	return apply_filters( 'get_edit_tag_link', get_edit_term_link( $tag_id, $taxonomy ) );
}

get_edit_term_link() 示例

注意

get_edit_term_link() 注意