| 18 | function __construct() { |
| 19 | $this->setup_hooks(); |
| 20 | } |
| 21 | |
| 22 | protected function setup_hooks() { |
| 23 | add_action( 'wp_edit_nav_menu_item_title', array( $this, 'get_menu_item_title_markup' ), 10, 3 ); |
| 24 | add_action( 'wp_edit_nav_menu_item_title', array( $this, 'get_menu_item_submenu_status_markup' ), 10, 3 ); |
| 25 | |
| 26 | add_action( 'wp_edit_nav_menu_item_controls', array( $this, 'get_menu_item_type_markup' ), 10, 3 ); |
| 27 | add_action( 'wp_edit_nav_menu_item_controls', array( $this, 'get_menu_item_order_no_js_markup' ), 10, 3 ); |
| 28 | add_action( 'wp_edit_nav_menu_item_controls', array( $this, 'get_menu_item_edit_link_markup' ), 10, 3 ); |
| 29 | |
| 30 | add_action( 'wp_edit_nav_menu_item_fields', array( $this, 'get_menu_item_fields_url_markup' ), 10, 2 ); |
| 31 | add_action( 'wp_edit_nav_menu_item_fields', array( $this, 'get_menu_item_fields_label_markup' ), 10, 2 ); |
| 32 | add_action( 'wp_edit_nav_menu_item_fields', array( $this, 'get_menu_item_fields_title_attr_markup' ), 10, 2 ); |
| 33 | add_action( 'wp_edit_nav_menu_item_fields', array( $this, 'get_menu_item_fields_target_markup' ), 10, 2 ); |
| 34 | add_action( 'wp_edit_nav_menu_item_fields', array( $this, 'get_menu_item_fields_class_markup' ), 10, 2 ); |
| 35 | add_action( 'wp_edit_nav_menu_item_fields', array( $this, 'get_menu_item_fields_description_markup' ), 10, 2 ); |
| 36 | add_action( 'wp_edit_nav_menu_item_fields', array( $this, 'get_menu_item_fields_move_for_js_markup' ), 10, 2 ); |
| 37 | add_action( 'wp_edit_nav_menu_item_fields', array( $this, 'get_menu_item_fields_actions_markup' ), 10, 2 ); |
| 38 | add_action( 'wp_edit_nav_menu_item_fields', array( $this, 'get_menu_item_fields_hidden_fields_markup' ), 10, 2 ); |
| 39 | } |
| 40 | |
64 | | $removed_args = array( |
65 | | 'action', |
66 | | 'customlink-tab', |
67 | | 'edit-menu-item', |
68 | | 'menu-item', |
69 | | 'page-tab', |
70 | | '_wpnonce', |
| 87 | |
| 88 | $original_title = $this->get_original_title( $item ); |
| 89 | |
| 90 | $classes = $this->get_nav_item_classes( $item, $item_id, $depth ); |
| 91 | ?> |
| 92 | <li id="menu-item-<?php echo $item_id; ?>" class="<?php echo implode(' ', $classes ); ?>"> |
| 93 | <div class="menu-item-bar"> |
| 94 | <div class="menu-item-handle"> |
| 95 | <span class="item-title"> |
| 96 | <?php do_action( 'wp_edit_nav_menu_item_title', $item, $item_id, $depth ); ?> |
| 97 | </span> |
| 98 | |
| 99 | <span class="item-controls"> |
| 100 | <?php do_action( 'wp_edit_nav_menu_item_controls', $item, $item_id, $depth ); ?> |
| 101 | </span> |
| 102 | </div> |
| 103 | </div> |
| 104 | |
| 105 | <div class="menu-item-settings wp-clearfix" id="menu-item-settings-<?php echo $item_id; ?>"> |
| 106 | <?php do_action( 'wp_edit_nav_menu_item_fields', $item, $item_id ); ?> |
| 107 | </div><!-- .menu-item-settings--> |
| 108 | |
| 109 | <ul class="menu-item-transport"></ul> |
| 110 | <?php |
| 111 | $output .= ob_get_clean(); |
| 112 | } |
| 113 | |
| 114 | protected function get_nav_item_classes( $item, $item_id, $depth ) { |
| 115 | $classes = array( |
| 116 | 'menu-item menu-item-depth-' . $depth, |
| 117 | 'menu-item-' . esc_attr( $item->object ), |
| 118 | 'menu-item-edit-' . ( ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? 'active' : 'inactive'), |
| 121 | if ( ! $this->is_valid( $item ) ) { |
| 122 | $classes[] = 'menu-item-invalid'; |
| 123 | } elseif ( $this->is_draft( $item ) ) { |
| 124 | $classes[] = 'pending'; |
| 125 | } |
| 126 | |
| 127 | return $classes; |
| 128 | } |
| 129 | |
| 130 | protected function get_nonced_url( $item_id, $action, $nonce_name ) { |
| 131 | return wp_nonce_url( |
| 132 | add_query_arg( |
| 133 | array( |
| 134 | 'action' => $action, |
| 135 | 'menu-item' => $item_id, |
| 136 | ), |
| 137 | admin_url( 'nav-menus.php' ) |
| 138 | ), |
| 139 | $nonce_name |
| 140 | ); |
| 141 | } |
| 142 | |
| 143 | protected function get_item_title( $item, $is_escaped = false ) { |
| 144 | $title = $item->title; |
| 145 | |
| 146 | if ( ! $this->is_valid( $item ) ) { |
| 147 | /* translators: %s: title of menu item which is invalid */ |
| 148 | $title = sprintf( __( '%s (Invalid)' ), $item->title ); |
| 149 | } elseif ( $this->is_draft( $item ) ) { |
| 150 | /* translators: %s: title of menu item in draft status */ |
| 151 | $title = sprintf( __('%s (Pending)'), $item->title ); |
| 152 | } |
| 153 | |
| 154 | $title = ( ! isset( $item->label ) || '' == $item->label ) ? $title : $item->label; |
| 155 | |
| 156 | return $is_escaped ? esc_html( $title ) : $title; |
| 157 | } |
| 158 | |
| 159 | protected function is_valid( $item ) { |
| 160 | return empty( $item->_invalid ); |
| 161 | } |
| 162 | |
| 163 | protected function is_draft( $item ) { |
| 164 | return isset( $item->post_status ) && 'draft' == $item->post_status; |
| 165 | } |
| 166 | |
| 167 | protected function get_original_title( $item ) { |
88 | | $classes = array( |
89 | | 'menu-item menu-item-depth-' . $depth, |
90 | | 'menu-item-' . esc_attr( $item->object ), |
91 | | 'menu-item-edit-' . ( ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? 'active' : 'inactive'), |
| 183 | return $original_title; |
| 184 | } |
| 185 | |
| 186 | |
| 187 | public function get_menu_item_type_markup( $item, $item_id, $depth ) { |
| 188 | ?> |
| 189 | <span class="item-type"><?php echo esc_html( $item->type_label ); ?></span> |
| 190 | <?php |
| 191 | } |
| 192 | |
| 193 | public function get_menu_item_order_no_js_markup( $item, $item_id, $depth ) { |
| 194 | $move_up_url = $this->get_nonced_url($item_id, 'move-up-menu-item', 'move-menu_item'); |
| 195 | $move_down_url = $this->get_nonced_url($item_id, 'move-down-menu-item', 'move-menu_item'); |
| 196 | |
| 197 | ?> |
| 198 | <span class="item-order hide-if-js"> |
| 199 | <a href="<?php echo $move_up_url ?>" class="item-move-up" aria-label="<?php esc_attr_e( 'Move up' ) ?>">↑</a> |
| 200 | | |
| 201 | <a href="<?php echo $move_down_url; ?>" class="item-move-down" aria-label="<?php esc_attr_e( 'Move down' ) ?>">↓</a> |
| 202 | </span> |
| 203 | <?php |
| 204 | } |
| 205 | |
| 206 | |
| 207 | public function get_menu_item_edit_link_markup() { |
| 208 | $removed_args = array( |
| 209 | 'action', |
| 210 | 'customlink-tab', |
| 211 | 'edit-menu-item', |
| 212 | 'menu-item', |
| 213 | 'page-tab', |
| 214 | '_wpnonce', |
96 | | if ( ! empty( $item->_invalid ) ) { |
97 | | $classes[] = 'menu-item-invalid'; |
98 | | /* translators: %s: title of menu item which is invalid */ |
99 | | $title = sprintf( __( '%s (Invalid)' ), $item->title ); |
100 | | } elseif ( isset( $item->post_status ) && 'draft' == $item->post_status ) { |
101 | | $classes[] = 'pending'; |
102 | | /* translators: %s: title of menu item in draft status */ |
103 | | $title = sprintf( __('%s (Pending)'), $item->title ); |
| 223 | ?> |
| 224 | <a class="item-edit" id="edit-<?php echo $item_id; ?>" href="<?php echo $edit_url; ?>" aria-label="<?php esc_attr_e( 'Edit menu item' ); ?>"><?php _e( 'Edit' ); ?></a> |
| 225 | <?php |
| 226 | } |
| 227 | |
| 228 | public function get_menu_item_title_markup( $item ) { |
| 229 | ?> |
| 230 | <span class="menu-item-title"><?php echo $this->get_item_title( $item, true ); ?></span> |
| 231 | <?php |
| 232 | } |
| 233 | |
| 234 | public function get_menu_item_submenu_status_markup( $item, $item_id, $depth ) { |
| 235 | $submenu_style = ''; |
| 236 | if ( 0 == $depth ) { |
| 237 | $submenu_style = 'style="display: none;"'; |
113 | | <li id="menu-item-<?php echo $item_id; ?>" class="<?php echo implode(' ', $classes ); ?>"> |
114 | | <div class="menu-item-bar"> |
115 | | <div class="menu-item-handle"> |
116 | | <span class="item-title"><span class="menu-item-title"><?php echo esc_html( $title ); ?></span> <span class="is-submenu" <?php echo $submenu_text; ?>><?php _e( 'sub item' ); ?></span></span> |
117 | | <span class="item-controls"> |
118 | | <span class="item-type"><?php echo esc_html( $item->type_label ); ?></span> |
119 | | <span class="item-order hide-if-js"> |
120 | | <a href="<?php |
121 | | echo wp_nonce_url( |
122 | | add_query_arg( |
123 | | array( |
124 | | 'action' => 'move-up-menu-item', |
125 | | 'menu-item' => $item_id, |
126 | | ), |
127 | | remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) |
128 | | ), |
129 | | 'move-menu_item' |
130 | | ); |
131 | | ?>" class="item-move-up" aria-label="<?php esc_attr_e( 'Move up' ) ?>">↑</a> |
132 | | | |
133 | | <a href="<?php |
134 | | echo wp_nonce_url( |
135 | | add_query_arg( |
136 | | array( |
137 | | 'action' => 'move-down-menu-item', |
138 | | 'menu-item' => $item_id, |
139 | | ), |
140 | | remove_query_arg($removed_args, admin_url( 'nav-menus.php' ) ) |
141 | | ), |
142 | | 'move-menu_item' |
143 | | ); |
144 | | ?>" class="item-move-down" aria-label="<?php esc_attr_e( 'Move down' ) ?>">↓</a> |
145 | | </span> |
146 | | <a class="item-edit" id="edit-<?php echo $item_id; ?>" href="<?php |
147 | | echo ( isset( $_GET['edit-menu-item'] ) && $item_id == $_GET['edit-menu-item'] ) ? admin_url( 'nav-menus.php' ) : add_query_arg( 'edit-menu-item', $item_id, remove_query_arg( $removed_args, admin_url( 'nav-menus.php#menu-item-settings-' . $item_id ) ) ); |
148 | | ?>" aria-label="<?php esc_attr_e( 'Edit menu item' ); ?>"><?php _e( 'Edit' ); ?></a> |
149 | | </span> |
150 | | </div> |
151 | | </div> |
| 271 | <p class="field-title-attribute field-attr-title description description-wide"> |
| 272 | <label for="edit-menu-item-attr-title-<?php echo $item_id; ?>"> |
| 273 | <?php _e( 'Title Attribute' ); ?><br /> |
| 274 | <input type="text" id="edit-menu-item-attr-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->post_excerpt ); ?>" /> |
| 275 | </label> |
| 276 | </p> |
| 277 | <?php |
| 278 | } |
153 | | <div class="menu-item-settings wp-clearfix" id="menu-item-settings-<?php echo $item_id; ?>"> |
154 | | <?php if ( 'custom' == $item->type ) : ?> |
155 | | <p class="field-url description description-wide"> |
156 | | <label for="edit-menu-item-url-<?php echo $item_id; ?>"> |
157 | | <?php _e( 'URL' ); ?><br /> |
158 | | <input type="text" id="edit-menu-item-url-<?php echo $item_id; ?>" class="widefat code edit-menu-item-url" name="menu-item-url[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->url ); ?>" /> |
159 | | </label> |
160 | | </p> |
161 | | <?php endif; ?> |
162 | | <p class="description description-wide"> |
163 | | <label for="edit-menu-item-title-<?php echo $item_id; ?>"> |
164 | | <?php _e( 'Navigation Label' ); ?><br /> |
165 | | <input type="text" id="edit-menu-item-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-title" name="menu-item-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->title ); ?>" /> |
166 | | </label> |
167 | | </p> |
168 | | <p class="field-title-attribute field-attr-title description description-wide"> |
169 | | <label for="edit-menu-item-attr-title-<?php echo $item_id; ?>"> |
170 | | <?php _e( 'Title Attribute' ); ?><br /> |
171 | | <input type="text" id="edit-menu-item-attr-title-<?php echo $item_id; ?>" class="widefat edit-menu-item-attr-title" name="menu-item-attr-title[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->post_excerpt ); ?>" /> |
172 | | </label> |
173 | | </p> |
174 | | <p class="field-link-target description"> |
175 | | <label for="edit-menu-item-target-<?php echo $item_id; ?>"> |
176 | | <input type="checkbox" id="edit-menu-item-target-<?php echo $item_id; ?>" value="_blank" name="menu-item-target[<?php echo $item_id; ?>]"<?php checked( $item->target, '_blank' ); ?> /> |
177 | | <?php _e( 'Open link in a new tab' ); ?> |
178 | | </label> |
179 | | </p> |
180 | | <p class="field-css-classes description description-thin"> |
181 | | <label for="edit-menu-item-classes-<?php echo $item_id; ?>"> |
182 | | <?php _e( 'CSS Classes (optional)' ); ?><br /> |
183 | | <input type="text" id="edit-menu-item-classes-<?php echo $item_id; ?>" class="widefat code edit-menu-item-classes" name="menu-item-classes[<?php echo $item_id; ?>]" value="<?php echo esc_attr( implode(' ', $item->classes ) ); ?>" /> |
184 | | </label> |
185 | | </p> |
186 | | <p class="field-xfn description description-thin"> |
187 | | <label for="edit-menu-item-xfn-<?php echo $item_id; ?>"> |
188 | | <?php _e( 'Link Relationship (XFN)' ); ?><br /> |
189 | | <input type="text" id="edit-menu-item-xfn-<?php echo $item_id; ?>" class="widefat code edit-menu-item-xfn" name="menu-item-xfn[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->xfn ); ?>" /> |
190 | | </label> |
191 | | </p> |
192 | | <p class="field-description description description-wide"> |
193 | | <label for="edit-menu-item-description-<?php echo $item_id; ?>"> |
194 | | <?php _e( 'Description' ); ?><br /> |
195 | | <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> |
196 | | <span class="description"><?php _e('The description will be displayed in the menu if the current theme supports it.'); ?></span> |
197 | | </label> |
198 | | </p> |
| 280 | public function get_menu_item_fields_target_markup( $item, $item_id ) { |
| 281 | ?> |
| 282 | <p class="field-link-target description"> |
| 283 | <label for="edit-menu-item-target-<?php echo $item_id; ?>"> |
| 284 | <input type="checkbox" id="edit-menu-item-target-<?php echo $item_id; ?>" value="_blank" name="menu-item-target[<?php echo $item_id; ?>]"<?php checked( $item->target, '_blank' ); ?> /> |
| 285 | <?php _e( 'Open link in a new tab' ); ?> |
| 286 | </label> |
| 287 | </p> |
| 288 | <?php |
| 289 | } |
200 | | <p class="field-move hide-if-no-js description description-wide"> |
201 | | <label> |
202 | | <span><?php _e( 'Move' ); ?></span> |
203 | | <a href="#" class="menus-move menus-move-up" data-dir="up"><?php _e( 'Up one' ); ?></a> |
204 | | <a href="#" class="menus-move menus-move-down" data-dir="down"><?php _e( 'Down one' ); ?></a> |
205 | | <a href="#" class="menus-move menus-move-left" data-dir="left"></a> |
206 | | <a href="#" class="menus-move menus-move-right" data-dir="right"></a> |
207 | | <a href="#" class="menus-move menus-move-top" data-dir="top"><?php _e( 'To the top' ); ?></a> |
208 | | </label> |
209 | | </p> |
| 291 | public function get_menu_item_fields_class_markup( $item, $item_id ) { |
| 292 | ?> |
| 293 | <p class="field-css-classes description description-thin"> |
| 294 | <label for="edit-menu-item-classes-<?php echo $item_id; ?>"> |
| 295 | <?php _e( 'CSS Classes (optional)' ); ?><br /> |
| 296 | <input type="text" id="edit-menu-item-classes-<?php echo $item_id; ?>" class="widefat code edit-menu-item-classes" name="menu-item-classes[<?php echo $item_id; ?>]" value="<?php echo esc_attr( implode(' ', $item->classes ) ); ?>" /> |
| 297 | </label> |
| 298 | </p> |
| 299 | <?php |
| 300 | } |
211 | | <div class="menu-item-actions description-wide submitbox"> |
212 | | <?php if ( 'custom' != $item->type && $original_title !== false ) : ?> |
213 | | <p class="link-to-original"> |
214 | | <?php printf( __('Original: %s'), '<a href="' . esc_attr( $item->url ) . '">' . esc_html( $original_title ) . '</a>' ); ?> |
215 | | </p> |
216 | | <?php endif; ?> |
217 | | <a class="item-delete submitdelete deletion" id="delete-<?php echo $item_id; ?>" href="<?php |
218 | | echo wp_nonce_url( |
219 | | add_query_arg( |
220 | | array( |
221 | | 'action' => 'delete-menu-item', |
222 | | 'menu-item' => $item_id, |
223 | | ), |
224 | | admin_url( 'nav-menus.php' ) |
225 | | ), |
226 | | 'delete-menu_item_' . $item_id |
227 | | ); ?>"><?php _e( 'Remove' ); ?></a> <span class="meta-sep hide-if-no-js"> | </span> <a class="item-cancel submitcancel hide-if-no-js" id="cancel-<?php echo $item_id; ?>" href="<?php echo esc_url( add_query_arg( array( 'edit-menu-item' => $item_id, 'cancel' => time() ), admin_url( 'nav-menus.php' ) ) ); |
228 | | ?>#menu-item-settings-<?php echo $item_id; ?>"><?php _e('Cancel'); ?></a> |
229 | | </div> |
| 302 | public function get_menu_item_fields_description_markup( $item, $item_id ) { |
| 303 | ?> |
| 304 | <p class="field-description description description-wide"> |
| 305 | <label for="edit-menu-item-description-<?php echo $item_id; ?>"> |
| 306 | <?php _e( 'Description' ); ?><br /> |
| 307 | <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> |
| 308 | <span class="description"><?php _e( 'The description will be displayed in the menu if the current theme supports it.' ); ?></span> |
| 309 | </label> |
| 310 | </p> |
| 311 | <?php |
| 312 | } |
231 | | <input class="menu-item-data-db-id" type="hidden" name="menu-item-db-id[<?php echo $item_id; ?>]" value="<?php echo $item_id; ?>" /> |
232 | | <input class="menu-item-data-object-id" type="hidden" name="menu-item-object-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->object_id ); ?>" /> |
233 | | <input class="menu-item-data-object" type="hidden" name="menu-item-object[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->object ); ?>" /> |
234 | | <input class="menu-item-data-parent-id" type="hidden" name="menu-item-parent-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_item_parent ); ?>" /> |
235 | | <input class="menu-item-data-position" type="hidden" name="menu-item-position[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_order ); ?>" /> |
236 | | <input class="menu-item-data-type" type="hidden" name="menu-item-type[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->type ); ?>" /> |
237 | | </div><!-- .menu-item-settings--> |
238 | | <ul class="menu-item-transport"></ul> |
| 314 | public function get_menu_item_fields_move_for_js_markup( $item, $item_id ) { |
| 315 | ?> |
| 316 | <p class="field-move hide-if-no-js description description-wide"> |
| 317 | <label> |
| 318 | <span><?php _e( 'Move' ); ?></span> |
| 319 | <a href="#" class="menus-move menus-move-up" data-dir="up"><?php _e( 'Up one' ); ?></a> |
| 320 | <a href="#" class="menus-move menus-move-down" data-dir="down"><?php _e( 'Down one' ); ?></a> |
| 321 | <a href="#" class="menus-move menus-move-left" data-dir="left"></a> |
| 322 | <a href="#" class="menus-move menus-move-right" data-dir="right"></a> |
| 323 | <a href="#" class="menus-move menus-move-top" data-dir="top"><?php _e( 'To the top' ); ?></a> |
| 324 | </label> |
| 325 | </p> |
| 329 | public function get_menu_item_fields_actions_markup( $item, $item_id ) { |
| 330 | $original_title = $this->get_original_title( $item ); |
| 331 | |
| 332 | $cancel_url = esc_url( add_query_arg( array( 'edit-menu-item' => $item_id, 'cancel' => time() ), admin_url( 'nav-menus.php' ) ) ); |
| 333 | $cancel_url .= '#menu-item-settings-' . $item_id; |
| 334 | |
| 335 | $remove_url = $this->get_nonced_url($item_id, 'delete-menu-item', 'delete-menu_item_' . $item_id); |
| 336 | ?> |
| 337 | <div class="menu-item-actions description-wide submitbox"> |
| 338 | <?php if ( 'custom' != $item->type && $original_title !== false ) : ?> |
| 339 | <p class="link-to-original"> |
| 340 | <?php printf( __('Original: %s'), '<a href="' . esc_attr( $item->url ) . '">' . esc_html( $original_title ) . '</a>' ); ?> |
| 341 | </p> |
| 342 | <?php endif; ?> |
| 343 | <a class="item-delete submitdelete deletion" id="delete-<?php echo $item_id; ?>" href="<?php echo $remove_url; ?>"><?php _e( 'Remove' ); ?></a> |
| 344 | <span class="meta-sep hide-if-no-js"> | </span> |
| 345 | <a class="item-cancel submitcancel hide-if-no-js" id="cancel-<?php echo $item_id; ?>" href="<?php echo $cancel_url; ?>"><?php _e('Cancel'); ?></a> |
| 346 | </div> |
| 347 | <?php |
| 348 | } |
| 349 | |
| 350 | public function get_menu_item_fields_hidden_fields_markup( $item, $item_id ) { |
| 351 | ?> |
| 352 | <input class="menu-item-data-db-id" type="hidden" name="menu-item-db-id[<?php echo $item_id; ?>]" value="<?php echo $item_id; ?>" /> |
| 353 | <input class="menu-item-data-object-id" type="hidden" name="menu-item-object-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->object_id ); ?>" /> |
| 354 | <input class="menu-item-data-object" type="hidden" name="menu-item-object[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->object ); ?>" /> |
| 355 | <input class="menu-item-data-parent-id" type="hidden" name="menu-item-parent-id[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_item_parent ); ?>" /> |
| 356 | <input class="menu-item-data-position" type="hidden" name="menu-item-position[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->menu_order ); ?>" /> |
| 357 | <input class="menu-item-data-type" type="hidden" name="menu-item-type[<?php echo $item_id; ?>]" value="<?php echo esc_attr( $item->type ); ?>" /> |
| 358 | <?php |
| 359 | } |