Changeset 2206
- Timestamp:
- 12/18/2015 06:15:42 PM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/formatting.php
r1914 r2206 195 195 } 196 196 197 /** 198 * Handles formatting of the parameter description. 199 * 200 * @param string $text The parameter description. 201 * @return string 202 */ 203 public static function format_param_description( $text ) { 204 // Encode all htmlentities. 205 $text = htmlentities( $text ); 206 207 // Simple allowable tags that should get unencoded. 208 // Note: This precludes them from being able to be used in an encoded fashion 209 // within a parameter description. 210 $allowable_tags = array( 'code' ); 211 foreach ( $allowable_tags as $tag ) { 212 $text = str_replace( array( "<{$tag}>", "</{$tag}>" ), array( "<{$tag}>", "</{$tag}>" ), $text ); 213 } 214 215 // Convert any @link or @see to actual link. 216 $text = self::make_doclink_clickable( $text ); 217 218 return $text; 219 } 220 197 221 } // DevHub_Formatting 198 222 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
r2205 r2206 633 633 $params[ $tag['variable'] ]['required'] = 'Required'; 634 634 } 635 $params[ $tag['variable'] ]['content'] = htmlentities( $params[ $tag['variable'] ]['content'] ); 636 $params[ $tag['variable'] ]['content'] = \DevHub_Formatting::make_doclink_clickable( $params[ $tag['variable'] ]['content'] ); 635 $params[ $tag['variable'] ]['content'] = \DevHub_Formatting::format_param_description( $params[ $tag['variable'] ]['content'] ); 637 636 } 638 637 }
Note: See TracChangeset
for help on using the changeset viewer.