Make WordPress Core

Ticket #36964: 36964.2.patch

File 36964.2.patch, 1.3 KB (added by ramiy, 8 years ago)

updated patch for wp4.7

  • wp-admin/edit-tags.php

     
    542542</form></div>
    543543<?php }
    544544
    545 if ( ! is_null( $tax->labels->popular_items ) ) {
     545/**
     546 * Filters whether to display a tag cloud of the popular items in the taxonomy edit
     547 * screen.
     548 *
     549 * The tag cloud is a feature of non-hierarchy taxonomies. Until WordPress 4.7, the
     550 * tag cloud was visible. Since WordPress 4.7 it is hidden.
     551 *
     552 * Using this filter you can control the visibility of the tag cloud in your custom
     553 * taxonomies. You can display the tag cloud using `__return_true`.
     554 *
     555 * @since 4.7.0
     556 *
     557 * @param bool   $display_tag_cloud Whether to display the popular items tag cloud.
     558 *                                  Default is false, don't display the tag cloud.
     559 * @param object $tax               The taxonomy object.
     560 */
     561$tag_cloud_visibility = apply_filters( 'display_admin_popular_items_tag_cloud', false, $tax );
     562
     563if ( ! is_null( $tax->labels->popular_items ) && true === $tag_cloud_visibility ) {
     564
    546565        if ( current_user_can( $tax->cap->edit_terms ) ) {
    547566                $tag_cloud = wp_tag_cloud( array( 'taxonomy' => $taxonomy, 'post_type' => $post_type, 'echo' => false, 'link' => 'edit' ) );
    548567        } else {