Changeset 4473
- Timestamp:
- 12/04/2016 07:03:40 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
r4410 r4473 142 142 143 143 /** 144 * Shorten excerpt length on index pages, so plugins cards are all the same height. 145 * 146 * @param string $excerpt The excerpt. 147 * @return string 148 */ 149 function excerpt_length( $excerpt ) { 150 if ( is_home() || is_archive() ) { 151 $excerpt = wp_trim_words( $excerpt, 15 ); 152 } 153 154 return $excerpt; 155 } 156 add_filter( 'get_the_excerpt', __NAMESPACE__ . '\excerpt_length' ); 157 158 /** 144 159 * Adds hreflang link attributes to plugin pages. 145 160 *
Note: See TracChangeset
for help on using the changeset viewer.