';
}
} else {
echo __('No users found for term:', 'ajax-search-pro') . ' ' . esc_html($phrase) .'';
}
}
die();
}
public function processData() {
// Get the args first if exists
if ( is_array($this->data) && isset($this->data['args']) )
$this->args = array_merge($this->args, $this->data['args']);
if ( is_array($this->data) && isset($this->data['value']) ) {
// If called from back-end non-post context
$this->e_data = $this->decode_param($this->data['value']);
$this->data = $this->encode_param($this->data['value']);
} else {
// POST method or something else
$this->e_data = $this->decode_param($this->data);
$this->data = $this->encode_param($this->data);
}
/**
* At this point the this->data variable surely contains the encoded data, no matter what.
*/
}
public final function getData() {
return $this->data;
}
public final function getSelected() {
return $this->e_data;
}
}
}
if ( !has_action('wp_ajax_wd_search_users') )
add_action('wp_ajax_wd_search_users', 'wd_UserSelect::searchUsers');