Ticket #25448: edit-tag-form.2.diff
File edit-tag-form.2.diff, 5.9 KB (added by , 11 years ago) |
---|
-
wp-admin/edit-tag-form.php
16 16 return; 17 17 } 18 18 19 // Back compat hooks20 19 if ( 'category' == $taxonomy ) { 20 /** 21 * Fires before the Edit Category form. 22 * 23 * @since 2.1.0 24 * @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead. 25 * 26 * @param object $tag Current category object. 27 */ 21 28 do_action( 'edit_category_form_pre', $tag ); 22 29 } elseif ( 'link_category' == $taxonomy ) { 30 /** 31 * Fires before the Edit Link Category form. 32 * 33 * @since 2.3.0 34 * @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead. 35 * 36 * @param object $tag Current link category object. 37 */ 23 38 do_action( 'edit_link_category_form_pre', $tag ); 24 39 } else { 40 /** 41 * Fires before the Edit Tag form. 42 * 43 * @since 2.5.0 44 * @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead. 45 * 46 * @param object $tag Current tag object. 47 */ 25 48 do_action( 'edit_tag_form_pre', $tag ); 26 49 } 50 /** 51 * Fires before the Edit Term form for all taxonomies. 52 * 53 * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug. 54 * 55 * @since 3.0.0 56 * 57 * @param object $tag Current taxonomy term object. 58 * @param object $taxonomy Current $taxonomy object. 59 */ 27 60 do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy ); ?> 28 61 29 62 <div class="wrap"> 30 63 <h2><?php echo $tax->labels->edit_item; ?></h2> 31 64 <div id="ajax-response"></div> 65 <?php 66 /** 67 * Fires before the Edit Tag form is displayed. 68 * 69 * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug. 70 * 71 * @since 3.7.0 72 */ 73 ?> 32 74 <form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"<?php do_action( $taxonomy . '_term_edit_form_tag' ); ?>> 33 75 <input type="hidden" name="action" value="editedtag" /> 34 76 <input type="hidden" name="tag_ID" value="<?php echo esc_attr($tag->term_id) ?>" /> … … 43 85 <?php if ( !global_terms_enabled() ) { ?> 44 86 <tr class="form-field"> 45 87 <th scope="row" valign="top"><label for="slug"><?php _ex('Slug', 'Taxonomy Slug'); ?></label></th> 46 <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" /> 88 <?php 89 /** 90 * Filter the editable slug. 91 * 92 * @since 2.6.0 93 * 94 * @param string $slug The current tag's slug. 95 */ 96 ?> 97 <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" /> 47 98 <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> 48 99 </tr> 49 100 <?php } ?> … … 64 115 <span class="description"><?php _e('The description is not prominent by default; however, some themes may show it.'); ?></span></td> 65 116 </tr> 66 117 <?php 67 // Back compat hooks 68 if ( 'category' == $taxonomy ) 69 do_action('edit_category_form_fields', $tag); 70 elseif ( 'link_category' == $taxonomy ) 71 do_action('edit_link_category_form_fields', $tag); 72 else 73 do_action('edit_tag_form_fields', $tag); 74 75 do_action($taxonomy . '_edit_form_fields', $tag, $taxonomy); 118 if ( 'category' == $taxonomy ) { 119 /** 120 * Fires after the Edit Category form fields are displayed. 121 * 122 * @since 2.9.0 123 * @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead. 124 * 125 * @param object $tag Current taxonomy object. 126 */ 127 do_action( 'edit_category_form_fields', $tag ); 128 } elseif ( 'link_category' == $taxonomy ) { 129 /** 130 * Fires after the Edit Link Category form fields are displayed. 131 * 132 * @since 2.9.0 133 * @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead. 134 * 135 * @param object $tag Current taxonomy object. 136 */ 137 do_action( 'edit_link_category_form_fields', $tag ); 138 } else { 139 /** 140 * Fires after the Edit Tag form fields are displayed. 141 * 142 * @since 2.9.0 143 * @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead. 144 * 145 * @param object $tag Current taxonomy object. 146 */ 147 do_action( 'edit_tag_form_fields', $tag ); 148 } 149 /** 150 * Fires after the Taxonomy Edit form fields are displayed. 151 * 152 * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug. 153 * 154 * @since 3.0.0 155 * 156 * @param object $tag Current taxonomy term object. 157 * @param object $taxonomy Current taxonomy object. 158 */ 159 do_action( $taxonomy . '_edit_form_fields', $tag, $taxonomy ); 76 160 ?> 77 161 </table> 78 162 <?php 79 163 // Back compat hooks 80 if ( 'category' == $taxonomy ) 81 do_action('edit_category_form', $tag); 82 elseif ( 'link_category' == $taxonomy ) 83 do_action('edit_link_category_form', $tag); 84 else 85 do_action('edit_tag_form', $tag); 164 if ( 'category' == $taxonomy ) { 165 /** This action is documented in wp-admin/edit-tags.php */ 166 do_action( 'edit_category_form', $tag ); 167 } elseif ( 'link_category' == $taxonomy ) { 168 /** This action is documented in wp-admin/edit-tags.php */ 169 do_action( 'edit_link_category_form', $tag ); 170 } else { 171 /** 172 * Fires after the Edit Tag form table is displayed. 173 * 174 * @since 2.5.0 175 * @deprecated 3.0.0 Use {$taxonomy}_edit_form instead. 176 * 177 * @param object $tag Current taxonomy object. 178 */ 179 do_action( 'edit_tag_form', $tag ); 180 } 181 /** 182 * Fires after the taxonomy edit form table is displayed. 183 * 184 * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug. 185 * 186 * @since 3.0.0 187 * 188 * @param object $tag Current taxonomy term object. 189 * @param object $taxonomy Current taxonomy object. 190 */ 191 do_action( $taxonomy . '_edit_form', $tag, $taxonomy ); 86 192 87 do_action($taxonomy . '_edit_form', $tag, $taxonomy);88 89 193 submit_button( __('Update') ); 90 194 ?> 91 195 </form> 92 196 </div> 93 197 <script type="text/javascript"> 94 198 try{document.forms.edittag.name.focus();}catch(e){} 95 </script> 199 </script> 200 No newline at end of file