Making WordPress.org


Ignore:
Timestamp:
07/26/2017 01:28:26 AM (9 years ago)
Author:
tellyworth
Message:

Plugin directory: add meta description on plugin pages. Props @joostdevalk

Fixes #2864

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php

    r5604 r5718  
    120120
    121121        /**
     122         * Prints meta description in the head of a page.
     123         *
     124         * @static
     125         */
     126        public static function meta_description() {
     127                if ( is_singular( 'plugin' ) ) {
     128                        printf( '<meta name="description" value="%s"/>',
     129                                esc_attr( get_the_excerpt( get_queried_object() ) )
     130                        );
     131                }
     132        }
     133
     134        /**
    122135         * Returns a string representing the number of active installs for an item.
    123136         *
Note: See TracChangeset for help on using the changeset viewer.