/home/vianto5/cititower.mx/wp-content/plugins/wpml-wpforms/classes/Hooks/WpForms
NameSizeModeActions
AteFieldAdjuster.php63660644editdlrm
AteFieldReorder.php26880644editdlrm
AteLayoutHooks.php23770644editdlrm
ConversationalForms.php4020644editdlrm
DynamicChoices.php4360644editdlrm
EntryEdit.php16880644editdlrm
EntryPreviewField.php29390644editdlrm
Factory.php6070644editdlrm
FormPages.php16640644editdlrm
Import.php9080644editdlrm
Notifications.php95540644editdlrm
Package.php14450644editdlrm
Strings.php59040644editdlrm
SubLabels.php19830644editdlrm
TranslateEverythingHooks.php6300644editdlrm
Edit: /home/vianto5/cititower.mx/wp-content/plugins/wpml-wpforms/classes/Hooks/WpForms/EntryEdit.php (1688B)
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(); } }