Changeset 1344
- Timestamp:
- 07/02/08 13:44:49 (4 months ago)
- Files:
-
- trunk/wp-admin/admin-ajax.php (modified) (1 diff)
- trunk/wp-admin/admin-header.php (modified) (2 diffs)
- trunk/wp-admin/gears-manifest.php (modified) (2 diffs)
- trunk/wp-admin/includes/media.php (modified) (1 diff)
- trunk/wp-admin/includes/schema.php (modified) (1 diff)
- trunk/wp-admin/includes/upgrade.php (modified) (4 diffs)
- trunk/wp-admin/index.php (modified) (2 diffs)
- trunk/wp-admin/js/post.js (modified) (1 diff)
- trunk/wp-admin/press-this.php (modified) (5 diffs)
- trunk/wp-app.php (modified) (1 diff)
- trunk/wp-includes/bookmark-template.php (modified) (2 diffs)
- trunk/wp-includes/class-smtp.php (modified) (1 diff)
- trunk/wp-includes/default-filters.php (modified) (1 diff)
- trunk/wp-includes/functions.php (modified) (31 diffs)
- trunk/wp-includes/js/jquery/suggest.js (modified) (4 diffs)
- trunk/wp-includes/js/jquery/ui.core.js (modified) (1 diff)
- trunk/wp-includes/js/jquery/ui.sortable.js (modified) (1 diff)
- trunk/wp-includes/js/jquery/ui.tabs.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/fullscreen/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/inlinepopups/template.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/media/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/media/media.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/paste/blank.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/paste/pastetext.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/paste/pasteword.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/safari/editor_plugin.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js (modified) (12 diffs)
- trunk/wp-includes/js/tinymce/themes/advanced/about.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/anchor.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/charmap.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/color_picker.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/image.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/link.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/themes/advanced/source_editor.htm (modified) (1 diff)
- trunk/wp-includes/js/tinymce/tiny_mce.js (modified) (1 diff)
- trunk/wp-includes/js/tinymce/tiny_mce_config.php (modified) (4 diffs)
- trunk/wp-includes/js/tinymce/wp-mce-help.php (modified) (1 diff)
- trunk/wp-includes/link-template.php (modified) (1 diff)
- trunk/wp-includes/pluggable.php (modified) (2 diffs)
- trunk/wp-includes/post.php (modified) (35 diffs)
- trunk/wp-includes/query.php (modified) (2 diffs)
- trunk/wp-includes/rewrite.php (modified) (2 diffs)
- trunk/wp-includes/script-loader.php (modified) (7 diffs)
- trunk/wp-includes/shortcodes.php (modified) (10 diffs)
- trunk/wp-includes/version.php (modified) (1 diff)
- trunk/wp-login.php (modified) (3 diffs)
- trunk/wp-settings.php (modified) (2 diffs)
- trunk/xmlrpc.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-ajax.php
r1328 r1344 14 14 $s = $_GET['q']; // is this slashed already? 15 15 16 if ( strstr( $s, ',' ) ) 17 die; // it's a multiple tag insert, we won't find anything 18 $results = $wpdb->get_col( $wpdb->prepare("SELECT name FROM $wpdb->terms WHERE name LIKE (%s)", '%' . $s . '%') ); 16 if ( strstr( $s, ',' ) ) { 17 $s = explode( ',', $s ); 18 $s = $s[count( $s ) - 1]; 19 } 20 $s = trim( $s ); 21 if ( strlen( $s ) < 2 ) 22 die; // require 2 chars for matching 23 $results = $wpdb->get_col( "SELECT name FROM $wpdb->terms WHERE name LIKE ('%". $s . "%')" ); 19 24 echo join( $results, "\n" ); 20 25 die; trunk/wp-admin/admin-header.php
r1342 r1344 88 88 <p><?php _e('After you install and enable Gears most of WordPress’ images, scripts, and CSS files will be stored locally on your computer. This speeds up page load time.'); ?></p> 89 89 <p><strong><?php _e('Don’t install on a public or shared computer.'); ?></strong></p> <div class="submit"><button onclick="window.location = 'http://gears.google.com/?action=install&return=<?php echo urlencode( admin_url() ); ?>';" class="button"><?php _e('Install Now'); ?></button> 90 <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';"> Cancel</button></div>90 <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';"><?php _e('Cancel'); ?></button></div> 91 91 </div> 92 92 … … 97 97 <p><strong><?php _e('However if this is a public or shared computer, Gears should not be enabled.'); ?></strong></p> 98 98 <div class="submit"><button class="button" onclick="wpGears.getPermission();"><?php _e('Enable Gears'); ?></button> 99 <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';"> Cancel</button></div>99 <button class="button" style="margin-left:10px;" onclick="document.getElementById('gears-info-box').style.display='none';"><?php _e('Cancel'); ?></button></div> 100 100 </div> 101 101 trunk/wp-admin/gears-manifest.php
r1342 r1344 65 65 { 66 66 "betaManifestVersion" : 1, 67 "version" : "<?php echo $man_version; ?>_2008062 5",67 "version" : "<?php echo $man_version; ?>_20080626", 68 68 "entries" : [ 69 69 <?php echo $defaults; ?> … … 113 113 { "url" : "../wp-includes/js/swfupload/swfupload_f9.swf" }, 114 114 115 { "url" : "../wp-includes/js/tinymce/tiny_mce_popup.js?ver=31 01" },116 { "url" : "../wp-includes/js/tinymce/utils/mctabs.js?ver=31 01" },117 { "url" : "../wp-includes/js/tinymce/utils/validate.js?ver=31 01" },118 { "url" : "../wp-includes/js/tinymce/utils/form_utils.js?ver=31 01" },119 { "url" : "../wp-includes/js/tinymce/utils/editable_selects.js?ver=31 01" },120 { "url" : "../wp-includes/js/tinymce/plugins/paste/js/pasteword.js?ver=31 01" },121 { "url" : "../wp-includes/js/tinymce/plugins/paste/js/pastetext.js?ver=31 01" },122 { "url" : "../wp-includes/js/tinymce/plugins/media/js/media.js?ver=31 01" },123 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/color_picker.js?ver=31 01" },124 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/charmap.js?ver=31 01" },125 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/image.js?ver=31 01" },126 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=31 01" },127 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=31 01" },128 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=31 01" },129 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=31 02" },115 { "url" : "../wp-includes/js/tinymce/tiny_mce_popup.js?ver=311" }, 116 { "url" : "../wp-includes/js/tinymce/utils/mctabs.js?ver=311" }, 117 { "url" : "../wp-includes/js/tinymce/utils/validate.js?ver=311" }, 118 { "url" : "../wp-includes/js/tinymce/utils/form_utils.js?ver=311" }, 119 { "url" : "../wp-includes/js/tinymce/utils/editable_selects.js?ver=311" }, 120 { "url" : "../wp-includes/js/tinymce/plugins/paste/js/pasteword.js?ver=311" }, 121 { "url" : "../wp-includes/js/tinymce/plugins/paste/js/pastetext.js?ver=311" }, 122 { "url" : "../wp-includes/js/tinymce/plugins/media/js/media.js?ver=311" }, 123 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/color_picker.js?ver=311" }, 124 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/charmap.js?ver=311" }, 125 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/image.js?ver=311" }, 126 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/link.js?ver=311" }, 127 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/source_editor.js?ver=311" }, 128 { "url" : "../wp-includes/js/tinymce/themes/advanced/js/anchor.js?ver=311" }, 129 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/js/editimage.js?ver=311" }, 130 130 131 { "url" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=31 01" },132 { "url" : "../wp-includes/js/tinymce/themes/advanced/anchor.htm?ver=31 01" },133 { "url" : "../wp-includes/js/tinymce/themes/advanced/image.htm?ver=31 01" },134 { "url" : "../wp-includes/js/tinymce/themes/advanced/link.htm?ver=31 01" },135 { "url" : "../wp-includes/js/tinymce/themes/advanced/color_picker.htm?ver=31 01" },136 { "url" : "../wp-includes/js/tinymce/themes/advanced/charmap.htm?ver=31 01" },137 { "url" : "../wp-includes/js/tinymce/plugins/media/media.htm?ver=31 01" },138 { "url" : "../wp-includes/js/tinymce/plugins/paste/pasteword.htm?ver=31 01" },139 { "url" : "../wp-includes/js/tinymce/plugins/paste/blank.htm?ver=31 01" },140 { "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=31 01" },141 { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=31 01" },142 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=31 01" },143 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=31 01" },144 { "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=31 01" },131 { "url" : "../wp-includes/js/tinymce/themes/advanced/source_editor.htm?ver=311" }, 132 { "url" : "../wp-includes/js/tinymce/themes/advanced/anchor.htm?ver=311" }, 133 { "url" : "../wp-includes/js/tinymce/themes/advanced/image.htm?ver=311" }, 134 { "url" : "../wp-includes/js/tinymce/themes/advanced/link.htm?ver=311" }, 135 { "url" : "../wp-includes/js/tinymce/themes/advanced/color_picker.htm?ver=311" }, 136 { "url" : "../wp-includes/js/tinymce/themes/advanced/charmap.htm?ver=311" }, 137 { "url" : "../wp-includes/js/tinymce/plugins/media/media.htm?ver=311" }, 138 { "url" : "../wp-includes/js/tinymce/plugins/paste/pasteword.htm?ver=311" }, 139 { "url" : "../wp-includes/js/tinymce/plugins/paste/blank.htm?ver=311" }, 140 { "url" : "../wp-includes/js/tinymce/plugins/paste/pastetext.htm?ver=311" }, 141 { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=311" }, 142 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=311" }, 143 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311" }, 144 { "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=311" }, 145 145 146 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=31 01" },147 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=31 01" },148 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css?ver=31 01" },149 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css?ver=31 01" },150 { "url" : "../wp-includes/js/tinymce/plugins/spellchecker/css/content.css?ver=31 01" },151 { "url" : "../wp-includes/js/tinymce/plugins/wordpress/css/content.css?ver=31 01" },152 { "url" : "../wp-includes/js/tinymce/plugins/media/css/content.css?ver=31 01" },153 { "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=31 01" },154 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=31 01" },155 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=31 01" },156 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=31 01" },157 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=31 01" },158 { "url" : "../wp-includes/js/tinymce/wordpress.css?ver=31 01" },146 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/ui.css?ver=311" }, 147 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver=311" }, 148 { "url" : "../wp-includes/js/tinymce/themes/advanced/skins/wp_theme/dialog.css?ver=311" }, 149 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css?ver=311" }, 150 { "url" : "../wp-includes/js/tinymce/plugins/spellchecker/css/content.css?ver=311" }, 151 { "url" : "../wp-includes/js/tinymce/plugins/wordpress/css/content.css?ver=311" }, 152 { "url" : "../wp-includes/js/tinymce/plugins/media/css/content.css?ver=311" }, 153 { "url" : "../wp-includes/js/tinymce/plugins/media/css/media.css?ver=311" }, 154 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=311" }, 155 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=311" }, 156 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311" }, 157 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=311" }, 158 { "url" : "../wp-includes/js/tinymce/wordpress.css?ver=311" }, 159 159 160 160 { "url" : "../wp-includes/js/tinymce/themes/advanced/img/icons.gif" }, trunk/wp-admin/includes/media.php
r1342 r1344 331 331 332 332 if ( !empty($src) ) { 333 if ( !strpos($src, '://') )334 $src = "http://$src";335 333 $alt = @$desc; 336 334 $html = "<img src='$src' alt='$alt' />"; trunk/wp-admin/includes/schema.php
r1342 r1344 331 331 // 2.6 332 332 add_option('avatar_default', 'mystery'); 333 add_option('enable_app', 0);334 add_option('enable_xmlrpc', 0);333 add_option('enable_app', 0); 334 add_option('enable_xmlrpc', 0); 335 335 336 336 // Delete unused options trunk/wp-admin/includes/upgrade.php
r1342 r1344 7 7 8 8 if ( !function_exists('wp_install') ) : 9 function wp_install($blog_title, $user_name, $user_email, $public, $ remote) {9 function wp_install($blog_title, $user_name, $user_email, $public, $deprecated='') { 10 10 global $wp_rewrite; 11 11 … … 19 19 update_option('admin_email', $user_email); 20 20 update_option('blog_public', $public); 21 update_option('enable_app',$remote);22 update_option('enable_xmlrpc',$remote);23 21 24 22 $guessurl = wp_guess_url(); … … 207 205 upgrade_252(); 208 206 209 if ( $wp_current_db_version < 8 000)207 if ( $wp_current_db_version < 8201 ) 210 208 upgrade_260(); 211 209 … … 753 751 754 752 function upgrade_260() { 755 populate_roles_260(); 753 if ( $wp_current_db_version < 8000 ) 754 populate_roles_260(); 755 756 if ( $wp_current_db_version < 8201 ) { 757 update_option('enable_app', 1); 758 update_option('enable_xmlrpc', 1); 759 } 756 760 } 757 761 trunk/wp-admin/index.php
r1336 r1344 92 92 } 93 93 94 $total_comments = sprintf( __ ( '%1$s total' ), $num_comm['total_comments']);95 $approved_comments = sprintf( __ ( '%1$s approved' ), $num_comm['approved']);96 $spam_comments = sprintf( __ ( '%1$s spam' ), $num_comm['spam']);97 $moderated_comments = sprintf( __ ( '%1$s awaiting moderation' ), $num_comm['awaiting_moderation']);94 $total_comments = sprintf( __ngettext( '%1$s total', '%1$s total', $num_comm['total_comments'] ), number_format_i18n($num_comm['total_comments']) ); 95 $approved_comments = sprintf( __ngettext( '%1$s approved', '%1$s approved', $num_comm['approved'] ), number_format_i18n($num_comm['approved']) ); 96 $spam_comments = sprintf( __ngettext( '%1$s spam', '%1$s spam', $num_comm['spam'] ), number_format_i18n($num_comm['spam']) ); 97 $moderated_comments = sprintf( __ngettext( '%1$s awaiting moderation', '%1$s awaiting moderation', $num_comm['awaiting_moderation'] ), number_format_i18n($num_comm['awaiting_moderation']) ); 98 98 99 99 if( current_user_can( 'moderate_comments' ) ) { … … 103 103 } 104 104 105 $comm_text = sprintf( __ ( 'Current comment break down: %1$s, %2$s, %3$s and %4$s.'), $total_comments, $approved_comments, $spam_comments, $moderated_comments );105 $comm_text = sprintf( __ngettext( 'You have %1$s comment, %2$s, %3$s and %4$s.', 'You have %1$s comments, %2$s, %3$s and %4$s.', $num_comm['total_comments'] ), $total_comments, $approved_comments, $spam_comments, $moderated_comments ); 106 106 107 107 $post_type_text = implode(', ', $post_type_texts); trunk/wp-admin/js/post.js
r1336 r1344 99 99 100 100 // auto-suggest stuff 101 jQuery('#newtag').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2 } );101 jQuery('#newtag').suggest( 'admin-ajax.php?action=ajax-tag-search', { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } ); 102 102 jQuery('#newtag').keypress( tag_press_key ); 103 103 trunk/wp-admin/press-this.php
r1336 r1344 91 91 <body class="press-this"> 92 92 93 <div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a onclick="window.opener.location.replace(this.href); window.close();" href="<?php echo get_permalink( $post_ID); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&post=<?php echo $post_ID; ?>" onclick="window.opener.location.replace(this.href); window.close();"><?php _e('Edit post'); ?></a> | <a href="#" onclick="window.close();"> Close Window</a></p></div>93 <div id="message" class="updated fade"><p><strong><?php _e('Your post has been saved.'); ?></strong> <a onclick="window.opener.location.replace(this.href); window.close();" href="<?php echo get_permalink( $post_ID); ?>"><?php _e('View post'); ?></a> | <a href="post.php?action=edit&post=<?php echo $post_ID; ?>" onclick="window.opener.location.replace(this.href); window.close();"><?php _e('Edit post'); ?></a> | <a href="#" onclick="window.close();"><?php _e('Close Window'); ?></a></p></div> 94 94 95 95 <div id="footer"> … … 138 138 139 139 <p><input type="hidden" name="this_photo" value="<?php echo $image; ?>" id="this_photo" /> 140 <a href="#" class="select"><img src="<?php echo $image; ?>" width="475" alt=" Click to insert." title="Click to insert." /></a></p>141 142 <p id="options"><a href="#" class="select"> Insert Image</a> | <a href="#" class="cancel">Cancel</a></p>140 <a href="#" class="select"><img src="<?php echo $image; ?>" width="475" alt="<?php echo attribute_escape(__('Click to insert.')); ?>" title="<?php echo attribute_escape(__('Click to insert.')); ?>" /></a></p> 141 142 <p id="options"><a href="#" class="select"><?php _e('Insert Image'); ?></a> | <a href="#" class="cancel"><?php _e('Cancel'); ?></a></p> 143 143 <?php die; 144 144 } … … 165 165 </div> 166 166 167 <p id="options"><a href="#" class="select"> Insert Image</a> | <a href="#" class="cancel">Cancel</a></p>167 <p id="options"><a href="#" class="select"><?php _e('Insert Image'); ?></a> | <a href="#" class="cancel"><?php _e('Cancel'); ?></a></p> 168 168 <?php die; 169 169 } … … 433 433 case 'photo' : 434 434 set_menu('photo'); 435 set_title(' Post');435 set_title('<?php _e('Post') ?>'); 436 436 <?php if($selection) { ?> 437 437 set_editor("<?php echo $selection; ?>"); 438 438 <?php } ?> 439 439 jQuery('#extra_fields').show(); 440 jQuery('#extra_fields').before('<h2 id="waiting"><img src="images/loading.gif" alt="" /> Loading...</h2>');440 jQuery('#extra_fields').before('<h2 id="waiting"><img src="images/loading.gif" alt="" /><?php echo js_escape( __( 'Loading...' ) ); ?></h2>'); 441 441 jQuery('#extra_fields').load('<?php echo clean_url($_SERVER['PHP_SELF']).'/?ajax=photo&u='.attribute_escape($url); ?>'); 442 442 jQuery.ajax({ … … 519 519 <div id="tagchecklist"></div> 520 520 </div> 521 <label for="post_status" id="post_status"><input type="radio" name="post_status" value="publish" checked="checked" id="published" />Published <input type="radio" name="post_status" value="draft" id="unpubplished" /> Unpublished</label> 521 <div id="post_status"> 522 <input type="radio" name="post_status" value="publish" checked="checked" id="published" /> <label for="published"><?php _e('Published'); ?></label> 523 <input type="radio" name="post_status" value="draft" id="unpublished" /> <label for="unpublished"><?php _e('Unpublished'); ?></label> 524 </div> 522 525 <p class="submit"> 523 526 <input type="submit" value="<?php _e('Publish') ?>" onclick="document.getElementById('photo_saving').style.display = '';"/> trunk/wp-app.php
r1328 r1344 195 195 $this->redirect($this->get_service_url()); 196 196 } 197 198 // check to see if AtomPub is enabled 199 if( !get_option( 'enable_app' ) ) 200 $this->not_allowed( 'AtomPub services are disabled on this blog. An admin user can enable them at ' . admin_url('options-writing.php') ); 197 201 198 202 // dispatch trunk/wp-includes/bookmark-template.php
r1336 r1344 187 187 $defaults = array( 188 188 'orderby' => 'name', 'order' => 'ASC', 189 'limit' => -1, 'category' => '', 189 'limit' => -1, 'category' => '', 'exclude_category' => '', 190 190 'category_name' => '', 'hide_invisible' => 1, 191 191 'show_updated' => 0, 'echo' => 1, … … 204 204 if ( $categorize ) { 205 205 //Split the bookmarks into ul's for each category 206 $cats = get_terms('link_category', array('name__like' => $category_name, 'include' => $category, ' orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0));206 $cats = get_terms('link_category', array('name__like' => $category_name, 'include' => $category, 'exclude' => $exclude_category, 'orderby' => $category_orderby, 'order' => $category_order, 'hierarchical' => 0)); 207 207 208 208 foreach ( (array) $cats as $cat ) { trunk/wp-includes/class-smtp.php
r1336 r1344 250 250 * that is to be send with the headers. Each header needs to be 251 251 * on a single line followed by a <CRLF> with the message headers 252 * and the message body being sep erated by and additional <CRLF>.252 * and the message body being separated by and additional <CRLF>. 253 253 * 254 254 * Implements rfc 821: DATA <CRLF> trunk/wp-includes/default-filters.php
r1328 r1344 154 154 add_filter('pre_comment_content', 'wp_rel_nofollow', 15); 155 155 add_filter('comment_email', 'antispambot'); 156 add_filter('option_tag_base', '_wp_filter_taxonomy_base'); 157 add_filter('option_category_base', '_wp_filter_taxonomy_base'); 156 158 157 159 //Atom SSL support trunk/wp-includes/functions.php
r1337 r1344 100 100 } 101 101 102 102 /** 103 * Retrieve the date in localized format, based on timestamp. 104 * 105 * If the locale specifies the locale month and weekday, then the locale will 106 * take over the format for the date. If it isn't, then the date format string 107 * will be used instead. 108 * 109 * @since 0.71 110 * 111 * @param string $dateformatstring Format to display the date 112 * @param int $unixtimestamp Unix timestamp 113 * @return string The date, translated if locale specifies it. 114 */ 103 115 function date_i18n( $dateformatstring, $unixtimestamp ) { 104 116 global $wp_locale; 105 117 $i = $unixtimestamp; 118 // Sanity check for PHP 5.1.0- 119 if ( -1 == $i ) 120 $i = false; 121 106 122 if ( ( !empty( $wp_locale->month ) ) && ( !empty( $wp_locale->weekday ) ) ) { 107 123 $datemonth = $wp_locale->get_month( date( 'm', $i ) ); … … 277 293 } 278 294 279 /* Options functions */280 281 295 /** 282 296 * Retrieve option value based on setting name. 283 297 * 284 * {@internal Missing Long Description}} 298 * If the option does not exist or does not have a value, then the return value 299 * will be false. This is useful to check whether you need to install an option 300 * and is commonly used during installation of plugin options and to test 301 * whether upgrading is required. 302 * 303 * You can "short-circuit" the retrieval of the option from the database for 304 * your plugin or core options that aren't protected. You can do so by hooking 305 * into the 'pre_option_$option' with the $option being replaced by the option 306 * name. You should not try to override special options, but you will not be 307 * prevented from doing so. 308 * 309 * There is a second filter called 'option_$option' with the $option being 310 * replaced with the option name. This gives the value as the only parameter. 285 311 * 286 312 * @since 1.5.0 287 313 * @package WordPress 288 314 * @subpackage Option 315 * @uses apply_filters() Calls 'pre_option_$optionname' false to allow 316 * overwriting the option value in a plugin. 317 * @uses apply_filters() Calls 'option_$optionname' with the option name value. 289 318 * 290 319 * @param string $setting Name of option to retrieve. Should already be SQL-escaped … … 348 377 } 349 378 379 /** 380 * Retrieve all autoload options or all options, if no autoloaded ones exist. 381 * 382 * This is different from wp_load_alloptions(), in this that function does not 383 * cache all options and will retrieve all options from the database every time 384 * it is called. 385 * 386 * @since 1.0.0 387 * @package WordPress 388 * @subpackage Option 389 * @uses apply_filters() Calls 'pre_option_$optionname' hook with option value as parameter. 390 * @uses apply_filters() Calls 'all_options' on options list. 391 * 392 * @return array List of all options. 393 */ 350 394 function get_alloptions() { 351 395 global $wpdb, $wp_queries; … … 358 402 // "When trying to design a foolproof system, 359 403 // never underestimate the ingenuity of the fools :)" -- Dougal 360 if ( in_array( $option->option_name, array( 'siteurl', 'home', 'category_base' ) ) )404 if ( in_array( $option->option_name, array( 'siteurl', 'home', 'category_base', 'tag_base' ) ) ) 361 405 $option->option_value = untrailingslashit( $option->option_value ); 362 406 $value = maybe_unserialize( $option->option_value ); … … 366 410 } 367 411 368 412 /** 413 * Loads and caches all autoloaded options, if available or all options. 414 * 415 * This is different from get_alloptions(), in that this function will cache the 416 * options and will return the cached options when called again. 417 * 418 * @since 2.2.0 419 * @package WordPress 420 * @subpackage Option 421 * 422 * @return array List all options. 423 */ 369 424 function wp_load_alloptions() { 370 425 global $wpdb; … … 433 488 } 434 489 435 // expects $option_name to NOT be SQL-escaped 490 /** 491 * Update the value of an option that was already added. 492 * 493 * If the option does not exist, then the option will be added with the option 494 * value, but you will not be able to set whether it is autoloaded. If you want 495 * to set whether an option autoloaded, then you need to use the add_option(). 496 * 497 * When the option is updated, then the filter named 498 * 'update_option_$option_name', with the $option_name as the $option_name 499 * parameter value, will be called. The hook should accept two parameters, the 500 * first is the old parameter and the second is the new parameter. 501 * 502 * @since 1.0.0 503 * @package WordPress 504 * @subpackage Option 505 * 506 * @param string $option_name Option name. Expected to not be SQL-escaped 507 * @param mixed $newvalue Option value. 508 * @return bool False if value was not updated and true if value was updated. 509 */ 436 510 function update_option( $option_name, $newvalue ) { 437 511 global $wpdb; … … 465 539 } 466 540 467 468 // thx Alex Stapleton, http://alex.vort-x.net/blog/ 469 // expects $name to NOT be SQL-escaped 541 /** 542 * Add a new option. 543 * 544 * You can create options without values and then add values later. Does not 545 * check whether the option has already been added, but does check that you 546 * aren't adding a protected WordPress option. Care should be taken to not name 547 * options, the same as the ones which are protected and to not add options 548 * that were already added. 549 * 550 * The filter named 'add_option_$optionname', with the $optionname being 551 * replaced with the option's name, will be called. The hook should accept two 552 * parameters, the first is the option name, and the second is the value. 553 * 554 * @package WordPress 555 * @subpackage Option 556 * @since 1.0.0 557 * @link http://alex.vort-x.net/blog/ Thanks Alex Stapleton 558 * 559 * @param string $name Option name to add. Expects to NOT be SQL escaped. 560 * @param mixed $value Optional. Option value, can be anything. 561 * @param mixed $deprecated Optional. Description. Not used anymore. 562 * @param bool $autoload Optional. Default is enabled. Whether to load the option when WordPress starts up. 563 * @return null returns when finished. 564 */ 470 565 function add_option( $name, $value = '', $deprecated = '', $autoload = 'yes' ) { 471 566 global $wpdb; … … 485 580 $wpdb->query( $wpdb->prepare( "INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES (%s, %s, %s)", $name, $value, $autoload ) ); 486 581 487 do_action( "add_option_{$name}", $name, $value ); 582 do_action( "add_option_{$name}", $name, $value ); 488 583 return; 489 584 } 490 585 491 586 /** 587 * Removes option by name and prevents removal of protected WordPress options. 588 * 589 * @package WordPress 590 * @subpackage Option 591 * @since unknown 592 * 593 * @param string $name Option name to remove. 594 * @return bool True, if succeed. False, if failure. 595 */ 492 596 function delete_option( $name ) { 493 597 global $wpdb; … … 504 608 // expected_slashed ($name) 505 609 $wpdb->query( "DELETE FROM $wpdb->options WHERE option_name = '$name'" ); 506 507 610 return true; 508 611 } 509 612 510 613 /** 614 * Serialize data, if needed. 615 * 616 * @param mixed $data Data that might be serialized. 617 * @return mixed A scalar data 618 */ 511 619 function maybe_serialize( $data ) { 512 620 if ( is_string( $data ) ) … … 572 680 } 573 681 574 682 /** 683 * Open the file handle for debugging. 684 * 685 * This function is used for XMLRPC feature, but it is general purpose enough 686 * to be used in anywhere. 687 * 688 * @see fopen() for mode options. 689 * @package WordPress 690 * @subpackage Debug 691 * @since unknown 692 * @uses $debug Used for whether debugging is enabled. 693 * 694 * @param string $filename File path to debug file. 695 * @param string $mode Same as fopen() mode parameter. 696 * @return bool|resource File handle. False on failure. 697 */ 575 698 function debug_fopen( $filename, $mode ) { 576 699 global $debug; … … 583 706 } 584 707 585 708 /** 709 * Write contents to the file used for debugging. 710 * 711 * Technically, this can be used to write to any file handle when the global 712 * $debug is set to 1 or true. 713 * 714 * @package WordPress 715 * @subpackage Debug 716 * @since unknown 717 * @uses $debug Used for whether debugging is enabled. 718 * 719 * @param resource $fp File handle for debugging file. 720 * @param string $string Content to write to debug file. 721 */ 586 722 function debug_fwrite( $fp, $string ) { 587 723 global $debug; … … 590 726 } 591 727 592 728 /** 729 * Close the debugging file handle. 730 * 731 * Technically, this can be used to close any file handle when the global $debug 732 * is set to 1 or true. 733 * 734 * @package WordPress 735 * @subpackage Debug 736 * @since unknown 737 * @uses $debug Used for whether debugging is enabled. 738 * 739 * @param resource $fp Debug File handle. 740 */ 593 741 function debug_fclose( $fp ) { 594 742 global $debug; … … 759 907 } 760 908 761 909 /** 910 * Build URL query based on an associative and, or indexed array. 911 * 912 * This is a convenient function for easily building url queries. It sets the 913 * separator to '&' and uses _http_build_query() function. 914 * 915 * @see _http_build_query() Used to build the query 916 * @link http://us2.php.net/manual/en/function.http-build-query.php more on what 917 * http_build_query() does. 918 * 919 * @since unknown 920 * 921 * @param array $data URL-encode key/value pairs. 922 * @return string URL encoded string 923 */ 762 924 function build_query( $data ) { 763 925 return _http_build_query( $data, NULL, '&', '', false ); … … 765 927 766 928 /** 767 * Retrieve a modified query string. 768 * 769 * {@internal Missing Long Description}} 770 * 771 * Adding a single key & value or an associative array. 772 * Setting a key value to emptystring removes the key. 773 * Omitting oldquery_or_uri uses the $_SERVER value. 929 * Retrieve a modified URL query string. 930 * 931 * You can rebuild the URL and append a new query variable to the URL query by 932 * using this function. You can also retrieve the full URL with query data. 933 * 934 * Adding a single key & value or an associative array. Setting a key value to 935 * emptystring removes the key. Omitting oldquery_or_uri uses the $_SERVER 936 * value. 774 937 * 775 938 * @since 1.5.0 … … 884 1047 } 885 1048 1049 /** 1050 * HTTP request for URI to retrieve content. 1051 * 1052 * Tries to retrieve the HTTP content with fopen first and then using cURL, if 1053 * fopen can't be used. 1054 * 1055 * @since unknown 1056 * 1057 * @param string $uri URI/URL of web page to retrieve. 1058 * @return string HTTP content. 1059 */ 886 1060 function wp_remote_fopen( $uri ) { 887 1061 $timeout = 10; … … 995 1169 } 996 1170 997 1171 /** 1172 * Set HTTP status header. 1173 * 1174 * @since unknown 1175 * @uses apply_filters() Calls 'status_header' on status header string, HTTP 1176 * HTTP code, HTTP code description, and protocol string as separate 1177 * parameters. 1178 * 1179 * @param int $header HTTP status code 1180 * @return null Does not return anything. 1181 */ 998 1182 function status_header( $header ) { 999 1183 $text = get_status_header_desc( $header ); … … 1293 1477 // $dir is absolute, $path is (maybe) relative to ABSPATH 1294 1478 $dir = path_join( ABSPATH, $upload_path ); 1295 $path = str_replace( ABSPATH, '', trim( $upload_path ) );1296 1479 1297 1480 if ( !$url = get_option( 'upload_url_path' ) ) 1298 $url = trailingslashit( $siteurl ) . $path;1481 $url = WP_CONTENT_URL . '/uploads'; 1299 1482 1300 1483 if ( defined('UPLOADS') ) { … … 1790 1973 } 1791 1974 1792 1793 1975 /** 1794 1976 * Load the correct database class file. … … 1808 1990 require_once( ABSPATH . WPINC . '/wp-db.php' ); 1809 1991 } 1810 1811 1992 1812 1993 /** … … 1857 2038 } 1858 2039 1859 1860 2040 /** 1861 2041 * Converts value to positive integer. … … 1869 2049 return abs( intval( $maybeint ) ); 1870 2050 } 1871 1872 2051 1873 2052 /** … … 1903 2082 return false; 1904 2083 } 1905 1906 2084 1907 2085 /** … … 1921 2099 } 1922 2100 1923 1924 2101 /** 1925 2102 * Marks a function as deprecated and informs when it has been used. … … 1959 2136 } 1960 2137 1961 1962 2138 /** 1963 2139 * Marks a file as deprecated and informs when it has been used. … … 1997 2173 } 1998 2174 1999 2000 2175 /** 2001 2176 * Is the server running earlier than 1.5.0 version of lighttpd … … 2010 2185 return 'lighttpd' == $server_parts[0] && -1 == version_compare( $server_parts[1], '1.5.0' ); 2011 2186 } 2012 2013 2187 2014 2188 /** … … 2041 2215 } 2042 2216 2043 2044 2217 /** 2045 2218 * File validates against allowed set of defined rules. … … 2072 2245 } 2073 2246 2074 2075 2247 /** 2076 2248 * Determine if SSL is used. … … 2083 2255 return ( 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false; 2084 2256 } 2085 2086 2257 2087 2258 /** … … 2105 2276 } 2106 2277 2107 2108 2278 /** 2109 2279 * Whether to force SSL used for the Administration Panels. … … 2126 2296 } 2127 2297 2298 /** 2299 * Guess the URL for the site. 2300 * 2301 * Will remove wp-admin links to retrieve only return URLs not in the wp-admin 2302 * directory. 2303 * 2304 * @since 2.6 2305 * 2306 * @return string 2307 */ 2308 function wp_guess_url() { 2309 if ( defined('WP_SITEURL') && '' != WP_SITEURL ) { 2310 $url = WP_SITEURL; 2311 } else { 2312 $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; 2313 $url = preg_replace('|/wp-admin/.*|i', '', $schema . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); 2314 } 2315 return $url; 2316 } 2317 2128 2318 ?> trunk/wp-includes/js/jquery/suggest.js
r1328 r1344 1 1 /* 2 * jquery.suggest 1.1 - 2007-08-06 2 * jquery.suggest 1.1b - 2007-08-06 3 * Patched by Mark Jaquith with Alexander Dick's "multiple items" patch to allow for auto-suggesting of more than one tag before submitting 4 * See: http://www.vulgarisoip.com/2007/06/29/jquerysuggest-an-alternative-jquery-based-autocomplete-library/#comment-7228 3 5 * 4 6 * Uses code and techniques from following libraries: … … 114 116 var q = $.trim($input.val()); 115 117 118 if ( options.multiple ) { 119 var multipleSepPos = q.lastIndexOf(options.multipleSep); 120 if ( multipleSepPos != -1 ) { 121 q = q.substr(multipleSepPos + options.multipleSep.length); 122 } 123 } 116 124 if (q.length >= options.minchars) { 117 125 … … 246 254 247 255 if ($currentResult) { 248 $input.val($currentResult.text()); 256 if ( options.multiple ) { 257 if ( $input.val().indexOf(options.multipleSep) != -1 ) { 258 $currentVal = $input.val().substr( 0, ( $input.val().lastIndexOf(options.multipleSep) + options.multipleSep.length ) ); 259 } else { 260 $currentVal = ""; 261 } 262
