Ticket #25448: edit-tag-form.diff
File edit-tag-form.diff, 5.6 KB (added by , 11 years ago) |
---|
-
wp-admin/edit-tag-form.php
18 18 19 19 // Back compat hooks 20 20 if ( 'category' == $taxonomy ) 21 /** 22 * Fires before the edit tag form is displayed. 23 * 24 * This action is used for backward compatibility. 25 * Use $taxonomy_pre_edit_form instead 26 * 27 * @since 2.1.0 28 * 29 * @param object $tag Current category object. 30 */ 21 31 do_action('edit_category_form_pre', $tag ); 22 32 elseif ( 'link_category' == $taxonomy ) 33 /** 34 * Fires before the edit link category form is displayed. 35 * 36 * This action is used for backward compatibility. 37 * Use $taxonomy_pre_edit_form instead 38 * 39 * @since 2.3.0 40 * 41 * @param object $tag Current link category object. 42 */ 23 43 do_action('edit_link_category_form_pre', $tag ); 24 44 else 45 /** 46 * Fires before the edit tag form is displayed. 47 * 48 * This action is used for backward compatibility. 49 * Use $taxonomy_pre_edit_form instead 50 * 51 * @since 2.5.0 52 * 53 * @param object $tag Current tag object. 54 */ 25 55 do_action('edit_tag_form_pre', $tag); 26 56 57 /** 58 * Fires before the edit taxonomy term form is displayed. 59 * 60 * @since 3.0.0 61 * 62 * @param object $tag Current taxonomy term object. 63 * @param object $taxonomy Current $taxonomy object. 64 */ 27 65 do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy); ?> 28 66 29 67 <div class="wrap"> 30 68 <?php screen_icon(); ?> 31 69 <h2><?php echo $tax->labels->edit_item; ?></h2> 32 70 <div id="ajax-response"></div> 71 <?php 72 /** 73 * Fires before the edit link category form is displayed. 74 * 75 * @since 2.1.0 76 * 77 * @param object $taxonomy Current taxonomy object. 78 */ 79 ?> 33 80 <form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"<?php do_action( $taxonomy . '_term_edit_form_tag' ); ?>> 34 81 <input type="hidden" name="action" value="editedtag" /> 35 82 <input type="hidden" name="tag_ID" value="<?php echo esc_attr($tag->term_id) ?>" /> … … 44 91 <?php if ( !global_terms_enabled() ) { ?> 45 92 <tr class="form-field"> 46 93 <th scope="row" valign="top"><label for="slug"><?php _ex('Slug', 'Taxonomy Slug'); ?></label></th> 94 <?php 95 /** 96 * Filter the editable slug. 97 * 98 * @since 2.6.0 99 * 100 * @param string $tag->slug The current tag's slug. 101 */ 102 ?> 47 103 <td><input name="slug" id="slug" type="text" value="<?php if ( isset( $tag->slug ) ) echo esc_attr(apply_filters('editable_slug', $tag->slug)); ?>" size="40" /> 48 104 <p class="description"><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td> 49 105 </tr> … … 67 123 <?php 68 124 // Back compat hooks 69 125 if ( 'category' == $taxonomy ) 126 /** 127 * Fires after the edit category form fields are displayed. 128 * 129 * This action is used for backward compatibility. 130 * Use $taxonomy_edit_form_fields instead 131 * 132 * @since 2.9.0 133 * 134 * @param object $tag Current taxonomy object. 135 */ 70 136 do_action('edit_category_form_fields', $tag); 71 137 elseif ( 'link_category' == $taxonomy ) 138 /** 139 * Fires after the edit link category form fields are displayed. 140 * 141 * This action is used for backward compatibility. 142 * Use $taxonomy_edit_form_fields instead 143 * 144 * @since 2.9.0 145 * 146 * @param object $tag Current taxonomy object. 147 */ 72 148 do_action('edit_link_category_form_fields', $tag); 73 149 else 150 /** 151 * Fires after the edit tag form fields are displayed. 152 * 153 * This action is used for backward compatibility. 154 * Use $taxonomy_edit_form_fields instead 155 * 156 * @since 2.9.0 157 * 158 * @param object $tag Current taxonomy object. 159 */ 74 160 do_action('edit_tag_form_fields', $tag); 75 161 162 /** 163 * Fires after the taxonomy edit form fields are displayed. 164 * 165 * This action fires inside the form, before the closing 166 * table tag. 167 * 168 * @since 3.0.0 169 * 170 * @param object $tag Current taxonomy term object. 171 * @param object $taxonomy Current taxonomy object. 172 */ 76 173 do_action($taxonomy . '_edit_form_fields', $tag, $taxonomy); 77 174 ?> 78 175 </table> 79 176 <?php 80 177 // Back compat hooks 81 178 if ( 'category' == $taxonomy ) 179 /** 180 * Fires after the edit tag form table is displayed. 181 * 182 * This action is used for backward compatibility. 183 * Use $taxonomy_edit_form instead 184 * 185 * @since 2.1.0 186 * 187 * @param object $tag Current taxonomy object. 188 */ 82 189 do_action('edit_category_form', $tag); 83 190 elseif ( 'link_category' == $taxonomy ) 191 /** 192 * Fires after the edit tag form table is displayed. 193 * 194 * This action is used for backward compatibility. 195 * Use $taxonomy_edit_form instead 196 * 197 * @since 2.3.0 198 * 199 * @param object $tag Current taxonomy object. 200 */ 84 201 do_action('edit_link_category_form', $tag); 85 202 else 203 /** 204 * Fires after the edit tag form table is displayed. 205 * 206 * This action is used for backward compatibility. 207 * Use $taxonomy_edit_form instead 208 * 209 * @since 2.5.0 210 * 211 * @param object $tag Current taxonomy object. 212 */ 86 213 do_action('edit_tag_form', $tag); 87 214 215 /** 216 * Fires after the taxonomy edit form table is displayed. 217 * 218 * This action fires inside the form, after the closing 219 * table tag. 220 * 221 * @since 3.0.0 222 * 223 * @param object $tag Current taxonomy term object. 224 * @param object $taxonomy Current taxonomy object. 225 */ 88 226 do_action($taxonomy . '_edit_form', $tag, $taxonomy); 89 227 90 228 submit_button( __('Update') ); … … 93 231 </div> 94 232 <script type="text/javascript"> 95 233 try{document.forms.edittag.name.focus();}catch(e){} 96 </script> 234 </script> 235 No newline at end of file