Changeset 10810 for trunk/wp-admin/includes/misc.php
- Timestamp:
- 03/18/2009 02:43:45 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/misc.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/misc.php
r10643 r10810 242 242 if ( !is_string( $content ) || empty( $content ) ) 243 243 return array(); 244 244 245 245 $tokens = token_get_all( $content ); 246 246 $functions = array(); … … 257 257 } 258 258 } 259 259 260 260 $functions = array_unique( $functions ); 261 261 sort( $functions ); 262 262 $ignore_functions = apply_filters( 'documentation_ignore_functions', $ignore_functions ); 263 263 $ignore_functions = array_unique( $ignore_functions ); 264 264 265 265 $out = array(); 266 266 foreach ( $functions as $function ) { … … 269 269 $out[] = $function; 270 270 } 271 271 272 272 return $out; 273 273 } … … 276 276 * Determines the language to use for CodePress syntax highlighting, 277 277 * based only on a filename. 278 * 278 * 279 279 * @since 2.8 280 * 280 * 281 281 * @param string $filename The name of the file to be highlighting 282 282 **/ 283 283 function codepress_get_lang( $filename ) { 284 $codepress_supported_langs = apply_filters( 'codepress_supported_langs', 284 $codepress_supported_langs = apply_filters( 'codepress_supported_langs', 285 285 array( '.css' => 'css', 286 '.js' => 'javascript', 287 '.php' => 'php', 288 '.html' => 'html', 289 '.htm' => 'html', 290 '.txt' => 'text' 286 '.js' => 'javascript', 287 '.php' => 'php', 288 '.html' => 'html', 289 '.htm' => 'html', 290 '.txt' => 'text' 291 291 ) ); 292 292 $extension = substr( $filename, strrpos( $filename, '.' ) ); 293 293 if ( $extension && array_key_exists( $extension, $codepress_supported_langs ) ) 294 294 return $codepress_supported_langs[$extension]; 295 295 296 296 return 'generic'; 297 297 } … … 299 299 /** 300 300 * Adds Javascript required to make CodePress work on the theme/plugin editors. 301 * 301 * 302 302 * This code is attached to the action admin_print_footer_scripts. 303 * 303 * 304 304 * @since 2.8 305 305 **/
Note: See TracChangeset
for help on using the changeset viewer.