<?php
global $czpf_plugin;

function send_error_die($msg){
	die(json_encode(array('R'=>'ERR','MSG'=>$msg)));
}

if(!isset($_REQUEST['sort_object']) ){
	send_error_die('Error in data');
}



add_action( 'init', 'create_post_typess' );	

function create_post_typess(){
	require_once(RHCCZPF_PATH.'inc/class.object_controler.php');
	$czpf_class_object_controler = new czpf_class_object_controler(RHCCZPF_URL);
	$_GET['paged'] = $_REQUEST['paged'];
	

	$return_data = $czpf_class_object_controler->generate_memebers('ex',$_REQUEST['sort_object']);
	die(json_encode(array('R'=>'OK','data'=>$return_data,'paged'=>$_REQUEST['paged'])));
}
?>