array( * array('type' => 'text', 'name' => 'name', 'label' => 'Nom', 'required' => true), * array('type' => 'email', 'name' => 'email', 'label' => 'Email', 'required' => true), * array('type' => 'textarea', 'name' => 'message', 'label' => 'Message', 'required' => true), * array('type' => 'submit', 'name' => 'submit', 'label' => 'Send'), * ), * )); * * @param string $form_id Unique form identifier * @param array $config Form configuration array */ function adpf_register_form($form_id, $config) { add_filter('adpf_form_config_' . $form_id, function() use ($config) { return $config; }); } /** * Get form configuration * * @param string $form_id Form ID * @return array|false Form configuration or false */ function adpf_get_form_config($form_id) { return apply_filters('adpf_form_config_' . $form_id, false); } /** * Get the upgrade URL for the Pro version * * @return string URL to the Pro version page */ function adpf_get_upgrade_url() { if (function_exists('adpf_fs_integration')) { $upgrade_url = adpf_fs_integration()->get_upgrade_url(); if (!empty($upgrade_url)) { return $upgrade_url; } } return admin_url('admin.php?page=ad-pro-forms-menu-pricing'); }