Changeset 27089
- Timestamp:
- 02/04/2014 07:55:48 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-terms-list-table.php
r24824 r27089 47 47 48 48 if ( 'post_tag' == $this->screen->taxonomy ) { 49 /** 50 * Filter the number of terms displayed per page for the Tags list table. 51 * 52 * @since 2.8.0 53 * 54 * @param int $tags_per_page Number of tags to be displayed. Default 20. 55 */ 49 56 $tags_per_page = apply_filters( 'edit_tags_per_page', $tags_per_page ); 50 $tags_per_page = apply_filters( 'tagsperpage', $tags_per_page ); // Old filter 57 58 /** 59 * Filter the number of terms displayed per page for the Tags list table. 60 * 61 * @since 2.7.0 62 * @deprecated 2.8.0 Use edit_tags_per_page instead. 63 * 64 * @param int $tags_per_page Number of tags to be displayed. Default 20. 65 */ 66 $tags_per_page = apply_filters( 'tagsperpage', $tags_per_page ); 51 67 } elseif ( 'category' == $this->screen->taxonomy ) { 52 $tags_per_page = apply_filters( 'edit_categories_per_page', $tags_per_page ); // Old filter 68 /** 69 * Filter the number of terms displayed per page for the Categories list table. 70 * 71 * @since 2.8.0 72 * 73 * @param int $tags_per_page Number of categories to be displayed. Default 20. 74 */ 75 $tags_per_page = apply_filters( 'edit_categories_per_page', $tags_per_page ); 53 76 } 54 77 … … 247 270 248 271 $pad = str_repeat( '— ', max( 0, $this->level ) ); 272 273 /** 274 * Filter display of the term name in the terms list table. 275 * 276 * The default output may include padding due to the term's 277 * current level in the term hierarchy. 278 * 279 * @since 2.5.0 280 * 281 * @see WP_Terms_List_Table::column_name() 282 * 283 * @param string $pad_tag_name The term name, padded if not top-level. 284 * @param object $tag Term object. 285 */ 249 286 $name = apply_filters( 'term_name', $pad . ' ' . $tag->name, $tag ); 287 250 288 $qe_data = get_term( $tag->term_id, $taxonomy, OBJECT, 'edit' ); 251 289 $edit_link = esc_url( get_edit_term_link( $tag->term_id, $taxonomy, $this->screen->post_type ) ); … … 263 301 $actions['view'] = '<a href="' . get_term_link( $tag ) . '">' . __( 'View' ) . '</a>'; 264 302 303 /** 304 * Filter the action links displayed for each term in the Tags list table. 305 * 306 * @since 2.8.0 307 * @deprecated 3.0.0 Use {$taxonomy}_row_actions instead. 308 * 309 * @param array $actions An array of action links to be displayed. Default 310 * 'Edit', 'Quick Edit', 'Delete', and 'View'. 311 * @param object $tag Term object. 312 */ 265 313 $actions = apply_filters( 'tag_row_actions', $actions, $tag ); 314 315 /** 316 * Filter the action links displayed for each term in the terms list table. 317 * 318 * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug. 319 * 320 * @since 3.0.0 321 * 322 * @param array $actions An array of action links to be displayed. Default 323 * 'Edit', 'Quick Edit', 'Delete', and 'View'. 324 * @param object $tag Term object. 325 */ 266 326 $actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag ); 267 327 … … 269 329 $out .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">'; 270 330 $out .= '<div class="name">' . $qe_data->name . '</div>'; 331 332 /** This filter is documented in wp-admin/edit-tag-form.php */ 271 333 $out .= '<div class="slug">' . apply_filters( 'editable_slug', $qe_data->slug ) . '</div>'; 272 334 $out .= '<div class="parent">' . $qe_data->parent . '</div></div>'; … … 280 342 281 343 function column_slug( $tag ) { 344 /** This filter is documented in wp-admin/edit-tag-form.php */ 282 345 return apply_filters( 'editable_slug', $tag->slug ); 283 346 } … … 315 378 316 379 function column_default( $tag, $column_name ) { 380 /** 381 * Filter the displayed columns in the terms list table. 382 * 383 * The dynamic portion of the hook name, $this->screen->taxonomy, 384 * refers to the slug of the current taxonomy. 385 * 386 * @since 2.8.0 387 * 388 * @param string $string Blank string. 389 * @param string $column_name Name of the column. 390 * @param int $term_id Term ID. 391 */ 317 392 return apply_filters( "manage_{$this->screen->taxonomy}_custom_column", '', $column_name, $tag->term_id ); 318 393 } … … 357 432 continue; 358 433 434 /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */ 359 435 do_action( 'quick_edit_custom_box', $column_name, 'edit-tags', $this->screen->taxonomy ); 360 436 }
Note: See TracChangeset
for help on using the changeset viewer.