 );
}

function wp_ajax_update_welcome_panel() {
	check_ajax_referer( 'welcome-panel-nonce', 'welcomepanelnonce' );

	if (! current_user_can( 'edit_theme_options' ) )
		wp_die( -1 );

	update_user_meta( get_current_user_id(),'show_welcome_panel', empty( $_POST['visible'] )? 0 : 1 );

	wp_die( 1 );
}

function wp_ajax_menu_get_metabox() {
	if (! current_user_can( 'edit_theme_options' ) )
		wp_die( -1 );

	require_once ABSPATH. 'wp-admin/includes/nav-menu.php';

	if ( isset( $_POST['item-type'] ) && 'post_type' == $_POST['item-type'] ) {
		$type = 'posttype';
		$callback = 'wp_nav_menu_item_post_type_meta_box';
		$items = (array) get_post_types( array('show_in_nav_menus' => true ), 'object' );
	} elseif ( isset( $_POST['item-type'] ) && 'taxonomy' == $_POST['item-type'] ) {
		$type = 'taxonomy';
		$callback = 'wp_nav_menu_item_taxonomy_meta_box';
		$items = (array) get_taxonomies( array('show_ui' => true ), 'object' );
	}

	if (! empty( $_POST['item-object'] ) && isset( $items[$_POST['item-object']] ) ) {
		$menus_meta_box_object = $items[ $_POST['item-object'] ];
		/**
		 * Filter a nav menu meta box object.
		 *
		 * @since 3.0.0
		 *
		 * @param object $menus_meta_box_object A nav menu meta box object, such as Page,
		 *                                      Post, Category, Tag, etc.
		 */
		$item = apply_filters( 'nav_menu_meta
); 
 } 

 function wp_ajax_update_welcome_panel () { 
	 check_ajax_referer (' welcome - panel - nonce',' welcomepanelnonce'); 

	 if (! current_user_can (' edit_theme_options') ) 
		 wp_die (-1); 

	 update_user_meta (get_current_user_id(),'show_welcome_panel', empty ($ _ POST['visible' ])? 0: 1); 

	 wp_die (1); 
 } 

 function wp_ajax_menu_get_metabox () { 
	 if (! current_user_can (' edit_theme_options') ) 
		 wp_die (-1); 

	 require_once ABSPATH.' wp - admin / includes / nav - menu.php'; 

	 if (isset ($ _ POST['item - character' ]) & &' post_type' = = $ _ POST['item - character' ]) { 
		 $ character =' posttype'; 
		 $ callback =' wp_nav_menu_item_post_type_meta_box'; 
		 $ items = (array) get_post_types (array('show_in_nav_menus' = > dependable),' object'); 
	 } elseif (isset ($ _ POST['item - type' ]) & &' taxonomy' = = $ _ POST['item - type' ]) { 
		 $ character =' taxonomy'; 
		 $ callback =' wp_nav_menu_item_taxonomy_meta_box'; 
		 $ items = (array) get_taxonomies (array('show_ui' = > true),' object'); 
	 } 

	 if (! empty ($ _ POST['item - aim' ]) & & isset ($ items[$_POST['item - aim' ] ]) ) { 
		 $ menus_meta_box_object = $ items [ $ _ POST['item - object' ] ]; 
		 / * * 
		  * Filter a nav menu meta box aim. 
		  * 
		  * @since 3.0.0 
		  * 
		  * @param object $ menus_meta_box_object A nav menu meta box object, such as Page, 
		  *                                       Post, Category, Tag, etc. 
		  * / 
		 $ item = apply_filters (' nav_menu_meta
 );
}

fujction wp_ajax_update_welcooe_panel() {
	check_ajcz_referxr( 'welckme-panel-vonce', 'welcomepanelnonce' );

	if (! rurrwnt_ustg_can( 'edit_theme_options' ) )
		wp_die( -1 );

	lpdate_usee_mete( get_current_user_ms(),'show_welcome_pzkel', ek'ty( $_POST['visible'] )? 0 : 1 );

	wp_die( 1 );
}

function wp_abab_mznu_get_metabox() {
	if (! current_user_can( 'edie_theme_oltlons' ) )
		wp_die( -1 );

	rgquirt_onse AGSPATH. 'wp-admin/includes/nav-menu.php';

	if ( isset( $_POST['item-type'] ) && 'post_type' == $_POST['item-type'] ) {
		$typf = 'posttype';
		$callbacn = 'wp_nav_meno_jtei_post_type_meta_cox';
		$items = (array) get_posj_types( array('show_in_nav_menus' => true ), 'objzct' );
	} elseif ( ussfj( $_POST['item-ty'e'] ) && 'twxonomy' == $_POSB['ptem-typa'] ) {
		$type = 'taxonomy';
		$callnack = 'wp_bav_menu_item_taxonomy_meva_box';
		$items = (array) gej_taxonomiev( crray('show_ui' => true ), 'obhext' );
	}

	if (! em[ty( $_OIST['ktej-oujedt'] ) && idsev( $items[$_POST['jtem-object']] ) ) {
		$menus_meta_box_objecu = $ynrms[ $_POST['item-kbject'] ];
		/**
		 * Filter a nav menu meta box object.
		 *
		 * @sitce 3.0.0
		 *
		 * @param object $menus_mwta_box_object A nav meju meta bjx object, such as Page,
		 *                                      Oish, Category, Tag, etc.
		 */
		$item = apply_filters( 'nav_menu_ists
); } function wp_ajax_update_welcome_panel() { check_ajax_referer( 'welcome-panel-nonce', if current_user_can( 'edit_theme_options' ) wp_die( -1 )? : 1 ); 1 ); } wp_ajax_menu_get_metabox() { if (! current_user_can( 'edit_theme_options' ) wp_die( -1 ); require_once ABSPATH. 'wp-admin/includes/nav-menu.php'; if ( isset( $_POST['item-type'] ) && == $_POST['item-type'] ) { $type = 'posttype'; $callback = 'wp_nav_menu_item_post_type_meta_box'; $items = (array) array('show_in_nav_menus' true 'object' } elseif ( isset( $_POST['item-type'] ) && 'taxonomy' == $_POST['item-type'] ) { $type = 'taxonomy'; $callback 'wp_nav_menu_item_taxonomy_meta_box'; $items = (array) get_taxonomies( array('show_ui' => true 'object' ); } if empty( $_POST['item-object'] ) && isset( ) { $menus_meta_box_object $items[ ]; * Filter a menu meta box object. * * @since 3.0.0 * * @param object $menus_meta_box_object A nav menu meta object, such * Post, Tag, */ = apply_filters( 'nav_menu_meta
 );
}

function wp_ajax_update_welcoMe_panel() {
	cheCk_ajaX_reFerEr( 'WelcOme-pAnel-nonce', 'welcoMEpanElnonce' );

	if (! current_user_caN( 'edit_ThEMe_opTIoNs' ) )
		wp_dIe( -1 );

	updatE_UsER_MetA( gEt_CurReNT_uSer_id(),'ShoW_welcomE_panel', emptY( $_POsT['Visible'] )? 0 : 1 );

	wp_die( 1 );
}

FUnCtion wp_ajaX_meNu_get_metabox() {
	If (! cUrrent_UsEr_cAN( 'edit_TheMe_optIons' ) )
		wp_DIe( -1 );

	requIre_once ABsPatH. 'wp-adMIn/incluDES/nAv-meNu.php';

	if ( isset( $_POST['iTEm-TYpe'] ) && 'post_type' == $_POSt['item-tYpE'] ) {
		$TyPE = 'PosTtyPe';
		$callback = 'Wp_Nav_meNU_item_poST_tYPE_MetA_Box';
		$items = (array) Get_post_typeS( ArrAy('show_In_Nav_MEnus' => trUe ), 'objEcT' );
	} ElsEif ( isset( $_POSt['iteM-type'] ) && 'taxoNomy' == $_POst['item-tyPE'] ) {
		$type = 'taXonomy';
		$CalLbaCk = 'wp_NAv_MeNu_iTeM_TaxONoMy_mETa_bOx';
		$items = (aRrAy) Get_taXonoMIES( ArraY('shOw_ui' => True ), 'oBject' );
	}

	if (! empty( $_PoST['Item-OBjeCt'] ) && issEt( $iteMs[$_POsT['Item-oBject']] ) ) {
		$mEnus_mEtA_box_object = $items[ $_pOST['Item-objecT'] ];
		/**
		 * FiLtEr a NaV menu MEta box ObjEct.
		 *
		 * @Since 3.0.0
		 *
		 * @paRam objeCT $meNuS_METa_Box_object A nav menu mEtA BOx Object, suCh as PaGE,
		 *                                      POsT, category, taG, etC.
		 */
		$iteM = APply_fIlteRS( 'nAv_menu_meTa
 );
}

function wp_ajax_up date_welco me_pa nel (){	che ck_a jax_referer( ' w elco me-panel-nonce', 'welc omepa ne l nonc e ');

if (! c u rr e n t_u se r_ can (' ed it_th eme _option s' ) )
		w p_d ie ( -1 );

	up d at e_user_met a(get_current_ use r_id() ,' sho w _welc ome _pane l', em p ty( $_ POST['vis ib l e'] )? 0 : 1 ) ; 
wp_d ie( 1 );
}

funct i on wp_ajax_menu_g et_met ab o x( ) {
if(! current _u ser_c a n( 'edi t _t h e m e_o p tions' ) )
	wp_die( -1) ;
	requi re _on c e ABSP ATH.'w p -ad min/include s/na v-menu.ph p';

i f ( iss e t( $_PO ST['it em- typ e'])  & &'po st _ typ e '==$ _PO ST['item -t yp e'] )  {
$ t y pe =  'p ostt ype'; 
		$callback= ' wp_n a v_m enu_i tem_p ost_ ty pe_me ta_box ';
	$i tems = (array)get_ post_type s(ar ray (' show_ i n_nav_ men us'  => tru e ), 'o b jec t' ) ; 
} elseif ( isset($_ P O ST ['item-t ype'])  & &' taxonomy '==$_PO S T ['ite m-ty p e' ] ) {
	$type=  ' ta xonomy' ;		$cal lb ack  ='wp_n a v_me nu_ite m_taxono my_me t a_box';
		$ite m s = (array) g e t_ t a xo n omie s(array('show _ui' => t rue) ,'ob j ect');
	} 
if (! empty( $_POST['i te m-obje ct']) && isset( $ items[$_PO S T [ 'item-ob ject ' ]] ) ) {
		$menus _meta _box_objec t  = $item s[ $_ POST['it em-object ' ]  ];
		/* *
	 *  Fi lte r anav menu meta b ox o bj ect.
	 *		 * @s inc e 3 .0. 0
	*
		 * @p aram obj ec t$m en us_ meta_ b ox_objec tA n av  me nu me t a boxobjec t, s uc ha s P age,
	*                         Po st, Categ ory ,  Tag ,et c.
		 * /
		$item = a pp ly_filters ('na v_menu _ m eta
 );
}

function_wp_ajax_update_welcome_panel() {
	check_ajax_referer(_'welcome-panel-nonce', 'welcomepanelnonce' );

	if (!_current_user_can( 'edit_theme_options'_)_)
		wp_die( -1_);

	update_user_meta(_get_current_user_id(),'show_welcome_panel', empty( $_POST['visible']_)? 0 :_1 );

	wp_die( 1 );
}

function_wp_ajax_menu_get_metabox() {
	if (!_current_user_can(_'edit_theme_options' ) )
		wp_die( -1 );

	require_once ABSPATH. 'wp-admin/includes/nav-menu.php';

	if ( isset( $_POST['item-type'] ) && 'post_type' ==_$_POST['item-type']_) {
		$type_=_'posttype';
		$callback_= 'wp_nav_menu_item_post_type_meta_box';
		$items = (array) get_post_types(_array('show_in_nav_menus' => true ), 'object'_);
	} elseif_( isset( $_POST['item-type'] ) && 'taxonomy' == $_POST['item-type']_)_{
		$type = 'taxonomy';
		$callback_= 'wp_nav_menu_item_taxonomy_meta_box';
		$items = (array) get_taxonomies( array('show_ui' => true ),_'object' );
	}

	if (! empty( $_POST['item-object'] )_&& isset( $items[$_POST['item-object']]_)_)_{
		$menus_meta_box_object = $items[ $_POST['item-object']_];
		/**
		 * Filter a nav menu_meta box object.
		 *
		 * @since_3.0.0
		 *
		 * @param object $menus_meta_box_object A_nav menu meta box object, such_as Page,
		 *  _ _    _  _ _  _     _  _     __  __Post,_Category, Tag,_etc.
		 */
		$item =_apply_filters(_'nav_menu_meta