Ticket #5607: remaining_notices.diff
File remaining_notices.diff, 29.8 KB (added by , 17 years ago) |
---|
-
wp-admin/edit-category-form.php
5 5 $form = '<form name="editcat" id="editcat" method="post" action="categories.php">'; 6 6 $action = 'editedcat'; 7 7 $nonce_action = 'update-category_' . $cat_ID; 8 do_action('edit_category_form_pre', $category);8 do_action('edit_category_form_pre', ( isset($category) ) ? $category : null); 9 9 } else { 10 10 $heading = __('Add Category'); 11 11 $submit_text = __('Add Category »'); 12 12 $form = '<form name="addcat" id="addcat" method="post" action="categories.php" class="add:the-list:">'; 13 13 $action = 'addcat'; 14 14 $nonce_action = 'add-category'; 15 do_action('add_category_form_pre', $category);15 do_action('add_category_form_pre', ( isset($category) ) ? $category : null); 16 16 } 17 17 ?> 18 18 … … 20 20 <h2><?php echo $heading ?></h2> 21 21 <div id="ajax-response"></div> 22 22 <?php echo $form ?> 23 <input type="hidden" name="action" value="<?php echo $action?>" />24 <input type="hidden" name="cat_ID" value="<?php echo $category->term_id?>" />23 <input type="hidden" name="action" value="<?php echo ( isset($action) ) ? $action : '' ?>" /> 24 <input type="hidden" name="cat_ID" value="<?php echo ( isset($category->term_id) ) ? $category->term_id : ''?>" /> 25 25 <?php wp_nonce_field($nonce_action); ?> 26 26 <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 27 27 <tr class="form-field form-required"> 28 28 <th width="33%" scope="row" valign="top"><label for="cat_name"><?php _e('Category name:') ?></label></th> 29 <td width="67%"><input name="cat_name" id="cat_name" type="text" value="<?php echo attribute_escape($category->name); ?>" size="40" /></td>29 <td width="67%"><input name="cat_name" id="cat_name" type="text" value="<?php echo ( isset($category->name) ) ? attribute_escape($category->name) : ''; ?>" size="40" /></td> 30 30 </tr> 31 31 <tr class="form-field"> 32 32 <th scope="row" valign="top"><label for="category_nicename"><?php _e('Category slug:') ?></label></th> 33 <td><input name="category_nicename" id="category_nicename" type="text" value="<?php echo attribute_escape($category->slug); ?>" size="40" /></td>33 <td><input name="category_nicename" id="category_nicename" type="text" value="<?php echo ( isset($category->attribute_escape) ) ? attribute_escape($category->slug) : ''; ?>" size="40" /></td> 34 34 </tr> 35 35 <tr class="form-field"> 36 36 <th scope="row" valign="top"><label for="category_parent"><?php _e('Category parent:') ?></label></th> 37 37 <td> 38 <?php wp_dropdown_categories('hide_empty=0&name=category_parent&orderby=name&selected=' . $category->parent . '&hierarchical=1&show_option_none=' . __('None')); ?> 38 <?php $parent = ( isset($category->parent) ) ? $category->parent : ''; 39 wp_dropdown_categories('hide_empty=0&name=category_parent&orderby=name&selected=' . $parent . '&hierarchical=1&show_option_none=' . __('None')); ?> 39 40 </td> 40 41 </tr> 41 42 <tr class="form-field"> 42 43 <th scope="row" valign="top"><label for="category_description"><?php _e('Description: (optional)') ?></label></th> 43 <td><textarea name="category_description" id="category_description" rows="5" cols="50" style="width: 97%;"><?php echo wp_specialchars($category->description); ?></textarea></td>44 <td><textarea name="category_description" id="category_description" rows="5" cols="50" style="width: 97%;"><?php echo ( isset($category->description) ) ? wp_specialchars($category->description) : ''; ?></textarea></td> 44 45 </tr> 45 46 </table> 46 47 <p class="submit"><input type="submit" name="submit" value="<?php echo $submit_text ?>" /></p> 47 <?php do_action('edit_category_form', $category); ?>48 <?php do_action('edit_category_form', ( isset($category) ) ? $category : null); ?> 48 49 </form> 49 50 </div> -
wp-admin/edit-link-form.php
14 14 function xfn_check($class, $value = '', $deprecated = '') { 15 15 global $link; 16 16 17 $link_rel = $link->link_rel;17 $link_rel = ( isset($link->link_rel) ) ? $link->link_rel : null; 18 18 $rels = preg_split('/\s+/', $link_rel); 19 19 20 20 if ('' != $value && in_array($value, $rels) ) { … … 51 51 <h3 class="dbx-handle"><?php _e('Target') ?></h3> 52 52 <div class="dbx-content"> 53 53 <label for="link_target_blank" class="selectit"> 54 <input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo(( $link->link_target == '_blank') ? 'checked="checked"' : ''); ?> />54 <input id="link_target_blank" type="radio" name="link_target" value="_blank" <?php echo((isset($link->link_target) && $link->link_target == '_blank') ? 'checked="checked"' : ''); ?> /> 55 55 <code>_blank</code></label> 56 56 <label for="link_target_top" class="selectit"> 57 <input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo(( $link->link_target == '_top') ? 'checked="checked"' : ''); ?> />57 <input id="link_target_top" type="radio" name="link_target" value="_top" <?php echo((isset($link->link_target) && $link->link_target == '_top') ? 'checked="checked"' : ''); ?> /> 58 58 <code>_top</code></label> 59 59 <label for="link_target_none" class="selectit"> 60 <input id="link_target_none" type="radio" name="link_target" value="" <?php echo(( $link->link_target == '') ? 'checked="checked"' : ''); ?> />60 <input id="link_target_none" type="radio" name="link_target" value="" <?php echo((isset($link->link_target) && $link->link_target == '') ? 'checked="checked"' : ''); ?> /> 61 61 <?php _e('none') ?></label> 62 62 </div> 63 63 </fieldset> … … 84 84 </tr> 85 85 <tr> 86 86 <th width="20%" scope="row" valign="top"><label for="link_url"><?php _e('Address:') ?></label></th> 87 <td width="80%"><input type="text" name="link_url" id="link_url" value="<?php echo $link->link_url; if ( empty( $link->link_url ) ) echo 'http://'; ?>" style="width: 95%" /></td>87 <td width="80%"><input type="text" name="link_url" id="link_url" value="<?php echo ( empty( $link->link_url ) ) ? 'http://' : $link->link_url; ?>" style="width: 95%" /></td> 88 88 </tr> 89 89 <tr> 90 90 <th scope="row" valign="top"><label for="link_description"><?php _e('Description:') ?></label></th> 91 <td><input type="text" name="link_description" id="link_description" value="<?php echo $link->link_description; ?>" style="width: 95%" /></td>91 <td><input type="text" name="link_description" id="link_description" value="<?php echo ( ! empty( $link->link_description ) ) ? $link->link_description : ''; ?>" style="width: 95%" /></td> 92 92 </tr> 93 93 </table> 94 94 … … 104 104 <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 105 105 <tr> 106 106 <th width="20%" scope="row"><?php _e('rel:') ?></th> 107 <td width="80%"><input type="text" name="link_rel" id="link_rel" size="50" value="<?php echo $link->link_rel; ?>" /></td>107 <td width="80%"><input type="text" name="link_rel" id="link_rel" size="50" value="<?php echo ( ! empty($link->link_rel) ) ? $link->link_rel : ''; ?>" /></td> 108 108 </tr> 109 109 <tr> 110 110 <th scope="row"><?php _e('<a href="http://gmpg.org/xfn/">XFN</a> Creator:') ?></th> … … 217 217 <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 218 218 <tr> 219 219 <th width="20%" scope="row"><?php _e('Image Address:') ?></th> 220 <td width="80%"><input type="text" name="link_image" size="50" value="<?php echo $link->link_image; ?>" style="width: 95%" /></td>220 <td width="80%"><input type="text" name="link_image" size="50" value="<?php echo ( isset($link->link_image) ) ? $link->link_image : ''; ?>" style="width: 95%" /></td> 221 221 </tr> 222 222 <tr> 223 223 <th scope="row"><?php _e('RSS Address:') ?> </th> 224 <td><input name="link_rss" type="text" id="rss_uri" value="<?php echo $link->link_rss; ?>" size="50" style="width: 95%" /></td>224 <td><input name="link_rss" type="text" id="rss_uri" value="<?php echo ( isset($link->link_rss) ) ? $link->link_rss : ''; ?>" size="50" style="width: 95%" /></td> 225 225 </tr> 226 226 <tr> 227 227 <th scope="row"><?php _e('Notes:') ?></th> 228 <td><textarea name="link_notes" cols="50" rows="10" style="width: 95%"><?php echo $link->link_notes; ?></textarea></td>228 <td><textarea name="link_notes" cols="50" rows="10" style="width: 95%"><?php echo ( isset($link->link_notes) ) ? $link->link_notes : ''; ?></textarea></td> 229 229 </tr> 230 230 <tr> 231 231 <th scope="row"><?php _e('Rating:') ?></th> … … 233 233 <?php 234 234 for ($r = 0; $r < 10; $r++) { 235 235 echo(' <option value="'.$r.'" '); 236 if ( $link->link_rating == $r)236 if (isset($link->link_rating) && $link->link_rating == $r) 237 237 echo 'selected="selected"'; 238 238 echo('>'.$r.'</option>'); 239 239 } -
wp-admin/edit-page-form.php
3 3 <h2 id="write-post"><?php _e('Write Page'); ?></h2> 4 4 <?php 5 5 6 if ( 0 == $post_ID) {6 if (empty($post_ID) || 0 == $post_ID) { 7 7 $form_action = 'post'; 8 8 $nonce_action = 'add-page'; 9 9 $temp_ID = -1 * time(); // don't change this formula without looking at wp_write_post() … … 20 20 21 21 $sendto = clean_url(stripslashes(wp_get_referer())); 22 22 23 if ( 0 != $post_ID&& $sendto == get_permalink($post_ID) )23 if ( ! empty($post_ID) && $sendto == get_permalink($post_ID) ) 24 24 $sendto = 'redo'; 25 25 ?> 26 26 … … 73 73 74 74 <fieldset id="passworddiv" class="dbx-box"> 75 75 <h3 class="dbx-handle"><?php _e('Page Password') ?></h3> 76 <div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></div>76 <div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo ( isset($post->post_password) ) ? attribute_escape( $post->post_password ) : ''; ?>" /></div> 77 77 </fieldset> 78 78 79 79 <fieldset id="pageparent" class="dbx-box"> … … 98 98 99 99 <fieldset id="slugdiv" class="dbx-box"> 100 100 <h3 class="dbx-handle"><?php _e('Page Slug') ?></h3> 101 <div class="dbx-content"><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name); ?>" /></div>101 <div class="dbx-content"><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( ( isset($post->post_name) ) ? $post->post_name : '' ); ?>" /></div> 102 102 </fieldset> 103 103 104 104 <?php if ( $authors = get_editable_authors( $current_user->id ) ) : // TODO: ROLE SYSTEM ?> -
wp-admin/edit-pages.php
41 41 42 42 <form name="searchform" id="searchform" action="" method="get"> 43 43 <fieldset><legend><?php _e('Search Terms…') ?></legend> 44 <input type="text" name="s" id="s" value="<?php echo attribute_escape( stripslashes( $_GET['s'] ) ); ?>" size="17" />44 <input type="text" name="s" id="s" value="<?php echo ( isset($_GET['s']) ) ? attribute_escape( stripslashes( $_GET['s'] ) ) : ''; ?>" size="17" /> 45 45 </fieldset> 46 46 47 47 -
wp-admin/edit.php
4 4 $title = __('Posts'); 5 5 $parent_file = 'edit.php'; 6 6 wp_enqueue_script( 'admin-posts' ); 7 if ( 1 == $_GET['c'] )7 if ( isset($_GET['c']) && 1 == $_GET['c'] ) 8 8 wp_enqueue_script( 'admin-comments' ); 9 9 require_once('admin-header.php'); 10 10 … … 31 31 if ( is_single() ) { 32 32 printf(__('Comments on %s'), apply_filters( "the_title", $post->post_title)); 33 33 } else { 34 if ( $post_listing_pageable && !is_archive() && !is_search() )34 if ( isset($post_listing_pageable) && $post_listing_pageable && !is_archive() && !is_search() ) 35 35 $h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label); 36 36 else 37 $h2_noun = $post_status_label;37 $h2_noun = ( isset($post_status_label) ) ? $post_status_label : null; 38 38 // Use $_GET instead of is_ since they can override each other 39 39 $h2_author = ''; 40 $_GET['author'] = ( int) $_GET['author'];40 $_GET['author'] = ( isset($_GET['author']) ) ? (int) $_GET['author'] : 0; 41 41 if ( $_GET['author'] != 0 ) { 42 42 if ( $_GET['author'] == '-' . $user_ID ) { // author exclusion 43 43 $h2_author = ' ' . __('by other authors'); … … 111 111 <?php } ?> 112 112 113 113 <fieldset><legend><?php _e('Category…') ?></legend> 114 <?php wp_dropdown_categories('show_option_all='.__('All').'&hide_empty=1&hierarchical=1&show_count=1&selected='. $cat);?>114 <?php wp_dropdown_categories('show_option_all='.__('All').'&hide_empty=1&hierarchical=1&show_count=1&selected='.((isset($cat))?$cat:0));?> 115 115 </fieldset> 116 116 <input type="submit" id="post-query-submit" value="<?php _e('Filter »'); ?>" class="button" /> 117 117 </form> -
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/post.php
134 134 $text = wp_specialchars( stripslashes( urldecode( $_REQUEST['text'] ) ) ); 135 135 $text = funky_javascript_fix( $text); 136 136 $popupurl = clean_url($_REQUEST['popupurl']); 137 $post_content = '<a href="'.$popupurl.'">'.$post_title.'</a>'."\n$text"; 138 } 137 $post_content = '<a href="'.$popupurl.'">'.$post_title.'</a>'."\n$text"; 138 } else 139 $post_content = ''; 140 139 141 140 142 if ( !empty( $_REQUEST['excerpt'] ) ) 141 143 $post_excerpt = wp_specialchars( stripslashes( $_REQUEST['excerpt'] )); … … 478 480 global $wpdb; 479 481 if ( false === $q ) 480 482 $q = $_GET; 481 $q['m'] = ( int) $q['m'];482 $q['cat'] = ( int) $q['cat'];483 $q['m'] = ( isset($q['m']) ) ? (int) $q['m'] : 0; 484 $q['cat'] = ( isset($q['cat']) ) ? (int) $q['cat'] : 0; 483 485 $post_stati = array( // array( adj, noun ) 484 486 'draft' => array(__('Draft'), _c('Drafts|manage posts header')), 485 487 'future' => array(__('Scheduled'), __('Scheduled posts')), … … 497 499 $post_status_q = '&post_status=' . $q['post_status']; 498 500 } 499 501 500 if ( 'pending' === $q['post_status'] ) {502 if ( isset($q['post_status']) && 'pending' === $q['post_status'] ) { 501 503 $order = 'ASC'; 502 504 $orderby = 'modified'; 503 } elseif ( 'draft' === $q['post_status'] ) {505 } elseif ( isset($q['post_status']) && 'draft' === $q['post_status'] ) { 504 506 $order = 'DESC'; 505 507 $orderby = 'modified'; 506 508 } else { -
wp-admin/includes/template.php
241 241 function wp_manage_posts_columns() { 242 242 $posts_columns = array(); 243 243 $posts_columns['id'] = '<div style="text-align: center">' . __('ID') . '</div>'; 244 if ( 'draft' === $_GET['post_status'] )244 if ( isset($_GET['post_status']) && 'draft' === $_GET['post_status'] ) 245 245 $posts_columns['modified'] = __('Modified'); 246 elseif ( 'pending' === $_GET['post_status'] )246 elseif ( isset($_GET['post_status']) && 'pending' === $_GET['post_status'] ) 247 247 $posts_columns['modified'] = __('Submitted'); 248 248 else 249 249 $posts_columns['date'] = __('When'); 250 250 $posts_columns['title'] = __('Title'); 251 251 $posts_columns['categories'] = __('Categories'); 252 if ( ! in_array($_GET['post_status'], array('pending', 'draft', 'future')) )252 if ( ! isset($_GET['post_status']) || !in_array($_GET['post_status'], array('pending', 'draft', 'future')) ) 253 253 $posts_columns['comments'] = '<div style="text-align: center">' . __('Comments') . '</div>'; 254 254 $posts_columns['author'] = __('Author'); 255 255 $posts_columns = apply_filters('manage_posts_columns', $posts_columns); … … 361 361 $url = $user_object->user_url; 362 362 $short_url = str_replace( 'http://', '', $url ); 363 363 $short_url = str_replace( 'www.', '', $short_url ); 364 $first_name = ( isset( $user_object->first_name ) ) ? $user_object->first_name : ''; 365 $last_name = ( isset( $user_object->last_name ) ) ? $user_object->last_name : ''; 364 366 if ('/' == substr( $short_url, -1 )) 365 367 $short_url = substr( $short_url, 0, -1 ); 366 368 if ( strlen( $short_url ) > 35 ) … … 369 371 $r = "<tr id='user-$user_object->ID'$style> 370 372 <td><input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' /> <label for='user_{$user_object->ID}'>{$user_object->ID}</label></td> 371 373 <td><label for='user_{$user_object->ID}'><strong>$user_object->user_login</strong></label></td> 372 <td><label for='user_{$user_object->ID}'>$ user_object->first_name $user_object->last_name</label></td>374 <td><label for='user_{$user_object->ID}'>$first_name $last_name</label></td> 373 375 <td><a href='mailto:$email' title='" . sprintf( __('e-mail: %s' ), $email ) . "'>$email</a></td> 374 376 <td><a href='$url' title='website: $url'>$short_url</a></td>"; 375 377 $r .= "\n\t\t<td align='center'>"; … … 587 589 global $wp_locale, $post, $comment; 588 590 589 591 if ( $for_post ) 590 $edit = ( in_array($post->post_status, array('draft', 'pending') ) && ( !$post->post_date|| '0000-00-00 00:00:00' == $post->post_date ) ) ? false : true;592 $edit = ( in_array($post->post_status, array('draft', 'pending') ) && (empty($post->post_date) || '0000-00-00 00:00:00' == $post->post_date ) ) ? false : true; 591 593 592 594 $tab_index_attribute = ''; 593 595 if ( (int) $tab_index > 0 ) … … 596 598 echo '<fieldset><legend><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp"'.$tab_index_attribute.' /> <label for="timestamp">'.__( 'Edit timestamp' ).'</label></legend>'; 597 599 598 600 $time_adj = time() + (get_option( 'gmt_offset' ) * 3600 ); 599 $post_date = ($for_post) ? $post->post_date : $comment->comment_date; 601 $post_date = ( ! empty( $post->post_date ) ) ? $post->post_date : null; 602 $comment_date = ( ! empty( $comment->comment_date ) ) ? $comment->comment_date : null; 603 $post_date = ($for_post) ? $post_date : $comment_date; 600 604 $jj = ($edit) ? mysql2date( 'd', $post_date ) : gmdate( 'd', $time_adj ); 601 605 $mm = ($edit) ? mysql2date( 'm', $post_date ) : gmdate( 'm', $time_adj ); 602 606 $aa = ($edit) ? mysql2date( 'Y', $post_date ) : gmdate( 'Y', $time_adj ); … … 773 777 774 778 function wp_remember_old_slug() { 775 779 global $post; 776 $name = attribute_escape($post->post_name); // just in case780 $name = ( ! empty($post->post_name) ) ? attribute_escape($post->post_name) : ''; // just in case 777 781 if ( strlen($name) ) 778 782 echo '<input type="hidden" id="wp-old-slug" name="wp-old-slug" value="' . $name . '" />'; 779 783 } -
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/upload.php
163 163 <?php endif; ?> 164 164 <tr> 165 165 <th scope="row"><label for="post_title"><?php _e('Title'); ?></label></th> 166 <td><input type="text" id="post_title" name="post_title" value="<?php echo $attachment->post_title; ?>" /></td>166 <td><input type="text" id="post_title" name="post_title" value="<?php echo ( isset($attachment->post_title) ) ? $attachment->post_title : ''; ?>" /></td> 167 167 </tr> 168 168 <tr> 169 169 <th scope="row"><label for="post_content"><?php _e('Description'); ?></label></th> 170 <td><textarea name="post_content" id="post_content"><?php echo $attachment->post_content; ?></textarea></td>170 <td><textarea name="post_content" id="post_content"><?php echo ( isset($attachment->post_conent) ) ? $attachment->post_content : ''; ?></textarea></td> 171 171 </tr> 172 172 <?php if (isset($attachment_data['image_meta'])) { ?> 173 173 <tr> -
wp-admin/includes/user.php
217 217 218 218 function get_user_to_edit( $user_id ) { 219 219 $user = new WP_User( $user_id ); 220 $user->user_login = attribute_escape($user->user_login);221 $user->user_email = attribute_escape($user->user_email);222 $user->user_url = clean_url($user->user_url);223 $user->first_name = attribute_escape($user->first_name);224 $user->last_name = attribute_escape($user->last_name);225 $user->display_name = attribute_escape($user->display_name);226 $user->nickname = attribute_escape($user->nickname);227 $user->aim = attribute_escape($user->aim);228 $user->yim = attribute_escape($user->yim);229 $user->jabber = attribute_escape($user->jabber);230 $user->description = wp_specialchars($user->description);220 $user->user_login = ( isset($user->user_login) ) ? attribute_escape($user->user_login) : ''; 221 $user->user_email = ( isset($user->user_email) ) ? attribute_escape($user->user_email) : ''; 222 $user->user_url = ( isset($user->user_url) ) ? clean_url($user->user_url) : ''; 223 $user->first_name = ( isset($user->first_name) ) ? attribute_escape($user->first_name) : ''; 224 $user->last_name = ( isset($user->last_name) ) ? attribute_escape($user->last_name) : ''; 225 $user->display_name = ( isset($user->display_name) ) ? attribute_escape($user->display_name) : ''; 226 $user->nickname = ( isset($user->nickname) ) ? attribute_escape($user->nickname) : ''; 227 $user->aim = ( isset($user->aim) ) ? attribute_escape($user->aim) : ''; 228 $user->yim = ( isset($user->yim) ) ? attribute_escape($user->yim) : ''; 229 $user->jabber = ( isset($user->jabber) ) ? attribute_escape($user->jabber) : ''; 230 $user->description = ( isset($user->description) ) ? wp_specialchars($user->description) : ''; 231 231 232 232 return $user; 233 233 } -
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; -
wp-admin/link-add.php
16 16 require('admin-header.php'); 17 17 ?> 18 18 19 <?php if ( $_GET['added']&& '' != $_POST['link_name']) : ?>19 <?php if ( ! empty($_GET['added']) && '' != $_POST['link_name']) : ?> 20 20 <div id="message" class="updated fade"><p><?php _e('Link added.'); ?></p></div> 21 21 <?php endif; ?> 22 22 -
wp-admin/link-manager.php
129 129 $short_url = substr($short_url, 0, 32).'...'; 130 130 131 131 $visible = ($link->link_visible == 'Y') ? __('Yes') : __('No'); 132 ++ $i; 132 if ( isset($i) ) 133 ++ $i; 134 else 135 $i = 1; 133 136 $style = ($i % 2) ? '' : ' class="alternate"'; 134 137 ?><tr id="link-<?php echo $link->link_id; ?>" valign="middle" <?php echo $style; ?>><?php 135 138 foreach($link_columns as $column_name=>$column_display_name) { -
wp-admin/plugin-editor.php
55 55 if ( !current_user_can('edit_plugins') ) 56 56 wp_die('<p>'.__('You do not have sufficient permissions to edit plugins for this blog.').'</p>'); 57 57 58 if ( $_GET['liveupdate']) {58 if ( ! empty($_GET['liveupdate']) ) { 59 59 check_admin_referer('edit-plugin-test_' . $file); 60 60 $current = get_option('active_plugins'); 61 61 $plugin = $file; -
wp-admin/users.php
8 8 $title = __('Users'); 9 9 $parent_file = 'users.php'; 10 10 11 $action = $_REQUEST['action'];11 $action = ( isset($_REQUEST['action']) ) ? $_REQUEST['action'] : ''; 12 12 $update = ''; 13 13 14 14 if ( empty($_POST) ) { … … 61 61 $searches[] = $col . " LIKE '%$this->search_term%'"; 62 62 $search_sql .= implode(' OR ', $searches); 63 63 $search_sql .= ')'; 64 } else { 65 $search_sql = ''; 64 66 } 65 67 $this->query_from_where = "FROM $wpdb->users WHERE 1=1 $search_sql"; 66 68 … … 276 278 include('admin-header.php'); 277 279 278 280 // Query the users 279 $wp_user_search = new WP_User_Search($_GET['usersearch'], $_GET['userspage']);280 281 282 $usersearch = ( isset($_GET['usersearch']) ) ? $_GET['usersearch'] : null; 283 $userspage = ( isset($_GET['userspage']) ) ? $_GET['userspage'] : null; 284 $wp_user_search = new WP_User_Search($usersearch, $userspage); 285 281 286 // Make the user objects 282 287 foreach ( $wp_user_search->get_results() as $userid ) { 283 288 $tmp_user = new WP_User($userid); … … 320 325 } 321 326 endif; ?> 322 327 323 <?php if ( is_wp_error( $errors ) ) : ?>328 <?php if ( ! empty($errors) && is_wp_error( $errors ) ) : ?> 324 329 <div class="error"> 325 330 <ul> 326 331 <?php … … 429 434 </div> 430 435 431 436 <?php 432 if ( is_wp_error($add_user_errors) ) {437 if ( ! empty($add_user_errors) && is_wp_error($add_user_errors) ) { 433 438 foreach ( array('user_login' => 'user_login', 'first_name' => 'user_firstname', 'last_name' => 'user_lastname', 'email' => 'user_email', 'url' => 'user_uri', 'role' => 'user_role') as $formpost => $var ) { 434 439 $var = 'new_' . $var; 435 440 $$var = attribute_escape(stripslashes($_POST[$formpost])); … … 441 446 <div class="wrap"> 442 447 <h2 id="add-new-user"><?php _e('Add New User') ?></h2> 443 448 444 <?php if ( is_wp_error( $add_user_errors ) ) : ?>449 <?php if ( ! empty($add_user_errors) && is_wp_error( $add_user_errors ) ) : ?> 445 450 <div class="error"> 446 451 <?php 447 452 foreach ( $add_user_errors->get_error_messages() as $message ) … … 464 469 <table class="editform" width="100%" cellspacing="2" cellpadding="5"> 465 470 <tr class="form-field form-required"> 466 471 <th scope="row" width="33%"><?php _e('Username (required)') ?><input name="action" type="hidden" id="action" value="adduser" /></th> 467 <td width="66%"><input name="user_login" type="text" id="user_login" value="<?php echo $new_user_login; ?>" /></td>472 <td width="66%"><input name="user_login" type="text" id="user_login" value="<?php echo ( ! empty($new_user_login) ) ? $new_user_login : ''; ?>" /></td> 468 473 </tr> 469 474 <tr class="form-field"> 470 475 <th scope="row"><?php _e('First Name') ?> </th> 471 <td><input name="first_name" type="text" id="first_name" value="<?php echo $new_user_firstname; ?>" /></td>476 <td><input name="first_name" type="text" id="first_name" value="<?php echo ( ! empty($new_user_firstname) ) ? $new_user_firstname : ''; ?>" /></td> 472 477 </tr> 473 478 <tr class="form-field"> 474 479 <th scope="row"><?php _e('Last Name') ?> </th> 475 <td><input name="last_name" type="text" id="last_name" value="<?php echo $new_user_lastname; ?>" /></td>480 <td><input name="last_name" type="text" id="last_name" value="<?php echo ( ! empty($new_user_lastname) ) ? $new_user_lastname : ''; ?>" /></td> 476 481 </tr> 477 482 <tr class="form-field form-required"> 478 483 <th scope="row"><?php _e('E-mail (required)') ?></th> 479 <td><input name="email" type="text" id="email" value="<?php echo $new_user_email; ?>" /></td>484 <td><input name="email" type="text" id="email" value="<?php echo ( ! empty($new_user_email) ) ? $new_user_email : ''; ?>" /></td> 480 485 </tr> 481 486 <tr class="form-field"> 482 487 <th scope="row"><?php _e('Website') ?></th> 483 <td><input name="url" type="text" id="url" value="<?php echo $new_user_uri; ?>" /></td>488 <td><input name="url" type="text" id="url" value="<?php echo ( ! empty($new_user_uri) ) ? $new_user_uri : ''; ?>" /></td> 484 489 </tr> 485 490 486 491 <?php if ( apply_filters('show_password_fields', true) ) : ?> … … 496 501 <th scope="row"><?php _e('Role'); ?></th> 497 502 <td><select name="role" id="role"> 498 503 <?php 499 if ( !$new_user_role)504 if ( empty($new_user_role) ) 500 505 $new_user_role = get_option('default_role'); 501 506 wp_dropdown_roles($new_user_role); 502 507 ?>