Making WordPress.org

Changeset 4556


Ignore:
Timestamp:
12/16/2016 09:40:26 PM (8 years ago)
Author:
coffee2code
Message:

developer.wordpress.org: Fix deprecation notice banner to use description from @deprecated when no @see is provided.

Props dimadin.
Fixes #2331.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php

    r4554 r4556  
    888888        // If no alternative resource was referenced, use the deprecation string, if
    889889        // present.
    890         if ( ! $deprecation_info && ! empty( $deprecated['content'] ) ) {
    891             $deprecation_info = ' ' . sanitize_text_field ( $deprecated['content'] );
     890        if ( ! $deprecation_info && ! empty( $deprecated['description'] ) ) {
     891            $deprecation_info = ' ' . sanitize_text_field ( $deprecated['description'] );
    892892            // Many deprecation strings use the syntax "Use function()" instead of the
    893893            // preferred "Use function() instead." Add it in if missing.
Note: See TracChangeset for help on using the changeset viewer.