diff --git a/src/wp-admin/includes/nav-menu.php b/src/wp-admin/includes/nav-menu.php
index 44f3ee0..7dad0ea 100644
a
|
b
|
class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { |
79 | 79 | |
80 | 80 | $title = $item->title; |
81 | 81 | |
| 82 | /* translators: menu item has no label */ |
| 83 | if (empty($title)){ |
| 84 | $title = sprintf( __('(no label)') ); |
| 85 | $no_title_class = 'no-title'; |
| 86 | } |
| 87 | |
82 | 88 | if ( ! empty( $item->_invalid ) ) { |
83 | 89 | $classes[] = 'menu-item-invalid'; |
84 | 90 | /* translators: %s: title of menu item which is invalid */ |
… |
… |
class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { |
99 | 105 | <li id="menu-item-<?php echo $item_id; ?>" class="<?php echo implode(' ', $classes ); ?>"> |
100 | 106 | <dl class="menu-item-bar"> |
101 | 107 | <dt class="menu-item-handle"> |
102 | | <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> |
| 108 | <span class="item-title"><span class="menu-item-title <?php echo $no_title_class; ?>"><?php echo esc_html( $title ); ?></span> <span class="is-submenu" <?php echo $submenu_text; ?>><?php _e( 'sub item' ); ?></span></span> |
103 | 109 | <span class="item-controls"> |
104 | 110 | <span class="item-type"><?php echo esc_html( $item->type_label ); ?></span> |
105 | 111 | <span class="item-order hide-if-js"> |
… |
… |
function wp_nav_menu_update_menu_items ( $nav_menu_selected_id, $nav_menu_select |
1275 | 1281 | foreach( (array) $_POST['menu-item-db-id'] as $_key => $k ) { |
1276 | 1282 | |
1277 | 1283 | // Menu item title can't be blank |
1278 | | if ( ! isset( $_POST['menu-item-title'][ $_key ] ) || '' == $_POST['menu-item-title'][ $_key ] ) |
| 1284 | if ( ! isset( $_POST['menu-item-title'][ $_key ] ) ) |
1279 | 1285 | continue; |
1280 | 1286 | |
1281 | 1287 | $args = array(); |
diff --git a/src/wp-admin/js/image-edit.js b/src/wp-admin/js/image-edit.js
index 7bf2928..a11a94a 100644
a
|
b
|
var imageEdit = window.imageEdit = { |
67 | 67 | return false; |
68 | 68 | }, |
69 | 69 | |
| 70 | toggleHelpImg : function(el) { |
| 71 | $( el ).closest('span').siblings( '.imgedit-help' ).slideToggle( 'fast' ); |
| 72 | console.log(el); |
| 73 | return false; |
| 74 | }, |
| 75 | |
70 | 76 | getTarget : function(postid) { |
71 | 77 | return $('input[name="imgedit-target-' + postid + '"]:checked', '#imgedit-save-target-' + postid).val() || 'full'; |
72 | 78 | }, |
diff --git a/src/wp-includes/media-template.php b/src/wp-includes/media-template.php
index 1c7749a..bcc70c0 100644
a
|
b
|
function wp_print_media_templates() { |
362 | 362 | </label> |
363 | 363 | <# var maybeReadOnly = data.can.save || data.allowLocalEdits ? '' : 'readonly'; #> |
364 | 364 | <label class="setting" data-setting="title"> |
365 | | <span class="name"><?php _e('Title'); ?></span> |
| 365 | <span class="name"><?php _e('Title'); ?><a href="#" class="dashicons dashicons-editor-help imgedit-help-toggle" onclick="imageEdit.toggleHelpImg(this);return false;"></a></span> |
| 366 | <span class="imgedit-help">Mate, this is a title.</span> |
366 | 367 | <input type="text" value="{{ data.title }}" {{ maybeReadOnly }} /> |
367 | 368 | </label> |
368 | 369 | <# if ( 'audio' === data.type ) { #> |
… |
… |
function wp_print_media_templates() { |
377 | 378 | <?php endforeach; ?> |
378 | 379 | <# } #> |
379 | 380 | <label class="setting" data-setting="caption"> |
380 | | <span class="name"><?php _e( 'Caption' ); ?></span> |
| 381 | <span class="name"><?php _e( 'Caption' ); ?><a href="#" class="dashicons dashicons-editor-help imgedit-help-toggle" onclick="imageEdit.toggleHelpImg(this);return false;"></a></span> |
| 382 | <span class="imgedit-help">Mate, this is a caption.</span> |
381 | 383 | <textarea {{ maybeReadOnly }}>{{ data.caption }}</textarea> |
382 | 384 | </label> |
383 | 385 | <# if ( 'image' === data.type ) { #> |
384 | 386 | <label class="setting" data-setting="alt"> |
385 | | <span class="name"><?php _e( 'Alt Text' ); ?></span> |
| 387 | <span class="name"><?php _e( 'Alt Text' ); ?><a href="#" class="dashicons dashicons-editor-help imgedit-help-toggle" onclick="imageEdit.toggleHelpImg(this);return false;"></a></span> |
| 388 | <span class="imgedit-help">Mate, this is the Alt Text.</span> |
386 | 389 | <input type="text" value="{{ data.alt }}" {{ maybeReadOnly }} /> |
387 | 390 | </label> |
388 | 391 | <# } #> |
389 | 392 | <label class="setting" data-setting="description"> |
390 | | <span class="name"><?php _e('Description'); ?></span> |
| 393 | <span class="name"><?php _e('Description'); ?><a href="#" class="dashicons dashicons-editor-help imgedit-help-toggle" onclick="imageEdit.toggleHelpImg(this);return false;"></a></span> |
| 394 | <span class="imgedit-help">Mate, this is the Description.</span> |
391 | 395 | <textarea {{ maybeReadOnly }}>{{ data.description }}</textarea> |
392 | 396 | </label> |
393 | 397 | <label class="setting"> |