Changeset 2205
- Timestamp:
- 12/18/2015 06:05:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
r2174 r2205 1212 1212 $part = preg_replace( '/\s+/', ' ', $part ); 1213 1213 list( $wordtype, $type, $name, $description ) = explode( ' ', $part, 4 ); 1214 $description = trim( $description ); 1215 1216 $skip_closing_li = false; 1217 1218 // Handle nested hashes. 1219 if ( '{' === $description[0] ) { 1220 $description = substr( $description, 1 ) . '<ul class="param-hash">'; 1221 $skip_closing_li = true; 1222 } elseif ( '}' === substr( $description, -1 ) ) { 1223 $description = substr( $description, 0, -1 ) . "</li></ul>\n"; 1224 } 1214 1225 1215 1226 if ( '@type' != $wordtype ) { … … 1228 1239 } 1229 1240 1230 $new_text .= "<b>'" . substr( $name, 1 ) . "'</b><br /><i><span class='type'>({$type})</span></i> {$description}</li>\n"; 1241 $new_text .= "<b>'" . substr( $name, 1 ) . "'</b><br /><i><span class='type'>({$type})</span></i> {$description}"; 1242 if ( ! $skip_closing_li ) { 1243 $new_text .= '</li>'; 1244 } 1245 $new_text .= "\n"; 1231 1246 } 1232 1247 }
Note: See TracChangeset
for help on using the changeset viewer.