Ticket #26209: class-wp-terms-list-table.patch
File class-wp-terms-list-table.patch, 4.4 KB (added by , 10 years ago) |
---|
-
wp-admin/includes/class-wp-terms-list-table.php
46 46 $tags_per_page = $this->get_items_per_page( 'edit_' . $this->screen->taxonomy . '_per_page' ); 47 47 48 48 if ( 'post_tag' == $this->screen->taxonomy ) { 49 50 /** 51 * Filter to modify the number of tags per page on 'post_tag' taxonomy. 52 * 53 * @since 2.8.0 54 * 55 * @param int $tags_per_page Number of tags per page 56 */ 49 57 $tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page ); 50 $tags_per_page = apply_filters( 'tagsperpage', $tags_per_page ); // Old filter 58 59 /** 60 * Filter to modify the number of tags per page on 'post_tag' taxonomy. 61 * 62 * @since 2.7.0 63 * @deprecated 2.8.0 64 * 65 * @param int $tags_per_page Number of tags per page 66 */ 67 $tags_per_page = apply_filters( 'tagsperpage', $tags_per_page ); 51 68 } elseif ( 'category' == $this->screen->taxonomy ) { 52 $tags_per_page = apply_filters( 'edit_categories_per_page', $tags_per_page ); // Old filter 69 70 /** 71 * Filter to modify the number of categories per page on 'category' taxonomy. 72 * 73 * @since 2.7.0 74 * @deprecated 2.8.0 75 * 76 * @param int $tags_per_page Number of categories per page 77 */ 78 $tags_per_page = apply_filters( 'edit_categories_per_page', $tags_per_page ); 53 79 } 54 80 55 81 $search = !empty( $_REQUEST['s'] ) ? trim( wp_unslash( $_REQUEST['s'] ) ) : ''; … … 246 272 $default_term = get_option( 'default_' . $taxonomy ); 247 273 248 274 $pad = str_repeat( '— ', max( 0, $this->level ) ); 275 276 /** 277 * Filter the name of the term. 278 * 279 * @since 2.5.0 280 * 281 * @param string $pad.' '.$tag->name Name of the term padded 282 * @param object $tag Term object 283 */ 249 284 $name = apply_filters( 'term_name', $pad . ' ' . $tag->name, $tag ); 250 285 $qe_data = get_term( $tag->term_id, $taxonomy, OBJECT, 'edit' ); 251 286 $edit_link = esc_url( get_edit_term_link( $tag->term_id, $taxonomy, $this->screen->post_type ) ); … … 262 297 if ( $tax->public ) 263 298 $actions['view'] = '<a href="' . get_term_link( $tag ) . '">' . __( 'View' ) . '</a>'; 264 299 300 /** 301 * Filter for the quick actions that appear when you mouseover a term’s row. 302 * 303 * @since 2.8.0 304 * 305 * @param array $actions Associative array of "quick actions" 306 * @param object $tag Term object 307 */ 265 308 $actions = apply_filters( 'tag_row_actions', $actions, $tag ); 309 310 /** 311 * Filter the name of the term. 312 * 313 * @since 3.0.0 314 * 315 * @param array $actions Associative array of “quick actions” that appear when you mouseover a term’s row 316 * @param object $tag Term object 317 */ 266 318 $actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag ); 267 319 268 320 $out .= $this->row_actions( $actions ); 269 321 $out .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">'; 270 322 $out .= '<div class="name">' . $qe_data->name . '</div>'; 323 324 /** 325 * Filter for term slug in the slug form field. 326 * 327 * @since 2.6.0 328 * 329 * @param string $qe_data->slug Term slug 330 */ 271 331 $out .= '<div class="slug">' . apply_filters( 'editable_slug', $qe_data->slug ) . '</div>'; 272 332 $out .= '<div class="parent">' . $qe_data->parent . '</div></div>'; 273 333 … … 279 339 } 280 340 281 341 function column_slug( $tag ) { 342 /** This filter is documented in wp-admin/includes/class-wp-terms-list-table.php */ 282 343 return apply_filters( 'editable_slug', $tag->slug ); 283 344 } 284 345 … … 314 375 } 315 376 316 377 function column_default( $tag, $column_name ) { 378 /** 379 * Filter for term slug in the slug form field. 380 * 381 * @since 3.5.0 382 * 383 * @param string $column_name Name of the column 384 * @param int $tag->term_id Term ID 385 */ 317 386 return apply_filters( "manage_{$this->screen->taxonomy}_custom_column", '', $column_name, $tag->term_id ); 318 387 } 319 388 … … 356 425 if ( isset( $core_columns[$column_name] ) ) 357 426 continue; 358 427 428 /** 429 * Fires one time for each custom column. 430 * 431 * @since 2.7.0 432 * 433 * @param string $column_name The name of the column to edit. 434 * @param string 'edit-tags' Edit Tags Administration Screen. 435 * @param string $this->screen->taxonomy The name of the taxonomy 436 */ 359 437 do_action( 'quick_edit_custom_box', $column_name, 'edit-tags', $this->screen->taxonomy ); 360 438 } 361 439