Changeset 8677
- Timestamp:
- 08/19/2008 11:01:36 PM (18 years ago)
- Location:
- branches/crazyhorse/wp-admin
- Files:
-
- 9 edited
-
css/colors-classic.css (modified) (1 diff)
-
css/colors-fresh.css (modified) (1 diff)
-
edit-attachment-rows.php (modified) (1 diff)
-
edit-form-advanced.php (modified) (8 diffs)
-
edit-post-rows.php (modified) (1 diff)
-
includes/media.php (modified) (24 diffs)
-
includes/template.php (modified) (5 diffs)
-
menu.php (modified) (1 diff)
-
wp-admin.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/crazyhorse/wp-admin/css/colors-classic.css
r8620 r8677 341 341 } 342 342 343 <<<<<<< .working 344 div#media-upload-header { 345 ======= 346 #adminmenu, div#media-upload-header, div#plugin-information-header { 347 >>>>>>> .merge-right.r8619 343 div#media-upload-header, div#plugin-information-header { 348 344 background-color: #14568a; 349 345 border-bottom-color: #07273e; -
branches/crazyhorse/wp-admin/css/colors-fresh.css
r8620 r8677 321 321 } 322 322 323 <<<<<<< .working 324 div#media-upload-header { 325 ======= 326 #adminmenu, div#media-upload-header, div#plugin-information-header { 327 >>>>>>> .merge-right.r8619 323 div#media-upload-header, div#plugin-information-header { 328 324 background-color: #e4f2fd; 329 325 border-bottom-color: #c6d9e9; -
branches/crazyhorse/wp-admin/edit-attachment-rows.php
r8620 r8677 128 128 } 129 129 ?> 130 <<<<<<< .working 131 <td><strong><a href="post.php?action=edit&post=<?php echo $post->post_parent; ?>"><?php echo $title ?></a></strong>, <?php echo get_the_time(__('Y/m/d')); ?></td> 132 ======= 133 <td><strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"><?php echo $title ?></a></strong></td> 134 >>>>>>> .merge-right.r8619 130 <td><strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>"><?php echo $title ?></a></strong>, <?php echo get_the_time(__('Y/m/d')); ?></td> 135 131 <?php 136 132 } else { -
branches/crazyhorse/wp-admin/edit-form-advanced.php
r8620 r8677 51 51 <?php 52 52 53 <<<<<<< .working54 53 // All meta boxes should be defined and added before the first do_meta_boxes() call (or potentially during the do_meta_boxes action). 55 =======56 if ( 0 == $post_ID)57 wp_nonce_field('add-post');58 else59 wp_nonce_field('update-post_' . $post_ID);60 >>>>>>> .merge-right.r861961 54 62 55 function post_tags_meta_box($post) { … … 69 62 add_meta_box('tagsdiv', __('Tags'), 'post_tags_meta_box', 'post', 'side', 'core'); 70 63 71 <<<<<<< .working72 64 //crazyhorse 73 65 function post_media_meta_box($post) { 74 66 echo "<p><small><em>This feature isn't fully functional in this prototype.</em></small></p>"; 75 =======76 <input type="hidden" id="user-id" name="user_ID" value="<?php echo (int) $user_ID ?>" />77 <input type="hidden" id="hiddenaction" name="action" value="<?php echo $form_action ?>" />78 <input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" />79 <input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" />80 <input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" />81 <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" />82 <input name="referredby" type="hidden" id="referredby" value="<?php83 if ( !empty($_REQUEST['popupurl']) )84 echo clean_url(stripslashes($_REQUEST['popupurl']));85 else if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) == $post_ID )86 echo 'redo';87 else88 echo clean_url(stripslashes(wp_get_referer()));89 ?>" />90 <?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>91 >>>>>>> .merge-right.r861992 67 93 68 if ( empty( $post->ID ) ) … … 115 90 echo "<h4>$att->post_title</h4>"; 116 91 117 <<<<<<< .working118 92 echo "<a href='#' class='no-crazy'>Remove</a> | "; 119 93 echo "<a href='media.php?action=edit&attachment_id=$att->ID'>Edit</a>"; 120 ======= 121 <p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p> 122 <p> 123 <select name='post_status' id='post_status' tabindex='4'> 124 <?php 125 // only show the publish menu item if they are allowed to publish posts or they are allowed to edit this post (accounts for 'edit_published_posts' capability) 126 if ( current_user_can('publish_posts') OR ( $post->post_status == 'publish' AND current_user_can('edit_post', $post->ID) ) ) : 127 ?> 128 <option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option> 129 <?php if ( 'future' == $post->post_status ) : ?> 130 <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option> 131 <?php endif; ?> 132 <?php endif; ?> 133 <option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option> 134 <option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Unpublished') ?></option> 135 </select> 136 </p> 137 >>>>>>> .merge-right.r8619 138 139 <<<<<<< .working 94 140 95 echo "<br class='clear' />"; 141 =======142 <?php if ( current_user_can( 'publish_posts' ) ) : ?>143 <p id="private-checkbox"><label for="post_status_private" class="selectit"><input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex="4" /> <?php _e('Keep this post private') ?></label></p>144 <?php if ( current_user_can( 'edit_others_posts' ) ) : ?>145 <p id="sticky-checkbox"><label for="sticky" class="selectit"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked(is_sticky($post->ID), true); ?> tabindex="4" /> <?php _e('Stick this post to the front page') ?></label></p>146 <?php endif; ?>147 <?php endif; ?>148 <?php149 if ( 0 != $post_ID ) {150 if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date151 $stamp = __('Scheduled for:<br />%1$s at %2$s');152 } else if ( 'publish' == $post->post_status ) { // already published153 $stamp = __('Published on:<br />%1$s at %2$s');154 } else if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified155 $stamp = __('Publish immediately');156 } else { // draft, 1 or more saves, date specified157 $stamp = __('Publish on:<br />%1$s at %2$s');158 >>>>>>> .merge-right.r8619159 96 } 160 97 … … 163 100 } 164 101 add_meta_box( 'mediadiv', __('Media added to this Post' ), 'post_media_meta_box', 'post', 'side', 'core' ); 165 166 <<<<<<< .working167 =======168 if ( ( 'edit' == $action) && current_user_can('delete_post', $post_ID) )169 echo "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&post=$post_ID", 'delete-post_' . $post_ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete post') . "</a>";170 ?>171 <br class="clear" />172 <?php if ( 0 != $post_ID ): ?>173 <?php if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) {174 $last_user = get_userdata($last_id);175 printf(__('Last edited by %1$s on %2$s at %3$s'), wp_specialchars( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));176 } else {177 printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));178 }179 ?>180 <br class="clear" />181 <?php endif; ?>182 <span id="autosave"></span>183 <span id="wp-word-count"></span>184 </p>185 >>>>>>> .merge-right.r8619186 187 188 <<<<<<< .working189 =======190 <ul>191 <?php if ( 0 != $post_ID ): ?>192 <li><a href="edit.php?p=<?php echo $post_ID ?>"><?php _e('See Comments on this Post') ?></a></li>193 <?php endif; ?>194 <li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li>195 <li><a href="edit.php"><?php _e('Manage All Posts') ?></a></li>196 <li><a href="categories.php"><?php _e('Manage All Categories') ?></a></li>197 <li><a href="edit-tags.php"><?php _e('Manage All Tags') ?></a></li>198 <li><a href="edit.php?post_status=draft"><?php _e('View Drafts'); ?></a></li>199 <?php do_action('post_relatedlinks_list'); ?>200 </ul>201 >>>>>>> .merge-right.r8619202 102 203 103 function post_categories_meta_box($post) { … … 333 233 function post_password_meta_box($post) { 334 234 ?> 335 <<<<<<< .working336 235 <p> 337 236 <input id="post_status_private" name="post_status" type="checkbox" value="private" <?php checked($post->post_status, 'private'); ?> tabindex="4" /> <?php _e('Keep this post private') ?></label> … … 339 238 <h4><?php _e( 'Post Password' ); ?></h4> 340 239 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></p> 341 =======342 <p><label class="hidden" for="post_password"><?php _e('Password Protect This Post') ?></label><input name="post_password" type="text" size="25" id="post_password" value="<?php if ( isset( $post->post_password ) ) : echo attribute_escape( $post->post_password ); endif; ?>" /></p>343 >>>>>>> .merge-right.r8619344 240 <p><?php _e('Setting a password will require people who visit your blog to enter the above password to view this post and its comments.'); ?></p> 345 241 <?php … … 410 306 <?php 411 307 412 if ( !isset($post_ID) ||0 == $post_ID)308 if ( 0 == $post_ID) 413 309 wp_nonce_field('add-post'); 414 310 else … … 429 325 <input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" /> 430 326 <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" /> 431 <input name="referredby" type="hidden" id="referredby" value="<?php 432 if ( !empty($_REQUEST['popupurl']) ) 433 echo clean_url(stripslashes($_REQUEST['popupurl'])); 434 else if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) === $post_ID ) 435 echo 'redo'; 436 else 437 echo clean_url(stripslashes(wp_get_referer())); 438 ?>" /> 327 <input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" /> 439 328 <?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?> 440 329 -
branches/crazyhorse/wp-admin/edit-post-rows.php
r8620 r8677 85 85 case 'title': 86 86 ?> 87 <<<<<<< .working 88 <td class="post-title"><strong><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><a class="row-title" href="post.php?action=edit&post=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong> 89 ======= 90 <td><strong><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong> 91 <?php if ( !empty($post->post_password) ) { _e(' — <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' — <strong>Private</strong>'); } ?></td> 92 >>>>>>> .merge-right.r8619 87 <td class="post-title"><strong><?php if ( current_user_can( 'edit_post', $post->ID ) ) { ?><a class="row-title" href="<?php echo $edit_link; ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a><?php } else { echo $title; } ?></strong> 93 88 <?php 94 89 if ( !empty($post->post_password) ) { _e(' — <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' — <strong>Private</strong>'); } -
branches/crazyhorse/wp-admin/includes/media.php
r8620 r8677 68 68 function image_add_caption( $html, $id, $alt, $title, $align, $url, $size ) { 69 69 70 <<<<<<< .working71 if ( empty($alt) ) return $html;72 =======73 70 if ( empty($alt) || apply_filters( 'disable_captions', '' ) ) return $html; 74 >>>>>>> .merge-right.r861975 71 $id = ( 0 < (int) $id ) ? 'attachment_' . $id : ''; 76 72 … … 182 178 return $id; 183 179 } 180 184 181 185 182 // wrap iframe content (produced by $content_func) in a doctype, html head/body etc … … 246 243 printf($context, $out); 247 244 } 248 //add_action( 'media_buttons', 'media_buttons' ); // crazyhorse 245 add_action( 'media_buttons', 'media_buttons' ); 249 246 add_action('media_upload_media', 'media_upload_handler'); 250 247 … … 252 249 check_admin_referer('media-form'); 253 250 254 if ( !empty($_POST['attachments']) ) 255 foreach ( $_POST['attachments'] as $attachment_id => $attachment ) { 256 $post = $_post = get_post($attachment_id, ARRAY_A); 257 if ( isset($attachment['post_content']) ) 258 $post['post_content'] = $attachment['post_content']; 259 if ( isset($attachment['post_title']) ) 260 $post['post_title'] = $attachment['post_title']; 261 if ( isset($attachment['post_excerpt']) ) 262 $post['post_excerpt'] = $attachment['post_excerpt']; 263 if ( isset($attachment['menu_order']) ) 264 $post['menu_order'] = $attachment['menu_order']; 265 266 $post = apply_filters('attachment_fields_to_save', $post, $attachment); 267 268 if ( isset($post['errors']) ) { 269 $errors[$attachment_id] = $post['errors']; 270 unset($post['errors']); 271 } 272 273 if ( $post != $_post ) 274 wp_update_post($post); 275 276 foreach ( get_attachment_taxonomies($post) as $t ) 277 if ( isset($attachment[$t]) ) 278 wp_set_object_terms($attachment_id, array_map('trim', preg_split('/,+/', $attachment[$t])), $t, false); 279 } 251 if ( !empty($_POST['attachments']) ) foreach ( $_POST['attachments'] as $attachment_id => $attachment ) { 252 $post = $_post = get_post($attachment_id, ARRAY_A); 253 if ( isset($attachment['post_content']) ) 254 $post['post_content'] = $attachment['post_content']; 255 if ( isset($attachment['post_title']) ) 256 $post['post_title'] = $attachment['post_title']; 257 if ( isset($attachment['post_excerpt']) ) 258 $post['post_excerpt'] = $attachment['post_excerpt']; 259 if ( isset($attachment['menu_order']) ) 260 $post['menu_order'] = $attachment['menu_order']; 261 262 $post = apply_filters('attachment_fields_to_save', $post, $attachment); 263 264 if ( isset($post['errors']) ) { 265 $errors[$attachment_id] = $post['errors']; 266 unset($post['errors']); 267 } 268 269 if ( $post != $_post ) 270 wp_update_post($post); 271 272 foreach ( get_attachment_taxonomies($post) as $t ) 273 if ( isset($attachment[$t]) ) 274 wp_set_object_terms($attachment_id, array_map('trim', preg_split('/,+/', $attachment[$t])), $t, false); 275 } 280 276 281 277 if ( isset($_POST['insert-gallery']) ) … … 299 295 } 300 296 301 // crazyhorse302 297 function media_upload_image() { 303 <<<<<<< .working304 305 =======306 298 $errors = array(); 307 299 $id = 0; 308 300 309 >>>>>>> .merge-right.r8619310 301 if ( isset($_POST['html-upload']) && !empty($_FILES) ) { 311 302 // Upload File button was clicked 312 if ( $_FILES['async-upload']['name'] == '' )313 return wp_iframe( 'media_error_nofile' );314 315 303 $id = media_handle_upload('async-upload', $_REQUEST['post_id']); 316 304 unset($_FILES); … … 349 337 } 350 338 351 return wp_iframe( 'media_ edit_single_form', $id, $errors);339 return wp_iframe( 'media_upload_type_form', 'image', $errors, $id ); 352 340 } 353 341 … … 533 521 } 534 522 535 <<<<<<< .working 536 // crazyhorse 537 ======= 523 // produce HTML for the image alignment radio buttons with the specified one checked 524 function image_align_input_fields($post, $checked='') { 525 526 $alignments = array('none' => 'None', 'left' => 'Left', 'center' => 'Center', 'right' => 'Right'); 527 if ( !array_key_exists($checked, $alignments) ) 528 $checked = 'none'; 529 530 $out = array(); 531 foreach ($alignments as $name => $label) { 532 533 $out[] = "<input type='radio' name='attachments[{$post->ID}][align]' id='image-align-{$name}-{$post->ID}' value='none'". 534 ( $checked == $name ? " checked='checked'" : "" ) . 535 " /><label for='image-align-{$name}-{$post->ID}' class='align image-align-{$name}-label'>" . __($label) . "</label>"; 536 } 537 return join("\n", $out); 538 } 539 540 // produce HTML for the size radio buttons with the specified one checked 538 541 function image_size_input_fields($post, $checked='') { 539 542 540 543 // get a list of the actual pixel dimensions of each possible intermediate version of this image 541 $sizes = array();542 544 $size_names = array('thumbnail' => 'Thumbnail', 'medium' => 'Medium', 'large' => 'Large', 'full' => 'Full size'); 543 545 … … 548 550 $enabled = ( $downsize[3] || 'full' == $size ); 549 551 $css_id = "image-size-{$size}-{$post->ID}"; 552 // if this size is the default but that's not available, don't select it 553 if ( $checked && !$enabled ) 554 $checked = ''; 550 555 // if $checked was not specified, default to the first available size that's bigger than a thumbnail 551 556 if ( !$checked && $enabled && 'thumbnail' != $size ) … … 571 576 } 572 577 573 >>>>>>> .merge-right.r8619 578 // produce HTML for the Link URL buttons with the default link type as specified 579 function image_link_input_fields($post, $url_type='') { 580 581 $file = wp_get_attachment_url($post->ID); 582 $link = get_attachment_link($post->ID); 583 584 $url = ''; 585 if ( $url_type == 'file' ) 586 $url = $file; 587 elseif ( $url_type == 'post' ) 588 $url = $link; 589 590 return "<input type='text' name='attachments[$post->ID][url]' value='" . attribute_escape($url) . "' /><br /> 591 <button type='button' class='button url-$post->ID' value=''>" . __('None') . "</button> 592 <button type='button' class='button url-$post->ID' value='" . attribute_escape($file) . "'>" . __('File URL') . "</button> 593 <button type='button' class='button url-$post->ID' value='" . attribute_escape($link) . "'>" . __('Post URL') . "</button> 594 <script type='text/javascript'> 595 jQuery('button.url-$post->ID').bind('click', function(){jQuery(this).siblings('input').val(this.value);}); 596 </script>\n"; 597 } 598 574 599 function image_attachment_fields_to_edit($form_fields, $post) { 575 600 if ( substr($post->post_mime_type, 0, 5) == 'image' ) { 576 601 $form_fields['post_title']['required'] = true; 577 602 578 <<<<<<< .working579 $form_fields['post_excerpt']['label'] = __('Caption');580 $form_fields['post_excerpt']['helps'][] = __('Alternate text (e.g. Blue skies)');581 =======582 603 $form_fields['post_excerpt']['label'] = __('Caption'); 583 604 $form_fields['post_excerpt']['helps'][] = __('Also used as alternate text for the image'); 584 >>>>>>> .merge-right.r8619 585 586 // $form_fields['post_content']['label'] = __('Description'); 587 588 <<<<<<< .working 589 // $thumb = wp_get_attachment_thumb_url($post->ID); 590 591 ======= 592 >>>>>>> .merge-right.r8619 605 606 $form_fields['post_content']['label'] = __('Description'); 607 593 608 $form_fields['align'] = array( 594 609 'label' => __('Alignment'), 595 610 'input' => 'html', 596 'html' => " 597 <input type='radio' name='attachments[$post->ID][align]' id='image-align-none-$post->ID' value='none' checked='checked' /> 598 <label for='image-align-none-$post->ID' class='align image-align-none-label'>" . __('None') . "</label> 599 <input type='radio' name='attachments[$post->ID][align]' id='image-align-left-$post->ID' value='left' /> 600 <label for='image-align-left-$post->ID' class='align image-align-left-label'>" . __('Left') . "</label> 601 <input type='radio' name='attachments[$post->ID][align]' id='image-align-center-$post->ID' value='center' /> 602 <label for='image-align-center-$post->ID' class='align image-align-center-label'>" . __('Center') . "</label> 603 <input type='radio' name='attachments[$post->ID][align]' id='image-align-right-$post->ID' value='right' /> 604 <label for='image-align-right-$post->ID' class='align image-align-right-label'>" . __('Right') . "</label>\n", 611 'html' => image_align_input_fields($post, get_option('image_default_align')), 605 612 ); 606 <<<<<<< .working 607 /* 608 $form_fields['image-size'] = array( 609 'label' => __('Size'), 610 'input' => 'html', 611 'html' => " 612 " . ( $thumb ? "<input type='radio' name='attachments[$post->ID][image-size]' id='image-size-thumb-$post->ID' value='thumbnail' /> 613 <label for='image-size-thumb-$post->ID'>" . __('Thumbnail') . "</label> 614 " : '' ) . "<input type='radio' name='attachments[$post->ID][image-size]' id='image-size-medium-$post->ID' value='medium' checked='checked' /> 615 <label for='image-size-medium-$post->ID'>" . __('Medium') . "</label> 616 <input type='radio' name='attachments[$post->ID][image-size]' id='image-size-full-$post->ID' value='full' /> 617 <label for='image-size-full-$post->ID'>" . __('Full size') . "</label>", 618 ); 619 ======= 620 $form_fields['image-size'] = image_size_input_fields($post); 621 >>>>>>> .merge-right.r8619 622 */ 613 614 $form_fields['image-size'] = image_size_input_fields($post, get_option('image_default_size')); 623 615 } 624 616 return $form_fields; … … 670 662 add_filter('media_send_to_editor', 'image_media_send_to_editor', 10, 3); 671 663 672 // crazyhorse673 664 function get_attachment_fields_to_edit($post, $errors = null) { 674 665 if ( is_int($post) ) … … 679 670 $edit_post = sanitize_post($post, 'edit'); 680 671 $file = wp_get_attachment_url($post->ID); 681 //$link = get_attachment_link($post->ID);672 $link = get_attachment_link($post->ID); 682 673 683 674 $form_fields = array( 684 675 'post_title' => array( 685 676 'label' => __('Title'), 686 'value' => $edit_post->post_title 677 'value' => $edit_post->post_title, 687 678 ), 688 679 'post_excerpt' => array( 689 <<<<<<< .working690 'label' => __('Caption'),691 'value' => $edit_post->post_excerpt692 =======693 680 'label' => __('Caption'), 694 681 'value' => $edit_post->post_excerpt, 695 >>>>>>> .merge-right.r8619696 682 ), 697 /*698 683 'post_content' => array( 699 684 'label' => __('Description'), … … 701 686 'input' => 'textarea', 702 687 ), 703 */704 688 'url' => array( 705 'label' => __('Path'), 706 'value' => attribute_escape($file) 707 ) 708 /* 689 'label' => __('Link URL'), 690 'input' => 'html', 691 'html' => image_link_input_fields($post, get_option('image_default_link_type')), 692 'helps' => __('Enter a link URL or click above for presets.'), 693 ), 709 694 'menu_order' => array( 710 695 'label' => __('Order'), 711 696 'value' => $edit_post->menu_order 712 ), */697 ), 713 698 ); 714 /* 699 715 700 foreach ( get_attachment_taxonomies($post) as $taxonomy ) { 716 701 $t = (array) get_taxonomy($taxonomy); … … 732 717 $form_fields[$taxonomy] = $t; 733 718 } 734 */ 719 735 720 // Merge default fields with their errors, so any key passed with the error (e.g. 'error', 'helps', 'value') will replace the default 736 721 // The recursive merge is easily traversed with array casting: foreach( (array) $things as $thing ) … … 742 727 } 743 728 744 // crazyhorse 745 function get_media_items( $post_id ) { 729 function get_media_items( $post_id, $errors ) { 746 730 if ( $post_id ) { 747 731 $post = get_post($post_id); … … 759 743 return ''; 760 744 761 $ins = isset($_REQUEST['ins']) ? 1 : 0;762 763 745 foreach ( $attachments as $id => $attachment ) 764 if ( $item = get_media_item_link( $id, $ins ) ) 765 $output .= $item; 766 767 // $output .= "\n<div id='media-item-$id' class='media-item child-of-$attachment->post_parent'><div class='progress'><div class='bar'></div></div><div id='media-upload-error-$id'></div>$item\n</div>"; 746 if ( $item = get_media_item( $id, array( 'errors' => isset($errors[$id]) ? $errors[$id] : null) ) ) 747 $output .= "\n<div id='media-item-$id' class='media-item child-of-$attachment->post_parent preloaded'><div class='progress'><div class='bar'></div></div><div id='media-upload-error-$id'></div><div class='filename'></div>$item\n</div>"; 768 748 769 749 return $output; 770 }771 772 // crazyhorse773 function get_media_item_link( $attachment_id, $ins ) {774 775 if ( ( $attachment_id = intval($attachment_id) ) && $thumb_url = get_attachment_icon_src( $attachment_id ) )776 $thumb_url = $thumb_url[0];777 else778 return false;779 780 $post = get_post($attachment_id);781 $mime = $post->post_mime_type;782 783 if ( false !== strpos($mime, 'image') ) $type = 'image';784 elseif ( false !== strpos($mime, 'audio') ) $type = 'audio';785 elseif ( false !== strpos($mime, 'video') ) $type = 'video';786 else $type = 'file';787 788 $ins = $ins ? '&ins=1' : '';789 $filename = basename($post->guid);790 $title = attribute_escape($post->post_title);791 $link = 'media-upload.php?att_id='.$attachment_id.'&tab=single&type='.$type.$ins;792 793 $item = '<div class="filelink">794 <a href="'.$link.'">795 <img class="thumbnail" src="'.$thumb_url.'" alt="'.$title.'" title="'.$title.'" /></a>796 <p class="filelink-caption">'.$filename.'</p></div>'."\n";797 798 799 return $item;800 }801 802 // crazyhorse803 function media_edit_single_form($attachment_id = 0, $errors = null) {804 global $redir_tab;805 806 $redir_tab = 'gallery';807 $ins = isset($_REQUEST['ins']) ? true : false;808 809 if ( ! $attachment_id )810 $attachment_id = (int) $_REQUEST['att_id'];811 812 $class = '';813 if ( isset($_REQUEST['type']) )814 $class = ' class="type-'.$_REQUEST['type'].'"';815 816 $post_id = isset($_REQUEST['post_id']) ? intval($_REQUEST['post_id']) : 0;817 $form_action_url = admin_url("media-upload.php?type=single&tab=gallery&post_id=$post_id");818 819 $post = get_post($attachment_id);820 $filename = basename($post->guid);821 822 media_upload_header();823 824 if ( $errors ) :825 ?>826 827 <div id="media-upload-notice">828 <?php if (isset($errors['upload_notice']) ) { ?>829 <?php echo $errors['upload_notice']; ?>830 <?php } ?>831 </div>832 <div id="media-upload-error">833 <?php if (isset($errors['upload_error']) && is_wp_error($errors['upload_error'])) { ?>834 <?php echo $errors['upload_error']->get_error_message(); ?>835 <?php } ?>836 </div>837 838 <?php839 return;840 endif; // errors841 ?>842 843 <form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form validate" id="gallery-form">844 <?php wp_nonce_field('media-form'); ?>845 846 <div id="att-info"><p<?php echo $class; ?>>847 <?php echo $filename; ?> 848 (<a href="<?php echo wp_nonce_url("post.php?action=delete-post&post=$attachment_id", 'delete-post_' . $attachment_id); ?>" class="del-link" onclick="return confirm('<?php echo js_escape( __("You are about to delete this file\n 'Cancel' to stop, 'OK' to delete.")); ?>');"><?php _e('Remove'); ?></a> | <a href="media-upload.php?tab=gallery<?php if ( $ins ) echo '&ins=1'; ?>"><?php _e('Change'); ?></a>)849 </p></div>850 851 <?php echo media_edit_single($attachment_id); ?>852 853 <p class="ml-submit">854 <?php if ( $ins ) { ?>855 <input type="submit" class="button" name="send[<?php echo $attachment_id; ?>]" value="<?php echo attribute_escape( __( 'Insert into Post' ) ) ?>" />856 <input type="hidden" name="ins" value="1" />857 <?php } ?>858 859 <input type="submit" class="button-link button" name="save" value="<?php echo attribute_escape( __( 'Save and Add Another' ) ); ?>" />860 861 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />862 <input type="hidden" name="type" value="<?php echo attribute_escape( $GLOBALS['type'] ); ?>" />863 <input type="hidden" name="tab" value="<?php echo attribute_escape( $GLOBALS['tab'] ); ?>" />864 </p>865 </form>866 <?php867 }868 869 // crazyhorse870 function media_edit_single($attachment_id = null) {871 global $post_mime_types;872 873 $post = get_post($attachment_id);874 875 $filename = basename($post->guid);876 $title_label = __('Title');877 $title = attribute_escape($post->post_title);878 879 if ( isset($post_mime_types) ) {880 $keys = array_keys(wp_match_mime_types(array_keys($post_mime_types), $post->post_mime_type));881 $type = array_shift($keys);882 $type = "<input type='hidden' id='type-of-$attachment_id' value='" . attribute_escape( $type ) . "' />";883 }884 885 $form_fields = get_attachment_fields_to_edit($post);886 887 $defaults = array(888 'input' => 'text',889 'required' => false,890 'value' => '',891 'extra_rows' => array(),892 );893 894 $hidden_fields = array();895 896 $item = "<table class='slidetoggle describe $class'>897 <thead class='media-item-info'>";898 899 foreach ( $form_fields as $id => $field ) {900 if ( $id{0} == '_' )901 continue;902 903 if ( !empty($field['tr']) ) {904 $item .= $field['tr'];905 continue;906 }907 908 $field = array_merge($defaults, $field);909 $name = "attachments[$attachment_id][$id]";910 911 if ( $field['input'] == 'hidden' ) {912 $hidden_fields[$name] = $field['value'];913 continue;914 }915 916 $required = $field['required'] ? '<abbr title="required" class="required">*</abbr>' : '';917 $aria_required = $field['required'] ? " aria-required='true' " : '';918 $class = $id;919 $class .= $field['required'] ? ' form-required' : '';920 921 $item .= "\t\t<tr class='$class'>\n\t\t\t<th valign='top' scope='row' class='label'><label for='$name'><span class='alignleft'>{$field['label']}</span><span class='alignright'>$required</span><br class='clear' /></label></th>\n\t\t\t<td class='field'>";922 if ( !empty($field[$field['input']]) )923 $item .= $field[$field['input']];924 elseif ( $field['input'] == 'textarea' ) {925 $item .= "<textarea type='text' id='$name' name='$name'>" . attribute_escape( $field['value'] ) . $aria_required . "</textarea>";926 } else {927 $item .= "<input type='text' id='$name' name='$name' value='" . attribute_escape( $field['value'] ) . "'" . $aria_required . "/>";928 }929 if ( !empty($field['helps']) )930 $item .= "<p class='help'>" . join( "</p>\n<p class='help'>", array_unique((array) $field['helps']) ) . '</p>';931 $item .= "</td>\n\t\t</tr>\n";932 933 $extra_rows = array();934 935 if ( !empty($field['errors']) )936 foreach ( array_unique((array) $field['errors']) as $error )937 $extra_rows['error'][] = $error;938 939 if ( !empty($field['extra_rows']) )940 foreach ( $field['extra_rows'] as $class => $rows )941 foreach ( (array) $rows as $html )942 $extra_rows[$class][] = $html;943 944 foreach ( $extra_rows as $class => $rows )945 foreach ( $rows as $html )946 $item .= "\t\t<tr><td></td><td class='$class'>$html</td></tr>\n";947 }948 949 if ( !empty($form_fields['_final']) )950 $item .= "\t\t<tr class='final'><td colspan='2'>{$form_fields['_final']}</td></tr>\n";951 $item .= "\t</tbody>\n";952 $item .= "\t</table>\n";953 954 foreach ( $hidden_fields as $name => $value )955 $item .= "\t<input type='hidden' name='$name' id='$name' value='" . attribute_escape( $value ) . "' />\n";956 957 return $item;958 959 750 } 960 751 … … 1126 917 ?> 1127 918 <script type="text/javascript">post_id = <?php echo intval($_REQUEST['post_id']); ?>;</script> 919 <div id="media-upload-header"> 920 <?php the_media_upload_tabs(); ?> 921 </div> 1128 922 <?php 1129 923 } … … 1279 1073 if ( f.alt.value ) { 1280 1074 alt = f.alt.value.replace(/['"<>]+/g, ''); 1281 <<<<<<< .working1282 =======1283 1075 <?php if ( ! apply_filters( 'disable_captions', '' ) ) { ?> 1284 >>>>>>> .merge-right.r86191285 1076 caption = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>'); 1077 <?php } ?> 1286 1078 } 1287 1079 … … 1392 1184 } 1393 1185 1394 // crazyhorse1395 1186 function media_upload_library_form($errors) { 1396 1187 global $wpdb, $wp_query, $wp_locale, $type, $tab, $post_mime_types; … … 1398 1189 media_upload_header(); 1399 1190 1400 $post_id = i sset($_REQUEST['post_id']) ? intval($_REQUEST['post_id']) : 0;1401 1402 $form_action_url = admin_url("media-upload.php?type= single&tab=library&post_id=$post_id");1191 $post_id = intval($_REQUEST['post_id']); 1192 1193 $form_action_url = admin_url("media-upload.php?type={$GLOBALS['type']}&tab=library&post_id=$post_id"); 1403 1194 1404 1195 $_GET['paged'] = isset( $_GET['paged'] ) ? intval($_GET['paged']) : 0; … … 1408 1199 if ( $start < 1 ) 1409 1200 $start = 0; 1410 add_filter( 'post_limits', $limit_filter = create_function( '$a', "return 'LIMIT $start, 8';" ) );1201 add_filter( 'post_limits', $limit_filter = create_function( '$a', "return 'LIMIT $start, 10';" ) ); 1411 1202 1412 1203 list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); 1413 $ins = isset($_REQUEST['ins']) ? '<input type="hidden" name="ins" value="1" />' : ''; 1204 1414 1205 ?> 1415 1206 1416 <div id="html-upload-ui"> 1417 <form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form validate"> 1418 <input type="file" name="async-upload" id="async-upload" /> 1419 <input type="submit" class="button" name="html-upload" value="<?php echo attribute_escape(__('Upload')); ?>" /> 1420 1421 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> 1422 <?php echo $ins; ?> 1423 <?php wp_nonce_field('media-form'); ?> 1424 </form> 1207 <form id="filter" action="" method="get"> 1208 <input type="hidden" name="type" value="<?php echo attribute_escape( $type ); ?>" /> 1209 <input type="hidden" name="tab" value="<?php echo attribute_escape( $tab ); ?>" /> 1210 <input type="hidden" name="post_id" value="<?php echo (int) $post_id; ?>" /> 1211 <input type="hidden" name="post_mime_type" value="<?php echo attribute_escape( $_GET['post_mime_type'] ); ?>" /> 1212 1213 <div id="search-filter"> 1214 <label class="hidden" for="post-search-input"><?php _e('Search Media');?>:</label> 1215 <input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" /> 1216 <input type="submit" value="<?php echo attribute_escape( __( 'Search Media' ) ); ?>" class="button" /> 1425 1217 </div> 1426 1218 1427 <?php if ( 'false' !== $_GET['library'] ) : ?> 1428 1429 <div id="html-upload-help"><?php _e('Or select from your Media Library'); ?></div> 1219 <ul class="subsubsub"> 1220 <?php 1221 $type_links = array(); 1222 $_num_posts = (array) wp_count_attachments(); 1223 $matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts)); 1224 foreach ( $matches as $_type => $reals ) 1225 foreach ( $reals as $real ) 1226 $num_posts[$_type] += $_num_posts[$real]; 1227 // If available type specified by media button clicked, filter by that type 1228 if ( empty($_GET['post_mime_type']) && !empty($num_posts[$type]) ) { 1229 $_GET['post_mime_type'] = $type; 1230 list($post_mime_types, $avail_post_mime_types) = wp_edit_attachments_query(); 1231 } 1232 if ( empty($_GET['post_mime_type']) || $_GET['post_mime_type'] == 'all' ) 1233 $class = ' class="current"'; 1234 $type_links[] = "<li><a href='" . clean_url(add_query_arg(array('post_mime_type'=>'all', 'paged'=>false, 'm'=>false))) . "'$class>".__('All Types')."</a>"; 1235 foreach ( $post_mime_types as $mime_type => $label ) { 1236 $class = ''; 1237 1238 if ( !wp_match_mime_types($mime_type, $avail_post_mime_types) ) 1239 continue; 1240 1241 if ( wp_match_mime_types($mime_type, $_GET['post_mime_type']) ) 1242 $class = ' class="current"'; 1243 1244 $type_links[] = "<li><a href='" . clean_url(add_query_arg(array('post_mime_type'=>$mime_type, 'paged'=>false))) . "'$class>" . sprintf(__ngettext($label[2][0], $label[2][1], $num_posts[$mime_type]), "<span id='$mime_type-counter'>" . number_format_i18n( $num_posts[$mime_type] ) . '</span>') . '</a>'; 1245 } 1246 echo implode(' | </li>', $type_links) . '</li>'; 1247 unset($type_links); 1248 ?> 1249 </ul> 1430 1250 1431 1251 <div class="tablenav"> 1252 1432 1253 <?php 1433 1254 $page_links = paginate_links( array( … … 1441 1262 echo "<div class='tablenav-pages'>$page_links</div>"; 1442 1263 ?> 1264 1265 <div class="alignleft"> 1266 <?php 1267 1268 $arc_query = "SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_type = 'attachment' ORDER BY post_date DESC"; 1269 1270 $arc_result = $wpdb->get_results( $arc_query ); 1271 1272 $month_count = count($arc_result); 1273 1274 if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ?> 1275 <select name='m'> 1276 <option<?php selected( @$_GET['m'], 0 ); ?> value='0'><?php _e('Show all dates'); ?></option> 1277 <?php 1278 foreach ($arc_result as $arc_row) { 1279 if ( $arc_row->yyear == 0 ) 1280 continue; 1281 $arc_row->mmonth = zeroise( $arc_row->mmonth, 2 ); 1282 1283 if ( $arc_row->yyear . $arc_row->mmonth == $_GET['m'] ) 1284 $default = ' selected="selected"'; 1285 else 1286 $default = ''; 1287 1288 echo "<option$default value='" . attribute_escape( $arc_row->yyear . $arc_row->mmonth ) . "'>"; 1289 echo wp_specialchars( $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear" ); 1290 echo "</option>\n"; 1291 } 1292 ?> 1293 </select> 1294 <?php } ?> 1295 1296 <input type="submit" id="post-query-submit" value="<?php echo attribute_escape( __( 'Filter »' ) ); ?>" class="button-secondary" /> 1297 1443 1298 </div> 1444 1299 1445 <form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form validate" id="library-form">1446 1447 <?php wp_nonce_field('media-form'); ?>1448 1449 <div id="media-items">1450 <?php echo get_media_items(null, $errors); ?>1451 1300 <br class="clear" /> 1452 1301 </div> 1453 1302 </form> 1303 1304 <form enctype="multipart/form-data" method="post" action="<?php echo attribute_escape($form_action_url); ?>" class="media-upload-form validate" id="library-form"> 1305 1306 <?php wp_nonce_field('media-form'); ?> 1307 <?php //media_upload_form( $errors ); ?> 1308 1309 <script type="text/javascript"> 1310 <!-- 1311 jQuery(function($){ 1312 var preloaded = $(".media-item.preloaded"); 1313 if ( preloaded.length > 0 ) { 1314 preloaded.each(function(){prepareMediaItem({id:this.id.replace(/[^0-9]/g, '')},'');}); 1315 updateMediaForm(); 1316 } 1317 }); 1318 --> 1319 </script> 1320 1321 <div id="media-items"> 1322 <?php echo get_media_items(null, $errors); ?> 1323 </div> 1324 <p class="ml-submit"> 1325 <input type="submit" class="button savebutton" name="save" value="<?php echo attribute_escape( __( 'Save all changes' ) ); ?>" /> 1326 <input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" /> 1327 </p> 1328 </form> 1454 1329 <?php 1455 1456 endif; // library 1457 } 1458 1459 function media_error_nofile() { ?> 1460 <div style="text-align:center;"><h3>Please choose a file to upload</h3> 1461 <p><button onclick="history.back();" class="button">Go Back</button></p></div> 1462 <?php } 1330 } 1463 1331 1464 1332 function type_form_image() { … … 1472 1340 } 1473 1341 1342 $default_align = get_option('image_default_align'); 1343 if ( empty($default_align) ) 1344 $default_align = 'none'; 1345 1474 1346 return ' 1475 1347 <table class="describe"><tbody> … … 1489 1361 <td class="field"><p><input id="title" name="title" value="" type="text" aria-required="true" /></p></td> 1490 1362 </tr> 1491 <<<<<<< .working1492 =======1493 1363 1494 1364 <tr> … … 1499 1369 <p class="help">' . $alt_help . '</p></td> 1500 1370 </tr> 1501 >>>>>>> .merge-right.r8619 1502 1503 <<<<<<< .working 1504 <tr> 1505 <th valign="top" scope="row" class="label"> 1506 <span class="alignleft"><label for="alt">' . __('Image Caption') . '</label></span> 1507 </th> 1508 <td class="field"><input id="alt" name="alt" value="" type="text" aria-required="true" /> 1509 <p class="help">' . __('Also used as alternate text for the image') . '</p></td> 1510 </tr> 1511 1512 ======= 1513 >>>>>>> .merge-right.r8619 1371 1514 1372 <tr class="align"> 1515 1373 <th valign="top" scope="row" class="label"><p><label for="align">' . __('Alignment') . '</label></p></th> 1516 1374 <td class="field"> 1517 <input name="align" id="align-none" value="alignnone" onclick="addExtImage.align=this.value" type="radio" checked="checked"/>1375 <input name="align" id="align-none" value="alignnone" onclick="addExtImage.align=this.value" type="radio"' . ($default_align == 'none' ? ' checked="checked"' : '').' /> 1518 1376 <label for="align-none" class="align image-align-none-label">' . __('None') . '</label> 1519 <input name="align" id="align-left" value="alignleft" onclick="addExtImage.align=this.value" type="radio" />1377 <input name="align" id="align-left" value="alignleft" onclick="addExtImage.align=this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '').' /> 1520 1378 <label for="align-left" class="align image-align-left-label">' . __('Left') . '</label> 1521 <input name="align" id="align-center" value="aligncenter" onclick="addExtImage.align=this.value" type="radio" />1379 <input name="align" id="align-center" value="aligncenter" onclick="addExtImage.align=this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '').' /> 1522 1380 <label for="align-center" class="align image-align-center-label">' . __('Center') . '</label> 1523 <input name="align" id="align-right" value="alignright" onclick="addExtImage.align=this.value" type="radio" />1381 <input name="align" id="align-right" value="alignright" onclick="addExtImage.align=this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '').' /> 1524 1382 <label for="align-right" class="align image-align-right-label">' . __('Right') . '</label> 1525 1383 </td> -
branches/crazyhorse/wp-admin/includes/template.php
r8620 r8677 747 747 $post_link = "<a href='" . get_comment_link() . "'>"; 748 748 $post_link .= get_the_title($comment->comment_post_ID) . '</a>'; 749 <<<<<<< .working750 =======751 752 $edit_link_start = "<a class='row-title' href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>";753 $edit_link_end = '</a>';754 >>>>>>> .merge-right.r8619755 749 } else { 756 750 $post_link = get_the_title($comment->comment_post_ID); … … 780 774 <td class="check-column"><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { ?><input type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" /><?php } ?></td> 781 775 <?php endif; ?> 782 <<<<<<< .working783 776 <td class="comment-column"> 784 777 <?php if ( 'detail' == $mode || 'single' == $mode ) comment_text(); ?> 785 778 786 =======787 <td class="comment">788 <p class="comment-author"><strong><?php echo $edit_link_start; comment_author(); echo $edit_link_end; ?></strong><br />789 <?php if ( !empty($author_url) ) : ?>790 <a href="<?php echo $author_url ?>"><?php echo $author_url_display; ?></a> |791 <?php endif; ?>792 <?php if ( current_user_can( 'edit_post', $post->ID ) ) : ?>793 <?php if ( !empty($comment->comment_author_email) ): ?>794 <?php comment_author_email_link() ?> |795 <?php endif; ?>796 <a href="edit-comments.php?s=<?php comment_author_IP() ?>&mode=detail"><?php comment_author_IP() ?></a>797 <?php endif; //current_user_can?>798 </p>799 <?php if ( 'detail' == $mode ) comment_text(); ?>800 <p><?php printf(__('From %1$s, %2$s'), $post_link, $ptime) ?></p>801 </td>802 <td><?php comment_date(__('Y/m/d')); ?></td>803 <td class="action-links">804 >>>>>>> .merge-right.r8619805 779 <?php 806 780 $actions = array(); … … 1207 1181 global $wp_meta_boxes; 1208 1182 1209 <<<<<<< .working1210 =======1211 1212 >>>>>>> .merge-right.r86191213 1183 if ( !isset($wp_meta_boxes) ) 1214 1184 $wp_meta_boxes = array(); … … 1267 1237 echo "<div id='$context-sortables' class='meta-box-sortables'>\n"; 1268 1238 1269 <<<<<<< .working1270 1239 $i = 0; 1271 1240 do { … … 1276 1245 if ( $id ) 1277 1246 add_meta_box( $id, null, null, $page, $box_context, 'sorted' ); 1278 =======1279 foreach ( array('high', 'core', 'default', 'low') as $priority ) {1280 if ( ! isset( $wp_meta_boxes[$page][$context][$priority] ) )1281 continue;1282 1283 foreach ( (array) $wp_meta_boxes[$page][$context][$priority] as $box ) {1284 if ( false === $box )1285 continue;1286 echo '<div id="' . $box['id'] . '" class="postbox ' . postbox_classes($box['id'], $page) . '">' . "\n";1287 echo "<h3>{$box['title']}</h3>\n";1288 echo '<div class="inside">' . "\n";1289 call_user_func($box['callback'], $object, $box);1290 echo "</div>\n";1291 echo "</div>\n";1292 >>>>>>> .merge-right.r86191293 1247 } 1294 1248 $already_sorted = true; -
branches/crazyhorse/wp-admin/menu.php
r8620 r8677 13 13 $awaiting_mod = $awaiting_mod->moderated; 14 14 15 <<<<<<< .working16 15 $top_menu = $top_submenu = $menu = $submenu = array(); 17 =======18 $update_plugins = get_option( 'update_plugins' );19 $update_count = 0;20 if ( isset( $update_plugins->response ) )21 $update_count = count( $update_plugins->response );22 23 $menu[35] = array( sprintf( __('Plugins %s'), "<span id='update-plugins' class='count-$update_count'><span class='plugin-count'>" . number_format_i18n($update_count) . "</span></span>" ), 'activate_plugins', 'plugins.php');24 if ( current_user_can('edit_users') )25 $menu[40] = array(__('Users'), 'edit_users', 'users.php');26 else27 $menu[40] = array(__('Profile'), 'read', 'profile.php');28 >>>>>>> .merge-right.r861929 16 30 17 $top_menu[5] = array( __('My Account'), 'read', 'profile.php' ); -
branches/crazyhorse/wp-admin/wp-admin.css
r8620 r8677 1658 1658 } 1659 1659 1660 <<<<<<< .working1661 =======1662 #poststuff h3, #poststuff .closed h3 {1663 cursor: pointer;1664 }1665 1666 >>>>>>> .merge-right.r86191667 1660 .hide-if-no-js { 1668 1661 display: none;
Note: See TracChangeset
for help on using the changeset viewer.