IP : 3.142.99.115Hostname : server86.web-hosting.comKernel : Linux server86.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
servlmvm/
./
.cphorde/
../
www/
wp-admin/
includes/
class-wp-terms-list-table.php/
/
<?php /** * List Table API: WP_Terms_List_Table class * * @package WordPress * @subpackage Administration * @since 3.1.0 */
/** * Core class used to implement displaying terms in a list table. * * @since 3.1.0 * * @see WP_List_Table */ class WP_Terms_List_Table extends WP_List_Table {
public $callback_args;
private $level;
/** * Constructor. * * @since 3.1.0 * * @see WP_List_Table::__construct() for more information on default arguments. * * @global string $post_type Global post type. * @global string $taxonomy Global taxonomy. * @global string $action * @global object $tax * * @param array $args An associative array of arguments. */ public function __construct( $args = array() ) { global $post_type, $taxonomy, $action, $tax;
if ( 'post_tag' === $taxonomy ) { /** * Filters the number of terms displayed per page for the Tags list table. * * @since 2.8.0 * * @param int $tags_per_page Number of tags to be displayed. Default 20. */ $tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page );
/** * Filters the number of terms displayed per page for the Tags list table. * * @since 2.7.0 * @deprecated 2.8.0 Use {@see 'edit_tags_per_page'} instead. * * @param int $tags_per_page Number of tags to be displayed. Default 20. */ $tags_per_page = apply_filters_deprecated( 'tagsperpage', array( $tags_per_page ), '2.8.0', 'edit_tags_per_page' ); } elseif ( 'category' === $taxonomy ) { /** * Filters the number of terms displayed per page for the Categories list table. * * @since 2.8.0 * * @param int $tags_per_page Number of categories to be displayed. Default 20. */ $tags_per_page = apply_filters( 'edit_categories_per_page', $tags_per_page ); }
// Save the values because 'number' and 'offset' can be subsequently overridden. $this->callback_args = $args;
if ( is_taxonomy_hierarchical( $taxonomy ) && ! isset( $args['orderby'] ) ) { // We'll need the full set of terms then. $args['number'] = 0; $args['offset'] = $args['number']; }
/** * @since 5.9.0 Renamed `$tag` to `$item` to match parent class for PHP 8 named parameter support. * * @param WP_Term $item Term object. * @return string */ public function column_cb( $item ) { // Restores the more descriptive, specific name for use within this method. $tag = $item;
/** * Filters display of the term name in the terms list table. * * The default output may include padding due to the term's * current level in the term hierarchy. * * @since 2.5.0 * * @see WP_Terms_List_Table::column_name() * * @param string $pad_tag_name The term name, padded if not top-level. * @param WP_Term $tag Term object. */ $name = apply_filters( 'term_name', $pad . ' ' . $tag->name, $tag );
/** This filter is documented in wp-admin/includes/class-wp-terms-list-table.php */ $quick_edit_enabled = apply_filters( 'quick_edit_enabled_for_taxonomy', true, $taxonomy );
/** This filter is documented in wp-admin/edit-tag-form.php */ $output .= '<div class="slug">' . apply_filters( 'editable_slug', $qe_data->slug, $qe_data ) . '</div>'; $output .= '<div class="parent">' . $qe_data->parent . '</div></div>'; }
return $output; }
/** * Gets the name of the default primary column. * * @since 4.3.0 * * @return string Name of the default primary column, in this case, 'name'. */ protected function get_default_primary_column_name() { return 'name'; }
/** * Generates and displays row action links. * * @since 4.3.0 * @since 5.9.0 Renamed `$tag` to `$item` to match parent class for PHP 8 named parameter support. * * @param WP_Term $item Tag being acted upon. * @param string $column_name Current column name. * @param string $primary Primary column name. * @return string Row actions output for terms, or an empty string * if the current column is not the primary column. */ protected function handle_row_actions( $item, $column_name, $primary ) { if ( $primary !== $column_name ) { return ''; }
// Restores the more descriptive, specific name for use within this method. $tag = $item;
/** * Filters the action links displayed for each term in the Tags list table. * * @since 2.8.0 * @since 3.0.0 Deprecated in favor of {@see '{$taxonomy}_row_actions'} filter. * @since 5.4.2 Restored (un-deprecated). * * @param string[] $actions An array of action links to be displayed. Default * 'Edit', 'Quick Edit', 'Delete', and 'View'. * @param WP_Term $tag Term object. */ $actions = apply_filters( 'tag_row_actions', $actions, $tag );
/** * Filters the action links displayed for each term in the terms list table. * * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. * * Possible hook names include: * * - `category_row_actions` * - `post_tag_row_actions` * * @since 3.0.0 * * @param string[] $actions An array of action links to be displayed. Default * 'Edit', 'Quick Edit', 'Delete', and 'View'. * @param WP_Term $tag Term object. */ $actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag );
/** * @param WP_Term $tag Term object. * @return string */ public function column_links( $tag ) { $count = number_format_i18n( $tag->count );
if ( $count ) { $count = "<a href='link-manager.php?cat_id=$tag->term_id'>$count</a>"; }
return $count; }
/** * @since 5.9.0 Renamed `$tag` to `$item` to match parent class for PHP 8 named parameter support. * * @param WP_Term $item Term object. * @param string $column_name Name of the column. * @return string */ public function column_default( $item, $column_name ) { // Restores the more descriptive, specific name for use within this method. $tag = $item;
/** * Filters the displayed columns in the terms list table. * * The dynamic portion of the hook name, `$this->screen->taxonomy`, * refers to the slug of the current taxonomy. * * Possible hook names include: * * - `manage_category_custom_column` * - `manage_post_tag_custom_column` * * @since 2.8.0 * * @param string $string Custom column output. Default empty. * @param string $column_name Name of the column. * @param int $term_id Term ID. */ return apply_filters( "manage_{$this->screen->taxonomy}_custom_column", '', $column_name, $tag->term_id ); }
/** * Outputs the hidden row displayed when inline editing * * @since 3.1.0 */ public function inline_edit() { $tax = get_taxonomy( $this->screen->taxonomy );