~canonical-sysadmins/wordpress/3.9.x

« back to all changes in this revision

Viewing changes to wp-admin/includes/nav-menu.php

  • Committer: Andrew Glen-Young
  • Date: 2011-03-08 14:47:51 UTC
  • Revision ID: andrew.glen-young@canonical.com-20110308144751-1n6spqgayztf9h77
[AGY] import 3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
         * @since 3.0.0
14
14
         *
15
15
         * @param string $output Passed by reference.
16
 
         * @param int $depth Depth of page.
17
16
         */
18
17
        function start_lvl(&$output) {}
19
18
 
22
21
         * @since 3.0.0
23
22
         *
24
23
         * @param string $output Passed by reference.
25
 
         * @param int $depth Depth of page.
26
24
         */
27
25
        function end_lvl(&$output) {
28
26
        }
34
32
         * @param string $output Passed by reference. Used to append additional content.
35
33
         * @param object $item Menu item data object.
36
34
         * @param int $depth Depth of menu item. Used for padding.
37
 
         * @param int $current_page Menu item ID.
38
35
         * @param object $args
39
36
         */
40
37
        function start_el(&$output, $item, $depth, $args) {
164
161
                                <p class="field-description description description-wide">
165
162
                                        <label for="edit-menu-item-description-<?php echo $item_id; ?>">
166
163
                                                <?php _e( 'Description' ); ?><br />
167
 
                                                <textarea id="edit-menu-item-description-<?php echo $item_id; ?>" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description[<?php echo $item_id; ?>]"><?php echo esc_html( $item->description ); ?></textarea>
 
164
                                                <textarea id="edit-menu-item-description-<?php echo $item_id; ?>" class="widefat edit-menu-item-description" rows="3" cols="20" name="menu-item-description[<?php echo $item_id; ?>]"><?php echo esc_html( $item->description ); // textarea_escaped ?></textarea>
168
165
                                                <span class="description"><?php _e('The description will be displayed in the menu if the current theme supports it.'); ?></span>
169
166
                                        </label>
170
167
                                </p>
218
215
         * @param string $output Passed by reference. Used to append additional content.
219
216
         * @param object $item Menu item data object.
220
217
         * @param int $depth Depth of menu item. Used for padding.
221
 
         * @param int $current_page Menu item ID.
222
218
         * @param object $args
223
219
         */
224
220
        function start_el(&$output, $item, $depth, $args) {
249
245
                $output .= '<input type="hidden" class="menu-item-url" name="menu-item[' . $possible_object_id . '][menu-item-url]" value="'. esc_attr( $item->url ) .'" />';
250
246
                $output .= '<input type="hidden" class="menu-item-target" name="menu-item[' . $possible_object_id . '][menu-item-target]" value="'. esc_attr( $item->target ) .'" />';
251
247
                $output .= '<input type="hidden" class="menu-item-attr_title" name="menu-item[' . $possible_object_id . '][menu-item-attr_title]" value="'. esc_attr( $item->attr_title ) .'" />';
252
 
                $output .= '<input type="hidden" class="menu-item-description" name="menu-item[' . $possible_object_id . '][menu-item-description]" value="'. esc_attr( $item->description ) .'" />';
253
248
                $output .= '<input type="hidden" class="menu-item-classes" name="menu-item[' . $possible_object_id . '][menu-item-classes]" value="'. esc_attr( implode( ' ', $item->classes ) ) .'" />';
254
249
                $output .= '<input type="hidden" class="menu-item-xfn" name="menu-item[' . $possible_object_id . '][menu-item-xfn]" value="'. esc_attr( $item->xfn ) .'" />';
255
250
        }
499
494
        ?>
500
495
        <p class="button-controls">
501
496
                <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
502
 
                <input type="submit"<?php disabled( $nav_menu_selected_id, 0 ); ?> class="button-primary" name="nav-menu-locations" value="<?php esc_attr_e( 'Save' ); ?>" />
 
497
                <?php submit_button( __( 'Save' ), 'primary', 'nav-menu-locations', false, disabled( $nav_menu_selected_id, 0, false ) ); ?>
503
498
        </p>
504
499
        <?php
505
500
}
652
647
                ?>">
653
648
                        <ul id="<?php echo $post_type_name; ?>checklist-most-recent" class="categorychecklist form-no-clear">
654
649
                                <?php
655
 
                                $recent_args = array_merge( $args, array( 'orderby' => 'post_date', 'order' => 'DESC', 'showposts' => 15 ) );
 
650
                                $recent_args = array_merge( $args, array( 'orderby' => 'post_date', 'order' => 'DESC', 'posts_per_page' => 15 ) );
656
651
                                $most_recent = $get_posts->query( $recent_args );
657
652
                                $args['walker'] = $walker;
658
653
                                echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', $most_recent), 0, (object) $args );
673
668
                        }
674
669
                        ?>
675
670
                        <p class="quick-search-wrap">
676
 
                                <input type="text" class="quick-search regular-text input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-posttype-<?php echo $post_type_name; ?>" />
 
671
                                <input type="text" class="quick-search input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-posttype-<?php echo $post_type_name; ?>" />
677
672
                                <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
678
 
                                <input type="submit" class="quick-search-submit button-secondary hide-if-js" value="<?php esc_attr_e('Search'); ?>" />
 
673
                                <?php submit_button( __( 'Search' ), 'quick-search-submit button-secondary hide-if-js', 'submit', false ); ?>
679
674
                        </p>
680
675
 
681
676
                        <ul id="<?php echo $post_type_name; ?>-search-checklist" class="list:<?php echo $post_type_name?> categorychecklist form-no-clear">
900
895
                        }
901
896
                        ?>
902
897
                        <p class="quick-search-wrap">
903
 
                                <input type="text" class="quick-search regular-text input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" />
 
898
                                <input type="text" class="quick-search input-with-default-title" title="<?php esc_attr_e('Search'); ?>" value="<?php echo $searched; ?>" name="quick-search-taxonomy-<?php echo $taxonomy_name; ?>" />
904
899
                                <img class="waiting" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
905
 
                                <input type="submit" class="quick-search-submit button-secondary hide-if-js" value="<?php esc_attr_e('Search'); ?>" />
 
900
                                <?php submit_button( __( 'Search' ), 'quick-search-submit button-secondary hide-if-js', 'submit', false ); ?>
906
901
                        </p>
907
902
 
908
903
                        <ul id="<?php echo $taxonomy_name; ?>-search-checklist" class="list:<?php echo $taxonomy_name?> categorychecklist form-no-clear">
1102
1097
 *
1103
1098
 * @since 3.0.0
1104
1099
 *
1105
 
 * @param string $menu_item_id The ID of the menu item to format.
1106
1100
 * @return string|WP_Error $output The menu formatted to edit or error object on failure.
1107
1101
 */
1108
1102
function wp_nav_menu_manage_columns() {