<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[13551] trunk: Fix metabox hiding.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/13551">13551</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-03-02 18:06:14 +0000 (Tue, 02 Mar 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix metabox hiding. Props scribu. fixes <a href="http://trac.wordpress.org/ticket/12439">#12439</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminadminajaxphp">trunk/wp-admin/admin-ajax.php</a></li>
<li><a href="#trunkwpadminadminheaderphp">trunk/wp-admin/admin-header.php</a></li>
<li><a href="#trunkwpadminjspostdevjs">trunk/wp-admin/js/post.dev.js</a></li>
<li><a href="#trunkwpadminjspostjs">trunk/wp-admin/js/post.js</a></li>
<li><a href="#trunkwpadminjspostboxdevjs">trunk/wp-admin/js/postbox.dev.js</a></li>
<li><a href="#trunkwpincludesuserphp">trunk/wp-includes/user.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminadminajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/admin-ajax.php (13550 => 13551)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin-ajax.php        2010-03-02 17:56:24 UTC (rev 13550)
+++ trunk/wp-admin/admin-ajax.php        2010-03-02 18:06:14 UTC (rev 13551)
</span><span class="lines">@@ -1021,11 +1021,11 @@
</span><span class="cx">                 die('-1');
</span><span class="cx"> 
</span><span class="cx">         if ( is_array($closed) )
</span><del>-                update_user_meta($user-&gt;ID, 'closedpostboxes_'.$page, $closed);
</del><ins>+                update_user_option($user-&gt;ID, &quot;closedpostboxes_$page&quot;, $closed);
</ins><span class="cx"> 
</span><span class="cx">         if ( is_array($hidden) ) {
</span><span class="cx">                 $hidden = array_diff( $hidden, array('submitdiv', 'linksubmitdiv') ); // postboxes that are always shown
</span><del>-                update_user_meta($user-&gt;ID, 'meta-box-hidden_'.$page, $hidden);
</del><ins>+                update_user_option($user-&gt;ID, &quot;meta-box-hidden_$page&quot;, $hidden);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         die('1');
</span><span class="lines">@@ -1043,7 +1043,7 @@
</span><span class="cx">                 die('-1');
</span><span class="cx"> 
</span><span class="cx">         if ( is_array($hidden) )
</span><del>-                update_user_meta($user-&gt;ID, &quot;manage-$page-columns-hidden&quot;, $hidden);
</del><ins>+                update_user_option($user-&gt;ID, &quot;manage-$page-columns-hidden&quot;, $hidden);
</ins><span class="cx"> 
</span><span class="cx">         die('1');
</span><span class="cx">         break;
</span><span class="lines">@@ -1063,7 +1063,7 @@
</span><span class="cx">                 update_user_option($user-&gt;ID, &quot;meta-box-order_$page&quot;, $order);
</span><span class="cx"> 
</span><span class="cx">         if ( $page_columns )
</span><del>-                update_user_meta($user-&gt;ID, &quot;screen_layout_$page&quot;, $page_columns);
</del><ins>+                update_user_option($user-&gt;ID, &quot;screen_layout_$page&quot;, $page_columns);
</ins><span class="cx"> 
</span><span class="cx">         die('1');
</span><span class="cx">         break;
</span></span></pre></div>
<a id="trunkwpadminadminheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/admin-header.php (13550 => 13551)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin-header.php        2010-03-02 17:56:24 UTC (rev 13550)
+++ trunk/wp-admin/admin-header.php        2010-03-02 18:06:14 UTC (rev 13551)
</span><span class="lines">@@ -34,8 +34,17 @@
</span><span class="cx"> &lt;script type=&quot;text/javascript&quot;&gt;
</span><span class="cx"> //&lt;![CDATA[
</span><span class="cx"> addLoadEvent = function(func){if(typeof jQuery!=&quot;undefined&quot;)jQuery(document).ready(func);else if(typeof wpOnload!='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
</span><del>-var userSettings = {'url':'&lt;?php echo SITECOOKIEPATH; ?&gt;','uid':'&lt;?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user-&gt;ID; ?&gt;','time':'&lt;?php echo time() ?&gt;'};
-var ajaxurl = '&lt;?php echo admin_url('admin-ajax.php'); ?&gt;', pagenow = '&lt;?php echo substr($pagenow, 0, -4); ?&gt;', typenow = '&lt;?php echo $typenow; ?&gt;', adminpage = '&lt;?php echo $admin_body_class; ?&gt;',  thousandsSeparator = '&lt;?php echo addslashes( $wp_locale-&gt;number_format['thousands_sep'] ); ?&gt;', decimalPoint = '&lt;?php echo addslashes( $wp_locale-&gt;number_format['decimal_point'] ); ?&gt;';
</del><ins>+var userSettings = {
+                'url': '&lt;?php echo SITECOOKIEPATH; ?&gt;', 
+                'uid': '&lt;?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user-&gt;ID; ?&gt;',
+                'time':'&lt;?php echo time() ?&gt;'
+        },
+        ajaxurl = '&lt;?php echo admin_url('admin-ajax.php'); ?&gt;', 
+        pagenow = '&lt;?php echo $current_screen-&gt;id; ?&gt;', 
+        typenow = '&lt;?php if ( isset($current_screen-&gt;post_type) ) echo $current_screen-&gt;post_type; ?&gt;', 
+        adminpage = '&lt;?php echo $admin_body_class; ?&gt;',  
+        thousandsSeparator = '&lt;?php echo addslashes( $wp_locale-&gt;number_format['thousands_sep'] ); ?&gt;', 
+        decimalPoint = '&lt;?php echo addslashes( $wp_locale-&gt;number_format['decimal_point'] ); ?&gt;';
</ins><span class="cx"> //]]&gt;
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;?php
</span></span></pre></div>
<a id="trunkwpadminjspostdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/post.dev.js (13550 => 13551)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/post.dev.js        2010-03-02 17:56:24 UTC (rev 13550)
+++ trunk/wp-admin/js/post.dev.js        2010-03-02 18:06:14 UTC (rev 13551)
</span><span class="lines">@@ -228,17 +228,9 @@
</span><span class="cx"> })(jQuery);
</span><span class="cx"> 
</span><span class="cx"> jQuery(document).ready( function($) {
</span><del>-        var stamp, visibility, sticky = '', post = 'post' == pagenow || 'post-new' == pagenow, page = 'page' == pagenow || 'page-new' == pagenow;
</del><ins>+        var stamp, visibility, sticky = '';
</ins><span class="cx"> 
</span><del>-        // postboxes
-        if ( post ) {
-                type = 'post';
-                if ( typenow )
-                        type = typenow;
-                postboxes.add_postbox_toggles(type);
-        } else if ( page ) {
-                postboxes.add_postbox_toggles('page');
-        }
</del><ins>+        postboxes.add_postbox_toggles(pagenow);
</ins><span class="cx"> 
</span><span class="cx">         // multi-taxonomies
</span><span class="cx">         if ( $('#tagsdiv-post_tag').length ) {
</span></span></pre></div>
<a id="trunkwpadminjspostjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/post.js (13550 => 13551)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/post.js        2010-03-02 17:56:24 UTC (rev 13550)
+++ trunk/wp-admin/js/post.js        2010-03-02 18:06:14 UTC (rev 13551)
</span><span class="lines">@@ -1 +1 @@
</span><del>-var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(b){var c=[];jQuery.each(b,function(a,d){d=jQuery.trim(d);if(d&amp;&amp;jQuery.inArray(d,c)==-1){c.push(d)}});return c}(function(a){tagBox={clean:function(b){return b.replace(/\s*,\s*/g,&quot;,&quot;).replace(/,+/g,&quot;,&quot;).replace(/[,\s]+$/,&quot;&quot;).replace(/^[,\s]+/,&quot;&quot;)},parseTags:function(e){var h=e.id,b=h.split(&quot;-check-num-&quot;)[1],d=a(e).closest(&quot;.tagsdiv&quot;),g=d.find(&quot;.the-tags&quot;),c=g.val().split(&quot;,&quot;),f=[];delete c[b];a.each(c,function(i,j){j=a.trim(j);if(j){f.push(j)}});g.val(this.clean(f.join(&quot;,&quot;)));this.quickClicks(d);return false},quickClicks:function(c){var e=a(&quot;.the-tags&quot;,c),d=a(&quot;.tagchecklist&quot;,c),b;if(!e.length){return}b=e.val().split(&quot;,&quot;);d.empty();a.each(b,function(h,i){var f,g,j=a(c).attr(&quot;id&quot;);i=a.trim(i);if(!i.match(/^\s+$/)&amp;&amp;&quot;&quot;!=i){g=j+&quot;-check-num-&quot;+h;f='&lt;span&gt;&lt;a id=&quot;'+g+'&quot; class=&quot;ntdelbutton&quot;&gt;X&lt;/a&gt;&amp;nbsp;'+i+&quot;&lt;/span&gt; &quot;;d.append(f);a(&quot;#&quot;+g).click(function(){tagBox.parseTags(this)})}})},flushTags:function(e,b,g){b=b||false;var i,c=a(&quot;.the-tags&quot;,e),h=a(&quot;input.newtag&quot;,e),d;i=b?a(b).text():h.val();tagsval=c.val();d=tagsval?tagsval+&quot;,&quot;+i:i;d=this.clean(d);d=array_unique_noempty(d.split(&quot;,&quot;)).join(&quot;,&quot;);c.val(d);this.quickClicks(e);if(!b){h.val(&quot;&quot;)}if(&quot;undefined&quot;==typeof(g)){h.focus()}return false},get:function(c){var b=c.substr(c.indexOf(&quot;-&quot;)+1);a.post(ajaxurl,{action:&quot;get-tagcloud&quot;,tax:b},function(e,d){if(0==e||&quot;success&quot;!=d){e=wpAjax.broken}e=a('&lt;p id=&quot;tagcloud-'+b+'&quot; class=&quot;the-tagcloud&quot;&gt;'+e+&quot;&lt;/p&gt;&quot;);a(&quot;a&quot;,e).click(function(){tagBox.flushTags(a(this).closest(&quot;.inside&quot;).children(&quot;.tagsdiv&quot;),this);return false});a(&quot;#&quot;+c).after(e)})},init:function(){var b=this,c=a(&quot;div.ajaxtag&quot;);a(&quot;.tagsdiv&quot;).each(function(){tagBox.quickClicks(this)});a(&quot;input.tagadd&quot;,c).click(function(){b.flushTags(a(this).closest(&quot;.tagsdiv&quot;))});a(&quot;div.taghint&quot;,c).click(function(){a(this).css(&quot;visibility&quot;,&quot;hidden&quot;).siblings(&quot;.newtag&quot;).focus()});a(&quot;input.newtag&quot;,c).blur(function(){if(this.value==&quot;&quot;){a(this).siblings(&quot;.taghint&quot;).css(&quot;visibility&quot;,&quot;&quot;)}}).focus(function(){a(this).siblings(&quot;.taghint&quot;).css(&quot;visibility&quot;,&quot;hidden&quot;)}).keyup(function(d){if(13==d.which){tagBox.flushTags(a(this).closest(&quot;.tagsdiv&quot;));return false}}).keypress(function(d){if(13==d.which){d.preventDefault();return false}}).each(function(){var d=a(this).closest(&quot;div.tagsdiv&quot;).attr(&quot;id&quot;);a(this).suggest(ajaxurl+&quot;?action=ajax-tag-search&amp;tax=&quot;+d,{delay:500,minchars:2,multiple:true,multipleSep:&quot;, &quot;})});a(&quot;#post&quot;).submit(function(){a(&quot;div.tagsdiv&quot;).each(function(){tagBox.flushTags(this,false,1)})});a(&quot;a.tagcloud-link&quot;).click(function(){tagBox.get(a(this).attr(&quot;id&quot;));a(this).unbind().click(function(){a(this).siblings(&quot;.the-tagcloud&quot;).toggle();return false});return false})}};commentsBox={st:0,get:function(d,c){var b=this.st,e;if(!c){c=20}this.st+=c;this.total=d;a(&quot;#commentsdiv img.waiting&quot;).show();e={action:&quot;get-comments&quot;,mode:&quot;single&quot;,_ajax_nonce:a(&quot;#add_comment_nonce&quot;).val(),post_ID:a(&quot;#post_ID&quot;).val(),start:b,num:c};a.post(ajaxurl,e,function(f){f=wpAjax.parseAjaxResponse(f);a(&quot;#commentsdiv .widefat&quot;).show();a(&quot;#commentsdiv img.waiting&quot;).hide();if(&quot;object&quot;==typeof f&amp;&amp;f.responses[0]){a(&quot;#the-comment-list&quot;).append(f.responses[0].data);theList=theExtraList=null;a(&quot;a[className*=':']&quot;).unbind();setCommentsList();if(commentsBox.st&gt;commentsBox.total){a(&quot;#show-comments&quot;).hide()}else{a(&quot;#show-comments&quot;).html(postL10n.showcomm)}return}else{if(1==f){a(&quot;#show-comments&quot;).parent().html(postL10n.endcomm);return}}a(&quot;#the-comment-list&quot;).append('&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;'+wpAjax.broken+&quot;&lt;/td&gt;&lt;/tr&gt;&quot;)});return false}};WPSetThumbnailHTML=function(b){a(&quot;.inside&quot;,&quot;#postimagediv&quot;).html(b)};WPSetThumbnailID=function(c){var b=a(&quot;input[value=_thumbnail_id]&quot;,&quot;#list-table&quot;);if(b.size()&gt;0){a(&quot;#meta\\[&quot;+b.attr(&quot;id&quot;).match(/[0-9]+/)+&quot;\\]\\[value\\]&quot;).text(c)}};WPRemoveThumbnail=function(){a.post(ajaxurl,{action:&quot;set-post-thumbnail&quot;,post_id:a(&quot;#post_ID&quot;).val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(b){if(b==&quot;0&quot;){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(b)}})}})(jQuery);jQuery(document).ready(function(g){var c,a,h=&quot;&quot;,b=&quot;post&quot;==pagenow||&quot;post-new&quot;==pagenow,f=&quot;page&quot;==pagenow||&quot;page-new&quot;==pagenow;if(b){type=&quot;post&quot;;if(typenow){type=typenow}postboxes.add_postbox_toggles(type)}else{if(f){postboxes.add_postbox_toggles(&quot;page&quot;)}}if(g(&quot;#tagsdiv-post_tag&quot;).length){tagBox.init()}else{g(&quot;#side-sortables, #normal-sortables, #advanced-sortables&quot;).children(&quot;div.postbox&quot;).each(function(){if(this.id.indexOf(&quot;tagsdiv-&quot;)===0){tagBox.init();return false}})}g(&quot;.categorydiv&quot;).each(function(){var n=g(this).attr(&quot;id&quot;),j=false,m,o,l,i,k;l=n.split(&quot;-&quot;);l.shift();i=l.join(&quot;-&quot;);k=i+&quot;_tab&quot;;if(i==&quot;category&quot;){k=&quot;cats&quot;}g(&quot;a&quot;,&quot;#&quot;+i+&quot;-tabs&quot;).click(function(){var p=g(this).attr(&quot;href&quot;);g(this).parent().addClass(&quot;tabs&quot;).siblings(&quot;li&quot;).removeClass(&quot;tabs&quot;);g(&quot;#&quot;+i+&quot;-tabs&quot;).siblings(&quot;.tabs-panel&quot;).hide();g(p).show();if(&quot;#&quot;+i+&quot;-all&quot;==p){deleteUserSetting(k)}else{setUserSetting(k,&quot;pop&quot;)}return false});if(getUserSetting(k)){g('a[href=&quot;#'+i+'-pop&quot;]',&quot;#&quot;+i+&quot;-tabs&quot;).click()}g(&quot;#new&quot;+i).one(&quot;focus&quot;,function(){g(this).val(&quot;&quot;).removeClass(&quot;form-input-tip&quot;)});g(&quot;#&quot;+i+&quot;-add-submit&quot;).click(function(){g(&quot;#new&quot;+i).focus()});m=function(){if(j){return}j=true;var p=jQuery(this),r=p.is(&quot;:checked&quot;),q=p.val().toString();g(&quot;#in-&quot;+i+&quot;-&quot;+q+&quot;, #in-&quot;+i+&quot;-category-&quot;+q).attr(&quot;checked&quot;,r);j=false};catAddBefore=function(p){if(!g(&quot;#new&quot;+i).val()){return false}p.data+=&quot;&amp;&quot;+g(&quot;:checked&quot;,&quot;#&quot;+i+&quot;checklist&quot;).serialize();return p};o=function(u,t){var q,p=g(&quot;#new&quot;+i+&quot;_parent&quot;);if(&quot;undefined&quot;!=t.parsed.responses[0]&amp;&amp;(q=t.parsed.responses[0].supplemental.newcat_parent)){p.before(q);p.remove()}};g(&quot;#&quot;+i+&quot;checklist&quot;).wpList({alt:&quot;&quot;,response:i+&quot;-ajax-response&quot;,addBefore:catAddBefore,addAfter:o});g(&quot;#&quot;+i+&quot;-add-toggle&quot;).click(function(){g(&quot;#&quot;+i+&quot;-adder&quot;).toggleClass(&quot;wp-hidden-children&quot;);g('a[href=&quot;#'+i+'-all&quot;]',&quot;#&quot;+i+&quot;-tabs&quot;).click();return false});g(&quot;#&quot;+i+&quot;checklist li.popular-category :checkbox, #&quot;+i+&quot;checklist-pop :checkbox&quot;).live(&quot;click&quot;,function(){var p=g(this),r=p.is(&quot;:checked&quot;),q=p.val();if(q&amp;&amp;p.parents(&quot;#taxonomy-&quot;+i).length){g(&quot;#in-&quot;+i+&quot;-&quot;+q+&quot;, #in-popular-&quot;+i+&quot;-&quot;+q).attr(&quot;checked&quot;,r)}})});if(g(&quot;#postcustom&quot;).length){g(&quot;#the-list&quot;).wpList({addAfter:function(i,j){g(&quot;table#list-table&quot;).show();if(typeof(autosave_update_post_ID)!=&quot;undefined&quot;){autosave_update_post_ID(j.parsed.responses[0].supplemental.postid)}},addBefore:function(i){i.data+=&quot;&amp;post_id=&quot;+g(&quot;#post_ID&quot;).val();return i}})}if(g(&quot;#submitdiv&quot;).length){c=g(&quot;#timestamp&quot;).html();a=g(&quot;#post-visibility-display&quot;).html();function e(){var i=g(&quot;#post-visibility-select&quot;);if(g(&quot;input:radio:checked&quot;,i).val()!=&quot;public&quot;){g(&quot;#sticky&quot;).attr(&quot;checked&quot;,false);g(&quot;#sticky-span&quot;).hide()}else{g(&quot;#sticky-span&quot;).show()}if(g(&quot;input:radio:checked&quot;,i).val()!=&quot;password&quot;){g(&quot;#password-span&quot;).hide()}else{g(&quot;#password-span&quot;).show()}}function d(){var p,q,j,s,r=g(&quot;#post_status&quot;),k=g(&quot;option[value=publish]&quot;,r),i=g(&quot;#aa&quot;).val(),n=g(&quot;#mm&quot;).val(),o=g(&quot;#jj&quot;).val(),m=g(&quot;#hh&quot;).val(),l=g(&quot;#mn&quot;).val();p=new Date(i,n-1,o,m,l);q=new Date(g(&quot;#hidden_aa&quot;).val(),g(&quot;#hidden_mm&quot;).val()-1,g(&quot;#hidden_jj&quot;).val(),g(&quot;#hidden_hh&quot;).val(),g(&quot;#hidden_mn&quot;).val());j=new Date(g(&quot;#cur_aa&quot;).val(),g(&quot;#cur_mm&quot;).val()-1,g(&quot;#cur_jj&quot;).val(),g(&quot;#cur_hh&quot;).val(),g(&quot;#cur_mn&quot;).val());if(p.getFullYear()!=i||(1+p.getMonth())!=n||p.getDate()!=o||p.getMinutes()!=l){g(&quot;.timestamp-wrap&quot;,&quot;#timestampdiv&quot;).addClass(&quot;form-invalid&quot;);return false}else{g(&quot;.timestamp-wrap&quot;,&quot;#timestampdiv&quot;).removeClass(&quot;form-invalid&quot;)}if(p&gt;j&amp;&amp;g(&quot;#original_post_status&quot;).val()!=&quot;future&quot;){s=postL10n.publishOnFuture;g(&quot;#publish&quot;).val(postL10n.schedule)}else{if(p&lt;=j&amp;&amp;g(&quot;#original_post_status&quot;).val()!=&quot;publish&quot;){s=postL10n.publishOn;g(&quot;#publish&quot;).val(postL10n.publish)}else{s=postL10n.publishOnPast;if(f){g(&quot;#publish&quot;).val(postL10n.updatePage)}else{g(&quot;#publish&quot;).val(postL10n.updatePost)}}}if(q.toUTCString()==p.toUTCString()){g(&quot;#timestamp&quot;).html(c)}else{g(&quot;#timestamp&quot;).html(s+&quot; &lt;b&gt;&quot;+g(&quot;option[value=&quot;+g(&quot;#mm&quot;).val()+&quot;]&quot;,&quot;#mm&quot;).text()+&quot; &quot;+o+&quot;, &quot;+i+&quot; @ &quot;+m+&quot;:&quot;+l+&quot;&lt;/b&gt; &quot;)}if(g(&quot;input:radio:checked&quot;,&quot;#post-visibility-select&quot;).val()==&quot;private&quot;){if(f){g(&quot;#publish&quot;).val(postL10n.updatePage)}else{g(&quot;#publish&quot;).val(postL10n.updatePost)}if(k.length==0){r.append('&lt;option value=&quot;publish&quot;&gt;'+postL10n.privatelyPublished+&quot;&lt;/option&gt;&quot;)}else{k.html(postL10n.privatelyPublished)}g(&quot;option[value=publish]&quot;,r).attr(&quot;selected&quot;,true);g(&quot;.edit-post-status&quot;,&quot;#misc-publishing-actions&quot;).hide()}else{if(g(&quot;#original_post_status&quot;).val()==&quot;future&quot;||g(&quot;#original_post_status&quot;).val()==&quot;draft&quot;){if(k.length){k.remove();r.val(g(&quot;#hidden_post_status&quot;).val())}}else{k.html(postL10n.published)}if(r.is(&quot;:hidden&quot;)){g(&quot;.edit-post-status&quot;,&quot;#misc-publishing-actions&quot;).show()}}g(&quot;#post-status-display&quot;).html(g(&quot;option:selected&quot;,r).text());if(g(&quot;option:selected&quot;,r).val()==&quot;private&quot;||g(&quot;option:selected&quot;,r).val()==&quot;publish&quot;){g(&quot;#save-post&quot;).hide()}else{g(&quot;#save-post&quot;).show();if(g(&quot;option:selected&quot;,r).val()==&quot;pending&quot;){g(&quot;#save-post&quot;).show().val(postL10n.savePending)}else{g(&quot;#save-post&quot;).show().val(postL10n.saveDraft)}}return true}g(&quot;.edit-visibility&quot;,&quot;#visibility&quot;).click(function(){if(g(&quot;#post-visibility-select&quot;).is(&quot;:hidden&quot;)){e();g(&quot;#post-visibility-select&quot;).slideDown(&quot;normal&quot;);g(this).hide()}return false});g(&quot;.cancel-post-visibility&quot;,&quot;#post-visibility-select&quot;).click(function(){g(&quot;#post-visibility-select&quot;).slideUp(&quot;normal&quot;);g(&quot;#visibility-radio-&quot;+g(&quot;#hidden-post-visibility&quot;).val()).attr(&quot;checked&quot;,true);g(&quot;#post_password&quot;).val(g(&quot;#hidden_post_password&quot;).val());g(&quot;#sticky&quot;).attr(&quot;checked&quot;,g(&quot;#hidden-post-sticky&quot;).attr(&quot;checked&quot;));g(&quot;#post-visibility-display&quot;).html(a);g(&quot;.edit-visibility&quot;,&quot;#visibility&quot;).show();d();return false});g(&quot;.save-post-visibility&quot;,&quot;#post-visibility-select&quot;).click(function(){var i=g(&quot;#post-visibility-select&quot;);i.slideUp(&quot;normal&quot;);g(&quot;.edit-visibility&quot;,&quot;#visibility&quot;).show();d();if(g(&quot;input:radio:checked&quot;,i).val()!=&quot;public&quot;){g(&quot;#sticky&quot;).attr(&quot;checked&quot;,false)}if(true==g(&quot;#sticky&quot;).attr(&quot;checked&quot;)){h=&quot;Sticky&quot;}else{h=&quot;&quot;}g(&quot;#post-visibility-display&quot;).html(postL10n[g(&quot;input:radio:checked&quot;,i).val()+h]);return false});g(&quot;input:radio&quot;,&quot;#post-visibility-select&quot;).change(function(){e()});g(&quot;#timestampdiv&quot;).siblings(&quot;a.edit-timestamp&quot;).click(function(){if(g(&quot;#timestampdiv&quot;).is(&quot;:hidden&quot;)){g(&quot;#timestampdiv&quot;).slideDown(&quot;normal&quot;);g(this).hide()}return false});g(&quot;.cancel-timestamp&quot;,&quot;#timestampdiv&quot;).click(function(){g(&quot;#timestampdiv&quot;).slideUp(&quot;normal&quot;);g(&quot;#mm&quot;).val(g(&quot;#hidden_mm&quot;).val());g(&quot;#jj&quot;).val(g(&quot;#hidden_jj&quot;).val());g(&quot;#aa&quot;).val(g(&quot;#hidden_aa&quot;).val());g(&quot;#hh&quot;).val(g(&quot;#hidden_hh&quot;).val());g(&quot;#mn&quot;).val(g(&quot;#hidden_mn&quot;).val());g(&quot;#timestampdiv&quot;).siblings(&quot;a.edit-timestamp&quot;).show();d();return false});g(&quot;.save-timestamp&quot;,&quot;#timestampdiv&quot;).click(function(){if(d()){g(&quot;#timestampdiv&quot;).slideUp(&quot;normal&quot;);g(&quot;#timestampdiv&quot;).siblings(&quot;a.edit-timestamp&quot;).show()}return false});g(&quot;#post-status-select&quot;).siblings(&quot;a.edit-post-status&quot;).click(function(){if(g(&quot;#post-status-select&quot;).is(&quot;:hidden&quot;)){g(&quot;#post-status-select&quot;).slideDown(&quot;normal&quot;);g(this).hide()}return false});g(&quot;.save-post-status&quot;,&quot;#post-status-select&quot;).click(function(){g(&quot;#post-status-select&quot;).slideUp(&quot;normal&quot;);g(&quot;#post-status-select&quot;).siblings(&quot;a.edit-post-status&quot;).show();d();return false});g(&quot;.cancel-post-status&quot;,&quot;#post-status-select&quot;).click(function(){g(&quot;#post-status-select&quot;).slideUp(&quot;normal&quot;);g(&quot;#post_status&quot;).val(g(&quot;#hidden_post_status&quot;).val());g(&quot;#post-status-select&quot;).siblings(&quot;a.edit-post-status&quot;).show();d();return false})}if(g(&quot;#edit-slug-box&quot;).length){editPermalink=function(j){var k,n=0,m=g(&quot;#editable-post-name&quot;),o=m.html(),r=g(&quot;#post_name&quot;),s=r.html(),p=g(&quot;#edit-slug-buttons&quot;),q=p.html(),l=g(&quot;#editable-post-name-full&quot;).html();g(&quot;#view-post-btn&quot;).hide();p.html('&lt;a href=&quot;#&quot; class=&quot;save button&quot;&gt;'+postL10n.ok+'&lt;/a&gt; &lt;a class=&quot;cancel&quot; href=&quot;#&quot;&gt;'+postL10n.cancel+&quot;&lt;/a&gt;&quot;);p.children(&quot;.save&quot;).click(function(){var i=m.children(&quot;input&quot;).val();g.post(ajaxurl,{action:&quot;sample-permalink&quot;,post_id:j,new_slug:i,new_title:g(&quot;#title&quot;).val(),samplepermalinknonce:g(&quot;#samplepermalinknonce&quot;).val()},function(t){g(&quot;#edit-slug-box&quot;).html(t);p.html(q);r.attr(&quot;value&quot;,i);makeSlugeditClickable();g(&quot;#view-post-btn&quot;).show()});return false});g(&quot;.cancel&quot;,&quot;#edit-slug-buttons&quot;).click(function(){g(&quot;#view-post-btn&quot;).show();m.html(o);p.html(q);r.attr(&quot;value&quot;,s);return false});for(k=0;k&lt;l.length;++k){if(&quot;%&quot;==l.charAt(k)){n++}}slug_value=(n&gt;l.length/4)?&quot;&quot;:l;m.html('&lt;input type=&quot;text&quot; id=&quot;new-post-slug&quot; value=&quot;'+slug_value+'&quot; /&gt;').children(&quot;input&quot;).keypress(function(t){var i=t.keyCode||0;if(13==i){p.children(&quot;.save&quot;).click();return false}if(27==i){p.children(&quot;.cancel&quot;).click();return false}r.attr(&quot;value&quot;,this.value)}).focus()};makeSlugeditClickable=function(){g(&quot;#editable-post-name&quot;).click(function(){g(&quot;#edit-slug-buttons&quot;).children(&quot;.edit-slug&quot;).click()})};makeSlugeditClickable()}});
</del><span class="cx">\ No newline at end of file
</span><ins>+var tagBox,commentsBox,editPermalink,makeSlugeditClickable,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail;function array_unique_noempty(b){var c=[];jQuery.each(b,function(a,d){d=jQuery.trim(d);if(d&amp;&amp;jQuery.inArray(d,c)==-1){c.push(d)}});return c}(function(a){tagBox={clean:function(b){return b.replace(/\s*,\s*/g,&quot;,&quot;).replace(/,+/g,&quot;,&quot;).replace(/[,\s]+$/,&quot;&quot;).replace(/^[,\s]+/,&quot;&quot;)},parseTags:function(e){var h=e.id,b=h.split(&quot;-check-num-&quot;)[1],d=a(e).closest(&quot;.tagsdiv&quot;),g=d.find(&quot;.the-tags&quot;),c=g.val().split(&quot;,&quot;),f=[];delete c[b];a.each(c,function(i,j){j=a.trim(j);if(j){f.push(j)}});g.val(this.clean(f.join(&quot;,&quot;)));this.quickClicks(d);return false},quickClicks:function(c){var e=a(&quot;.the-tags&quot;,c),d=a(&quot;.tagchecklist&quot;,c),b;if(!e.length){return}b=e.val().split(&quot;,&quot;);d.empty();a.each(b,function(h,i){var f,g,j=a(c).attr(&quot;id&quot;);i=a.trim(i);if(!i.match(/^\s+$/)&amp;&amp;&quot;&quot;!=i){g=j+&quot;-check-num-&quot;+h;f='&lt;span&gt;&lt;a id=&quot;'+g+'&quot; class=&quot;ntdelbutton&quot;&gt;X&lt;/a&gt;&amp;nbsp;'+i+&quot;&lt;/span&gt; &quot;;d.append(f);a(&quot;#&quot;+g).click(function(){tagBox.parseTags(this)})}})},flushTags:function(e,b,g){b=b||false;var i,c=a(&quot;.the-tags&quot;,e),h=a(&quot;input.newtag&quot;,e),d;i=b?a(b).text():h.val();tagsval=c.val();d=tagsval?tagsval+&quot;,&quot;+i:i;d=this.clean(d);d=array_unique_noempty(d.split(&quot;,&quot;)).join(&quot;,&quot;);c.val(d);this.quickClicks(e);if(!b){h.val(&quot;&quot;)}if(&quot;undefined&quot;==typeof(g)){h.focus()}return false},get:function(c){var b=c.substr(c.indexOf(&quot;-&quot;)+1);a.post(ajaxurl,{action:&quot;get-tagcloud&quot;,tax:b},function(e,d){if(0==e||&quot;success&quot;!=d){e=wpAjax.broken}e=a('&lt;p id=&quot;tagcloud-'+b+'&quot; class=&quot;the-tagcloud&quot;&gt;'+e+&quot;&lt;/p&gt;&quot;);a(&quot;a&quot;,e).click(function(){tagBox.flushTags(a(this).closest(&quot;.inside&quot;).children(&quot;.tagsdiv&quot;),this);return false});a(&quot;#&quot;+c).after(e)})},init:function(){var b=this,c=a(&quot;div.ajaxtag&quot;);a(&quot;.tagsdiv&quot;).each(function(){tagBox.quickClicks(this)});a(&quot;input.tagadd&quot;,c).click(function(){b.flushTags(a(this).closest(&quot;.tagsdiv&quot;))});a(&quot;div.taghint&quot;,c).click(function(){a(this).css(&quot;visibility&quot;,&quot;hidden&quot;).siblings(&quot;.newtag&quot;).focus()});a(&quot;input.newtag&quot;,c).blur(function(){if(this.value==&quot;&quot;){a(this).siblings(&quot;.taghint&quot;).css(&quot;visibility&quot;,&quot;&quot;)}}).focus(function(){a(this).siblings(&quot;.taghint&quot;).css(&quot;visibility&quot;,&quot;hidden&quot;)}).keyup(function(d){if(13==d.which){tagBox.flushTags(a(this).closest(&quot;.tagsdiv&quot;));return false}}).keypress(function(d){if(13==d.which){d.preventDefault();return false}}).each(function(){var d=a(this).closest(&quot;div.tagsdiv&quot;).attr(&quot;id&quot;);a(this).suggest(ajaxurl+&quot;?action=ajax-tag-search&amp;tax=&quot;+d,{delay:500,minchars:2,multiple:true,multipleSep:&quot;, &quot;})});a(&quot;#post&quot;).submit(function(){a(&quot;div.tagsdiv&quot;).each(function(){tagBox.flushTags(this,false,1)})});a(&quot;a.tagcloud-link&quot;).click(function(){tagBox.get(a(this).attr(&quot;id&quot;));a(this).unbind().click(function(){a(this).siblings(&quot;.the-tagcloud&quot;).toggle();return false});return false})}};commentsBox={st:0,get:function(d,c){var b=this.st,e;if(!c){c=20}this.st+=c;this.total=d;a(&quot;#commentsdiv img.waiting&quot;).show();e={action:&quot;get-comments&quot;,mode:&quot;single&quot;,_ajax_nonce:a(&quot;#add_comment_nonce&quot;).val(),post_ID:a(&quot;#post_ID&quot;).val(),start:b,num:c};a.post(ajaxurl,e,function(f){f=wpAjax.parseAjaxResponse(f);a(&quot;#commentsdiv .widefat&quot;).show();a(&quot;#commentsdiv img.waiting&quot;).hide();if(&quot;object&quot;==typeof f&amp;&amp;f.responses[0]){a(&quot;#the-comment-list&quot;).append(f.responses[0].data);theList=theExtraList=null;a(&quot;a[className*=':']&quot;).unbind();setCommentsList();if(commentsBox.st&gt;commentsBox.total){a(&quot;#show-comments&quot;).hide()}else{a(&quot;#show-comments&quot;).html(postL10n.showcomm)}return}else{if(1==f){a(&quot;#show-comments&quot;).parent().html(postL10n.endcomm);return}}a(&quot;#the-comment-list&quot;).append('&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;'+wpAjax.broken+&quot;&lt;/td&gt;&lt;/tr&gt;&quot;)});return false}};WPSetThumbnailHTML=function(b){a(&quot;.inside&quot;,&quot;#postimagediv&quot;).html(b)};WPSetThumbnailID=function(c){var b=a(&quot;input[value=_thumbnail_id]&quot;,&quot;#list-table&quot;);if(b.size()&gt;0){a(&quot;#meta\\[&quot;+b.attr(&quot;id&quot;).match(/[0-9]+/)+&quot;\\]\\[value\\]&quot;).text(c)}};WPRemoveThumbnail=function(){a.post(ajaxurl,{action:&quot;set-post-thumbnail&quot;,post_id:a(&quot;#post_ID&quot;).val(),thumbnail_id:-1,cookie:encodeURIComponent(document.cookie)},function(b){if(b==&quot;0&quot;){alert(setPostThumbnailL10n.error)}else{WPSetThumbnailHTML(b)}})}})(jQuery);jQuery(document).ready(function(e){var b,a,f=&quot;&quot;;postboxes.add_postbox_toggles(pagenow);if(e(&quot;#tagsdiv-post_tag&quot;).length){tagBox.init()}else{e(&quot;#side-sortables, #normal-sortables, #advanced-sortables&quot;).children(&quot;div.postbox&quot;).each(function(){if(this.id.indexOf(&quot;tagsdiv-&quot;)===0){tagBox.init();return false}})}e(&quot;.categorydiv&quot;).each(function(){var l=e(this).attr(&quot;id&quot;),h=false,k,m,j,g,i;j=l.split(&quot;-&quot;);j.shift();g=j.join(&quot;-&quot;);i=g+&quot;_tab&quot;;if(g==&quot;category&quot;){i=&quot;cats&quot;}e(&quot;a&quot;,&quot;#&quot;+g+&quot;-tabs&quot;).click(function(){var n=e(this).attr(&quot;href&quot;);e(this).parent().addClass(&quot;tabs&quot;).siblings(&quot;li&quot;).removeClass(&quot;tabs&quot;);e(&quot;#&quot;+g+&quot;-tabs&quot;).siblings(&quot;.tabs-panel&quot;).hide();e(n).show();if(&quot;#&quot;+g+&quot;-all&quot;==n){deleteUserSetting(i)}else{setUserSetting(i,&quot;pop&quot;)}return false});if(getUserSetting(i)){e('a[href=&quot;#'+g+'-pop&quot;]',&quot;#&quot;+g+&quot;-tabs&quot;).click()}e(&quot;#new&quot;+g).one(&quot;focus&quot;,function(){e(this).val(&quot;&quot;).removeClass(&quot;form-input-tip&quot;)});e(&quot;#&quot;+g+&quot;-add-submit&quot;).click(function(){e(&quot;#new&quot;+g).focus()});k=function(){if(h){return}h=true;var n=jQuery(this),p=n.is(&quot;:checked&quot;),o=n.val().toString();e(&quot;#in-&quot;+g+&quot;-&quot;+o+&quot;, #in-&quot;+g+&quot;-category-&quot;+o).attr(&quot;checked&quot;,p);h=false};catAddBefore=function(n){if(!e(&quot;#new&quot;+g).val()){return false}n.data+=&quot;&amp;&quot;+e(&quot;:checked&quot;,&quot;#&quot;+g+&quot;checklist&quot;).serialize();return n};m=function(q,p){var o,n=e(&quot;#new&quot;+g+&quot;_parent&quot;);if(&quot;undefined&quot;!=p.parsed.responses[0]&amp;&amp;(o=p.parsed.responses[0].supplemental.newcat_parent)){n.before(o);n.remove()}};e(&quot;#&quot;+g+&quot;checklist&quot;).wpList({alt:&quot;&quot;,response:g+&quot;-ajax-response&quot;,addBefore:catAddBefore,addAfter:m});e(&quot;#&quot;+g+&quot;-add-toggle&quot;).click(function(){e(&quot;#&quot;+g+&quot;-adder&quot;).toggleClass(&quot;wp-hidden-children&quot;);e('a[href=&quot;#'+g+'-all&quot;]',&quot;#&quot;+g+&quot;-tabs&quot;).click();return false});e(&quot;#&quot;+g+&quot;checklist li.popular-category :checkbox, #&quot;+g+&quot;checklist-pop :checkbox&quot;).live(&quot;click&quot;,function(){var n=e(this),p=n.is(&quot;:checked&quot;),o=n.val();if(o&amp;&amp;n.parents(&quot;#taxonomy-&quot;+g).length){e(&quot;#in-&quot;+g+&quot;-&quot;+o+&quot;, #in-popular-&quot;+g+&quot;-&quot;+o).attr(&quot;checked&quot;,p)}})});if(e(&quot;#postcustom&quot;).length){e(&quot;#the-list&quot;).wpList({addAfter:function(g,h){e(&quot;table#list-table&quot;).show();if(typeof(autosave_update_post_ID)!=&quot;undefined&quot;){autosave_update_post_ID(h.parsed.responses[0].supplemental.postid)}},addBefore:function(g){g.data+=&quot;&amp;post_id=&quot;+e(&quot;#post_ID&quot;).val();return g}})}if(e(&quot;#submitdiv&quot;).length){b=e(&quot;#timestamp&quot;).html();a=e(&quot;#post-visibility-display&quot;).html();function d(){var g=e(&quot;#post-visibility-select&quot;);if(e(&quot;input:radio:checked&quot;,g).val()!=&quot;public&quot;){e(&quot;#sticky&quot;).attr(&quot;checked&quot;,false);e(&quot;#sticky-span&quot;).hide()}else{e(&quot;#sticky-span&quot;).show()}if(e(&quot;input:radio:checked&quot;,g).val()!=&quot;password&quot;){e(&quot;#password-span&quot;).hide()}else{e(&quot;#password-span&quot;).show()}}function c(){var n,o,h,q,p=e(&quot;#post_status&quot;),i=e(&quot;option[value=publish]&quot;,p),g=e(&quot;#aa&quot;).val(),l=e(&quot;#mm&quot;).val(),m=e(&quot;#jj&quot;).val(),k=e(&quot;#hh&quot;).val(),j=e(&quot;#mn&quot;).val();n=new Date(g,l-1,m,k,j);o=new Date(e(&quot;#hidden_aa&quot;).val(),e(&quot;#hidden_mm&quot;).val()-1,e(&quot;#hidden_jj&quot;).val(),e(&quot;#hidden_hh&quot;).val(),e(&quot;#hidden_mn&quot;).val());h=new Date(e(&quot;#cur_aa&quot;).val(),e(&quot;#cur_mm&quot;).val()-1,e(&quot;#cur_jj&quot;).val(),e(&quot;#cur_hh&quot;).val(),e(&quot;#cur_mn&quot;).val());if(n.getFullYear()!=g||(1+n.getMonth())!=l||n.getDate()!=m||n.getMinutes()!=j){e(&quot;.timestamp-wrap&quot;,&quot;#timestampdiv&quot;).addClass(&quot;form-invalid&quot;);return false}else{e(&quot;.timestamp-wrap&quot;,&quot;#timestampdiv&quot;).removeClass(&quot;form-invalid&quot;)}if(n&gt;h&amp;&amp;e(&quot;#original_post_status&quot;).val()!=&quot;future&quot;){q=postL10n.publishOnFuture;e(&quot;#publish&quot;).val(postL10n.schedule)}else{if(n&lt;=h&amp;&amp;e(&quot;#original_post_status&quot;).val()!=&quot;publish&quot;){q=postL10n.publishOn;e(&quot;#publish&quot;).val(postL10n.publish)}else{q=postL10n.publishOnPast;if(page){e(&quot;#publish&quot;).val(postL10n.updatePage)}else{e(&quot;#publish&quot;).val(postL10n.updatePost)}}}if(o.toUTCString()==n.toUTCString()){e(&quot;#timestamp&quot;).html(b)}else{e(&quot;#timestamp&quot;).html(q+&quot; &lt;b&gt;&quot;+e(&quot;option[value=&quot;+e(&quot;#mm&quot;).val()+&quot;]&quot;,&quot;#mm&quot;).text()+&quot; &quot;+m+&quot;, &quot;+g+&quot; @ &quot;+k+&quot;:&quot;+j+&quot;&lt;/b&gt; &quot;)}if(e(&quot;input:radio:checked&quot;,&quot;#post-visibility-select&quot;).val()==&quot;private&quot;){if(page){e(&quot;#publish&quot;).val(postL10n.updatePage)}else{e(&quot;#publish&quot;).val(postL10n.updatePost)}if(i.length==0){p.append('&lt;option value=&quot;publish&quot;&gt;'+postL10n.privatelyPublished+&quot;&lt;/option&gt;&quot;)}else{i.html(postL10n.privatelyPublished)}e(&quot;option[value=publish]&quot;,p).attr(&quot;selected&quot;,true);e(&quot;.edit-post-status&quot;,&quot;#misc-publishing-actions&quot;).hide()}else{if(e(&quot;#original_post_status&quot;).val()==&quot;future&quot;||e(&quot;#original_post_status&quot;).val()==&quot;draft&quot;){if(i.length){i.remove();p.val(e(&quot;#hidden_post_status&quot;).val())}}else{i.html(postL10n.published)}if(p.is(&quot;:hidden&quot;)){e(&quot;.edit-post-status&quot;,&quot;#misc-publishing-actions&quot;).show()}}e(&quot;#post-status-display&quot;).html(e(&quot;option:selected&quot;,p).text());if(e(&quot;option:selected&quot;,p).val()==&quot;private&quot;||e(&quot;option:selected&quot;,p).val()==&quot;publish&quot;){e(&quot;#save-post&quot;).hide()}else{e(&quot;#save-post&quot;).show();if(e(&quot;option:selected&quot;,p).val()==&quot;pending&quot;){e(&quot;#save-post&quot;).show().val(postL10n.savePending)}else{e(&quot;#save-post&quot;).show().val(postL10n.saveDraft)}}return true}e(&quot;.edit-visibility&quot;,&quot;#visibility&quot;).click(function(){if(e(&quot;#post-visibility-select&quot;).is(&quot;:hidden&quot;)){d();e(&quot;#post-visibility-select&quot;).slideDown(&quot;normal&quot;);e(this).hide()}return false});e(&quot;.cancel-post-visibility&quot;,&quot;#post-visibility-select&quot;).click(function(){e(&quot;#post-visibility-select&quot;).slideUp(&quot;normal&quot;);e(&quot;#visibility-radio-&quot;+e(&quot;#hidden-post-visibility&quot;).val()).attr(&quot;checked&quot;,true);e(&quot;#post_password&quot;).val(e(&quot;#hidden_post_password&quot;).val());e(&quot;#sticky&quot;).attr(&quot;checked&quot;,e(&quot;#hidden-post-sticky&quot;).attr(&quot;checked&quot;));e(&quot;#post-visibility-display&quot;).html(a);e(&quot;.edit-visibility&quot;,&quot;#visibility&quot;).show();c();return false});e(&quot;.save-post-visibility&quot;,&quot;#post-visibility-select&quot;).click(function(){var g=e(&quot;#post-visibility-select&quot;);g.slideUp(&quot;normal&quot;);e(&quot;.edit-visibility&quot;,&quot;#visibility&quot;).show();c();if(e(&quot;input:radio:checked&quot;,g).val()!=&quot;public&quot;){e(&quot;#sticky&quot;).attr(&quot;checked&quot;,false)}if(true==e(&quot;#sticky&quot;).attr(&quot;checked&quot;)){f=&quot;Sticky&quot;}else{f=&quot;&quot;}e(&quot;#post-visibility-display&quot;).html(postL10n[e(&quot;input:radio:checked&quot;,g).val()+f]);return false});e(&quot;input:radio&quot;,&quot;#post-visibility-select&quot;).change(function(){d()});e(&quot;#timestampdiv&quot;).siblings(&quot;a.edit-timestamp&quot;).click(function(){if(e(&quot;#timestampdiv&quot;).is(&quot;:hidden&quot;)){e(&quot;#timestampdiv&quot;).slideDown(&quot;normal&quot;);e(this).hide()}return false});e(&quot;.cancel-timestamp&quot;,&quot;#timestampdiv&quot;).click(function(){e(&quot;#timestampdiv&quot;).slideUp(&quot;normal&quot;);e(&quot;#mm&quot;).val(e(&quot;#hidden_mm&quot;).val());e(&quot;#jj&quot;).val(e(&quot;#hidden_jj&quot;).val());e(&quot;#aa&quot;).val(e(&quot;#hidden_aa&quot;).val());e(&quot;#hh&quot;).val(e(&quot;#hidden_hh&quot;).val());e(&quot;#mn&quot;).val(e(&quot;#hidden_mn&quot;).val());e(&quot;#timestampdiv&quot;).siblings(&quot;a.edit-timestamp&quot;).show();c();return false});e(&quot;.save-timestamp&quot;,&quot;#timestampdiv&quot;).click(function(){if(c()){e(&quot;#timestampdiv&quot;).slideUp(&quot;normal&quot;);e(&quot;#timestampdiv&quot;).siblings(&quot;a.edit-timestamp&quot;).show()}return false});e(&quot;#post-status-select&quot;).siblings(&quot;a.edit-post-status&quot;).click(function(){if(e(&quot;#post-status-select&quot;).is(&quot;:hidden&quot;)){e(&quot;#post-status-select&quot;).slideDown(&quot;normal&quot;);e(this).hide()}return false});e(&quot;.save-post-status&quot;,&quot;#post-status-select&quot;).click(function(){e(&quot;#post-status-select&quot;).slideUp(&quot;normal&quot;);e(&quot;#post-status-select&quot;).siblings(&quot;a.edit-post-status&quot;).show();c();return false});e(&quot;.cancel-post-status&quot;,&quot;#post-status-select&quot;).click(function(){e(&quot;#post-status-select&quot;).slideUp(&quot;normal&quot;);e(&quot;#post_status&quot;).val(e(&quot;#hidden_post_status&quot;).val());e(&quot;#post-status-select&quot;).siblings(&quot;a.edit-post-status&quot;).show();c();return false})}if(e(&quot;#edit-slug-box&quot;).length){editPermalink=function(g){var h,l=0,k=e(&quot;#editable-post-name&quot;),m=k.html(),p=e(&quot;#post_name&quot;),q=p.html(),n=e(&quot;#edit-slug-buttons&quot;),o=n.html(),j=e(&quot;#editable-post-name-full&quot;).html();e(&quot;#view-post-btn&quot;).hide();n.html('&lt;a href=&quot;#&quot; class=&quot;save button&quot;&gt;'+postL10n.ok+'&lt;/a&gt; &lt;a class=&quot;cancel&quot; href=&quot;#&quot;&gt;'+postL10n.cancel+&quot;&lt;/a&gt;&quot;);n.children(&quot;.save&quot;).click(function(){var i=k.children(&quot;input&quot;).val();e.post(ajaxurl,{action:&quot;sample-permalink&quot;,post_id:g,new_slug:i,new_title:e(&quot;#title&quot;).val(),samplepermalinknonce:e(&quot;#samplepermalinknonce&quot;).val()},function(r){e(&quot;#edit-slug-box&quot;).html(r);n.html(o);p.attr(&quot;value&quot;,i);makeSlugeditClickable();e(&quot;#view-post-btn&quot;).show()});return false});e(&quot;.cancel&quot;,&quot;#edit-slug-buttons&quot;).click(function(){e(&quot;#view-post-btn&quot;).show();k.html(m);n.html(o);p.attr(&quot;value&quot;,q);return false});for(h=0;h&lt;j.length;++h){if(&quot;%&quot;==j.charAt(h)){l++}}slug_value=(l&gt;j.length/4)?&quot;&quot;:j;k.html('&lt;input type=&quot;text&quot; id=&quot;new-post-slug&quot; value=&quot;'+slug_value+'&quot; /&gt;').children(&quot;input&quot;).keypress(function(r){var i=r.keyCode||0;if(13==i){n.children(&quot;.save&quot;).click();return false}if(27==i){n.children(&quot;.cancel&quot;).click();return false}p.attr(&quot;value&quot;,this.value)}).focus()};makeSlugeditClickable=function(){e(&quot;#editable-post-name&quot;).click(function(){e(&quot;#edit-slug-buttons&quot;).children(&quot;.edit-slug&quot;).click()})};makeSlugeditClickable()}});
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkwpadminjspostboxdevjs"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/js/postbox.dev.js (13550 => 13551)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/js/postbox.dev.js        2010-03-02 17:56:24 UTC (rev 13550)
+++ trunk/wp-admin/js/postbox.dev.js        2010-03-02 18:06:14 UTC (rev 13551)
</span><span class="lines">@@ -5,6 +5,7 @@
</span><span class="cx">                         this.init(page,args);
</span><span class="cx">                         $('.postbox h3, .postbox .handlediv').click( function() {
</span><span class="cx">                                 var p = $(this).parent('.postbox'), id = p.attr('id');
</span><ins>+
</ins><span class="cx">                                 p.toggleClass('closed');
</span><span class="cx">                                 postboxes.save_state(page);
</span><span class="cx">                                 if ( id ) {
</span><span class="lines">@@ -19,6 +20,7 @@
</span><span class="cx">                         } );
</span><span class="cx">                         $('.hide-postbox-tog').click( function() {
</span><span class="cx">                                 var box = $(this).val();
</span><ins>+
</ins><span class="cx">                                 if ( $(this).attr('checked') ) {
</span><span class="cx">                                         $('#' + box).show();
</span><span class="cx">                                         if ( $.isFunction( postboxes.pbshow ) )
</span><span class="lines">@@ -115,7 +117,8 @@
</span><span class="cx"> 
</span><span class="cx">                 save_state : function(page) {
</span><span class="cx">                         var closed = $('.postbox').filter('.closed').map(function() { return this.id; }).get().join(','),
</span><del>-                        hidden = $('.postbox').filter(':hidden').map(function() { return this.id; }).get().join(',');
</del><ins>+                                hidden = $('.postbox').filter(':hidden').map(function() { return this.id; }).get().join(',');
+
</ins><span class="cx">                         $.post(ajaxurl, {
</span><span class="cx">                                 action: 'closed-postboxes',
</span><span class="cx">                                 closed: closed,
</span><span class="lines">@@ -127,6 +130,7 @@
</span><span class="cx"> 
</span><span class="cx">                 save_order : function(page) {
</span><span class="cx">                         var postVars, page_columns = $('.columns-prefs input:checked').val() || 0;
</span><ins>+
</ins><span class="cx">                         postVars = {
</span><span class="cx">                                 action: 'meta-box-order',
</span><span class="cx">                                 _ajax_nonce: $('#meta-box-order-nonce').val(),
</span></span></pre></div>
<a id="trunkwpincludesuserphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/user.php (13550 => 13551)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/user.php        2010-03-02 17:56:24 UTC (rev 13550)
+++ trunk/wp-includes/user.php        2010-03-02 18:06:14 UTC (rev 13551)
</span><span class="lines">@@ -203,7 +203,6 @@
</span><span class="cx">         if ( !empty( $deprecated ) )
</span><span class="cx">                 _deprecated_argument( __FUNCTION__, '3.0' );
</span><span class="cx"> 
</span><del>-        $option = preg_replace('|[^a-z0-9_]|i', '', $option);
</del><span class="cx">         if ( empty($user) )
</span><span class="cx">                 $user = wp_get_current_user();
</span><span class="cx">         else
</span><span class="lines">@@ -237,6 +236,7 @@
</span><span class="cx">  */
</span><span class="cx"> function update_user_option( $user_id, $option_name, $newvalue, $global = false ) {
</span><span class="cx">         global $wpdb;
</span><ins>+
</ins><span class="cx">         if ( !$global )
</span><span class="cx">                 $option_name = $wpdb-&gt;prefix . $option_name;
</span><span class="cx">         return update_user_meta( $user_id, $option_name, $newvalue );
</span><span class="lines">@@ -666,4 +666,4 @@
</span><span class="cx">         wp_cache_delete($user-&gt;user_nicename, 'userslugs');
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-?&gt;
</del><span class="cx">\ No newline at end of file
</span><ins>+?&gt;
</ins></span></pre>
</div>
</div>

</body>
</html>