Changeset 829
- Timestamp:
- 01/02/07 10:42:08 (2 years ago)
- Files:
-
- trunk/wp-admin/admin-functions.php (modified) (1 diff)
- trunk/wp-admin/categories.php (modified) (1 diff)
- trunk/wp-admin/export.php (modified) (1 diff)
- trunk/wp-admin/link-add.php (modified) (1 diff)
- trunk/wp-admin/plugins.php (modified) (1 diff)
- trunk/wp-admin/templates.php (modified) (1 diff)
- trunk/wp-includes/formatting.php (modified) (4 diffs)
- trunk/xmlrpc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-functions.php
r828 r829 562 562 function edit_link( $link_id = '' ) { 563 563 if (!current_user_can( 'manage_links' )) 564 wp_die( __( 'Cheatin& 8217; uh?' ));564 wp_die( __( 'Cheatin’ uh?' )); 565 565 566 566 $_POST['link_url'] = wp_specialchars( $_POST['link_url'] ); trunk/wp-admin/categories.php
r828 r829 35 35 // Don't delete the default cats. 36 36 if ( $cat_ID == get_option('default_category') ) 37 wp_die(sprintf(__("Can& 8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name));37 wp_die(sprintf(__("Can’t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); 38 38 39 39 if ( $cat_ID == get_option('default_link_category') ) 40 wp_die(sprintf(__("Can& 8217;t delete the <strong>%s</strong> category: this is the default one for links"), $cat_name));40 wp_die(sprintf(__("Can’t delete the <strong>%s</strong> category: this is the default one for links"), $cat_name)); 41 41 42 42 wp_delete_category($cat_ID); trunk/wp-admin/export.php
r828 r829 15 15 <p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p> 16 16 <p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, comments, custom fields, and categories.'); ?></p> 17 <p><?php _e('Once you& 8217;ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p>17 <p><?php _e('Once you’ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p> 18 18 <form action="" method="get"> 19 19 <h3><?php _e('Optional options'); ?></h3> trunk/wp-admin/link-add.php
r828 r829 29 29 <div id="wp-link-bookmarklet" class="wrap"> 30 30 <h3><?php _e('Add Link Bookmarklet'); ?></h3> 31 <p><?php _e('Right click on the following link and choose "Bookmark This Link..." to create an add link shortcut. Right now this only works on Mozilla or Netscape, but we& 8217;re working on it.'); ?></p>31 <p><?php _e('Right click on the following link and choose "Bookmark This Link..." to create an add link shortcut. Right now this only works on Mozilla or Netscape, but we’re working on it.'); ?></p> 32 32 <?php printf('<p><a href="%s" title="'.__('Link add bookmarklet').'">'.__('Link This').'</a></p>', "javascript:void(linkmanpopup=window.open('" . get_option('siteurl') . "/wp-admin/link-add.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?> 33 33 </div> trunk/wp-admin/plugins.php
r828 r829 87 87 if (empty($plugins)) { 88 88 echo '<p>'; 89 _e("Couldn& 8217;t open plugins directory or there are no plugins available."); // TODO: make more helpful89 _e("Couldn’t open plugins directory or there are no plugins available."); // TODO: make more helpful 90 90 echo '</p>'; 91 91 } else { trunk/wp-admin/templates.php
r828 r829 100 100 echo '<ol>'; 101 101 foreach ($recents as $recent) : 102 echo "<li><a href='templates.php?file=" . attribute_escape($recent) . "'>" . get_file_description(basename($recent)) . "</a></li>";102 echo "<li><a href='templates.php?file=" . attribute_escape($recent) . "'>" . wp_specialchars(get_file_description(basename($recent))) . "</a></li>"; 103 103 endforeach; 104 104 echo '</ol>'; trunk/wp-includes/formatting.php
r828 r829 422 422 423 423 @param text Text to be balanced 424 @param force Forces balancing, ignoring the value of the option 424 425 @return Returns balanced text 425 426 @author Leonard Lin (leonard@acm.org) … … 430 431 @changelog 431 432 --- Modified by Scott Reilly (coffee2code) 02 Aug 2004 432 1.2 ***TODO*** Make better - change loop condition to $text433 1.1 Fixed handling of append/stack pop order of end text434 Added Cleaning Hooks435 1.0 First Version433 1.2 ***TODO*** Make better - change loop condition to $text 434 1.1 Fixed handling of append/stack pop order of end text 435 Added Cleaning Hooks 436 1.0 First Version 436 437 */ 437 function balanceTags($text, $ is_comment = 0, $force = false) {438 function balanceTags($text, $force = false) { 438 439 439 440 if ( !$force && get_option('use_balanceTags') == 0 ) … … 537 538 538 539 function force_balance_tags($text) { 539 return balanceTags($text, 0,true);540 return balanceTags($text, true); 540 541 } 541 542 … … 765 766 $days = 1; 766 767 } 767 $since = sprintf(__ ('%s day', '%s days', $days), $days);768 $since = sprintf(__ngettext('%s day', '%s days', $days), $days); 768 769 } 769 770 return $since; trunk/xmlrpc.php
r827 r829 1224 1224 $p = explode( "\n\n", $linea ); 1225 1225 1226 $sem_regexp_pb = "/(\\/|\\\|\*|\?|\+|\.|\^|\\$|\(|\)|\[|\]|\||\{|\})/"; 1227 $sem_regexp_fix = "\\\\$1"; 1228 $link = preg_replace( $sem_regexp_pb, $sem_regexp_fix, $pagelinkedfrom ); 1229 1230 $finished = false; 1226 $preg_target = preg_quote($pagelinkedto); 1227 1231 1228 foreach ( $p as $para ) { 1232 if ( $finished ) 1233 continue; 1234 if ( strstr( $para, $pagelinkedto ) ) { 1235 $context = preg_replace( "/.*<a[^>]+".$link."[^>]*>([^>]+)<\/a>.*/", "$1", $para ); 1236 $excerpt = strip_tags( $para ); 1237 $excerpt = trim( $excerpt ); 1238 $use = preg_quote( $context ); 1239 $excerpt = preg_replace("|.*?\s(.{0,100}$use.{0,100})\s|s", "$1", $excerpt); 1240 $finished = true; 1229 if ( strpos($para, $pagelinkedto) !== false ) { // it exists, but is it a link? 1230 preg_match("|<a[^>]+?".$preg_target."[^>]*>([^>]+?)</a>|", $para, $context); 1231 1232 // If the URL isn't in a link context, keep looking 1233 if ( empty($context) ) 1234 continue; 1235 1236 // We're going to use this fake tag to mark the context in a bit 1237 // the marker is needed in case the link text appears more than once in the paragraph 1238 $excerpt = preg_replace('|\</?wpcontext\>|', '', $para); 1239 1240 // prevent really long link text 1241 if ( strlen($context[1]) > 100 ) 1242 $context[1] = substr($context[1], 0, 100) . '...'; 1243 1244 $marker = '<wpcontext>'.$context[1].'</wpcontext>'; // set up our marker 1245 $excerpt= str_replace($context[0], $marker, $excerpt); // swap out the link for our marker 1246 $excerpt = strip_tags($excerpt, '<wpcontext>'); // strip all tags but our context marker 1247 $excerpt = trim($excerpt); 1248 $preg_marker = preg_quote($marker); 1249 $excerpt = preg_replace("|.*?\s(.{0,100}$preg_marker.{0,100})\s.*|s", '$1', $excerpt); 1250 $excerpt = strip_tags($excerpt); // YES, again, to remove the marker wrapper 1251 break; 1241 1252 } 1242 1253 } 1243 1254 1244 if ( empty($context) ) // URL patternnot found1255 if ( empty($context) ) // Link to target not found 1245 1256 return new IXR_Error(17, 'The source URL does not contain a link to the target URL, and so cannot be used as a source.'); 1246 1257
