Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_ajax_hidden_columns ›

Desde3.1.0
Obsoleton/a
wp_ajax_hidden_columns ( Sem parâmetros )
Definido em:
Codex:

Ajax handler for hidden columns.



Fonte

function wp_ajax_hidden_columns() {
	check_ajax_referer( 'screen-options-nonce', 'screenoptionnonce' );
	$page = isset( $_POST['page'] ) ? $_POST['page'] : '';

	if ( $page != sanitize_key( $page ) ) {
		wp_die( 0 );
	}

	$user = wp_get_current_user();
	if ( ! $user ) {
		wp_die( -1 );
	}

	$hidden = ! empty( $_POST['hidden'] ) ? explode( ',', $_POST['hidden'] ) : array();
	update_user_option( $user->ID, "manage{$page}columnshidden", $hidden, true );

	wp_die( 1 );
}