Changeset 8678

Show
Ignore:
Timestamp:
08/19/08 23:20:00 (3 months ago)
Author:
ryan
Message:

crazyhorse: Merge cleanup

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/crazyhorse/wp-admin/edit-comments.php

    r8620 r8678  
    188188<?php do_action('manage_comments_nav', $comment_status); ?> 
    189189<?php wp_nonce_field('bulk-comments'); ?> 
    190 <<<<<<< .working 
    191190<input type="submit" name="doaction" value="Apply" class="button-secondary apply" /> 
    192 ======= 
    193191<?php if ( isset($_GET['apage']) ) { ?> 
    194192    <input type="hidden" name="apage" value="<?php echo absint( $_GET['apage'] ); ?>" /> 
    195193<?php } ?> 
    196 >>>>>>> .merge-right.r8619 
    197194</div> 
    198195 
  • branches/crazyhorse/wp-admin/edit-link-categories.php

    r8620 r8678  
    1212        foreach( (array) $_GET['delete'] as $cat_ID ) { 
    1313            $cat_name = get_term_field('name', $cat_ID, 'link_category'); 
     14            $default_cat_id = get_option('default_link_category'); 
    1415 
    1516            // Don't delete the default cats. 
    16             if ( $cat_ID == get_option('default_link_category')
     17            if ( $cat_ID == $default_cat_id
    1718                wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); 
    18         $default_cat_id = get_option('default_link_category'); 
    1919 
    20 <<<<<<< .working 
    21             wp_delete_term($cat_ID, 'link_category'); 
     20            wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); 
    2221        } 
    23 ======= 
    24         // Don't delete the default cats. 
    25         if ( $cat_ID == $default_cat_id ) 
    26             wp_die(sprintf(__("Can&#8217;t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); 
    27 >>>>>>> .merge-right.r8619 
    2822 
    29 <<<<<<< .working 
    3023        $location = 'edit-link-categories.php'; 
    3124        if ( $referer = wp_get_referer() ) { 
     
    3326                $location = $referer; 
    3427        } 
    35 ======= 
    36         wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); 
    37     } 
    38 >>>>>>> .merge-right.r8619 
    3928 
    4029        $location = add_query_arg('message', 6, $location); 
  • branches/crazyhorse/wp-admin/edit-link-form.php

    r8620 r8678  
    3131?> 
    3232 
    33 <<<<<<< .working 
    34 ======= 
    35 <?php echo $form ?> 
    36 <?php wp_nonce_field($nonce_action); ?> 
    37 <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> 
    38  
    39 <div class="wrap"> 
    40 <h2><?php echo $heading; ?></h2> 
    41  
    42 <div id="poststuff"> 
    43  
    44 <div class="submitbox" id="submitlink"> 
    45  
    46 <div id="previewview"> 
    47 <?php if ( !empty($link_id) ) { ?> 
    48 <a href="<?php echo $link->link_url; ?>" target="_blank"><?php _e('Visit Link'); ?></a> 
    49 <?php } ?> 
    50 </div> 
    51  
    52 <div class="inside"> 
    53 <p><label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked($link->link_visible, 'N'); ?> /> <?php _e('Keep this link private') ?></label></p> 
    54 </div> 
    55  
    56 <p class="submit"> 
    57 <input type="submit" class="button button-highlighted" name="save" value="<?php _e('Save'); ?>" tabindex="4" /> 
    58 <?php 
    59 if ( ( 'edit' == $action) && current_user_can('manage_links') ) 
    60     echo "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&amp;link_id=$link_id", 'delete-bookmark_' . $link_id) . "' onclick=\"if ( confirm('" . js_escape( sprintf( __("You are about to delete this link '%s'\n'Cancel' to stop, 'OK' to delete."), $link->link_name )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;link') . "</a>"; 
    61 ?> 
    62 </p> 
    63  
    64 <div class="side-info"> 
    65 <h5><?php _e('Related') ?></h5> 
    66  
    67 <ul> 
    68 <li><a href="link-manager.php"><?php _e('Manage All Links') ?></a></li> 
    69 <li><a href="edit-link-categories.php"><?php _e('Manage All Link Categories') ?></a></li> 
    70 <li><a href="link-import.php"><?php _e('Import Links') ?></a></li> 
    71 <?php do_action('link_relatedlinks_list'); ?> 
    72 </ul> 
    73 </div> 
    74 <?php do_action('submitlink_box'); ?> 
    75 </div> 
    76  
    77 <div id="post-body"> 
    78 <div id="namediv" class="stuffbox"> 
    79 <h3><label for="link_name"><?php _e('Name') ?></label></h3> 
    80 <div class="inside"> 
    81     <input type="text" name="link_name" size="30" tabindex="1" value="<?php echo $link->link_name; ?>" id="link_name" /><br /> 
    82     <?php _e('Example: Nifty blogging software'); ?> 
    83 </div> 
    84 </div> 
    85  
    86 <div id="addressdiv" class="stuffbox"> 
    87 <h3><label for="link_url"><?php _e('Web Address') ?></label></h3> 
    88 <div class="inside"> 
    89     <input type="text" name="link_url" size="30" tabindex="1" value="<?php echo $link->link_url; ?>" id="link_url" /><br /> 
    90     <?php _e('Example: <code>http://wordpress.org/</code> &#8212; don&#8217;t forget the <code>http://</code>'); ?> 
    91 </div> 
    92 </div> 
    93  
    94 <div id="descriptiondiv" class="stuffbox"> 
    95 <h3><label for="link_description"><?php _e('Description') ?></label></h3> 
    96 <div class="inside"> 
    97     <input type="text" name="link_description" size="30" tabindex="1" value="<?php echo ( isset( $link->link_description ) ? $link->link_description : ''); ?>" id="link_description" /><br /> 
    98     <?php _e('This will be shown when someone hovers over the link in the blogroll, or optionally below the link.'); ?> 
    99 </div> 
    100 </div> 
    101  
    102 >>>>>>> .merge-right.r8619 
    10333<?php function link_categories_meta_box($link) { ?> 
    10434<div id="category-adder" class="wp-hidden-children"> 
  • branches/crazyhorse/wp-admin/edit-page-form.php

    r8620 r8678  
    3434$temp_ID = (int) $temp_ID; 
    3535$user_ID = (int) $user_ID; 
    36  
    37 $sendto = clean_url(stripslashes(wp_get_referer())); 
    38  
    39 if ( 0 != $post_ID && $sendto == get_permalink($post_ID) ) 
    40     $sendto = 'redo'; 
    4136?> 
    4237 
     
    5348<?php 
    5449 
    55 <<<<<<< .working 
    56 ======= 
    57 if (isset($mode) && 'bookmarklet' == $mode) 
    58     echo '<input type="hidden" name="mode" value="bookmarklet" />'; 
    59 ?> 
    60 <input type="hidden" id="user-id" name="user_ID" value="<?php echo $user_ID ?>" /> 
    61 <input type="hidden" id="hiddenaction" name="action" value='<?php echo $form_action ?>' /> 
    62 <input type="hidden" id="originalaction" name="originalaction" value="<?php echo $form_action ?>" /> 
    63 <input type="hidden" id="post_author" name="post_author" value="<?php echo attribute_escape( $post->post_author ); ?>" /> 
    64 <?php echo $form_extra ?> 
    65 <input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" /> 
    66 <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" /> 
    67 <input name="referredby" type="hidden" id="referredby" value="<?php 
    68 if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) == $post_ID ) 
    69     echo 'redo'; 
    70 else 
    71     echo clean_url(stripslashes(wp_get_referer())); 
    72 ?>" /> 
    73 <?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?> 
    74  
    75 <div id="poststuff"> 
    76  
    77 <div class="submitbox" id="submitpage"> 
    78  
    79 <div id="previewview"> 
    80 <?php if ( 'publish' == $post->post_status ) { ?> 
    81 <a href="<?php echo clean_url(get_permalink($post->ID)); ?>" target="_blank"  tabindex="4"><?php _e('View this Page'); ?></a> 
    82 <?php } elseif ( 'edit' == $action ) { ?> 
    83 <a href="<?php echo clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>" target="_blank" tabindex="4"><?php _e('Preview this Page'); ?></a> 
    84 <?php } ?> 
    85 </div> 
    86  
    87 <div class="inside"> 
    88 <p><strong><label for='post_status'><?php _e('Publish Status') ?></label></strong></p> 
    89 <p> 
    90 <select name='post_status' tabindex='4' id='post_status'> 
    91 <?php // Show publish in dropdown if user can publish or if they can re-publish this page ('edit_published_pages') 
    92 // 'publish' option will be selected for published AND private posts (checkbox overrides dropdown) 
    93 if ( current_user_can('publish_pages') OR ( $post->post_status == 'publish' AND current_user_can('edit_page', $post->ID) ) ) : 
    94 ?> 
    95 <option<?php selected( $post->post_status, 'publish' ); selected( $post->post_status, 'private' );?> value='publish'><?php _e('Published') ?></option> 
    96 <?php endif; ?> 
    97 <?php if ( 'future' == $post->post_status ) : ?> 
    98 <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Pending') ?></option> 
    99 <?php endif; ?> 
    100 <option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option> 
    101 <option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Unpublished') ?></option> 
    102 </select> 
    103 </p> 
    104 <?php if ( current_user_can( 'publish_posts' ) ) : ?> 
    105 <p><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 page private') ?></label></p> 
    106 <?php endif; ?> 
    107  
    108 <?php 
    109 if ( 0 != $post_ID ) { 
    110     if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date 
    111         $stamp = __('Scheduled for:<br />%1$s at %2$s'); 
    112     } else if ( 'publish' == $post->post_status ) { // already published 
    113         $stamp = __('Published on:<br />%1$s at %2$s'); 
    114     } else if ( '0000-00-00 00:00:00' == $post->post_date ) { // draft, 1 or more saves, no date specified 
    115         $stamp = __('Publish immediately'); 
    116     } else { // draft, 1 or more saves, date specified 
    117         $stamp = __('Publish on:<br />%1$s at %2$s'); 
    118     } 
    119     $date = mysql2date(get_option('date_format'), $post->post_date); 
    120     $time = mysql2date(get_option('time_format'), $post->post_date); 
    121 } else { // draft (no saves, and thus no date specified) 
    122     $stamp = __('Publish immediately'); 
    123     $date = mysql2date(get_option('date_format'), current_time('mysql')); 
    124     $time = mysql2date(get_option('time_format'), current_time('mysql')); 
    125 } 
    126 ?> 
    127 <p class="curtime"><?php printf($stamp, $date, $time); ?> 
    128 &nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e('Edit') ?></a></p> 
    129  
    130 <div id='timestampdiv' class='hide-if-js'><?php touch_time(($action == 'edit'),1,4); ?></div> 
    131  
    132 </div> 
    133  
    134 <p class="submit"> 
    135 <input type="submit" name="save" class="button button-highlighted" value="<?php _e('Save'); ?>" tabindex="4" /> 
    136 <?php 
    137 if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) { 
    138 ?> 
    139 <?php if ( current_user_can('publish_pages') ) : ?> 
    140     <input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 
    141 <?php else : ?> 
    142     <input name="publish" type="submit" class="button" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" /> 
    143 <?php endif; ?> 
    144 <?php 
    145 } 
    146  
    147 if ( ('edit' == $action) && current_user_can('delete_page', $post_ID) ) 
    148     echo "<a class='submitdelete' href='" . wp_nonce_url("page.php?action=delete&amp;post=$post_ID", 'delete-page_' . $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 page '%s'\n  'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete&nbsp;page') . "</a>"; 
    149 ?> 
    150 <br class="clear" /> 
    151 <?php if ( 0 != $post_ID ) : ?> 
    152 <?php if ( $last_id = get_post_meta($post_ID, '_edit_last', true) ) { 
    153     $last_user = get_userdata($last_id); 
    154     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)); 
    155 } else { 
    156     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)); 
    157 } 
    158 ?> 
    159 <br class="clear" /> 
    160 <?php endif; ?> 
    161 <span id="autosave"></span> 
    162 <span id="wp-word-count"></span> 
    163 </p> 
    164  
    165 <div class="side-info"> 
    166 <h5><?php _e('Related') ?></h5> 
    167  
    168 <ul> 
    169 <?php if ( 0 != $post_ID ) : ?> 
    170 <li><a href="edit-pages.php?page_id=<?php echo $post_ID ?>"><?php _e('See Comments on this Page') ?></a></li> 
    171 <?php endif; ?> 
    172 <li><a href="edit-comments.php"><?php _e('Manage All Comments') ?></a></li> 
    173 <li><a href="edit-pages.php"><?php _e('Manage All Pages') ?></a></li> 
    174 <?php do_action('page_relatedlinks_list'); ?> 
    175 </ul> 
    176 </div> 
    177 <?php do_action('submitpage_box'); ?> 
    178 </div> 
    179  
    180 <div id="post-body"> 
    181 <div id="titlediv"> 
    182 <h3><label for="title"><?php _e('Title') ?></label></h3> 
    183 <div id="titlewrap"> 
    184   <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" autocomplete="off" /> 
    185 </div> 
    186 <div class="inside"> 
    187 <?php $sample_permalink_html = get_sample_permalink_html($post->ID); ?> 
    188     <div id="edit-slug-box"> 
    189 <?php if ( ! empty($post->ID) && ! empty($sample_permalink_html) ) : 
    190     echo $sample_permalink_html; 
    191 endif; ?> 
    192     </div> 
    193 </div> 
    194 </div> 
    195  
    196 <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea"> 
    197 <h3><label for="content"><?php _e('Page') ?></label></h3> 
    198 <?php the_editor($post->post_content); ?> 
    199 <?php wp_nonce_field( 'autosave', 'autosavenonce', false ); ?> 
    200 <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> 
    201 <?php wp_nonce_field( 'getpermalink', 'getpermalinknonce', false ); ?> 
    202 <?php wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false ); ?> 
    203 </div> 
    204  
    205 <?php do_meta_boxes('page', 'normal', $post); ?> 
    206  
    207 <?php do_action('edit_page_form'); ?> 
    208  
    209 <h2><?php _e('Advanced Options'); ?></h2> 
    210  
    211  
    212 <?php 
    213 >>>>>>> .merge-right.r8619 
    21450function page_custom_meta_box($post){ 
    21551?> 
     
    351187<input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" /> 
    352188<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo $post->post_status ?>" /> 
    353 <input name="referredby" type="hidden" id="referredby" value="<?php 
    354 if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) === $post_ID ) 
    355     echo 'redo'; 
    356 else 
    357     echo clean_url(stripslashes(wp_get_referer())); 
    358 ?>" /> 
     189<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" /> 
    359190<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?> 
    360191 
  • branches/crazyhorse/wp-admin/link-add.php

    r8620 r8678  
    2121$fixed_bar = true; 
    2222require('admin-header.php'); 
     23?> 
    2324 
    24 <<<<<<< .working 
    25 ======= 
    2625<?php if ( isset( $_GET['added'] ) && '' != $_POST['link_name']) : ?> 
    2726<div id="message" class="updated fade"><p><?php _e('Link added.'); ?></p></div> 
     
    2928 
    3029<?php 
    31 >>>>>>> .merge-right.r8619 
    3230$link = get_default_link_to_edit(); 
    3331include('edit-link-form.php'); 
  • branches/crazyhorse/wp-admin/post.php

    r8620 r8678  
    2828            ), get_edit_post_link( $post_ID, 'url' ) ); 
    2929        else 
    30 <<<<<<< .working 
    31             $location = "post.php?action=edit&post=$post_ID&message=6"; 
    32 ======= 
    33             $location = add_query_arg( 'message', 4, get_edit_post_link( $post_ID, 'url' ) ); 
    34 >>>>>>> .merge-right.r8619 
     30            $location = add_query_arg( 'message', 6, get_edit_post_link( $post_ID, 'url' ) ); 
    3531    } elseif (isset($_POST['addmeta']) && $_POST['addmeta']) { 
    3632        $location = add_query_arg( 'message', 2, wp_get_referer() );