<!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>[18857] trunk/wp-admin/includes/screen.php: Move all new WP_Screen properties to private.</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, #logmsg > ol { margin-left: 0; 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">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/18857">18857</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2011-10-01 17:59:46 +0000 (Sat, 01 Oct 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Move all new WP_Screen properties to private. We should introduce getters. Correct legacy (and ideally read-only) properties to @access public. see <a href="http://core.trac.wordpress.org/ticket/18785">#18785</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesscreenphp">trunk/wp-admin/includes/screen.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesscreenphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/screen.php (18856 => 18857)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/screen.php        2011-10-01 15:54:52 UTC (rev 18856)
+++ trunk/wp-admin/includes/screen.php        2011-10-01 17:59:46 UTC (rev 18857)
</span><span class="lines">@@ -400,7 +400,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.3.0
</span><span class="cx">          * @var string
</span><del>-         * @access private
</del><ins>+         * @access public
</ins><span class="cx">          */
</span><span class="cx">         public $action = '';
</span><span class="cx"> 
</span><span class="lines">@@ -410,7 +410,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.3.0
</span><span class="cx">          * @var string
</span><del>-         * @access private
</del><ins>+         * @access public
</ins><span class="cx">          */
</span><span class="cx">         public $base;
</span><span class="cx"> 
</span><span class="lines">@@ -419,7 +419,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.3.0
</span><span class="cx">          * @var string
</span><del>-         * @access private
</del><ins>+         * @access public
</ins><span class="cx">          */
</span><span class="cx">         public $id;
</span><span class="cx"> 
</span><span class="lines">@@ -428,7 +428,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.3.0
</span><span class="cx">          * @var bool
</span><del>-         * @access private
</del><ins>+         * @access public
</ins><span class="cx">          */
</span><span class="cx">         public $is_network;
</span><span class="cx"> 
</span><span class="lines">@@ -437,7 +437,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.3.0
</span><span class="cx">          * @var bool
</span><del>-         * @access private
</del><ins>+         * @access public
</ins><span class="cx">          */
</span><span class="cx">         public $is_user;
</span><span class="cx"> 
</span><span class="lines">@@ -448,7 +448,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.3.0
</span><span class="cx">          * @var string
</span><del>-         * @access private
</del><ins>+         * @access public
</ins><span class="cx">          */
</span><span class="cx">         public $parent_base;
</span><span class="cx"> 
</span><span class="lines">@@ -458,7 +458,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.3.0
</span><span class="cx">          * @var string
</span><del>-         * @access private
</del><ins>+         * @access public
</ins><span class="cx">          */
</span><span class="cx">         public $parent_file;
</span><span class="cx"> 
</span><span class="lines">@@ -468,7 +468,7 @@
</span><span class="cx">          *
</span><span class="cx">          * @since 3.3.0
</span><span class="cx">          * @var string
</span><del>-         * @access private
</del><ins>+         * @access public
</ins><span class="cx">          */
</span><span class="cx">         public $post_type;
</span><span class="cx"> 
</span><span class="lines">@@ -477,7 +477,7 @@
</span><span class="cx">          * The 'edit-tags.php?taxonomy=category' screen has a taxonomy of 'category'.
</span><span class="cx">          * @since 3.3.0
</span><span class="cx">          * @var string
</span><del>-         * @access private
</del><ins>+         * @access public
</ins><span class="cx">          */
</span><span class="cx">         public $taxonomy;
</span><span class="cx"> 
</span><span class="lines">@@ -488,7 +488,7 @@
</span><span class="cx">          * @var array
</span><span class="cx">          * @access private
</span><span class="cx">          */
</span><del>-        public $help_tabs = array();
</del><ins>+        private $_help_tabs = array();
</ins><span class="cx"> 
</span><span class="cx">         /**
</span><span class="cx">          * The help sidebar data associated with the screen, if any.
</span><span class="lines">@@ -497,7 +497,7 @@
</span><span class="cx">          * @var string
</span><span class="cx">          * @access private
</span><span class="cx">          */
</span><del>-        public $help_sidebar = '';
</del><ins>+        private $_help_sidebar = '';
</ins><span class="cx"> 
</span><span class="cx">         /**
</span><span class="cx">          * The screen options associated with the screen, if any.
</span><span class="lines">@@ -506,7 +506,7 @@
</span><span class="cx">          * @var array
</span><span class="cx">          * @access private
</span><span class="cx">          */
</span><del>-        public $options = array();
</del><ins>+        private $_options = array();
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -621,7 +621,7 @@
</span><span class="cx">          * @param array $args Associative array of arguments particular to the given $option.
</span><span class="cx">          */
</span><span class="cx">         public function add_option( $option, $args = array() ) {
</span><del>-                $this-&gt;options[ $option ] = $args;
</del><ins>+                $this-&gt;_options[ $option ] = $args;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -654,7 +654,7 @@
</span><span class="cx">                 if ( ! $args['id'] )
</span><span class="cx">                         $args['id'] = sanitize_html_class( $args['title'] );
</span><span class="cx"> 
</span><del>-                $this-&gt;help_tabs[] = $args;
</del><ins>+                $this-&gt;_help_tabs[] = $args;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -666,7 +666,7 @@
</span><span class="cx">          * @param string $content Sidebar content in plain text or HTML.
</span><span class="cx">          */
</span><span class="cx">         public function add_help_sidebar( $content ) {
</span><del>-                $this-&gt;help_sidebar = $content;
</del><ins>+                $this-&gt;_help_sidebar = $content;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><span class="lines">@@ -707,7 +707,7 @@
</span><span class="cx">                 &lt;div id=&quot;screen-meta&quot; class='metabox-prefs'&gt;
</span><span class="cx">                         &lt;div id=&quot;contextual-help-wrap&quot; class=&quot;hidden&quot;&gt;
</span><span class="cx">                                 &lt;ul class=&quot;contextual-help-tabs&quot;&gt;
</span><del>-                                        &lt;?php foreach ( $this-&gt;help_tabs as $i =&gt; $tab ):
</del><ins>+                                        &lt;?php foreach ( $this-&gt;_help_tabs as $i =&gt; $tab ):
</ins><span class="cx">                                                 $link_id  = &quot;tab-link-{$tab['id']}&quot;;
</span><span class="cx">                                                 $panel_id = &quot;tab-panel-{$tab['id']}&quot;;
</span><span class="cx">                                                 $classes  = ( $i == 0 ) ? 'active' : '';
</span><span class="lines">@@ -722,11 +722,11 @@
</span><span class="cx">                                 &lt;/ul&gt;
</span><span class="cx"> 
</span><span class="cx">                                 &lt;div class=&quot;contextual-help-sidebar&quot;&gt;
</span><del>-                                        &lt;?php echo $this-&gt;help_sidebar; ?&gt;
</del><ins>+                                        &lt;?php echo $this-&gt;_help_sidebar; ?&gt;
</ins><span class="cx">                                 &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx">                                 &lt;div class=&quot;contextual-help-tabs-wrap&quot;&gt;
</span><del>-                                        &lt;?php foreach ( $this-&gt;help_tabs as $i =&gt; $tab ):
</del><ins>+                                        &lt;?php foreach ( $this-&gt;_help_tabs as $i =&gt; $tab ):
</ins><span class="cx">                                                 $panel_id = &quot;tab-panel-{$tab['id']}&quot;;
</span><span class="cx">                                                 $classes  = ( $i == 0 ) ? 'active' : '';
</span><span class="cx">                                                 $classes .= ' help-tab-content';
</span><span class="lines">@@ -763,7 +763,7 @@
</span><span class="cx">                         $show_screen = true;
</span><span class="cx"> 
</span><span class="cx">                 // Check if there are per-page options.
</span><del>-                $show_screen = $show_screen || isset( $this-&gt;options['per_page'] );
</del><ins>+                $show_screen = $show_screen || isset( $this-&gt;_options['per_page'] );
</ins><span class="cx"> 
</span><span class="cx">                 $this-&gt;_screen_settings = apply_filters( 'screen_settings', '', $this );
</span><span class="cx"> 
</span><span class="lines">@@ -777,7 +777,7 @@
</span><span class="cx">                 if ( ! empty( $this-&gt;_screen_settings ) )
</span><span class="cx">                         $show_screen = true;
</span><span class="cx"> 
</span><del>-                if ( ! empty( $this-&gt;options ) )
</del><ins>+                if ( ! empty( $this-&gt;_options ) )
</ins><span class="cx">                         $show_screen = true;
</span><span class="cx"> 
</span><span class="cx">                 $this-&gt;_show_screen_options = apply_filters( 'screen_options_show_screen', $show_screen, $this );
</span><span class="lines">@@ -848,17 +848,17 @@
</span><span class="cx">                 if ( ! empty( $columns ) &amp;&amp; isset( $columns[ $this-&gt;id ] ) )
</span><span class="cx">                         add_screen_option( 'layout_columns', array('max' =&gt; $columns[ $this-&gt;id ] ) );
</span><span class="cx"> 
</span><del>-                if ( ! isset( $this-&gt;options['layout_columns'] ) ) {
</del><ins>+                if ( ! isset( $this-&gt;_options['layout_columns'] ) ) {
</ins><span class="cx">                         $screen_layout_columns = 0;
</span><span class="cx">                         return;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 $screen_layout_columns = get_user_option(&quot;screen_layout_$this-&gt;id&quot;);
</span><del>-                $num = $this-&gt;options['layout_columns']['max'];
</del><ins>+                $num = $this-&gt;_options['layout_columns']['max'];
</ins><span class="cx"> 
</span><span class="cx">                 if ( ! $screen_layout_columns ) {
</span><del>-                        if ( isset( $this-&gt;options['layout_columns']['default'] ) )
-                                $screen_layout_columns = $this-&gt;options['layout_columns']['default'];
</del><ins>+                        if ( isset( $this-&gt;_options['layout_columns']['default'] ) )
+                                $screen_layout_columns = $this-&gt;_options['layout_columns']['default'];
</ins><span class="cx">                         else
</span><span class="cx">                                 $screen_layout_columns = 'auto';
</span><span class="cx">                 }
</span><span class="lines">@@ -886,21 +886,21 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function render_per_page_options() {
</span><del>-                if ( ! isset( $this-&gt;options['per_page'] ) )
</del><ins>+                if ( ! isset( $this-&gt;_options['per_page'] ) )
</ins><span class="cx">                         return;
</span><span class="cx"> 
</span><del>-                $per_page_label = $this-&gt;options['per_page']['label'];
</del><ins>+                $per_page_label = $this-&gt;_options['per_page']['label'];
</ins><span class="cx"> 
</span><del>-                if ( empty( $this-&gt;options['per_page']['option'] ) ) {
</del><ins>+                if ( empty( $this-&gt;_options['per_page']['option'] ) ) {
</ins><span class="cx">                         $option = str_replace( '-', '_', &quot;{$this-&gt;id}_per_page&quot; );
</span><span class="cx">                 } else {
</span><del>-                        $option = $this-&gt;options['per_page']['option'];
</del><ins>+                        $option = $this-&gt;_options['per_page']['option'];
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 $per_page = (int) get_user_option( $option );
</span><span class="cx">                 if ( empty( $per_page ) || $per_page &lt; 1 ) {
</span><del>-                        if ( isset($this-&gt;options['per_page']['default']) )
-                                $per_page = $this-&gt;options['per_page']['default'];
</del><ins>+                        if ( isset($this-&gt;_options['per_page']['default']) )
+                                $per_page = $this-&gt;_options['per_page']['default'];
</ins><span class="cx">                         else
</span><span class="cx">                                 $per_page = 20;
</span><span class="cx">                 }
</span></span></pre>
</div>
</div>

</body>
</html>