WPCF7_ContactForm::upgrade()
Upgrades this contact form properties.
Метод класса: WPCF7_ContactForm{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->upgrade();
Код WPCF7_ContactForm::upgrade() WPCF7 ContactForm::upgrade CF7 6.0.1
private function upgrade() { $mail = $this->prop( 'mail' ); if ( is_array( $mail ) and ! isset( $mail['recipient'] ) ) { $mail['recipient'] = get_option( 'admin_email' ); } $this->properties['mail'] = $mail; $messages = $this->prop( 'messages' ); if ( is_array( $messages ) ) { foreach ( wpcf7_messages() as $key => $arr ) { if ( ! isset( $messages[$key] ) ) { $messages[$key] = $arr['default']; } } } $this->properties['messages'] = $messages; }