HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/f/r/e/frenchy/www/_trash/wp-content/plugins/advanced-forms/api/api-entries.php
<?php


/**
 * Gets all entries for the specified form
 *
 * @since 1.0.0
 *
 */
function af_get_entries( $form_key ) {

	$args = array(
		'post_type' => 'af_entry',
		'posts_per_page' => '-1',
 		'meta_query' => array(
	 		array(
		 		'key' => 'entry_form',
		 		'value' => $form_key,
	 		),
 		),
	);

	$query = new WP_Query( $args );

	return $query->posts;

}


/**
 * Get number of entries by form
 *
 * 1.0.2
 *
 */
function af_get_entry_count( $form_key ) {
	
	$args = array(
		'post_type' => 'af_entry',
		'posts_per_page' => '-1',
 		'meta_query' => array(
	 		array(
		 		'key' => 'entry_form',
		 		'value' => $form_key,
	 		),
 		),
	);

	$query = new WP_Query( $args );
	
	return $query->found_posts;
	
}