Forms::mapping( 'WPForms form', self::PLUGIN ) ); } public static function internal_post_types(): array { return array(); } /** * `wpforms_process_complete`. * * @param mixed $fields The submitted fields (never read). * @param mixed $entry The raw submission (never read). * @param mixed $form_data The form's settings. * @param mixed $entry_id The stored entry (0 in Lite). */ public static function log_submission( $fields, $entry, $form_data, $entry_id = 0 ): void { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundBeforeLastUsed -- the hook's signature; the field values are deliberately never read. if ( ! is_array( $form_data ) ) { return; } $form_id = isset( $form_data['id'] ) && is_numeric( $form_data['id'] ) ? (int) $form_data['id'] : 0; $title = isset( $form_data['settings']['form_title'] ) && is_string( $form_data['settings']['form_title'] ) ? $form_data['settings']['form_title'] : ''; Forms::submitted( self::PLUGIN, 'WPForms form', $form_id, $title, is_numeric( $entry_id ) ? (int) $entry_id : 0 ); } }