Changeset 10734
- Timestamp:
- 03/06/2009 04:17:57 PM (16 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/plugin-editor.php
r10627 r10734 92 92 if ( ! $error ) { 93 93 $content = file_get_contents( $real_file ); 94 95 if ( ' php' == mb_substr( $real_file, mb_strrpos( $real_file, '.' ) + 1) ) {94 95 if ( '.php' == substr( $real_file, strrpos( $real_file, '.' ) ) ) { 96 96 $functions = wp_doc_link_parse( $content ); 97 97 98 98 $docs_select = '<select name="docs-list" id="docs-list">'; 99 99 $docs_select .= '<option value="">' . __( 'Function Name...' ) . '</option>'; … … 103 103 $docs_select .= '</select>'; 104 104 } 105 105 106 106 $content = htmlspecialchars( $content ); 107 107 $codepress_lang = codepress_get_lang($real_file); -
trunk/wp-admin/theme-editor.php
r10614 r10734 84 84 update_recently_edited($file); 85 85 86 if ( !is_file($real_file))86 if ( !is_file($real_file) ) 87 87 $error = 1; 88 88 89 if ( !$error && filesize($real_file) > 0) {89 if ( !$error && filesize($real_file) > 0 ) { 90 90 $f = fopen($real_file, 'r'); 91 91 $content = fread($f, filesize($real_file)); 92 92 93 if ( ' php' == mb_substr( $real_file, mb_strrpos( $real_file, '.' ) + 1) ) {93 if ( '.php' == substr( $real_file, strrpos( $real_file, '.' ) ) ) { 94 94 $functions = wp_doc_link_parse( $content ); 95 95 96 96 $docs_select = '<select name="docs-list" id="docs-list">'; 97 97 $docs_select .= '<option value="">' . __( 'Function Name...' ) . '</option>'; 98 foreach ( $functions as $function ) {98 foreach ( $functions as $function ) { 99 99 $docs_select .= '<option value="' . urlencode( $function ) . '">' . htmlspecialchars( $function ) . '()</option>'; 100 100 }
Note: See TracChangeset
for help on using the changeset viewer.