Changeset 11672
- Timestamp:
- 06/29/2009 08:48:44 PM (15 years ago)
- Location:
- branches/2.8/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.8/wp-admin/includes/misc.php
r11579 r11672 273 273 return array(); 274 274 275 if ( !function_exists('token_get_all') ) 276 return array(); 277 275 278 $tokens = token_get_all( $content ); 276 279 $functions = array(); -
branches/2.8/wp-admin/plugin-editor.php
r11646 r11672 112 112 $functions = wp_doc_link_parse( $content ); 113 113 114 $docs_select = '<select name="docs-list" id="docs-list">'; 115 $docs_select .= '<option value="">' . __( 'Function Name...' ) . '</option>'; 116 foreach ( $functions as $function) { 117 $docs_select .= '<option value="' . esc_attr( $function ) . '">' . htmlspecialchars( $function ) . '()</option>'; 114 if ( !empty($functions) ) { 115 $docs_select = '<select name="docs-list" id="docs-list">'; 116 $docs_select .= '<option value="">' . __( 'Function Name...' ) . '</option>'; 117 foreach ( $functions as $function) { 118 $docs_select .= '<option value="' . esc_attr( $function ) . '">' . htmlspecialchars( $function ) . '()</option>'; 119 } 120 $docs_select .= '</select>'; 118 121 } 119 $docs_select .= '</select>';120 122 } 121 123 … … 205 207 <input type="hidden" name="plugin" value="<?php echo esc_attr($plugin) ?>" /> 206 208 </div> 207 <?php if ( isset( $functions) ) : ?>209 <?php if ( !empty( $docs_select ) ) : ?> 208 210 <div id="documentation"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <input type="button" class="button" value="<?php esc_attr_e( 'Lookup' ) ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" /></div> 209 211 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.