WP_Terms_List_Table::single_row( WP_Term $tag, int $level )


Description Description


Parameters Parameters

$tag

(WP_Term) (Required) Term object.

$level

(int) (Required)


Top ↑

Source Source

File: wp-admin/includes/class-wp-terms-list-table.php

	public function single_row( $tag, $level = 0 ) {
		global $taxonomy;
		$tag = sanitize_term( $tag, $taxonomy );

		$this->level = $level;

		if ( $tag->parent ) {
			$count = count( get_ancestors( $tag->term_id, $taxonomy, 'taxonomy' ) );
			$level = 'level-' . $count;
		} else {
			$level = 'level-0';
		}

		echo '<tr id="tag-' . $tag->term_id . '" class="' . $level . '">';
		$this->single_row_columns( $tag );
		echo '</tr>';
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.