Changeset 1360
- Timestamp:
- 07/09/08 10:00:15 (5 months ago)
- Files:
-
- trunk/wp-admin/admin-ajax.php (modified) (8 diffs)
- trunk/wp-admin/css/install.css (modified) (3 diffs)
- trunk/wp-admin/gears-manifest.php (modified) (2 diffs)
- trunk/wp-admin/includes/template.php (modified) (1 diff)
- trunk/wp-admin/upgrade.php (modified) (3 diffs)
- trunk/wp-content/themes/classic/style.css (modified) (4 diffs)
- trunk/wp-content/themes/default/style.css (modified) (4 diffs)
- trunk/wp-includes/category-template.php (modified) (4 diffs)
- trunk/wp-includes/deprecated.php (modified) (2 diffs)
- trunk/wp-includes/formatting.php (modified) (3 diffs)
- trunk/wp-includes/js/tinymce/langs/wp-langs.php (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js (modified) (4 diffs)
- trunk/wp-includes/js/tinymce/tiny_mce_config.php (modified) (1 diff)
- trunk/wp-includes/media.php (modified) (2 diffs)
- trunk/wp-includes/script-loader.php (modified) (2 diffs)
- trunk/wp-includes/version.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-ajax.php
r1344 r1360 31 31 check_ajax_referer( "delete-comment_$id" ); 32 32 if ( !$comment = get_comment( $id ) ) 33 die(' 0');33 die('1'); 34 34 if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) 35 35 die('-1'); 36 36 37 if ( isset($_POST['spam']) && 1 == $_POST['spam'] ) 37 if ( isset($_POST['spam']) && 1 == $_POST['spam'] ) { 38 if ( 'spam' == wp_get_comment_status( $comment->comment_ID ) ) 39 die('1'); 38 40 $r = wp_set_comment_status( $comment->comment_ID, 'spam' ); 39 else41 } else { 40 42 $r = wp_delete_comment( $comment->comment_ID ); 43 } 41 44 42 45 die( $r ? '1' : '0' ); … … 47 50 die('-1'); 48 51 52 $cat = get_category( $id ); 53 if ( !$cat || is_wp_error( $cat ) ) 54 die('1'); 55 49 56 if ( wp_delete_category( $id ) ) 50 57 die('1'); 51 else die('0'); 58 else 59 die('0'); 52 60 break; 53 61 case 'delete-tag' : … … 56 64 die('-1'); 57 65 66 $tag = get_term( $id, 'post_tag' ); 67 if ( !$tag || is_wp_error( $tag ) ) 68 die('1'); 69 58 70 if ( wp_delete_term($id, 'post_tag')) 59 71 die('1'); 60 else die('0'); 72 else 73 die('0'); 61 74 break; 62 75 case 'delete-link-cat' : … … 64 77 if ( !current_user_can( 'manage_categories' ) ) 65 78 die('-1'); 79 80 $cat = get_term( $id, 'link_category' ); 81 if ( !$cat || is_wp_error( $cat ) ) 82 die('1'); 66 83 67 84 $cat_name = get_term_field('name', $id, 'link_category'); … … 95 112 die('-1'); 96 113 114 $link = get_bookmark( $id ); 115 if ( !$link || is_wp_error( $link ) ) 116 die('1'); 117 97 118 if ( wp_delete_link( $id ) ) 98 119 die('1'); 99 else die('0'); 120 else 121 die('0'); 100 122 break; 101 123 case 'delete-meta' : 102 124 check_ajax_referer( "delete-meta_$id" ); 103 125 if ( !$meta = get_post_meta_by_id( $id ) ) 104 die('0'); 126 die('1'); 127 105 128 if ( !current_user_can( 'edit_post', $meta->post_id ) ) 106 129 die('-1'); … … 114 137 die('-1'); 115 138 139 if ( !get_post( $id ) ) 140 die('1'); 141 116 142 if ( wp_delete_post( $id ) ) 117 143 die('1'); … … 124 150 die('-1'); 125 151 152 if ( !get_page( $id ) ) 153 die('1'); 154 126 155 if ( wp_delete_post( $id ) ) 127 156 die('1'); 128 else die('0'); 157 else 158 die('0'); 129 159 break; 130 160 case 'dim-comment' : 131 161 if ( !$comment = get_comment( $id ) ) 132 162 die('0'); 163 133 164 if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) 134 165 die('-1'); … … 136 167 die('-1'); 137 168 138 if ( 'unapproved' == wp_get_comment_status($comment->comment_ID) ) { 169 $current = wp_get_comment_status( $comment->comment_ID ); 170 if ( $_POST['new'] == $current ) 171 die('1'); 172 173 if ( 'unapproved' == $current ) { 139 174 check_ajax_referer( "approve-comment_$id" ); 140 175 if ( wp_set_comment_status( $comment->comment_ID, 'approve' ) ) trunk/wp-admin/css/install.css
r1218 r1360 38 38 #logo { margin: 6px 0 14px 0px; border-bottom: none;} 39 39 40 .step a, .step input { font-size: 2em; } 40 .step { 41 font-size: 2.2em; 42 } 43 44 .step input { font-size: 2em; } 41 45 42 46 td input { font-size: 1.5em; } … … 46 50 .submit input, .button, .button-secondary { 47 51 font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif; 48 padding: 6px;49 border: none;52 padding: 5px 7px 7px; 53 border: 1px solid #a3a3a3; 50 54 margin-left: 0; 51 font-size: 13px !important; 52 -moz-border-radius: 2px; 53 -khtml-border-radius: 2px; 54 -webkit-border-radius: 2px; 55 border-radius: 2px; 55 -moz-border-radius: 3px; 56 -khtml-border-radius: 3px; 57 -webkit-border-radius: 3px; 58 border-radius: 3px; 56 59 color: #246; 57 60 background: #e5e5e5; … … 64 67 .submit input:hover, .button:hover, .button-secondary:hover { 65 68 color: #d54e21; 69 border-color: #535353; 66 70 } 67 71 trunk/wp-admin/gears-manifest.php
r1355 r1360 146 146 { "url" : "../wp-includes/js/tinymce/plugins/fullscreen/fullscreen.htm?ver=311" }, 147 147 { "url" : "../wp-includes/js/tinymce/plugins/inlinepopups/template.htm?ver=311" }, 148 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311 " },148 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/editimage.html?ver=311b" }, 149 149 { "url" : "../wp-includes/js/tinymce/wp-mce-help.php?ver=311" }, 150 150 … … 159 159 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/pasteword.css?ver=311" }, 160 160 { "url" : "../wp-includes/js/tinymce/plugins/paste/css/blank.css?ver=311" }, 161 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311 " },161 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css?ver=311b" }, 162 162 { "url" : "../wp-includes/js/tinymce/plugins/wpeditimage/css/editimage-rtl.css?ver=311" }, 163 163 { "url" : "../wp-includes/js/tinymce/wordpress.css?ver=311" }, trunk/wp-admin/includes/template.php
r1347 r1360 769 769 770 770 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 771 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3 ' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | ';772 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3 ' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | ';771 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | '; 772 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | '; 773 773 774 774 // we're looking at list of only approved or only unapproved comments 775 775 if ( 'moderated' == $comment_status ) { 776 $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment ' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | ';776 $actions['approve'] = "<a href='$approve_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=approved' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a> | '; 777 777 unset($actions['unapprove']); 778 778 } elseif ( 'approved' == $comment_status ) { 779 $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment ' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | ';779 $actions['unapprove'] = "<a href='$unapprove_url' class='delete:the-comment-list:comment-$comment->comment_ID:e7e7d3:action=dim-comment&new=unapproved' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a> | '; 780 780 unset($actions['approve']); 781 781 } trunk/wp-admin/upgrade.php
r1328 r1360 26 26 <h2><?php _e('No Upgrade Required'); ?></h2> 27 27 <p><?php _e('Your WordPress database is already up-to-date!'); ?></p> 28 < h2 class="step"><a href="<?php echo get_option('home'); ?>/"><?php _e('Continue'); ?></a></h2>28 <p class="step"><a class="button" href="<?php echo get_option('home'); ?>/"><?php _e('Continue'); ?></a></p> 29 29 30 30 <?php else : … … 38 38 <p><?php _e('Your WordPress database is out-of-date, and must be upgraded before you can continue.'); ?></p> 39 39 <p><?php _e('The upgrade process may take a while, so please be patient.'); ?></p> 40 < h2 class="step"><a href="upgrade.php?step=1&backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress'); ?></a></h2>40 <p class="step"><a class="button" href="upgrade.php?step=1&backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress'); ?></a></p> 41 41 <?php 42 42 break; … … 58 58 <h2><?php _e('Upgrade Complete'); ?></h2> 59 59 <p><?php _e('Your WordPress database has been successfully upgraded!'); ?></p> 60 < h2 class="step"><a href="<?php echo $backto; ?>"><?php _e('Continue'); ?></a></h2>60 <p class="step"><a class="button" href="<?php echo $backto; ?>"><?php _e('Continue'); ?></a></p> 61 61 62 62 <!-- trunk/wp-content/themes/classic/style.css
r1347 r1360 323 323 /* Captions & aligment */ 324 324 .aligncenter, 325 d l.aligncenter {325 div.aligncenter { 326 326 display: block; 327 327 margin-left: auto; … … 337 337 } 338 338 339 .wp _caption {339 .wp-caption { 340 340 border: 1px solid #ddd; 341 341 text-align: center; … … 349 349 } 350 350 351 .wp _caption img {351 .wp-caption img { 352 352 margin: 0; 353 353 padding: 0; … … 355 355 } 356 356 357 .wp _caption_dd{357 .wp-caption p.wp-caption-text { 358 358 font-size: 11px; 359 359 line-height: 17px; trunk/wp-content/themes/default/style.css
r1347 r1360 641 641 /* Captions */ 642 642 .aligncenter, 643 d l.aligncenter {643 div.aligncenter { 644 644 display: block; 645 645 margin-left: auto; … … 647 647 } 648 648 649 .wp _caption {649 .wp-caption { 650 650 border: 1px solid #ddd; 651 651 text-align: center; … … 659 659 } 660 660 661 .wp _caption img {661 .wp-caption img { 662 662 margin: 0; 663 663 padding: 0; … … 665 665 } 666 666 667 .wp _caption_dd{667 .wp-caption p.wp-caption-text { 668 668 font-size: 11px; 669 669 line-height: 17px; trunk/wp-includes/category-template.php
r1356 r1360 1 1 <?php 2 2 3 function get_category_children($id, $before = '/', $after = '' ) {3 function get_category_children($id, $before = '/', $after = '', $visited=array()) { 4 4 if ( 0 == $id ) 5 5 return ''; … … 15 15 if ( is_wp_error( $category ) ) 16 16 return $category; 17 if ( $category->parent == $id ) { 17 if ( $category->parent == $id && !in_array($category->term_id, $visited) ) { 18 $visited[] = $category->term_id; 18 19 $chain .= $before.$category->term_id.$after; 19 20 $chain .= get_category_children($category->term_id, $before, $after); … … 45 46 } 46 47 47 function get_category_parents($id, $link = FALSE, $separator = '/', $nicename = FALSE ){48 function get_category_parents($id, $link = FALSE, $separator = '/', $nicename = FALSE, $visited = array()){ 48 49 $chain = ''; 49 50 $parent = &get_category($id); … … 56 57 $name = $parent->cat_name; 57 58 58 if ( $parent->parent && ($parent->parent != $parent->term_id) ) 59 $chain .= get_category_parents($parent->parent, $link, $separator, $nicename); 59 if ( $parent->parent && ($parent->parent != $parent->term_id) && !in_array($parent->parent, $visited) ) { 60 $visited[] = $parent->parent; 61 $chain .= get_category_parents($parent->parent, $link, $separator, $nicename, $visited); 62 } 60 63 61 64 if ( $link ) trunk/wp-includes/deprecated.php
r1218 r1360 1065 1065 * @author Dougal 1066 1066 * @since 1.0.1 1067 * @deprecated Use get_categories()1068 * @see get_categories()1067 * @deprecated Use wp_list_bookmarks() 1068 * @see wp_list_bookmarks() 1069 1069 * 1070 1070 * @param string $order Sort link categories by 'name' or 'id' … … 1072 1072 */ 1073 1073 function get_links_list($order = 'name', $deprecated = '') { 1074 _deprecated_function(__FUNCTION__, '0.0', ' get_categories()');1074 _deprecated_function(__FUNCTION__, '0.0', 'wp_list_bookmarks()'); 1075 1075 1076 1076 $order = strtolower($order); trunk/wp-includes/formatting.php
r1328 r1360 4 4 global $wp_cockneyreplace; 5 5 $next = true; 6 $has_pre_parent = false; 6 7 $output = ''; 7 8 $curl = ''; … … 27 28 $curl = $textarr[$i]; 28 29 29 if (isset($curl{0}) && '<' != $curl{0} && '[' != $curl{0} && $next ) { // If it's not a tag30 if (isset($curl{0}) && '<' != $curl{0} && '[' != $curl{0} && $next && !$has_pre_parent) { // If it's not a tag 30 31 // static strings 31 32 $curl = str_replace($static_characters, $static_replacements, $curl); 32 33 // regular expressions 33 34 $curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl); 34 } elseif (strpos($curl, '<code') !== false || strpos($curl, '< pre') !== false || strpos($curl, '<kbd') !== false || strpos($curl, '<style') !== false || strpos($curl, '<script') !== false) {35 } elseif (strpos($curl, '<code') !== false || strpos($curl, '<kbd') !== false || strpos($curl, '<style') !== false || strpos($curl, '<script') !== false) { 35 36 $next = false; 37 } elseif (strpos($curl, '<pre') !== false) { 38 $has_pre_parent = true; 39 } elseif (strpos($curl, '</pre>') !== false) { 40 $has_pre_parent = false; 36 41 } else { 37 42 $next = true; … … 1125 1130 if ( empty($text) ) return apply_filters('richedit_pre', ''); 1126 1131 1127 $output = $text; 1128 $output = convert_chars($output); 1132 $output = convert_chars($text); 1129 1133 $output = wpautop($output); 1130 1131 // These must be double-escaped or planets will collide. 1132 $output = str_replace('<', '&lt;', $output); 1133 $output = str_replace('>', '&gt;', $output); 1134 1135 // These should be entities too 1136 $output = str_replace('<', '<', $output); 1137 $output = str_replace('>', '>', $output); 1138 1134 $output = htmlspecialchars($output, ENT_NOQUOTES); 1135 1139 1136 return apply_filters('richedit_pre', $output); 1140 1137 } trunk/wp-includes/js/tinymce/langs/wp-langs.php
r1347 r1360 435 435 s120:"' . mce_escape( __('120%') ) . '", 436 436 s130:"' . mce_escape( __('130%') ) . '", 437 caption:"' . mce_escape( __('Caption') ) . '" 437 img_title:"' . mce_escape( __('Edit Image Title') ) . '", 438 caption:"' . mce_escape( __('Edit Image Caption') ) . '" 438 439 }); 439 440 '; trunk/wp-includes/js/tinymce/plugins/wpeditimage/css/editimage.css
r1336 r1360 63 63 } 64 64 65 #media-upload #basic th.label { 66 padding: 5px 5px 5px 0; 67 } 68 65 69 .show-align { 66 70 height: 200px; trunk/wp-includes/js/tinymce/plugins/wpeditimage/editimage.html
r1344 r1360 8 8 <script type="text/javascript" src="../../utils/form_utils.js?ver=311"></script> 9 9 10 <link rel="stylesheet" href="css/editimage.css?ver=311 " type="text/css" media="all" />10 <link rel="stylesheet" href="css/editimage.css?ver=311b" type="text/css" media="all" /> 11 11 <link rel="stylesheet" href="../../../../../wp-admin/css/media.css?ver=2.6-beta1" type="text/css" media="all" /> 12 12 <script type="text/javascript"> … … 78 78 <th valign="top" scope="row" class="label"> 79 79 <label for="img_title"> 80 <span class="alignleft">{#advanced_dlg.link_titlefield}</span> 81 <span class="alignright"><abbr title="required" class="required">*</abbr></span> 80 <span class="alignleft">{#wpeditimage.img_title}</span> 82 81 </label> 83 82 </th> trunk/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js
r1355 r1360 16 16 return; 17 17 18 tb_show('', url + '/editimage.html? TB_iframe=true');18 tb_show('', url + '/editimage.html?ver=311b&TB_iframe=true'); 19 19 tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' ); 20 20 }); … … 75 75 _do_shcode : function(co) { 76 76 return co.replace(/\[wp_caption([^\]]+)\]([\s\S]+?)\[\/wp_caption\][\s\u00a0]*/g, function(a,b,c){ 77 b = b.replace(/\\'|\\'|\\'/g, ''').replace(/\\"|\\"/g, '"'); 78 c = c.replace(/\\'|\\'/g, ''').replace(/\\"/g, '"'); 77 79 var id = b.match(/id=['"]([^'"]+)/i), cls = b.match(/align=['"]([^'"]+)/i); 78 80 var w = b.match(/width=['"]([0-9]+)/), cap = b.match(/caption=['"]([^'"]+)/i); … … 92 94 93 95 _get_shcode : function(co) { 94 return co.replace(/<div class="mceTemp[^"]*">\s*<dl([^>]+)>\s*<dt[^>]+>([\s\S]+?)<\/dt>\s*<dd[^>]+>( [^<]+)<\/dd>\s*<\/dl>\s*<\/div>\s*/gi, function(a,b,c,cap){96 return co.replace(/<div class="mceTemp[^"]*">\s*<dl([^>]+)>\s*<dt[^>]+>([\s\S]+?)<\/dt>\s*<dd[^>]+>(.+?)<\/dd>\s*<\/dl>\s*<\/div>\s*/gi, function(a,b,c,cap){ 95 97 var id = b.match(/id=['"]([^'"]+)/i), cls = b.match(/class=['"]([^'"]+)/i); 96 98 var w = c.match(/width=['"]([0-9]+)/); … … 102 104 if ( ! w || ! cap ) return c; 103 105 cls = cls.match(/align[^ '"]+/) || 'alignnone'; 106 cap = cap.replace(/<\S[^<>]*>/gi, '').replace(/'/g, ''').replace(/"/g, '"'); 104 107 105 108 return '[wp_caption id="'+id+'" align="'+cls+'" width="'+w+'" caption="'+cap+'"]'+c+'[/wp_caption]'; trunk/wp-includes/js/tinymce/tiny_mce_config.php
r1355 r1360 223 223 if ( $disk_cache ) { 224 224 225 $cacheKey = apply_filters('tiny_mce_version', '2008070 6');225 $cacheKey = apply_filters('tiny_mce_version', '20080708'); 226 226 227 227 foreach ( $initArray as $v ) trunk/wp-includes/media.php
r1355 r1360 351 351 } 352 352 353 add_shortcode('wp_caption', ' wp_caption_shortcode');354 355 function wp_caption_shortcode($attr, $content = null) {353 add_shortcode('wp_caption', 'img_caption_shortcode'); 354 355 function img_caption_shortcode($attr, $content = null) { 356 356 357 357 // Allow plugins/themes to override the default caption template. 358 $output = apply_filters(' wp_caption_shortcode', '', $attr, $content);358 $output = apply_filters('img_caption_shortcode', '', $attr, $content); 359 359 if ( $output != '' ) 360 360 return $output; … … 372 372 if ( $id ) $id = 'id="' . $id . '" '; 373 373 374 return '<d l ' . $id . 'class="wp_caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">'375 . '<dt class="wp_caption_dt">' . $content . '</dt><dd class="wp_caption_dd">' . $caption . '</dd></dl>';374 return '<div ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">' 375 . $content . '<p class="wp-caption-text">' . $caption . '</p></div>'; 376 376 } 377 377 trunk/wp-includes/script-loader.php
r1355 r1360 38 38 39 39 // Modify this version when tinyMCE plugins are changed. 40 $mce_version = apply_filters('tiny_mce_version', '2008070 6');40 $mce_version = apply_filters('tiny_mce_version', '20080708'); 41 41 $scripts->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_config.php', array('editor_functions'), $mce_version ); 42 42 … … 228 228 $styles->add( 'widgets', '/wp-admin/css/widgets.css' ); 229 229 $styles->add( 'dashboard', '/wp-admin/css/dashboard.css' ); 230 $styles->add( 'install', '/wp-admin/css/install.css' );230 $styles->add( 'install', '/wp-admin/css/install.css', array(), '20080708' ); 231 231 $styles->add( 'theme-editor', '/wp-admin/css/theme-editor.css' ); 232 232 $styles->add( 'press-this', '/wp-admin/css/press-this.css', array(), '20080704' ); trunk/wp-includes/version.php
r1358 r1360 18 18 $wp_db_version = 8201; 19 19 20 $wpmu_version = '2.6 .beta1';20 $wpmu_version = '2.6-beta1'; 21 21 ?>
