/home/vianto5/hidalgoresidences.mx/wp-content/plugins/wpml-wpforms/classes/Hooks
NameSizeModeActions
ATE/-0755rm
AteLayoutHooks.php23760644editdlrm
ChoiceValidation.php76940644editdlrm
ConversationalForms.php4450644editdlrm
DynamicChoices.php4360644editdlrm
EntryEdit.php17300644editdlrm
EntryPreviewField.php29320644editdlrm
Factory.php6380644editdlrm
FormPages.php17060644editdlrm
Import.php9080644editdlrm
SubLabels.php19830644editdlrm
TranslateEverythingHooks.php6410644editdlrm
Edit: /home/vianto5/hidalgoresidences.mx/wp-content/plugins/wpml-wpforms/classes/Hooks/EntryEdit.php (1730B)
strings = $strings; } /** * @return void */ public function addHooks() { $maybeAddHooks = function( $mode ) { if ( 'edit' === $mode ) { // phpcs:ignore WordPress.Security.NonceVerification $entryEdit = (int) $_GET['entry_id']; Hooks::onFilter( 'wpforms_pro_admin_entries_edit_form_data' ) ->then( spreadArgs( $this->getMaybeTranslateFormData( $entryEdit ) ) ); Hooks::onFilter( 'wpforms_entry_single_data' ) ->then( spreadArgs( [ $this, 'maybeConvertDynamicChoices' ] ) ); } }; Hooks::onAction( 'wpforms_entries_init' ) ->then( spreadArgs( $maybeAddHooks ) ); } /** * @param int $entryEdit * * @return callable(array):array */ public function getMaybeTranslateFormData( int $entryEdit ) : callable { return function( array $formData ) use ( $entryEdit ) { $language = Entry::getLanguageById( $entryEdit ); if ( $language && Languages::getCurrentCode() !== $language ) { return Languages::whileInLanguage( $language ) ->invoke( [ $this->strings, 'applyTranslations' ] ) ->runWith( $formData ); } return $formData; }; } /** * @param array $fields * * @return array */ public function maybeConvertDynamicChoices( array $fields ) : array { return wpml_collect( $fields ) ->map( [ DynamicChoices::class, 'convertRawValue' ] ) ->all(); } }