Changeset 42217
- Timestamp:
- 11/23/2017 04:08:42 AM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-advanced.php
r42201 r42217 628 628 629 629 if ( post_type_supports($post_type, 'editor') ) { 630 ?> 631 <div id="postdivrich" class="postarea<?php if ( $_wp_editor_expand ) { echo ' wp-editor-expand'; } ?>"> 630 $_wp_editor_expand_class = ''; 631 if ( $_wp_editor_expand ) { 632 $_wp_editor_expand_class = ' wp-editor-expand'; 633 } 634 ?> 635 <div id="postdivrich" class="postarea<?php echo $_wp_editor_expand_class; ?>"> 632 636 633 637 <?php wp_editor( $post->post_content, 'content', array( -
trunk/src/wp-admin/edit-tag-form.php
r41618 r42217 114 114 */ 115 115 do_action( "{$taxonomy}_term_edit_form_top", $tag, $taxonomy ); 116 117 $tag_name_value = ''; 118 if ( isset( $tag->name ) ) { 119 $tag_name_value = esc_attr( $tag->name ); 120 } 116 121 ?> 117 122 <table class="form-table"> 118 123 <tr class="form-field form-required term-name-wrap"> 119 124 <th scope="row"><label for="name"><?php _ex( 'Name', 'term name' ); ?></label></th> 120 <td><input name="name" id="name" type="text" value="<?php if ( isset( $tag->name ) ) echo esc_attr($tag->name); ?>" size="40" aria-required="true" />125 <td><input name="name" id="name" type="text" value="<?php echo $tag_name_value; ?>" size="40" aria-required="true" /> 121 126 <p class="description"><?php _e('The name is how it appears on your site.'); ?></p></td> 122 127 </tr> -
trunk/src/wp-admin/includes/file.php
r42112 r42217 1703 1703 } 1704 1704 _e('If you do not remember your credentials, you should contact your web host.'); 1705 1706 $password_value = ''; 1707 if ( defined('FTP_PASS') ) { 1708 $password_value = '*****'; 1709 } 1705 1710 ?></p> 1706 1711 <label for="hostname"> … … 1717 1722 <label for="password"> 1718 1723 <span class="field-title"><?php echo $label_pass; ?></span> 1719 <input name="password" type="password" id="password" value="<?php if ( defined('FTP_PASS') ) echo '*****'; ?>"<?php disabled( defined('FTP_PASS') ); ?> />1724 <input name="password" type="password" id="password" value="<?php echo $password_value; ?>"<?php disabled( defined('FTP_PASS') ); ?> /> 1720 1725 <em><?php if ( ! defined('FTP_PASS') ) _e( 'This password will not be stored on the server.' ); ?></em> 1721 1726 </label> -
trunk/src/wp-admin/includes/media.php
r41964 r42217 526 526 do_action( "admin_head_{$content_func}" ); 527 527 } 528 529 $body_id_attr = ''; 530 if ( isset( $GLOBALS['body_id'] ) ) { 531 $body_id_attr = ' id="' . $GLOBALS['body_id'] . '"'; 532 } 528 533 ?> 529 534 </head> 530 <body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-core-ui no-js">535 <body<?php echo $body_id_attr; ?> class="wp-core-ui no-js"> 531 536 <script type="text/javascript"> 532 537 document.body.className = document.body.className.replace('no-js', 'js'); … … 2739 2744 $image_edit_button = "<input type='button' id='imgedit-open-btn-$post->ID' onclick='imageEdit.open( $post->ID, \"$nonce\" )' class='button' value='" . esc_attr__( 'Edit Image' ) . "' /> <span class='spinner'></span>"; 2740 2745 } 2746 2747 $open_style = $not_open_style = ''; 2748 if ( $open ) { 2749 $open_style = ' style="display:none"'; 2750 } else { 2751 $not_open_style = ' style="display:none"'; 2752 } 2741 2753 ?> 2742 2754 2743 2755 <div class="imgedit-response" id="imgedit-response-<?php echo $attachment_id; ?>"></div> 2744 2756 2745 <div<?php if ( $open ) echo ' style="display:none"'; ?> class="wp_attachment_image wp-clearfix" id="media-head-<?php echo $attachment_id; ?>">2757 <div<?php echo $open_style; ?> class="wp_attachment_image wp-clearfix" id="media-head-<?php echo $attachment_id; ?>"> 2746 2758 <p id="thumbnail-head-<?php echo $attachment_id; ?>"><img class="thumbnail" src="<?php echo set_url_scheme( $thumb_url[0] ); ?>" style="max-width:100%" alt="" /></p> 2747 2759 <p><?php echo $image_edit_button; ?></p> 2748 2760 </div> 2749 <div<?php if ( ! $open ) echo ' style="display:none"'; ?> class="image-editor" id="image-editor-<?php echo $attachment_id; ?>">2761 <div<?php echo $not_open_style; ?> class="image-editor" id="image-editor-<?php echo $attachment_id; ?>"> 2750 2762 <?php if ( $open ) wp_image_editor( $attachment_id ); ?> 2751 2763 </div> -
trunk/src/wp-admin/includes/meta-boxes.php
r42203 r42217 38 38 <div id="minor-publishing-actions"> 39 39 <div id="save-action"> 40 <?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> 41 <input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" class="button" /> 40 <?php 41 if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { 42 $private_style = ''; 43 if ( 'private' == $post->post_status ) { 44 $private_style = 'style="display:none"'; 45 } 46 ?> 47 <input <?php echo $private_style; ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" class="button" /> 42 48 <span class="spinner"></span> 43 49 <?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?> … … 104 110 ?> 105 111 </span> 106 <?php if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { ?> 107 <a href="#post_status" <?php if ( 'private' == $post->post_status ) { ?>style="display:none;" <?php } ?>class="edit-post-status hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit status' ); ?></span></a> 112 <?php 113 if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) { 114 $private_style = ''; 115 if ( 'private' == $post->post_status ) { 116 $private_style = 'style="display:none"'; 117 } 118 ?> 119 <a href="#post_status" <?php echo $private_style; ?> class="edit-post-status hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit status' ); ?></span></a> 108 120 109 121 <div id="post-status-select" class="hide-if-js"> -
trunk/src/wp-admin/includes/nav-menu.php
r41987 r42217 391 391 ); 392 392 393 $most_recent_url = $view_all_url = $search_url = ''; 394 if ( $nav_menu_selected_id ) { 395 $most_recent_url = esc_url(add_query_arg($post_type_name . '-tab', 'most-recent', remove_query_arg($removed_args))); 396 $view_all_url = esc_url(add_query_arg($post_type_name . '-tab', 'all', remove_query_arg($removed_args))); 397 $search_url = esc_url(add_query_arg($post_type_name . '-tab', 'search', remove_query_arg($removed_args))); 398 } 393 399 ?> 394 400 <div id="posttype-<?php echo $post_type_name; ?>" class="posttypediv"> 395 401 <ul id="posttype-<?php echo $post_type_name; ?>-tabs" class="posttype-tabs add-menu-item-tabs"> 396 402 <li <?php echo ( 'most-recent' == $current_tab ? ' class="tabs"' : '' ); ?>> 397 <a class="nav-tab-link" data-type="tabs-panel-posttype-<?php echo esc_attr( $post_type_name ); ?>-most-recent" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($post_type_name . '-tab', 'most-recent', remove_query_arg($removed_args))); ?>#tabs-panel-posttype-<?php echo $post_type_name; ?>-most-recent">403 <a class="nav-tab-link" data-type="tabs-panel-posttype-<?php echo esc_attr( $post_type_name ); ?>-most-recent" href="<?php echo $most_recent_url; ?>#tabs-panel-posttype-<?php echo $post_type_name; ?>-most-recent"> 398 404 <?php _e( 'Most Recent' ); ?> 399 405 </a> 400 406 </li> 401 407 <li <?php echo ( 'all' == $current_tab ? ' class="tabs"' : '' ); ?>> 402 <a class="nav-tab-link" data-type="<?php echo esc_attr( $post_type_name ); ?>-all" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($post_type_name . '-tab', 'all', remove_query_arg($removed_args))); ?>#<?php echo $post_type_name; ?>-all">408 <a class="nav-tab-link" data-type="<?php echo esc_attr( $post_type_name ); ?>-all" href="<?php echo $view_all_url; ?>#<?php echo $post_type_name; ?>-all"> 403 409 <?php _e( 'View All' ); ?> 404 410 </a> 405 411 </li> 406 412 <li <?php echo ( 'search' == $current_tab ? ' class="tabs"' : '' ); ?>> 407 <a class="nav-tab-link" data-type="tabs-panel-posttype-<?php echo esc_attr( $post_type_name ); ?>-search" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($post_type_name . '-tab', 'search', remove_query_arg($removed_args))); ?>#tabs-panel-posttype-<?php echo $post_type_name; ?>-search">413 <a class="nav-tab-link" data-type="tabs-panel-posttype-<?php echo esc_attr( $post_type_name ); ?>-search" href="<?php echo $search_url; ?>#tabs-panel-posttype-<?php echo $post_type_name; ?>-search"> 408 414 <?php _e( 'Search'); ?> 409 415 </a> … … 679 685 ); 680 686 687 $most_used_url = $view_all_url = $search_url = ''; 688 if ( $nav_menu_selected_id ) { 689 $most_used_url = esc_url(add_query_arg($taxonomy_name . '-tab', 'most-used', remove_query_arg($removed_args))); 690 $view_all_url = esc_url(add_query_arg($taxonomy_name . '-tab', 'all', remove_query_arg($removed_args))); 691 $search_url = esc_url(add_query_arg($taxonomy_name . '-tab', 'search', remove_query_arg($removed_args))); 692 } 681 693 ?> 682 694 <div id="taxonomy-<?php echo $taxonomy_name; ?>" class="taxonomydiv"> 683 695 <ul id="taxonomy-<?php echo $taxonomy_name; ?>-tabs" class="taxonomy-tabs add-menu-item-tabs"> 684 696 <li <?php echo ( 'most-used' == $current_tab ? ' class="tabs"' : '' ); ?>> 685 <a class="nav-tab-link" data-type="tabs-panel-<?php echo esc_attr( $taxonomy_name ); ?>-pop" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($taxonomy_name . '-tab', 'most-used', remove_query_arg($removed_args))); ?>#tabs-panel-<?php echo $taxonomy_name; ?>-pop">697 <a class="nav-tab-link" data-type="tabs-panel-<?php echo esc_attr( $taxonomy_name ); ?>-pop" href="<?php echo $most_used_url; ?>#tabs-panel-<?php echo $taxonomy_name; ?>-pop"> 686 698 <?php echo esc_html( $taxonomy->labels->most_used ); ?> 687 699 </a> 688 700 </li> 689 701 <li <?php echo ( 'all' == $current_tab ? ' class="tabs"' : '' ); ?>> 690 <a class="nav-tab-link" data-type="tabs-panel-<?php echo esc_attr( $taxonomy_name ); ?>-all" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($taxonomy_name . '-tab', 'all', remove_query_arg($removed_args))); ?>#tabs-panel-<?php echo $taxonomy_name; ?>-all">702 <a class="nav-tab-link" data-type="tabs-panel-<?php echo esc_attr( $taxonomy_name ); ?>-all" href="<?php echo $view_all_url; ?>#tabs-panel-<?php echo $taxonomy_name; ?>-all"> 691 703 <?php _e( 'View All' ); ?> 692 704 </a> 693 705 </li> 694 706 <li <?php echo ( 'search' == $current_tab ? ' class="tabs"' : '' ); ?>> 695 <a class="nav-tab-link" data-type="tabs-panel-search-taxonomy-<?php echo esc_attr( $taxonomy_name ); ?>" href="<?php if ( $nav_menu_selected_id ) echo esc_url(add_query_arg($taxonomy_name . '-tab', 'search', remove_query_arg($removed_args))); ?>#tabs-panel-search-taxonomy-<?php echo $taxonomy_name; ?>">707 <a class="nav-tab-link" data-type="tabs-panel-search-taxonomy-<?php echo esc_attr( $taxonomy_name ); ?>" href="<?php echo $search_url; ?>#tabs-panel-search-taxonomy-<?php echo $taxonomy_name; ?>"> 696 708 <?php _e( 'Search' ); ?> 697 709 </a> -
trunk/src/wp-admin/includes/widgets.php
r41621 r42217 182 182 $widget_number = isset($control['params'][0]['number']) ? $control['params'][0]['number'] : ''; 183 183 $id_base = isset($control['id_base']) ? $control['id_base'] : $widget_id; 184 $width = isset($control['width']) ? $control['width'] : ''; 185 $height = isset($control['height']) ? $control['height'] : ''; 184 186 $multi_number = isset($sidebar_args['_multi_num']) ? $sidebar_args['_multi_num'] : ''; 185 187 $add_new = isset($sidebar_args['_add']) ? $sidebar_args['_add'] : ''; … … 245 247 echo "\t\t<p>" . __('There are no options for this widget.') . "</p>\n"; 246 248 } 249 250 $noform_class = ''; 251 if ( 'noform' === $has_form ) { 252 $noform_class = ' widget-control-noform'; 253 } 247 254 ?> 248 255 <?php echo $after_widget_content; ?> 249 256 <input type="hidden" name="widget-id" class="widget-id" value="<?php echo esc_attr($id_format); ?>" /> 250 257 <input type="hidden" name="id_base" class="id_base" value="<?php echo esc_attr($id_base); ?>" /> 251 <input type="hidden" name="widget-width" class="widget-width" value="<?php if (isset( $control['width'] )) echo esc_attr($control['width']); ?>" />252 <input type="hidden" name="widget-height" class="widget-height" value="<?php if (isset( $control['height'] )) echo esc_attr($control['height']); ?>" />258 <input type="hidden" name="widget-width" class="widget-width" value="<?php echo esc_attr($width); ?>" /> 259 <input type="hidden" name="widget-height" class="widget-height" value="<?php echo esc_attr($height); ?>" /> 253 260 <input type="hidden" name="widget_number" class="widget_number" value="<?php echo esc_attr($widget_number); ?>" /> 254 261 <input type="hidden" name="multi_number" class="multi_number" value="<?php echo esc_attr($multi_number); ?>" /> … … 263 270 </span> 264 271 </div> 265 <div class="alignright<?php if ( 'noform' === $has_form ) echo ' widget-control-noform'; ?>">272 <div class="alignright<?php echo $noform_class; ?>"> 266 273 <?php submit_button( __( 'Save' ), 'primary widget-control-save right', 'savewidget', false, array( 'id' => 'widget-' . esc_attr( $id_format ) . '-savewidget' ) ); ?> 267 274 <span class="spinner"></span> -
trunk/src/wp-admin/nav-menus.php
r41868 r42217 590 590 ); 591 591 endif; 592 593 $nav_tab_active_class = ''; 594 if ( ! isset( $_GET['action'] ) || isset( $_GET['action'] ) && 'locations' != $_GET['action'] ) { 595 $nav_tab_active_class = ' nav-tab-active'; 596 } 592 597 ?> 593 598 … … 595 600 596 601 <h2 class="nav-tab-wrapper wp-clearfix"> 597 <a href="<?php echo admin_url( 'nav-menus.php' ); ?>" class="nav-tab<?php if ( ! isset( $_GET['action'] ) || isset( $_GET['action'] ) && 'locations' != $_GET['action'] ) echo ' nav-tab-active'; ?>"><?php esc_html_e( 'Edit Menus' ); ?></a>602 <a href="<?php echo admin_url( 'nav-menus.php' ); ?>" class="nav-tab<?php echo $nav_tab_active_class; ?>"><?php esc_html_e( 'Edit Menus' ); ?></a> 598 603 <?php if ( $num_locations && $menu_count ) : ?> 599 604 <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'locations' ), admin_url( 'nav-menus.php' ) ) ); ?>" class="nav-tab<?php if ( $locations_screen ) echo ' nav-tab-active'; ?>"><?php esc_html_e( 'Manage Locations' ); ?></a> … … 631 636 <select name="menu-locations[<?php echo $_location; ?>]" id="locations-<?php echo $_location; ?>"> 632 637 <option value="0"><?php printf( '— %s —', esc_html__( 'Select a Menu' ) ); ?></option> 633 <?php foreach ( $nav_menus as $menu ) : ?> 634 <?php $selected = isset( $menu_locations[$_location] ) && $menu_locations[$_location] == $menu->term_id; ?> 635 <option <?php if ( $selected ) echo 'data-orig="true"'; ?> <?php selected( $selected ); ?> value="<?php echo $menu->term_id; ?>"> 638 <?php 639 foreach ( $nav_menus as $menu ) : 640 $data_orig = ''; 641 $selected = isset( $menu_locations[$_location] ) && $menu_locations[$_location] == $menu->term_id; 642 if ( $selected ) { 643 $data_orig = 'data-orig="true"'; 644 } 645 ?> 646 <option <?php echo $data_orig; ?> <?php selected( $selected ); ?> value="<?php echo $menu->term_id; ?>"> 636 647 <?php echo wp_html_excerpt( $menu->name, 40, '…' ); ?> 637 648 </option> … … 722 733 </span><!-- /add-new-menu-action --> 723 734 </form> 724 <?php endif; ?> 735 <?php 736 endif; 737 738 $metabox_holder_disabled_class = ''; 739 if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) { 740 $metabox_holder_disabled_class = ' metabox-holder-disabled'; 741 } 742 ?> 725 743 </div><!-- /manage-menus --> 726 744 <div id="nav-menus-frame" class="wp-clearfix"> 727 <div id="menu-settings-column" class="metabox-holder<?php if ( isset( $_GET['menu'] ) && '0' == $_GET['menu'] ) { echo ' metabox-holder-disabled'; }?>">745 <div id="menu-settings-column" class="metabox-holder<?php echo $metabox_holder_disabled_class; ?>"> 728 746 729 747 <div class="clear"></div> … … 740 758 <div id="menu-management"> 741 759 <form id="update-nav-menu" method="post" enctype="multipart/form-data"> 742 <div class="menu-edit <?php if ( $add_new_screen ) echo 'blank-slate'; ?>"> 760 <?php 761 $new_screen_class = ''; 762 if ( $add_new_screen ) { 763 $new_screen_class = 'blank-slate'; 764 } 765 ?> 766 <div class="menu-edit <?php echo $new_screen_class; ?>"> 743 767 <input type="hidden" name="nav-menu-data"> 744 768 <?php … … 771 795 <?php if ( ! $add_new_screen ) : ?> 772 796 <h3><?php _e( 'Menu Structure' ); ?></h3> 773 <?php $starter_copy = ( $one_theme_location_no_menus ) ? __( 'Edit your default menu by adding or removing items. Drag each item into the order you prefer. Click Create Menu to save your changes.' ) : __( 'Drag each item into the order you prefer. Click the arrow on the right of the item to reveal additional configuration options.' ); ?> 774 <div class="drag-instructions post-body-plain" <?php if ( isset( $menu_items ) && 0 == count( $menu_items ) ) { ?>style="display: none;"<?php } ?>> 797 <?php 798 $hide_style = ''; 799 if ( isset( $menu_items ) && 0 == count( $menu_items ) ) { 800 $hide_style = 'style="display: none;"'; 801 } 802 $starter_copy = ( $one_theme_location_no_menus ) ? __( 'Edit your default menu by adding or removing items. Drag each item into the order you prefer. Click Create Menu to save your changes.' ) : __( 'Drag each item into the order you prefer. Click the arrow on the right of the item to reveal additional configuration options.' ); 803 ?> 804 <div class="drag-instructions post-body-plain" <?php echo $hide_style; ?>> 775 805 <p><?php echo $starter_copy; ?></p> 776 806 </div> … … 788 818 <input type="hidden" name="use-location" value="<?php echo esc_attr( $_GET['use-location'] ); ?>" /> 789 819 <?php endif; ?> 790 <?php endif; ?> 791 <div class="menu-settings" <?php if ( $one_theme_location_no_menus ) { ?>style="display: none;"<?php } ?>> 820 <?php 821 endif; 822 823 $no_menus_style = ''; 824 if ( $one_theme_location_no_menus ) { 825 $no_menus_style = 'style="display: none;"'; 826 } 827 ?> 828 <div class="menu-settings" <?php echo $no_menus_style; ?>> 792 829 <h3><?php _e( 'Menu Settings' ); ?></h3> 793 830 <?php -
trunk/src/wp-admin/options-discussion.php
r42201 r42217 184 184 185 185 $show_avatars = get_option( 'show_avatars' ); 186 $show_avatars_class = ''; 187 if ( ! $show_avatars ) { 188 $show_avatars_class = ' hide-if-js'; 189 } 186 190 ?> 187 191 … … 196 200 </fieldset></td> 197 201 </tr> 198 <tr class="avatar-settings<?php if ( ! $show_avatars ) echo ' hide-if-js'; ?>">202 <tr class="avatar-settings<?php echo $show_avatars_class; ?>"> 199 203 <th scope="row"><?php _e('Maximum Rating'); ?></th> 200 204 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Maximum Rating'); ?></span></legend> … … 219 223 </fieldset></td> 220 224 </tr> 221 <tr class="avatar-settings<?php if ( ! $show_avatars ) echo ' hide-if-js'; ?>">225 <tr class="avatar-settings<?php echo $show_avatars_class; ?>"> 222 226 <th scope="row"><?php _e('Default Avatar'); ?></th> 223 227 <td class="defaultavatarpicker"><fieldset><legend class="screen-reader-text"><span><?php _e('Default Avatar'); ?></span></legend> -
trunk/src/wp-admin/options-general.php
r42201 r42217 69 69 </tr> 70 70 71 <?php if ( !is_multisite() ) { ?> 71 <?php 72 if ( !is_multisite() ) { 73 $wp_site_url_class = $wp_home_class = ''; 74 if ( defined( 'WP_SITEURL' ) ) { 75 $wp_site_url_class = ' disabled'; 76 } 77 if ( defined( 'WP_HOME' ) ) { 78 $wp_home_class = ' disabled'; 79 } 80 ?> 72 81 73 82 <tr> 74 83 <th scope="row"><label for="siteurl"><?php _e('WordPress Address (URL)') ?></label></th> 75 <td><input name="siteurl" type="url" id="siteurl" value="<?php form_option( 'siteurl' ); ?>"<?php disabled( defined( 'WP_SITEURL' ) ); ?> class="regular-text code<?php if ( defined( 'WP_SITEURL' ) ) echo ' disabled'?>" /></td>84 <td><input name="siteurl" type="url" id="siteurl" value="<?php form_option( 'siteurl' ); ?>"<?php disabled( defined( 'WP_SITEURL' ) ); ?> class="regular-text code<?php echo $wp_site_url_class; ?>" /></td> 76 85 </tr> 77 86 78 87 <tr> 79 88 <th scope="row"><label for="home"><?php _e('Site Address (URL)') ?></label></th> 80 <td><input name="home" type="url" id="home" aria-describedby="home-description" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( defined( 'WP_HOME' ) ) echo ' disabled'?>" />89 <td><input name="home" type="url" id="home" aria-describedby="home-description" value="<?php form_option( 'home' ); ?>"<?php disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php echo $wp_home_class; ?>" /> 81 90 <?php if ( ! defined( 'WP_HOME' ) ) : ?> 82 91 <p class="description" id="home-description"><?php -
trunk/src/wp-admin/setup-config.php
r42201 r42217 92 92 $body_classes = (array) $body_classes; 93 93 $body_classes[] = 'wp-core-ui'; 94 $dir_attr = ''; 94 95 if ( is_rtl() ) { 95 96 $body_classes[] = 'rtl'; 97 $dir_attr = ' dir="rtl"'; 96 98 } 97 99 … … 99 101 ?> 100 102 <!DOCTYPE html> 101 <html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>103 <html xmlns="http://www.w3.org/1999/xhtml"<?php echo $dir_attr; ?>> 102 104 <head> 103 105 <meta name="viewport" content="width=device-width" /> -
trunk/src/wp-admin/themes.php
r42201 r42217 251 251 $aria_action = esc_attr( $theme['id'] . '-action' ); 252 252 $aria_name = esc_attr( $theme['id'] . '-name' ); 253 254 $active_class = ''; 255 if ( $theme['active'] ) { 256 $active_class = ' active'; 257 } 253 258 ?> 254 <div class="theme<?php if ( $theme['active'] ) echo ' active'; ?>" tabindex="0" aria-describedby="<?php echo $aria_action . ' ' . $aria_name; ?>">259 <div class="theme<?php echo $active_class; ?>" tabindex="0" aria-describedby="<?php echo $aria_action . ' ' . $aria_name; ?>"> 255 260 <?php if ( ! empty( $theme['screenshot'][0] ) ) { ?> 256 261 <div class="theme-screenshot"> -
trunk/src/wp-admin/user-edit.php
r42201 r42217 245 245 <tr class="user-rich-editing-wrap"> 246 246 <th scope="row"><?php _e( 'Visual Editor' ); ?></th> 247 <td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php if ( ! empty( $profileuser->rich_editing ) )checked( 'false', $profileuser->rich_editing ); ?> /> <?php _e( 'Disable the visual editor when writing' ); ?></label></td>247 <td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php checked( 'false', $profileuser->rich_editing ); ?> /> <?php _e( 'Disable the visual editor when writing' ); ?></label></td> 248 248 </tr> 249 249 <?php endif; ?> … … 264 264 <th scope="row"><?php _e( 'Syntax Highlighting' ); ?></th> 265 265 <td> 266 <label for="syntax_highlighting"><input name="syntax_highlighting" type="checkbox" id="syntax_highlighting" value="false" <?php if ( ! empty( $profileuser->syntax_highlighting ) )checked( 'false', $profileuser->syntax_highlighting ); ?> /> <?php _e( 'Disable syntax highlighting when editing code' ); ?></label>266 <label for="syntax_highlighting"><input name="syntax_highlighting" type="checkbox" id="syntax_highlighting" value="false" <?php checked( 'false', $profileuser->syntax_highlighting ); ?> /> <?php _e( 'Disable syntax highlighting when editing code' ); ?></label> 267 267 </td> 268 268 </tr> … … 291 291 <tr class="user-comment-shortcuts-wrap"> 292 292 <th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th> 293 <td><label for="comment_shortcuts"><input type="checkbox" name="comment_shortcuts" id="comment_shortcuts" value="true" <?php if ( ! empty( $profileuser->comment_shortcuts ) )checked( 'true', $profileuser->comment_shortcuts ); ?> /> <?php _e('Enable keyboard shortcuts for comment moderation.'); ?></label> <?php _e('<a href="https://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">More information</a>'); ?></td>293 <td><label for="comment_shortcuts"><input type="checkbox" name="comment_shortcuts" id="comment_shortcuts" value="true" <?php checked( 'true', $profileuser->comment_shortcuts ); ?> /> <?php _e('Enable keyboard shortcuts for comment moderation.'); ?></label> <?php _e('<a href="https://codex.wordpress.org/Keyboard_Shortcuts" target="_blank">More information</a>'); ?></td> 294 294 </tr> 295 295 <?php endif; ?> -
trunk/src/wp-content/themes/twentyeleven/header.php
r31265 r42217 120 120 // Has the text been hidden? 121 121 if ( 'blank' == get_header_textcolor() ) : 122 $header_image_class = ''; 123 if ( $header_image ) { 124 $header_image_class = ' with-image'; 125 } 122 126 ?> 123 <div class="only-search<?php if ( $header_image ) : ?> with-image<?php endif; ?>">127 <div class="only-search<?php echo $header_image_class; ?>"> 124 128 <?php get_search_form(); ?> 125 129 </div> -
trunk/src/wp-content/themes/twentyseventeen/functions.php
r41756 r42217 399 399 require_once( get_parent_theme_file_path( '/inc/color-patterns.php' ) ); 400 400 $hue = absint( get_theme_mod( 'colorscheme_hue', 250 ) ); 401 402 $customize_preview_data_hue = ''; 403 if ( is_customize_preview() ) { 404 $customize_preview_data_hue = 'data-hue="' . $hue . '"'; 405 } 401 406 ?> 402 <style type="text/css" id="custom-theme-colors" <?php if ( is_customize_preview() ) { echo 'data-hue="' . $hue . '"'; }?>>407 <style type="text/css" id="custom-theme-colors" <?php echo $customize_preview_data_hue; ?>> 403 408 <?php echo twentyseventeen_custom_colors_css(); ?> 404 409 </style> -
trunk/src/wp-includes/customize/class-wp-customize-nav-menu-location-control.php
r41899 r42217 57 57 return; 58 58 } 59 60 $value_hidden_class = $no_value_hidden_class = ''; 61 if ( $this->value() ) { 62 $value_hidden_class = ' hidden'; 63 } else { 64 $no_value_hidden_class = ' hidden'; 65 } 59 66 ?> 60 67 <label> … … 75 82 </select> 76 83 </label> 77 <button type="button" class="button-link create-menu<?php if ( $this->value() ) { echo ' hidden'; }?>" data-location-id="<?php echo esc_attr( $this->location_id ); ?>" aria-label="<?php esc_attr_e( 'Create a menu for this location' ); ?>"><?php _e( '+ Create New Menu' ); ?></button>78 <button type="button" class="button-link edit-menu<?php if ( ! $this->value() ) { echo ' hidden'; }?>" aria-label="<?php esc_attr_e( 'Edit selected menu' ); ?>"><?php _e( 'Edit Menu' ); ?></button>84 <button type="button" class="button-link create-menu<?php echo $value_hidden_class; ?>" data-location-id="<?php echo esc_attr( $this->location_id ); ?>" aria-label="<?php esc_attr_e( 'Create a menu for this location' ); ?>"><?php _e( '+ Create New Menu' ); ?></button> 85 <button type="button" class="button-link edit-menu<?php echo $no_value_hidden_class; ?>" aria-label="<?php esc_attr_e( 'Edit selected menu' ); ?>"><?php _e( 'Edit Menu' ); ?></button> 79 86 <?php 80 87 } -
trunk/src/wp-includes/functions.php
r42207 r42217 2756 2756 elseif ( function_exists( 'is_rtl' ) && is_rtl() ) 2757 2757 $text_direction = 'rtl'; 2758 2759 if ( function_exists( 'language_attributes' ) && function_exists( 'is_rtl' ) ) { 2760 $dir_attr = get_language_attributes(); 2761 } else { 2762 $dir_attr = "dir='$text_direction'"; 2763 } 2758 2764 ?> 2759 2765 <!DOCTYPE html> 2760 <html xmlns="http://www.w3.org/1999/xhtml" <?php if ( function_exists( 'language_attributes' ) && function_exists( 'is_rtl' ) ) language_attributes(); else echo "dir='$text_direction'"; ?>>2766 <html xmlns="http://www.w3.org/1999/xhtml" <?php echo $dir_attr; ?>> 2761 2767 <head> 2762 2768 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> … … 3769 3775 nocache_headers(); 3770 3776 header( 'Content-Type: text/html; charset=utf-8' ); 3777 3778 $dir_attr = ''; 3779 if ( is_rtl() ) { 3780 $dir_attr = ' dir="rtl"'; 3781 } 3771 3782 ?> 3772 3783 <!DOCTYPE html> 3773 <html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>3784 <html xmlns="http://www.w3.org/1999/xhtml"<?php echo $dir_attr; ?>> 3774 3785 <head> 3775 3786 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -
trunk/src/wp-includes/load.php
r41922 r42217 212 212 header( 'Content-Type: text/html; charset=utf-8' ); 213 213 header( 'Retry-After: 600' ); 214 215 $dir_attr = ''; 216 if ( is_rtl() ) { 217 $dir_attr = ' dir="rtl"'; 218 } 214 219 ?> 215 220 <!DOCTYPE html> 216 <html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>221 <html xmlns="http://www.w3.org/1999/xhtml"<?php echo $dir_attr; ?>> 217 222 <head> 218 223 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -
trunk/src/wp-includes/widgets/class-wp-nav-menu-widget.php
r41868 r42217 121 121 $menus = wp_get_nav_menus(); 122 122 123 $empty_menus_style = $not_empty_menus_style = ''; 124 if ( empty( $menus ) ) { 125 $empty_menus_style = ' style="display:none" '; 126 } else { 127 $not_empty_menus_style = ' style="display:none" '; 128 } 129 130 $nav_menu_style = ''; 131 if ( ! $nav_menu ) { 132 $nav_menu_style = 'display: none;'; 133 } 134 123 135 // If no menus exists, direct the user to go and create some. 124 136 ?> 125 <p class="nav-menu-widget-no-menus-message" <?php if ( ! empty( $menus ) ) { echo ' style="display:none" '; }?>>137 <p class="nav-menu-widget-no-menus-message" <?php echo $not_empty_menus_style; ?>> 126 138 <?php 127 139 if ( $wp_customize instanceof WP_Customize_Manager ) { … … 133 145 <?php echo sprintf( __( 'No menus have been created yet. <a href="%s">Create some</a>.' ), esc_attr( $url ) ); ?> 134 146 </p> 135 <div class="nav-menu-widget-form-controls" <?php if ( empty( $menus ) ) { echo ' style="display:none" '; }?>>147 <div class="nav-menu-widget-form-controls" <?php echo $empty_menus_style; ?>> 136 148 <p> 137 149 <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ) ?></label> … … 150 162 </p> 151 163 <?php if ( $wp_customize instanceof WP_Customize_Manager ) : ?> 152 <p class="edit-selected-nav-menu" style="<?php if ( ! $nav_menu ) { echo 'display: none;'; }?>">164 <p class="edit-selected-nav-menu" style="<?php echo $nav_menu_style; ?>"> 153 165 <button type="button" class="button"><?php _e( 'Edit Menu' ) ?></button> 154 166 </p> -
trunk/src/wp-signup.php
r41911 r42217 167 167 ?> 168 168 </p> 169 <?php endif; // Languages. ?> 169 <?php 170 endif; // Languages. 171 172 $blog_public_on_checked = $blog_public_off_checked = ''; 173 if ( isset( $_POST['blog_public'] ) && '0' == $_POST['blog_public'] ) { 174 $blog_public_off_checked = 'checked="checked"'; 175 } else { 176 $blog_public_on_checked = 'checked="checked"'; 177 } 178 ?> 170 179 171 180 <div id="privacy"> … … 175 184 <br style="clear:both" /> 176 185 <label class="checkbox" for="blog_public_on"> 177 <input type="radio" id="blog_public_on" name="blog_public" value="1" <?php if ( !isset( $_POST['blog_public'] ) || $_POST['blog_public'] == '1' ) { ?>checked="checked"<?php }?> />186 <input type="radio" id="blog_public_on" name="blog_public" value="1" <?php echo $blog_public_on_checked; ?> /> 178 187 <strong><?php _e( 'Yes' ); ?></strong> 179 188 </label> 180 189 <label class="checkbox" for="blog_public_off"> 181 <input type="radio" id="blog_public_off" name="blog_public" value="0" <?php if ( isset( $_POST['blog_public'] ) && $_POST['blog_public'] == '0' ) { ?>checked="checked"<?php }?> />190 <input type="radio" id="blog_public_off" name="blog_public" value="0" <?php echo $blog_public_off_checked; ?> /> 182 191 <strong><?php _e( 'No' ); ?></strong> 183 192 </label>
Note: See TracChangeset
for help on using the changeset viewer.