Slide 4
Slide 4 text
/**
* Helper function to retrieve all entries from specific caldera form.
*
* @param string $form_id ID of caldera form.
*
* @return array Retrieved entries
*/
private function get_entries( $form_id ) {
/**
* In front-end admin class is not included.
*
* @const CFCORE_PATH Caldera Forms absolute path
*/
require_once( CFCORE_PATH . 'classes/admin.php' );
//get all entries (page 1 with 9999999 entries per page should do it:)
$data = \Caldera_Forms_Admin::get_entries( $form_id, 1, 9999999 );
// $data has extra meta info. $entries has just the entries
return ( $data['total'] > 0 ) ? $data['entries'] : [ ];
}
WordCamp Berlin 2015 – Hans-Helge Bürger - Lightning Talk 4