Ticket #5607: remove_admin_notices6.diff
File remove_admin_notices6.diff, 2.4 KB (added by , 17 years ago) |
---|
-
wp-admin/includes/plugin.php
18 18 $name = $plugin_name[1]; 19 19 $name = trim( $name ); 20 20 $plugin = $name; 21 if ( '' != trim($plugin_uri[1]) && '' != $name ) {21 if (isset($plugin_uri[1]) && '' != trim($plugin_uri[1]) && '' != $name ) { 22 22 $plugin = '<a href="' . trim( $plugin_uri[1] ) . '" title="'.__( 'Visit plugin homepage' ).'">'.$plugin.'</a>'; 23 23 } 24 24 25 if ( '' == $author_uri[1] ) {25 if (! isset($author_uri[1]) || '' == $author_uri[1] ) { 26 26 $author = trim( $author_name[1] ); 27 27 } else { 28 28 $author = '<a href="' . trim( $author_uri[1] ) . '" title="'.__( 'Visit author homepage' ).'">' . trim( $author_name[1] ) . '</a>'; -
wp-admin/includes/theme.php
38 38 preg_match( '|Template Name:(.*)$|mi', $template_data, $name ); 39 39 preg_match( '|Description:(.*)$|mi', $template_data, $description ); 40 40 41 $name = $name[1];42 $description = $description[1];41 $name = ( isset($name[1]) ) ? $name[1] : null; 42 $description = ( isset($description[1]) ) ? $description[1] : null; 43 43 44 44 if ( !empty( $name ) ) { 45 45 $page_templates[trim( $name )] = basename( $template ); -
wp-admin/includes/widgets.php
146 146 function wp_widget_control( $key, $widget, $display = 'display' ) { 147 147 static $i = 0; 148 148 global $wp_registered_widgets, $wp_registered_widget_controls; 149 $control = $wp_registered_widget_controls[$widget];150 $widget = $wp_registered_widgets[$widget];149 $control = (isset($wp_registered_widget_controls[$widget])) ? $wp_registered_widget_controls[$widget] : null; 150 $widget = (isset($wp_registered_widgets[$widget])) ? $wp_registered_widgets[$widget] : null; 151 151 152 $id_format = $widget['id'];152 $id_format = ( isset($widget['id']) ) ? $widget['id'] : null; 153 153 if ( 'template' == $display && isset($control['params'][0]['number']) ) { 154 154 // number == -1 implies a template where id numbers are replaced by a generic '%i%' 155 155 $control['params'][0]['number'] = -1;