Changeset 2223
- Timestamp:
- 12/23/2015 08:25:53 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
r2206 r2223 1216 1216 1217 1217 // Handle nested hashes. 1218 if ( '{' === $description[0] ) {1219 $description = substr( $description, 1) . '<ul class="param-hash">';1218 if ( '{' === $description[0] || '{' === $name ) { 1219 $description = ltrim( $description, '{' ) . '<ul class="param-hash">'; 1220 1220 $skip_closing_li = true; 1221 1221 } elseif ( '}' === substr( $description, -1 ) ) { … … 1238 1238 } 1239 1239 1240 $new_text .= "<b>'" . substr( $name, 1 ) . "'</b><br /><i><span class='type'>({$type})</span></i> {$description}"; 1240 // Normalize argument name. 1241 if ( $name === '{' ) { 1242 // No name is specified, generally indicating an array of arrays. 1243 $name = ''; 1244 } else { 1245 // The name is defined as a variable, so remove the leading '$'. 1246 $name = ltrim( $name, '$' ); 1247 } 1248 if ( $name ) { 1249 $new_text .= "<b>'{$name}'</b><br />"; 1250 } 1251 $new_text .= "<i><span class='type'>({$type})</span></i> {$description}"; 1241 1252 if ( ! $skip_closing_li ) { 1242 1253 $new_text .= '</li>';
Note: See TracChangeset
for help on using the changeset viewer.