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