<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[34991] trunk/src/wp-admin: Administration: Convert H5 usage in Screen Options to use fieldsets and legends.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/34991">34991</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/34991","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>afercia</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2015-10-09 18:04:18 +0000 (Fri, 09 Oct 2015)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Administration: Convert H5 usage in Screen Options to use fieldsets and legends.
These H5 (heading level 5) don't allow for a good headings hierarchy and shouldn't be headings in the first place. Each group of options has now its own fieldset and legend.
In `render_screen_options()`, introduce two new "render" methods: `render_meta_boxes_preferences()` and `render_list_table_columns_preferences()` for consistency with already existing render methods and cleaner code.
Props joedolson, afercia.
Fixes <a href="https://core.trac.wordpress.org/ticket/33646">#33646</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadmincsscommoncss">trunk/src/wp-admin/css/common.css</a></li>
<li><a href="#trunksrcwpadmincsscustomizenavmenuscss">trunk/src/wp-admin/css/customize-nav-menus.css</a></li>
<li><a href="#trunksrcwpadminincludesclasswpscreenphp">trunk/src/wp-admin/includes/class-wp-screen.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadmincsscommoncss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/css/common.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/common.css 2015-10-09 17:46:24 UTC (rev 34990)
+++ trunk/src/wp-admin/css/common.css 2015-10-09 18:04:18 UTC (rev 34991)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1570,39 +1570,49 @@
</span><span class="cx" style="display: block; padding: 0 10px"> background-position: bottom left;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-#screen-options-wrap h5,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+#screen-options-wrap h5, /* Back-compat for old plugins */
+#screen-options-wrap legend,
</ins><span class="cx" style="display: block; padding: 0 10px"> #contextual-help-wrap h5 {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- margin: 8px 0;
- font-size: 13px;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ margin: 0;
+ padding: 8px 0;
+ font-size: 13px;
+ font-weight: 600;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.ie8 #screen-options-wrap legend {
+ color: inherit;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> .metabox-prefs label {
</span><span class="cx" style="display: block; padding: 0 10px"> display: inline-block;
</span><span class="cx" style="display: block; padding: 0 10px"> padding-right: 15px;
</span><span class="cx" style="display: block; padding: 0 10px"> line-height: 30px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.metabox-prefs label input[type=checkbox] {
- margin-top: -4px;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+#number-of-columns {
+ display: inline-block;
+ vertical-align: middle;
+ line-height: 30px;
+}
+
+.metabox-prefs input[type=checkbox] {
+ margin-top: 0;
</ins><span class="cx" style="display: block; padding: 0 10px"> margin-right: 6px;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.metabox-prefs label input {
- margin: 0 5px 0 2px;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.metabox-prefs label input,
+.metabox-prefs label input[type=checkbox] {
+ margin: -4px 5px 0 0;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> .metabox-prefs .columns-prefs label input {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- margin: 0 2px;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ margin: -1px 2px 0 0;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> .metabox-prefs label a {
</span><span class="cx" style="display: block; padding: 0 10px"> display: none;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-.metabox-prefs .screen-options {
- padding-top: 10px;
-}
-
</del><span class="cx" style="display: block; padding: 0 10px"> .metabox-prefs .screen-options input,
</span><span class="cx" style="display: block; padding: 0 10px"> .metabox-prefs .screen-options label {
</span><span class="cx" style="display: block; padding: 0 10px"> margin-top: 0;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1619,6 +1629,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> padding-right: 0;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+.screen-options + .screen-options {
+ margin-top: 10px;
+}
+
</ins><span class="cx" style="display: block; padding: 0 10px"> /*------------------------------------------------------------------------------
</span><span class="cx" style="display: block; padding: 0 10px"> 6.2 - Help Menu
</span><span class="cx" style="display: block; padding: 0 10px"> ------------------------------------------------------------------------------*/
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1900,7 +1914,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> .columns-prefs label {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- padding: 0 5px;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ padding: 0 10px 0 0;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /* @todo: what is this doing here */
</span></span></pre></div>
<a id="trunksrcwpadmincsscustomizenavmenuscss"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/css/customize-nav-menus.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/css/customize-nav-menus.css 2015-10-09 17:46:24 UTC (rev 34990)
+++ trunk/src/wp-admin/css/customize-nav-menus.css 2015-10-09 18:04:18 UTC (rev 34991)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -349,7 +349,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> display: none;
</span><span class="cx" style="display: block; padding: 0 10px"> background: #fff;
</span><span class="cx" style="display: block; padding: 0 10px"> border-top: 1px solid #ddd;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- padding: 4px 15px 0;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ padding: 4px 15px 15px;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> .wp-customizer .metabox-prefs label {
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpscreenphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-screen.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-screen.php 2015-10-09 17:46:24 UTC (rev 34990)
+++ trunk/src/wp-admin/includes/class-wp-screen.php 2015-10-09 18:04:18 UTC (rev 34991)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -918,9 +918,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $this->_screen_settings = '<p><a id="access-on" href="widgets.php?widgets-access=on">' . __('Enable accessibility mode') . '</a><a id="access-off" href="widgets.php?widgets-access=off">' . __('Disable accessibility mode') . "</a></p>\n";
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> case 'post' :
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expand = '<div class="editor-expand hidden"><label for="editor-expand-toggle">';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $expand = '<fieldset class="editor-expand hidden"><legend>' . __( 'Additional settings' ) . '</legend><label for="editor-expand-toggle">';
</ins><span class="cx" style="display: block; padding: 0 10px"> $expand .= '<input type="checkbox" id="editor-expand-toggle"' . checked( get_user_setting( 'editor_expand', 'on' ), 'on', false ) . ' />';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $expand .= __( 'Enable full-height editor and distraction-free functionality.' ) . '</label></div>';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $expand .= __( 'Enable full-height editor and distraction-free functionality.' ) . '</label></fieldset>';
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->_screen_settings = $expand;
</span><span class="cx" style="display: block; padding: 0 10px"> break;
</span><span class="cx" style="display: block; padding: 0 10px"> default:
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -969,82 +969,109 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function render_screen_options( $options = array() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_meta_boxes;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> $options = wp_parse_args( $options, array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'wrap' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $columns = get_column_headers( $this );
- $hidden = get_hidden_columns( $this );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wrapper_start = $wrapper_end = $form_start = $form_end = '';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ?>
- <?php if ( $options['wrap'] ) : ?>
- <div id="screen-options-wrap" class="hidden" tabindex="-1" aria-label="<?php esc_attr_e('Screen Options Tab'); ?>">
- <?php endif; ?>
- <form id="adv-settings" method="post">
- <?php if ( isset( $wp_meta_boxes[ $this->id ] ) || $this->get_option( 'per_page' ) || ( $columns && empty( $columns['_title'] ) ) ) : ?>
- <h5><?php _e( 'Show on screen' ); ?></h5>
- <?php
- endif;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Output optional wrapper.
+ if ( $options['wrap'] ) {
+ $wrapper_start = '<div id="screen-options-wrap" class="hidden" tabindex="-1" aria-label="' . esc_attr__( 'Screen Options Tab' ) . '">';
+ $wrapper_end = '</div>';
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Don't output the form and nonce for the widgets accessibility mode links.
+ if ( 'widgets' !== $this->base ) {
+ $form_start = "\n<form id='adv-settings' method='post'>\n";
+ $form_end = "\n" . wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false, false ) . "\n</form>\n";
+ }
+
+ echo $wrapper_start . $form_start;
+
+ $this->render_meta_boxes_preferences();
+ $this->render_list_table_columns_preferences();
+ $this->render_screen_layout();
+ $this->render_per_page_options();
+ echo $this->_screen_settings;
+
+ echo $form_end . $wrapper_end;
+ }
+
+ /**
+ * Render the meta boxes preferences.
+ *
+ * @since 4.4.0
+ */
+ public function render_meta_boxes_preferences() {
+ global $wp_meta_boxes;
+
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $wp_meta_boxes[ $this->id ] ) ) : ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <div class="metabox-prefs">
- <?php
- meta_box_prefs( $this );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <fieldset class="metabox-prefs">
+ <legend><?php _e( 'Boxes' ); ?></legend>
+ <?php
+ meta_box_prefs( $this );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'dashboard' === $this->id && has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) {
- if ( isset( $_GET['welcome'] ) ) {
- $welcome_checked = empty( $_GET['welcome'] ) ? 0 : 1;
- update_user_meta( get_current_user_id(), 'show_welcome_panel', $welcome_checked );
- } else {
- $welcome_checked = get_user_meta( get_current_user_id(), 'show_welcome_panel', true );
- if ( 2 == $welcome_checked && wp_get_current_user()->user_email != get_option( 'admin_email' ) )
- $welcome_checked = false;
- }
- echo '<label for="wp_welcome_panel-hide">';
- echo '<input type="checkbox" id="wp_welcome_panel-hide"' . checked( (bool) $welcome_checked, true, false ) . ' />';
- echo _x( 'Welcome', 'Welcome panel' ) . "</label>\n";
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'dashboard' === $this->id && has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) {
+ if ( isset( $_GET['welcome'] ) ) {
+ $welcome_checked = empty( $_GET['welcome'] ) ? 0 : 1;
+ update_user_meta( get_current_user_id(), 'show_welcome_panel', $welcome_checked );
+ } else {
+ $welcome_checked = get_user_meta( get_current_user_id(), 'show_welcome_panel', true );
+ if ( 2 == $welcome_checked && wp_get_current_user()->user_email != get_option( 'admin_email' ) )
+ $welcome_checked = false;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ?>
- <br class="clear" />
- </div>
- <?php endif;
- if ( $columns ) :
- if ( ! empty( $columns['_title'] ) ) : ?>
- <h5><?php echo $columns['_title']; ?></h5>
- <?php endif; ?>
- <div class="metabox-prefs">
- <?php
- $special = array('_title', 'cb', 'comment', 'media', 'name', 'title', 'username', 'blogname');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ echo '<label for="wp_welcome_panel-hide">';
+ echo '<input type="checkbox" id="wp_welcome_panel-hide"' . checked( (bool) $welcome_checked, true, false ) . ' />';
+ echo _x( 'Welcome', 'Welcome panel' ) . "</label>\n";
+ }
+ ?>
+ </fieldset>
+ <?php endif;
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- foreach ( $columns as $column => $title ) {
- // Can't hide these for they are special
- if ( in_array( $column, $special ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /**
+ * Render the list table columns preferences.
+ *
+ * @since 4.4.0
+ */
+ public function render_list_table_columns_preferences() {
+
+ $columns = get_column_headers( $this );
+ $hidden = get_hidden_columns( $this );
+
+ if ( $columns ) {
+ $legend = ! empty( $columns['_title'] ) ? $columns['_title'] : __( 'Columns' );
+ ?>
+ <fieldset class="metabox-prefs">
+ <legend><?php echo $legend; ?></legend>
+ <?php
+ $special = array( '_title', 'cb', 'comment', 'media', 'name', 'title', 'username', 'blogname' );
+
+ foreach ( $columns as $column => $title ) {
+ // Can't hide these for they are special
+ if ( in_array( $column, $special ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( empty( $title ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }
+
+ if ( empty( $title ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> continue;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( 'comments' == $column )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'comments' == $column ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $title = __( 'Comments' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $id = "$column-hide";
- echo '<label for="' . $id . '">';
- echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" id="' . $id . '" value="' . $column . '"' . checked( !in_array($column, $hidden), true, false ) . ' />';
- echo "$title</label>\n";
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ?>
- <br class="clear" />
- </div>
- <?php endif;
</del><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $this->render_screen_layout();
- $this->render_per_page_options();
- echo $this->_screen_settings;
-
- ?>
- <div><?php wp_nonce_field( 'screen-options-nonce', 'screenoptionnonce', false ); ?></div>
- </form>
- <?php if ( $options['wrap'] ) : ?>
- </div>
- <?php endif;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $id = "$column-hide";
+ echo '<label>';
+ echo '<input class="hide-column-tog" name="' . $id . '" type="checkbox" value="' . $column . '"' . checked( ! in_array( $column, $hidden ), true, false ) . ' />';
+ echo "$title</label>\n";
+ }
+ ?>
+ </fieldset>
+ <?php
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1053,26 +1080,26 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.3.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function render_screen_layout() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $this->get_option('layout_columns') )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! $this->get_option( 'layout_columns' ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $screen_layout_columns = $this->get_columns();
</span><span class="cx" style="display: block; padding: 0 10px"> $num = $this->get_option( 'layout_columns', 'max' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <h5 class="screen-layout"><?php _e('Screen Layout'); ?></h5>
- <div class='columns-prefs'><?php
- _e('Number of Columns:');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <fieldset class='columns-prefs'>
+ <legend class="screen-layout"><?php _e( 'Layout' ); ?></legend><?php
</ins><span class="cx" style="display: block; padding: 0 10px"> for ( $i = 1; $i <= $num; ++$i ):
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <label class="columns-prefs-<?php echo $i; ?>">
</span><span class="cx" style="display: block; padding: 0 10px"> <input type='radio' name='screen_columns' value='<?php echo esc_attr( $i ); ?>'
</span><span class="cx" style="display: block; padding: 0 10px"> <?php checked( $screen_layout_columns, $i ); ?> />
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <?php echo esc_html( $i ); ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <?php printf( _n( '%s column', '%s columns', $i ), number_format_i18n( $i ) ); ?>
</ins><span class="cx" style="display: block; padding: 0 10px"> </label>
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> endfor; ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- </div>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ </fieldset>
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1119,12 +1146,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Back compat
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $this->post_type ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /** This filter is documented in wp-admin/includes/class-wp-posts-list-table.php */
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /** This filter is documented in wp-admin/includes/post.php */
</ins><span class="cx" style="display: block; padding: 0 10px"> $per_page = apply_filters( 'edit_posts_per_page', $per_page, $this->post_type );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- <div class="screen-options">
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ <fieldset class="screen-options">
+ <legend><?php _e( 'Pagination' ); ?></legend>
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php if ( $per_page_label ) : ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <label for="<?php echo esc_attr( $option ); ?>"><?php echo $per_page_label; ?></label>
</span><span class="cx" style="display: block; padding: 0 10px"> <input type="number" step="1" min="1" max="999" class="screen-per-page" name="wp_screen_options[value]"
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1134,7 +1162,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> echo get_submit_button( __( 'Apply' ), 'button', 'screen-options-apply', false ); ?>
</span><span class="cx" style="display: block; padding: 0 10px"> <input type="hidden" name="wp_screen_options[option]" value="<?php echo esc_attr( $option ); ?>" />
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- </div>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ </fieldset>
</ins><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre>
</div>
</div>
</body>
</html>