root/trunk/wp-admin/edit-link-category-form.php

Revision 8656, 2.3 kB (checked in by westi, 3 weeks ago)

More phpdoc updates for wp-adming. See #7496 props santosj.

  • Property svn:eol-style set to native
Line 
1 <?php
2 /**
3  * Edit link category form for inclusion in administration panels.
4  *
5  * @package WordPress
6  * @subpackage Administration
7  */
8
9 if ( ! empty($cat_ID) ) {
10     /**
11      * @var string
12      */
13     $heading = __('Edit Category');
14     $submit_text = __('Edit Category');
15     $form = '<form name="editcat" id="editcat" method="post" action="link-category.php" class="validate">';
16     $action = 'editedcat';
17     $nonce_action = 'update-link-category_' . $cat_ID;
18     do_action('edit_link_category_form_pre', $category);
19 } else {
20     $heading = __('Add Category');
21     $submit_text = __('Add Category');
22     $form = '<form name="addcat" id="addcat" class="add:the-list: validate" method="post" action="link-category.php">';
23     $action = 'addcat';
24     $nonce_action = 'add-link-category';
25     do_action('add_link_category_form_pre', $category);
26 }
27 ?>
28
29 <div class="wrap">
30 <h2><?php echo $heading ?></h2>
31 <div id="ajax-response"></div>
32 <?php echo $form ?>
33 <input type="hidden" name="action" value="<?php echo $action ?>" />
34 <input type="hidden" name="cat_ID" value="<?php echo $category->term_id ?>" />
35 <?php wp_original_referer_field(true, 'previous'); wp_nonce_field($nonce_action); ?>
36     <table class="form-table">
37         <tr class="form-field form-required">
38             <th scope="row" valign="top"><label for="name"><?php _e('Category name') ?></label></th>
39             <td><input name="name" id="name" type="text" value="<?php echo $category->name; ?>" size="40" aria-required="true" /></td>
40         </tr>
41         <tr class="form-field">
42             <th scope="row" valign="top"><label for="slug"><?php _e('Category slug') ?></label></th>
43             <td><input name="slug" id="slug" type="text" value="<?php echo attribute_escape(apply_filters('editable_slug', $category->slug)); ?>" size="40" />
44             <?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></td>
45         </tr>
46         <tr class="form-field">
47             <th scope="row" valign="top"><label for="description"><?php _e('Description (optional)') ?></label></th>
48             <td><textarea name="description" id="description" rows="5" cols="50" style="width: 97%;"><?php echo $category->description; ?></textarea></td>
49         </tr>
50     </table>
51 <p class="submit"><input type="submit" class="button" name="submit" value="<?php echo $submit_text ?>" /></p>
52 <?php do_action('edit_link_category_form', $category); ?>
53 </form>
54 </div>
55
Note: See TracBrowser for help on using the browser.