~canonical-sysadmins/wordpress/4.7

« back to all changes in this revision

Viewing changes to wp-admin/includes/class-wp-terms-list-table.php

  • Committer: Nick Moffitt
  • Date: 2015-01-15 11:04:26 UTC
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: nick.moffitt@canonical.com-20150115110426-5stm1p14cfnxrtme
New Upstream Version 4.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
                }
203
203
        }
204
204
 
 
205
        /**
 
206
         * @param string $taxonomy
 
207
         * @param array $terms
 
208
         * @param array $children
 
209
         * @param int $start
 
210
         * @param int $per_page
 
211
         * @param int $count
 
212
         * @param int $parent
 
213
         * @param int $level
 
214
         */
205
215
        private function _rows( $taxonomy, $terms, &$children, $start, $per_page, &$count, $parent = 0, $level = 0 ) {
206
216
 
207
217
                $end = $start + $per_page;
250
260
                }
251
261
        }
252
262
 
 
263
        /**
 
264
         * @global string $taxonomy
 
265
         * @staticvar string $row_class
 
266
         * @param object $tag
 
267
         * @param int $level
 
268
         */
253
269
        public function single_row( $tag, $level = 0 ) {
254
270
                global $taxonomy;
255
271
                $tag = sanitize_term( $tag, $taxonomy );
264
280
                echo '</tr>';
265
281
        }
266
282
 
 
283
        /**
 
284
         * @param object $tag
 
285
         * @return string
 
286
         */
267
287
        public function column_cb( $tag ) {
268
288
                $default_term = get_option( 'default_' . $this->screen->taxonomy );
269
289
 
274
294
                return '&nbsp;';
275
295
        }
276
296
 
 
297
        /**
 
298
         * @param object $tag
 
299
         * @return string
 
300
         */
277
301
        public function column_name( $tag ) {
278
302
                $taxonomy = $this->screen->taxonomy;
279
303
                $tax = get_taxonomy( $taxonomy );
327
351
                /**
328
352
                 * Filter the action links displayed for each term in the terms list table.
329
353
                 *
330
 
                 * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
 
354
                 * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
331
355
                 *
332
356
                 * @since 3.0.0
333
357
                 *
348
372
                return $out;
349
373
        }
350
374
 
 
375
        /**
 
376
         * @param object $tag
 
377
         * @return string
 
378
         */
351
379
        public function column_description( $tag ) {
352
380
                return $tag->description;
353
381
        }
354
382
 
 
383
        /**
 
384
         * @param object $tag
 
385
         * @return string
 
386
         */
355
387
        public function column_slug( $tag ) {
356
388
                /** This filter is documented in wp-admin/edit-tag-form.php */
357
389
                return apply_filters( 'editable_slug', $tag->slug );
358
390
        }
359
391
 
 
392
        /**
 
393
         * @param object $tag
 
394
         * @return string
 
395
         */
360
396
        public function column_posts( $tag ) {
361
397
                $count = number_format_i18n( $tag->count );
362
398
 
381
417
                return "<a href='" . esc_url ( add_query_arg( $args, 'edit.php' ) ) . "'>$count</a>";
382
418
        }
383
419
 
 
420
        /**
 
421
         * @param object $tag
 
422
         * @return string
 
423
         */
384
424
        public function column_links( $tag ) {
385
425
                $count = number_format_i18n( $tag->count );
386
426
                if ( $count )
388
428
                return $count;
389
429
        }
390
430
 
 
431
        /**
 
432
         * @param object $tag
 
433
         * @param string $column_name
 
434
         * @return string
 
435
         */
391
436
        public function column_default( $tag, $column_name ) {
392
437
                /**
393
438
                 * Filter the displayed columns in the terms list table.
394
439
                 *
395
 
                 * The dynamic portion of the hook name, $this->screen->taxonomy,
 
440
                 * The dynamic portion of the hook name, `$this->screen->taxonomy`,
396
441
                 * refers to the slug of the current taxonomy.
397
442
                 *
398
443
                 * @since 2.8.0