Changeset 8678
- Timestamp:
- 08/19/2008 11:20:00 PM (18 years ago)
- Location:
- branches/crazyhorse/wp-admin
- Files:
-
- 6 edited
-
edit-comments.php (modified) (1 diff)
-
edit-link-categories.php (modified) (2 diffs)
-
edit-link-form.php (modified) (1 diff)
-
edit-page-form.php (modified) (3 diffs)
-
link-add.php (modified) (2 diffs)
-
post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/crazyhorse/wp-admin/edit-comments.php
r8620 r8678 188 188 <?php do_action('manage_comments_nav', $comment_status); ?> 189 189 <?php wp_nonce_field('bulk-comments'); ?> 190 <<<<<<< .working191 190 <input type="submit" name="doaction" value="Apply" class="button-secondary apply" /> 192 =======193 191 <?php if ( isset($_GET['apage']) ) { ?> 194 192 <input type="hidden" name="apage" value="<?php echo absint( $_GET['apage'] ); ?>" /> 195 193 <?php } ?> 196 >>>>>>> .merge-right.r8619197 194 </div> 198 195 -
branches/crazyhorse/wp-admin/edit-link-categories.php
r8620 r8678 12 12 foreach( (array) $_GET['delete'] as $cat_ID ) { 13 13 $cat_name = get_term_field('name', $cat_ID, 'link_category'); 14 $default_cat_id = get_option('default_link_category'); 14 15 15 16 // Don't delete the default cats. 16 if ( $cat_ID == get_option('default_link_category'))17 if ( $cat_ID == $default_cat_id ) 17 18 wp_die(sprintf(__("Can’t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); 18 $default_cat_id = get_option('default_link_category');19 19 20 <<<<<<< .working 21 wp_delete_term($cat_ID, 'link_category'); 20 wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id)); 22 21 } 23 =======24 // Don't delete the default cats.25 if ( $cat_ID == $default_cat_id )26 wp_die(sprintf(__("Can’t delete the <strong>%s</strong> category: this is the default one"), $cat_name));27 >>>>>>> .merge-right.r861928 22 29 <<<<<<< .working30 23 $location = 'edit-link-categories.php'; 31 24 if ( $referer = wp_get_referer() ) { … … 33 26 $location = $referer; 34 27 } 35 =======36 wp_delete_term($cat_ID, 'link_category', array('default' => $default_cat_id));37 }38 >>>>>>> .merge-right.r861939 28 40 29 $location = add_query_arg('message', 6, $location); -
branches/crazyhorse/wp-admin/edit-link-form.php
r8620 r8678 31 31 ?> 32 32 33 <<<<<<< .working34 =======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 <?php59 if ( ( 'edit' == $action) && current_user_can('manage_links') )60 echo "<a class='submitdelete' href='" . wp_nonce_url("link.php?action=delete&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 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> — don’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.r8619103 33 <?php function link_categories_meta_box($link) { ?> 104 34 <div id="category-adder" class="wp-hidden-children"> -
branches/crazyhorse/wp-admin/edit-page-form.php
r8620 r8678 34 34 $temp_ID = (int) $temp_ID; 35 35 $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';41 36 ?> 42 37 … … 53 48 <?php 54 49 55 <<<<<<< .working56 =======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="<?php68 if ( strpos( wp_get_referer(), '/wp-admin/' ) === false && $post_ID && url_to_postid(wp_get_referer()) == $post_ID )69 echo 'redo';70 else71 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 <?php109 if ( 0 != $post_ID ) {110 if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date111 $stamp = __('Scheduled for:<br />%1$s at %2$s');112 } else if ( 'publish' == $post->post_status ) { // already published113 $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 specified115 $stamp = __('Publish immediately');116 } else { // draft, 1 or more saves, date specified117 $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 <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 <?php137 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 <?php145 }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&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 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 <?php213 >>>>>>> .merge-right.r8619214 50 function page_custom_meta_box($post){ 215 51 ?> … … 351 187 <input type="hidden" id="post_type" name="post_type" value="<?php echo $post->post_type ?>" /> 352 188 <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())); ?>" /> 359 190 <?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?> 360 191 -
branches/crazyhorse/wp-admin/link-add.php
r8620 r8678 21 21 $fixed_bar = true; 22 22 require('admin-header.php'); 23 ?> 23 24 24 <<<<<<< .working25 =======26 25 <?php if ( isset( $_GET['added'] ) && '' != $_POST['link_name']) : ?> 27 26 <div id="message" class="updated fade"><p><?php _e('Link added.'); ?></p></div> … … 29 28 30 29 <?php 31 >>>>>>> .merge-right.r861932 30 $link = get_default_link_to_edit(); 33 31 include('edit-link-form.php'); -
branches/crazyhorse/wp-admin/post.php
r8620 r8678 28 28 ), get_edit_post_link( $post_ID, 'url' ) ); 29 29 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' ) ); 35 31 } elseif (isset($_POST['addmeta']) && $_POST['addmeta']) { 36 32 $location = add_query_arg( 'message', 2, wp_get_referer() );
Note: See TracChangeset
for help on using the changeset viewer.