Prevent the Slug metabox from being forever hidden when showing all metaboxes. Fixes #12088

git-svn-id: http://svn.automattic.com/wordpress/trunk@14065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32
2010-04-11 02:41:40 +00:00
parent fbf39813dc
commit 59bb0c7d9c
2 changed files with 8 additions and 7 deletions

View File

@@ -988,10 +988,12 @@ case 'autosave' : // The name of this action is hardcoded in edit_post()
break;
case 'closed-postboxes' :
check_ajax_referer( 'closedpostboxes', 'closedpostboxesnonce' );
$closed = isset( $_POST['closed'] ) ? $_POST['closed'] : '';
$closed = explode( ',', $_POST['closed'] );
$hidden = isset( $_POST['hidden'] ) ? $_POST['hidden'] : '';
$hidden = explode( ',', $_POST['hidden'] );
$closed = isset( $_POST['closed'] ) ? explode( ',', $_POST['closed']) : array();
$closed = array_filter($closed);
$hidden = isset( $_POST['hidden'] ) ? explode( ',', $_POST['hidden']) : array();
$hidden = array_filter($hidden);
$page = isset( $_POST['page'] ) ? $_POST['page'] : '';
if ( !preg_match( '/^[a-z_-]+$/', $page ) )