Ticket #7509: 7509.10.diff
File 7509.10.diff, 14.5 KB (added by , 15 years ago) |
---|
-
wp-admin/admin-header.php
77 77 if ( '' == $blog_name ) 78 78 $blog_name = ' '; 79 79 $title_class = ''; 80 if ( function_exists('mb_strlen') && mb_strlen($blog_name, 'UTF-8') > 30 ) 81 $title_class = 'class="long-title"'; 80 if ( function_exists('mb_strlen') ) { 81 if ( mb_strlen($blog_name, 'UTF-8') > 30 ) 82 $title_class = 'class="long-title"'; 83 } else { 84 if ( strlen($blog_name) > 30 ) 85 $title_class = 'class="long-title"'; 86 } 82 87 ?> 83 88 84 89 <img id="logo50" src="images/wp-logo.gif" alt="" /> <h1 <?php echo $title_class ?>><a href="<?php echo trailingslashit( get_bloginfo('url') ); ?>" title="<?php _e('Visit site') ?>"><?php echo $blog_name ?></a></h1> -
wp-admin/edit-tags.php
247 247 </div> 248 248 249 249 <?php if ( $can_manage ) { 250 do_action('add_tag_form_pre' , $tag); ?>250 do_action('add_tag_form_pre'); ?> 251 251 252 252 <div class="form-wrap"> 253 253 <h3><?php _e('Add a New Tag'); ?></h3> 254 254 <div id="ajax-response"></div> 255 255 <form name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list: validate"> 256 256 <input type="hidden" name="action" value="addtag" /> 257 <input type="hidden" name="tag_ID" value="<?php echo $tag->term_id ?>" />258 257 <?php wp_original_referer_field(true, 'previous'); wp_nonce_field('add-tag'); ?> 259 258 260 259 <div class="form-field form-required"> 261 260 <label for="name"><?php _e('Tag name') ?></label> 262 <input name="name" id="name" type="text" value=" <?php if ( isset( $tag->name ) ) echo attribute_escape($tag->name); ?>" size="40" aria-required="true" />261 <input name="name" id="name" type="text" value="" size="40" aria-required="true" /> 263 262 <p><?php _e('The name is how the tag appears on your site.'); ?></p> 264 263 </div> 265 264 266 265 <div class="form-field"> 267 266 <label for="slug"><?php _e('Tag slug') ?></label> 268 <input name="slug" id="slug" type="text" value=" <?php if ( isset( $tag->slug ) ) echo attribute_escape(apply_filters('editable_slug', $tag->slug)); ?>" size="40" />267 <input name="slug" id="slug" type="text" value="" size="40" /> 269 268 <p><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p> 270 269 </div> 271 270 272 271 <p class="submit"><input type="submit" class="button" name="submit" value="<?php _e('Add Tag'); ?>" /></p> 273 <?php do_action(' edit_tag_form', $tag); ?>272 <?php do_action('add_tag_form'); ?> 274 273 </form></div> 275 274 <?php } ?> 276 275 -
wp-admin/includes/dashboard.php
37 37 'home' => get_option('home'), 38 38 'link' => apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?hl=en&scoring=d&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), 39 39 'url' => apply_filters( 'dashboard_incoming_links_feed', 'http://blogsearch.google.com/blogsearch_feeds?hl=en&scoring=d&ie=utf-8&num=10&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), 40 'items' => $widget_options['dashboard_incoming_links']['items'],41 'show_date' => $widget_options['dashboard_incoming_links']['show_date']40 'items' => isset($widget_options['dashboard_incoming_links']['items']) ? $widget_options['dashboard_incoming_links']['items'] : 10, 41 'show_date' => isset($widget_options['dashboard_incoming_links']['show_date']) ? $widget_options['dashboard_incoming_links']['show_date'] : false 42 42 ); 43 43 } 44 44 wp_add_dashboard_widget( 'dashboard_incoming_links', __( 'Incoming Links' ), 'wp_dashboard_incoming_links', 'wp_dashboard_incoming_links_control' ); -
wp-admin/includes/post.php
25 25 26 26 if ( $update ) 27 27 $post_data['ID'] = (int) $post_data['post_ID']; 28 $post_data['post_content'] = $post_data['content'];29 $post_data['post_excerpt'] = $post_data['excerpt'];28 $post_data['post_content'] = isset($post_data['content']) ? $post_data['content'] : ''; 29 $post_data['post_excerpt'] = isset($post_data['excerpt']) ? $post_data['excerpt'] : ''; 30 30 $post_data['post_parent'] = isset($post_data['parent_id'])? $post_data['parent_id'] : ''; 31 31 if ( isset($post_data['trackback_url']) ) 32 32 $post_data['to_ping'] = $post_data['trackback_url']; … … 71 71 if ( isset($post_data['pending']) && '' != $post_data['pending'] ) 72 72 $post_data['post_status'] = 'pending'; 73 73 74 $previous_status = get_post_field('post_status', $post_data['ID']);74 $previous_status = get_post_field('post_status', isset($post_data['ID']) ? $post_data['ID'] : $post_data['temp_ID']); 75 75 76 76 // Posts 'submitted for approval' present are submitted to $_POST the same as if they were being published. 77 77 // Change status from 'publish' to 'pending' if user lacks permissions to publish or to resave published posts. -
wp-admin/includes/template.php
3166 3166 <form id="adv-settings" action="" method="get"> 3167 3167 <div class="metabox-prefs"> 3168 3168 <?php 3169 if ( !meta_box_prefs($screen) ) {3169 if ( !meta_box_prefs($screen) && isset($column_screens[$screen]) ) { 3170 3170 manage_columns_prefs($column_screens[$screen]); 3171 3171 wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); 3172 3172 } -
wp-admin/install.php
89 89 90 90 display_header(); 91 91 // Fill in the data we gathered 92 $weblog_title = stripslashes($_POST['weblog_title']);93 $admin_email = stripslashes($_POST['admin_email']);94 $public = (int) $_POST['blog_public'];92 $weblog_title = isset($_POST['weblog_title']) ? stripslashes($_POST['weblog_title']) : ''; 93 $admin_email = isset($_POST['admin_email']) ? stripslashes($_POST['admin_email']) : ''; 94 $public = isset($_POST['blog_public']) ? (int) $_POST['blog_public'] : 0; 95 95 // check e-mail address 96 96 if (empty($admin_email)) { 97 97 // TODO: poka-yoke -
wp-admin/page.php
34 34 } elseif ( 'post' == $_POST['originalaction'] && !empty($_POST['mode']) && 'sidebar' == $_POST['mode'] ) { 35 35 $location = 'sidebar.php?a=b'; 36 36 } elseif ( isset($_POST['save']) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) { 37 if ( $_POST['_wp_original_http_referer']&& strpos( $_POST['_wp_original_http_referer'], '/wp-admin/page.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/page-new.php') === false )37 if ( isset($_POST['_wp_original_http_referer']) && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/page.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/page-new.php') === false ) 38 38 $location = add_query_arg( array( 39 39 '_wp_original_http_referer' => urlencode( stripslashes( $_POST['_wp_original_http_referer'] ) ), 40 40 'message' => 1 41 41 ), get_edit_post_link( $page_ID, 'url' ) ); 42 42 else 43 43 $location = add_query_arg( 'message', 4, get_edit_post_link( $page_ID, 'url' ) ); 44 } elseif ( $_POST['addmeta']) {44 } elseif ( isset($_POST['addmeta']) ) { 45 45 $location = add_query_arg( 'message', 2, wp_get_referer() ); 46 46 $location = explode('#', $location); 47 47 $location = $location[0] . '#postcustom'; 48 } elseif ( $_POST['deletemeta']) {48 } elseif ( isset($_POST['deletemeta']) ) { 49 49 $location = add_query_arg( 'message', 3, wp_get_referer() ); 50 50 $location = explode('#', $location); 51 51 $location = $location[0] . '#postcustom'; -
wp-admin/post.php
39 39 elseif ( isset($_POST['publish']) ) 40 40 $location = 'sidebar.php?a=b'; 41 41 } elseif ( ( isset($_POST['save']) || isset($_POST['publish']) ) && ( empty($referredby) || $referredby == $referer || 'redo' != $referredby ) ) { 42 if ( $_POST['_wp_original_http_referer']&& strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post-new.php') === false )42 if ( isset($_POST['_wp_original_http_referer']) && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post.php') === false && strpos( $_POST['_wp_original_http_referer'], '/wp-admin/post-new.php') === false ) 43 43 $location = add_query_arg( array( 44 44 '_wp_original_http_referer' => urlencode( stripslashes( $_POST['_wp_original_http_referer'] ) ), 45 45 'message' => 1 -
wp-includes/comment.php
1392 1392 foreach ( (array) $post_links_temp[0] as $link_test ) : 1393 1393 if ( !in_array($link_test, $pung) && (url_to_postid($link_test) != $post_ID) // If we haven't pung it already and it isn't a link to itself 1394 1394 && !is_local_attachment($link_test) ) : // Also, let's never ping local attachments. 1395 $test = parse_url($link_test); 1396 if ( isset($test['query']) ) 1397 $post_links[] = $link_test; 1398 elseif ( ($test['path'] != '/') && ($test['path'] != '') ) 1399 $post_links[] = $link_test; 1395 if ( $test = @parse_url($link_test) ) { 1396 if ( isset($test['query']) ) 1397 $post_links[] = $link_test; 1398 elseif ( ($test['path'] != '/') && ($test['path'] != '') ) 1399 $post_links[] = $link_test; 1400 } 1400 1401 endif; 1401 1402 endforeach; 1402 1403 -
wp-includes/js/autosave.js
179 179 post_data["excerpt"] = jQuery("#excerpt").val(); 180 180 if ( jQuery("#post_author").size() ) 181 181 post_data["post_author"] = jQuery("#post_author").val(); 182 post_data["user_ID"] = jQuery("#user-id").val(); 182 183 183 184 // Don't run while the TinyMCE spellcheck is on. Why? Who knows. 184 185 if ( rich && tinyMCE.activeEditor.plugins.spellchecker && tinyMCE.activeEditor.plugins.spellchecker.active ) { -
wp-includes/post.php
1336 1336 $post_category = array(get_option('default_category')); 1337 1337 } 1338 1338 1339 //Set the default tag list 1340 if ( !isset($tags_input) ) 1341 $tags_input = array(); 1342 1339 1343 if ( empty($post_author) ) 1340 1344 $post_author = $user_ID; 1341 1345 -
wp-includes/query.php
1691 1691 $q['name'] = $q['pagename']; 1692 1692 $where .= " AND ($wpdb->posts.ID = '$reqpage')"; 1693 1693 $reqpage_obj = get_page($reqpage); 1694 if ( 'attachment' == $reqpage_obj->post_type ) {1694 if ( is_object($reqpage_obj) && 'attachment' == $reqpage_obj->post_type ) { 1695 1695 $this->is_attachment = true; 1696 1696 $this->is_page = true; 1697 1697 $q['attachment_id'] = $reqpage; -
wp-includes/script-loader.php
75 75 'broken' => __('An unidentified error has occurred.') 76 76 ) ); 77 77 78 $scripts->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '200811 02' );78 $scripts->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20081110' ); 79 79 80 80 $scripts->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('wp-ajax-response'), '20080729' ); 81 81 $scripts->localize( 'wp-lists', 'wpListL10n', array( -
wp-includes/taxonomy.php
840 840 if ( is_object($term) ) 841 841 $do_object = true; 842 842 843 $term_id = $do_object ? $term->term_id : (isset($term['term_id']) ? $term['term_id'] : 0); 844 843 845 foreach ( (array) $fields as $field ) { 844 if ( $do_object ) 845 $term->$field = sanitize_term_field($field, $term->$field, $term->term_id, $taxonomy, $context); 846 else 847 $term[$field] = sanitize_term_field($field, $term[$field], $term['term_id'], $taxonomy, $context); 846 if ( $do_object ) { 847 if ( isset($term->$field) ) 848 $term->$field = sanitize_term_field($field, $term->$field, $term_id, $taxonomy, $context); 849 } else { 850 if ( isset($term[$field]) ) 851 $term[$field] = sanitize_term_field($field, $term[$field], $term_id, $taxonomy, $context); 852 } 848 853 } 849 854 850 855 return $term; -
wp-includes/widgets.php
1707 1707 * @param array $inputs Override default display options. 1708 1708 */ 1709 1709 function wp_widget_rss_form( $args, $inputs = null ) { 1710 1710 1711 $default_inputs = array( 'url' => true, 'title' => true, 'items' => true, 'show_summary' => true, 'show_author' => true, 'show_date' => true ); 1711 1712 $inputs = wp_parse_args( $inputs, $default_inputs ); 1712 1713 extract( $args ); 1714 extract( $inputs, EXTR_SKIP); 1715 1713 1716 $number = attribute_escape( $number ); 1714 1717 $title = attribute_escape( $title ); 1715 1718 $url = attribute_escape( $url ); -
wp-settings.php
336 336 if ( !defined('PLUGINDIR') ) 337 337 define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH. For back compat. 338 338 339 if ( ! defined('WP_INSTALLING') ) { 340 // Used to guarantee unique hash cookies 341 $cookiehash = md5(get_option('siteurl')); 342 /** 343 * Used to guarantee unique hash cookies 344 * @since 1.5 345 */ 346 define('COOKIEHASH', $cookiehash); 347 } 339 /** 340 * Used to guarantee unique hash cookies 341 * @since 1.5 342 */ 343 define('COOKIEHASH', md5(get_option('siteurl'))); 348 344 349 345 /** 350 346 * Should be exactly the same as the default value of SECRET_KEY in wp-config-sample.php