Changeset 7262
- Timestamp:
- 03/12/2008 05:50:07 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/css/colors-classic.css
r7261 r7262 534 534 } 535 535 536 div#media-upload-error, .file-error, .required abbr, .widget-control-remove:hover, .delete:hover {536 div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover, .delete:hover { 537 537 color: #f00; 538 538 } -
trunk/wp-admin/css/colors-fresh.css
r7261 r7262 511 511 } 512 512 513 div#media-upload-error, .file-error, .required abbr, .widget-control-remove:hover, .delete:hover {513 div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover, .delete:hover { 514 514 color: #f00; 515 515 } -
trunk/wp-admin/css/media.css
r7178 r7262 37 37 } 38 38 39 th { position: relative; } 40 39 41 .media-upload-form label.form-help, td.help { 40 42 font-style: italic; … … 42 44 } 43 45 44 .media-upload-form p { 45 margin: 0 1em 1em 0; 46 .media-upload-form p.help { 47 margin: 0; 48 padding: 0; 46 49 } 47 50 … … 58 61 display: inline; 59 62 padding: 0 0 0 28px; 60 margin: 0 0; 61 } 62 .align .field input { 63 margin-left: 15px; 64 } 65 63 margin: 0 1em 0 0; 64 } 66 65 .image-align-none-label { 67 66 background: url(../images/align-none.png) no-repeat center left; … … 88 87 margin: 0 1em 0 0; 89 88 } 90 tr.image-size td.field {91 text-align: center;92 }93 89 .pinkynail { 94 90 max-width: 40px; … … 96 92 } 97 93 98 #media-items { 94 .filename { 95 display: none; 96 } 97 button.dismiss { 98 position: absolute; 99 top: 5px; 100 right: 5px; 101 z-index: 4; 102 } 103 .file-error { 104 margin: 0 0 5px 50px; 105 font-weight: bold; 106 } 107 108 .progress { 109 position: absolute; 110 top: 0px; 111 left: 0px; 112 width: 623px; 113 height: 36px; 114 } 115 .bar { 116 width: 0px; 117 height: 100%; 118 border-right-width: 3px; 119 border-right-style: solid; 120 } 121 .media-item .thumbnail { 122 max-width: 128px; 123 max-height: 128px; 124 } 125 .media-item .pinkynail { 126 position: absolute; 127 top: 2px; 128 left: 2px; 129 height: 32px; 130 max-width: 40px; 131 } 132 133 tbody.media-item-info tr { 134 background-color: transparent; 135 } 136 tbody.media-item-info th, tbody.media-item-info td { 137 border: none; 138 margin: 0; 139 } 140 141 .form-table tbody.media-item-info { 142 border: 8px solid #fff; 143 } 144 145 .describe.startopen, .describe.startclosed { 146 display: none; 147 } 148 abbr.required { 149 text-decoration: none; 150 border: none; 151 } 152 .describe label { 153 display: inline; 154 } 155 .describe td { 156 vertical-align: middle; 157 } 158 .describe td.A1 { 159 width: 132px; 160 } 161 .describe input[type="text"], .describe textarea { 162 width: 460px; 163 } 164 .describe-toggle-on, .describe-toggle-off { 165 display: block; 166 line-height: 36px; 167 z-index: 2; 168 position: absolute; 169 top: 0px; 170 right: 20px; 171 } 172 .describe-toggle-off { 173 display: none; 174 } 175 .clickmask { 176 background: transparent; 177 position: absolute; 178 top: 0px; 179 left: 0px; 180 cursor: pointer; 181 border: none; 182 z-index: 3; 183 height: 36px; 184 } 185 186 .hidden { 187 height: 0px; 188 width: 0px; 189 overflow: hidden; 190 border: none; 191 } 192 193 /* Specific to Uploader */ 194 195 #media-upload .media-upload-form p { 196 margin: 0 1em 1em 0; 197 } 198 #media-upload p.help { 199 font-style: italic; 200 font-weight: normal; 201 } 202 #media-upload tr.image-size td.field { 203 text-align: center; 204 } 205 #media-upload #media-items { 99 206 border-width: 1px; 100 207 border-style: solid; … … 102 209 width: 623px; 103 210 } 104 .media-item { 211 212 #media-upload .media-item { 105 213 border-bottom-width: 1px; 106 214 border-bottom-style: solid; … … 109 217 min-height: 36px; 110 218 } 111 .filename { 219 #media-upload .filename { 220 display: block; 112 221 line-height: 36px; 113 222 margin-left: 50px; 114 223 z-index: 2; 115 224 } 116 button.dismiss { 117 position: absolute; 118 top: 5px; 119 right: 5px; 120 z-index: 4; 121 } 122 .file-error { 123 margin: 0 0 5px 50px; 124 font-weight: bold; 125 } 126 127 .progress { 128 position: absolute; 129 top: 0px; 130 left: 0px; 131 width: 623px; 132 height: 36px; 133 } 134 .bar { 135 width: 0px; 136 height: 100%; 137 border-right-width: 3px; 138 border-right-style: solid; 139 } 140 .media-item .thumbnail { 141 max-width: 128px; 142 max-height: 128px; 143 } 144 .media-item .pinkynail { 145 position: absolute; 146 top: 2px; 147 left: 2px; 148 height: 32px; 149 max-width: 40px; 150 } 151 .describe { 225 #media-upload .describe { 152 226 border-top-width: 1px; 153 227 border-top-style: solid; … … 156 230 clear: both; 157 231 } 158 .describe.startopen, .describe.startclosed { 159 display: none; 160 } 161 .required abbr { 162 text-decoration: none; 163 border: none; 164 } 165 166 .describe label { 167 display: inline; 168 } 169 .describe td { 170 vertical-align: middle; 171 } 172 .describe td.A1 { 173 width: 132px; 174 } 175 .describe input[type="text"], .describe textarea { 176 width: 460px; 177 } 178 .describe-toggle-on, .describe-toggle-off { 179 display: block; 180 line-height: 36px; 181 z-index: 2; 182 position: absolute; 183 top: 0px; 184 right: 20px; 185 } 186 .describe-toggle-off { 187 display: none; 188 } 189 .clickmask { 190 background: transparent; 191 position: absolute; 192 top: 0px; 193 left: 0px; 194 cursor: pointer; 195 border: none; 196 z-index: 3; 197 height: 36px; 198 } 199 tr.align td.field { 232 #media-upload .describe th.label { 233 padding-top: .5em; 234 text-align: left; 235 } 236 #media-upload tr.align td.field { 200 237 text-align: center; 201 238 } 202 203 .hidden {204 height: 0px;205 width: 0px;206 overflow: hidden;207 border: none;208 } -
trunk/wp-admin/edit-attachment-rows.php
r7251 r7262 47 47 case 'media': 48 48 ?> 49 <td><strong>< !-- TODO <a href="upload.php?action=edit&post=<?php the_ID(); ?>"> --><?php the_title(); ?><!-- </a> --></strong><br />49 <td><strong><a href="media.php?action=edit&attachment_id=<?php the_ID(); ?>"><?php the_title(); ?></a></strong><br /> 50 50 <?php echo strtoupper(preg_replace('/^.*?\.(\w+)$/', '$1', get_attached_file($post->ID))); ?> 51 51 <?php do_action('manage_media_media_column', $post->ID); ?> -
trunk/wp-admin/includes/media.php
r7258 r7262 485 485 add_filter('attachment_fields_to_edit', 'image_attachment_fields_to_edit', 10, 2); 486 486 487 function media_single_attachment_fields_to_edit( $form_fields, $post ) { 488 unset($form_fields['url'], $form_fields['align'], $form_fields['image-size']); 489 return $form_fields; 490 } 491 487 492 function image_attachment_fields_to_save($post, $attachment) { 488 493 if ( substr($post['post_mime_type'], 0, 5) == 'image' ) { … … 549 554 'input' => 'html', 550 555 'html' => " 551 <input type='text' name='attachments[$post->ID][url]' value='" . attribute_escape($file) . "' /> 556 <input type='text' name='attachments[$post->ID][url]' value='" . attribute_escape($file) . "' /><br /> 552 557 <button type='button' class='button url-$post->ID' value=''>" . __('None') . "</button> 553 558 <button type='button' class='button url-$post->ID' value='" . attribute_escape($file) . "'>" . __('File URL') . "</button> … … 605 610 606 611 foreach ( $attachments as $id => $attachment ) 607 if ( $item = get_media_item( $id, isset($errors[$id]) ? $errors[$id] : null) )612 if ( $item = get_media_item( $id, array( 'errors' => isset($errors[$id]) ? $errors[$id] : null) ) ) 608 613 $output .= "\n<div id='media-item-$id' class='media-item child-of-$attachment->post_parent preloaded'><div id='media-upload-error-$id'></div><div class='filename'></div><div class='progress'><div class='bar'></div></div>$item<div class='progress clickmask'></div>\n</div>"; 609 614 … … 611 616 } 612 617 613 function get_media_item( $attachment_id, $errors = null, $send = true, $delete = true ) { 618 function get_media_item( $attachment_id, $args = null ) { 619 $default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true ); 620 $args = wp_parse_args( $args, $default_args ); 621 extract( $args, EXTR_SKIP ); 622 614 623 global $post_mime_types; 615 624 if ( ( $attachment_id = intval($attachment_id) ) && $thumb_url = get_attachment_icon_src( $attachment_id ) ) … … 644 653 $form_fields = get_attachment_fields_to_edit($post, $errors); 645 654 646 $class = empty($errors) ? 'startclosed' : 'startopen'; 655 if ( $toggle ) { 656 $class = empty($errors) ? 'startclosed' : 'startopen'; 657 $toggle_links = " 658 <a class='toggle describe-toggle-on' href='#'>$toggle_on</a> 659 <a class='toggle describe-toggle-off' href='#'>$toggle_off</a>"; 660 } else { 661 $class = 'form-table'; 662 $toggle_links = ''; 663 } 664 647 665 $item = " 648 666 $type 649 <a class='toggle describe-toggle-on' href='#'>$toggle_on</a> 650 <a class='toggle describe-toggle-off' href='#'>$toggle_off</a> 667 $toggle_links 651 668 <div class='filename new'>$filename</div> 652 <table class='slidetoggle describe $class'><tbody> 669 <table class='slidetoggle describe $class'> 670 <tbody class='media-item-info'> 653 671 <tr> 654 <td class='A1B1' rowspan='4' colspan='2'><img class='thumbnail' src='$thumb_url' alt='' /></td>672 <td class='A1B1' rowspan='4'><img class='thumbnail' src='$thumb_url' alt='' /></td> 655 673 <td>$filename</td> 656 674 </tr> 657 <t r><td>$post->post_mime_type</td></tr>675 <td>$post->post_mime_type</td></tr> 658 676 <tr><td>" . mysql2date($post->post_date, get_option('time_format')) . "</td></tr> 659 <tr><td>" . apply_filters('media_meta', '', $post) . "</tr></td>\n"; 677 <tr><td>" . apply_filters('media_meta', '', $post) . "</tr></td> 678 </tbody> 679 <tbody>\n"; 660 680 661 681 $defaults = array( … … 672 692 $delete = "<a href='$delete_href' id='del[$attachment_id]' disabled='disabled' class='delete'>" . __('Delete') . "</button>"; 673 693 if ( ( $send || $delete ) && !isset($form_fields['buttons']) ) 674 $form_fields['buttons'] = array('tr' => "\t\t<tr class='submit'><td colspan='2'></td><td class='savesend'>$send $delete</td></tr>\n");694 $form_fields['buttons'] = array('tr' => "\t\t<tr class='submit'><td></td><td class='savesend'>$send $delete</td></tr>\n"); 675 695 676 696 $hidden_fields = array(); … … 693 713 } 694 714 695 $required = $field['required'] ? '<abbr title="required">*</abbr>' : ''; 696 $item .= "\t\t<tr class='$id'>\n\t\t\t<td class='label'><label for='$name'>{$field['label']}</label></td>\n\t\t\t<td class='required'>$required</td>\n\t\t\t<td class='field'>"; 715 $required = $field['required'] ? '<abbr title="required" class="required">*</abbr>' : ''; 716 $class = $id; 717 $class .= $field['required'] ? ' form-required' : ''; 718 719 $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'>"; 697 720 if ( !empty($field[$field['input']]) ) 698 721 $item .= $field[$field['input']]; … … 702 725 $item .= "<input type='text' id='$name' name='$name' value='" . wp_specialchars($field['value'], 1) . "' />"; 703 726 } 727 if ( !empty($field['helps']) ) 728 $item .= "<p class='help'>" . join( "</p>\n<p class='help'>", array_unique((array) $field['helps']) ) . '</p>'; 704 729 $item .= "</td>\n\t\t</tr>\n"; 705 730 … … 709 734 foreach ( array_unique((array) $field['errors']) as $error ) 710 735 $extra_rows['error'][] = $error; 711 712 if ( !empty($field['helps']) )713 foreach ( array_unique((array) $field['helps']) as $help )714 $extra_rows['help'][] = $help;715 736 716 737 if ( !empty($field['extra_rows']) ) … … 721 742 foreach ( $extra_rows as $class => $rows ) 722 743 foreach ( $rows as $html ) 723 $item .= "\t\t<tr><td colspan='2'></td><td class='$class'>$html</td></tr>\n";744 $item .= "\t\t<tr><td></td><td class='$class'>$html</td></tr>\n"; 724 745 } 725 746 726 747 if ( !empty($form_fields['_final']) ) 727 $item .= "\t\t<tr class='final'><td colspan=' 3'>{$form_fields['_final']}</td></tr>\n";748 $item .= "\t\t<tr class='final'><td colspan='2'>{$form_fields['_final']}</td></tr>\n"; 728 749 $item .= "\t</table>\n"; 729 750 … … 1038 1059 <table class="describe"><tbody> 1039 1060 <tr> 1040 <td class="label"><label for="insertonly[src]">' . __('Image URL') . '</label></td> 1041 <td class="required"><abbr title="required">*</abbr></td> 1061 <th valign="top" scope="row" class="label"> 1062 <span class="alignleft"><label for="insertonly[src]">' . __('Image URL') . '</label></span> 1063 <span class="alignright"><abbr title="required" class="required">*</abbr></span> 1064 </th> 1042 1065 <td class="field"><input id="insertonly[src]" name="insertonly[src]" value="" type="text"></td> 1043 1066 </tr> 1044 1067 <tr> 1045 <td class="label"><label for="insertonly[alt]">' . __('Description') . '</label></td> 1046 <td class="required"><abbr title="required">*</abbr></td> 1068 <th valign="top" scope="row" class="label"> 1069 <span class="alignleft"><label for="insertonly[alt]">' . __('Description') . '</label></span> 1070 <span class="alignright"><abbr title="required">*</abbr></span> 1071 </th> 1047 1072 <td class="field"><input id="insertonly[alt]" name="insertonly[alt]" value="" type="text"></td> 1048 1073 </tr> 1049 <tr><td colspan="2"></td><td class="help">' . __('Alternate text, e.g. "The Mona Lisa"') . '</td></tr>1074 <tr><td></td><td class="help">' . __('Alternate text, e.g. "The Mona Lisa"') . '</td></tr> 1050 1075 <tr class="align"> 1051 <td class="label"><label for="insertonly[align]">' . __('Alignment') . '</label></td> 1052 <td class="required"></td> 1076 <th valign="top" scope="row" class="label"><label for="insertonly[align]">' . __('Alignment') . '</label></th> 1053 1077 <td class="field"> 1054 1078 <input name="insertonly[align]" id="image-align-none-0" value="none" type="radio"> … … 1063 1087 </tr> 1064 1088 <tr> 1065 <td colspan="2"></td>1089 <td></td> 1066 1090 <td> 1067 1091 <input type="submit" class="button" name="insertonlybutton" value="' . attribute_escape(__('Insert into Post')) . '" /> … … 1076 1100 <table class="describe"><tbody> 1077 1101 <tr> 1078 <td class="label"><label for="insertonly[href]">' . __('Audio File URL') . '</label></td> 1079 <td class="required"><abbr title="required">*</abbr></td> 1102 <th valign="top" scope="row" class="label"> 1103 <span class="alignleft"><label for="insertonly[href]">' . __('Audio File URL') . '</label></span> 1104 <span class="alignright"><abbr title="required" class="required">*</abbr></span> 1105 </th> 1080 1106 <td class="field"><input id="insertonly[href]" name="insertonly[href]" value="" type="text"></td> 1081 1107 </tr> 1082 1108 <tr> 1083 <td class="label"><label for="insertonly[title]">' . __('Title') . '</label></td> 1084 <td class="required"><abbr title="required">*</abbr></td> 1109 <th valign="top" scope="row" class="label"> 1110 <span class="alignleft"><label for="insertonly[title]">' . __('Title') . '</label></span> 1111 <span class="alignright"><abbr title="required" class="required">*</abbr></span> 1112 </th> 1085 1113 <td class="field"><input id="insertonly[title]" name="insertonly[title]" value="" type="text"></td> 1086 1114 </tr> 1087 <tr><td colspan="2"></td><td class="help">' . __('Link text, e.g. "Still Alive by Jonathan Coulton"') . '</td></tr>1115 <tr><td></td><td class="help">' . __('Link text, e.g. "Still Alive by Jonathan Coulton"') . '</td></tr> 1088 1116 <tr> 1089 <td colspan="2"></td>1117 <td></td> 1090 1118 <td> 1091 1119 <input type="submit" class="button" name="insertonlybutton" value="' . attribute_escape(__('Insert into Post')) . '" /> … … 1100 1128 <table class="describe"><tbody> 1101 1129 <tr> 1102 <td class="label"><label for="insertonly[href]">' . __('Video URL') . '</label></td> 1103 <td class="required"><abbr title="required">*</abbr></td> 1130 <th valign="top" scope="row" class="label"> 1131 <span class="alignleft"><label for="insertonly[href]">' . __('Video URL') . '</label></span> 1132 <span class="alignright"><abbr title="required" class="required">*</abbr></span> 1133 </th> 1104 1134 <td class="field"><input id="insertonly[href]" name="insertonly[href]" value="" type="text"></td> 1105 1135 </tr> 1106 1136 <tr> 1107 <td class="label"><label for="insertonly[title]">' . __('Title') . '</label></td> 1108 <td class="required"><abbr title="required">*</abbr></td> 1137 <th valign="top" scope="row" class="label"> 1138 <span class="alignleft"><label for="insertonly[title]">' . __('Title') . '</label></span> 1139 <span class="alignright"><abbr title="required" class="required">*</abbr></span> 1140 </th> 1109 1141 <td class="field"><input id="insertonly[title]" name="insertonly[title]" value="" type="text"></td> 1110 1142 </tr> 1111 <tr><td colspan="2"></td><td class="help">' . __('Link text, e.g. "Lucy on YouTube"') . '</td></tr>1143 <tr><td></td><td class="help">' . __('Link text, e.g. "Lucy on YouTube"') . '</td></tr> 1112 1144 <tr> 1113 <td colspan="2"></td>1145 <td></td> 1114 1146 <td> 1115 1147 <input type="submit" class="button" name="insertonlybutton" value="' . attribute_escape(__('Insert into Post')) . '" /> … … 1124 1156 <table class="describe"><tbody> 1125 1157 <tr> 1126 <td class="label"><label for="insertonly[href]">' . __('URL') . '</label></td> 1127 <td class="required"><abbr title="required">*</abbr></td> 1158 <th valign="top" scope="row" class="label"> 1159 <span class="alignleft"><label for="insertonly[href]">' . __('URL') . '</label></span> 1160 <span class="alignright"><abbr title="required" class="required">*</abbr></span> 1161 </th> 1128 1162 <td class="field"><input id="insertonly[href]" name="insertonly[href]" value="" type="text"></td> 1129 1163 </tr> 1130 1164 <tr> 1131 <td class="label"><label for="insertonly[title]">' . __('Title') . '</label></td> 1132 <td class="required"><abbr title="required">*</abbr></td> 1165 <th valign="top" scope="row" class="label"> 1166 <span class="alignleft"><label for="insertonly[title]">' . __('Title') . '</label></span> 1167 <span class="alignright"><abbr title="required" class="required">*</abbr></span> 1168 </th> 1133 1169 <td class="field"><input id="insertonly[title]" name="insertonly[title]" value="" type="text"></td> 1134 1170 </tr> 1135 <tr><td colspan="2"></td><td class="help">' . __('Link text, e.g. "Ransom Demands (PDF)"') . '</td></tr>1171 <tr><td></td><td class="help">' . __('Link text, e.g. "Ransom Demands (PDF)"') . '</td></tr> 1136 1172 <tr> 1137 <td colspan="2"></td>1173 <td></td> 1138 1174 <td> 1139 1175 <input type="submit" class="button" name="insertonlybutton" value="' . attribute_escape(__('Insert into Post')) . '" /> -
trunk/wp-admin/js/common.js
r7130 r7262 5 5 // Reveal 6 6 jQuery('.wp-no-js-hidden').removeClass( 'wp-no-js-hidden' ); 7 8 // Basic form validation 9 if ( ( 'undefined' != typeof wpAjax ) && jQuery.isFunction( wpAjax.validateForm ) ) { 10 jQuery('form').submit( function() { return wpAjax.validateForm( jQuery(this) ); } ); 11 } 7 12 }); -
trunk/wp-includes/js/wp-ajax-response.js
r7103 r7262 51 51 return true; 52 52 }, 53 invalidateForm: function( jQ ) { 54 jQ.addClass( 'form-invalid' ).change( function() { jQuery(this).removeClass( 'form-invalid' ); } ); 53 validateForm: function( selector ) { 54 selector = jQuery( selector ); 55 return !selector.find('.form-required').andSelf().filter('.form-required:has(:input[value=""]), .form-required:input[value=""]').addClass( 'form-invalid' ).change( function() { jQuery(this).removeClass( 'form-invalid' ); } ).size(); 55 56 } 56 57 }, wpAjax || { noPerm: 'You do not have permission to do that.', broken: 'AJAX is teh b0rked.' } ); -
trunk/wp-includes/js/wp-lists.js
r7130 r7262 71 71 72 72 var es = $('#' + s.element + ' :input').not('[name=_ajax_nonce], [name=_wpnonce], [name=action]'); 73 var required = $('#' + s.element + ' .form-required:has(:input[value=""]), #' + s.element + ' .form-required:input[value=""]'); 74 if ( required.size() ) { 75 wpAjax.invalidateForm( required ); 76 return false; 77 } 73 var valid = wpAjax.validateForm( '#' + s.element ); 74 if ( !valid ) { return false; } 78 75 79 76 s.data = $.param( $.extend( { _ajax_nonce: s.nonce, action: s.action }, wpAjax.unserialize( cls[4] || '' ) ) ); -
trunk/wp-includes/link-template.php
r7250 r7262 440 440 441 441 function get_edit_post_link( $id = 0 ) { 442 $post = &get_post( $id ); 442 if ( !$post = &get_post( $id ) ) 443 return; 444 445 switch ( $post->post_type ) : 446 case 'page' : 447 if ( !current_user_can( 'edit_page', $post->ID ) ) 448 return; 449 $file = 'page'; 450 $var = 'post'; 451 break; 452 case 'attachment' : 453 if ( !current_user_can( 'edit_post', $post->ID ) ) 454 return; 455 $file = 'media'; 456 $var = 'attachment_id'; 457 break; 458 default : 459 if ( !current_user_can( 'edit_post', $post->ID ) ) 460 return; 461 $file = 'post'; 462 $var = 'post'; 463 break; 464 endswitch; 465 466 return apply_filters( 'get_edit_post_link', get_bloginfo( 'wpurl' ) . "/wp-admin/$file.php?action=edit&$var=$post->ID", $post->ID ); 467 } 468 469 function edit_post_link( $link = 'Edit This', $before = '', $after = '' ) { 470 global $post; 443 471 444 472 if ( $post->post_type == 'page' ) { 445 473 if ( !current_user_can( 'edit_page', $post->ID ) ) 446 474 return; 447 448 $file = 'page';449 475 } else { 450 476 if ( !current_user_can( 'edit_post', $post->ID ) ) 451 477 return; 452 453 $file = 'post';454 }455 456 return apply_filters( 'get_edit_post_link', get_bloginfo( 'wpurl' ) . '/wp-admin/' . $file . '.php?action=edit&post=' . $post->ID, $post->ID );457 }458 459 function edit_post_link( $link = 'Edit This', $before = '', $after = '' ) {460 global $post;461 462 if ( $post->post_type == 'page' ) {463 if ( !current_user_can( 'edit_page', $post->ID ) )464 return;465 466 $file = 'page';467 } else {468 if ( !current_user_can( 'edit_post', $post->ID ) )469 return;470 471 $file = 'post';472 478 } 473 479 -
trunk/wp-includes/script-loader.php
r7256 r7262 42 42 $this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.6'); 43 43 44 $this->add( 'wp-ajax-response', '/wp-includes/js/wp-ajax-response.js', array('jquery'), '20080 229' . mt_rand());44 $this->add( 'wp-ajax-response', '/wp-includes/js/wp-ajax-response.js', array('jquery'), '20080312' ); 45 45 $this->localize( 'wp-ajax-response', 'wpAjax', array( 46 46 'noPerm' => 'You do not have permission to do that.', … … 48 48 ) ); 49 49 50 $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080 221' . mt_rand());50 $this->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080312' ); 51 51 52 52 $this->add( 'wp-ajax', '/wp-includes/js/wp-ajax.js', array('prototype'), '20070306'); … … 58 58 ) ); 59 59 60 $this->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('wp-ajax-response'), '20080 228' . mt_rand());60 $this->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('wp-ajax-response'), '20080312' ); 61 61 $this->localize( 'wp-lists', 'wpListL10n', array( 62 62 'url' => get_option( 'siteurl' ) . '/wp-admin/admin-ajax.php'
Note: See TracChangeset
for help on using the changeset viewer.