Ticket #26209: 26209.1.diff
| File 26209.1.diff, 4.6 KB (added by , 12 years ago) |
|---|
-
src/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 * Filter the number of tags 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 * Filter the number of tags displayed per page for the Tags list table. 59 * 60 * @since 2.7.0 61 * @deprecated 2.8.0 Use edit_tags_per_page instead. 62 * 63 * @param int $tags_per_page Number of tags to be displayed. Default 20. 64 */ 65 $tags_per_page = apply_filters( 'tagsperpage', $tags_per_page ); 51 66 } elseif ( 'category' == $this->screen->taxonomy ) { 52 $tags_per_page = apply_filters( 'edit_categories_per_page', $tags_per_page ); // Old filter 67 /** 68 * Filter the number of tags displayed per page for the Categories list table. 69 * 70 * @since 2.8.0 71 * 72 * @param int $tags_per_page Number of categories to be displayed. Default 20. 73 */ 74 $tags_per_page = apply_filters( 'edit_categories_per_page', $tags_per_page ); 53 75 } 54 76 55 77 $search = !empty( $_REQUEST['s'] ) ? trim( wp_unslash( $_REQUEST['s'] ) ) : ''; … … 246 268 $default_term = get_option( 'default_' . $taxonomy ); 247 269 248 270 $pad = str_repeat( '— ', max( 0, $this->level ) ); 271 /** 272 * Filter the display of the term name. 273 * 274 * @since 2.5.0 275 * 276 * @param string $pad_tag_name Name of the term padded. 277 * @param obj $tag Term object. 278 */ 249 279 $name = apply_filters( 'term_name', $pad . ' ' . $tag->name, $tag ); 250 280 $qe_data = get_term( $tag->term_id, $taxonomy, OBJECT, 'edit' ); 251 281 $edit_link = esc_url( get_edit_term_link( $tag->term_id, $taxonomy, $this->screen->post_type ) ); … … 262 292 if ( $tax->public ) 263 293 $actions['view'] = '<a href="' . get_term_link( $tag ) . '">' . __( 'View' ) . '</a>'; 264 294 295 /** 296 * Filter the action links displayed for each tag in the Tags list table. 297 * 298 * @since 2.8.0 299 * @deprecated 3.0.0 Use {$taxonomy}_row_actions instead. 300 * 301 * @param array $actions An array of action links to be displayed. Default 302 * 'Edit', 'Quick Edit', 'Delete', 'View'. 303 * @param obj $tag Term object. 304 */ 265 305 $actions = apply_filters( 'tag_row_actions', $actions, $tag ); 306 /** 307 * Filter the action links displayed for each term in the terms list table. 308 * 309 * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug. 310 * 311 * @since 3.0.0 312 * 313 * @param array $actions An array of action links to be displayed. Default 314 * 'Edit', 'Quick Edit', 'Delete', 'View'. 315 * @param obj $tag Term object. 316 */ 266 317 $actions = apply_filters( "{$taxonomy}_row_actions", $actions, $tag ); 267 318 268 319 $out .= $this->row_actions( $actions ); 269 320 $out .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">'; 270 321 $out .= '<div class="name">' . $qe_data->name . '</div>'; 322 /** This filter is documented in wp-admin/edit-tag-form.php */ 271 323 $out .= '<div class="slug">' . apply_filters( 'editable_slug', $qe_data->slug ) . '</div>'; 272 324 $out .= '<div class="parent">' . $qe_data->parent . '</div></div>'; 273 325 … … 279 331 } 280 332 281 333 function column_slug( $tag ) { 334 /** This filter is documented in wp-admin/edit-tag-form.php */ 282 335 return apply_filters( 'editable_slug', $tag->slug ); 283 336 } 284 337 … … 314 367 } 315 368 316 369 function column_default( $tag, $column_name ) { 370 /** 371 * Filter the displayed columns in the terms list table. 372 * 373 * The dynamic portion of the hook name, $this->screen->taxonomy, 374 * refers to the taxonomy slug. 375 * 376 * @since 3.5.0 377 * 378 * @param string $string Blank string. 379 * @param string $column_name Name of the column. 380 * @param int $term_id Term ID. 381 */ 317 382 return apply_filters( "manage_{$this->screen->taxonomy}_custom_column", '', $column_name, $tag->term_id ); 318 383 } 319 384 … … 356 421 if ( isset( $core_columns[$column_name] ) ) 357 422 continue; 358 423 424 /** This action is documented in wp-admin/includes/class-wp-posts-list-table.php */ 359 425 do_action( 'quick_edit_custom_box', $column_name, 'edit-tags', $this->screen->taxonomy ); 360 426 } 361 427