WPCF7_Submission::get_instance()public staticCF7 1.0

Returns the singleton instance of this class.

Метод класса: WPCF7_Submission{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = WPCF7_Submission::get_instance( $contact_form, $args );
$contact_form **
-
По умолчанию: null
$args **
-
По умолчанию: ''

Код WPCF7_Submission::get_instance() CF7 5.9.3

public static function get_instance( $contact_form = null, $args = '' ) {
	if ( $contact_form instanceof WPCF7_ContactForm ) {
		if ( empty( self::$instance ) ) {
			self::$instance = new self( $contact_form, $args );
			self::$instance->proceed();
			return self::$instance;
		} else {
			return null;
		}
	} else {
		if ( empty( self::$instance ) ) {
			return null;
		} else {
			return self::$instance;
		}
	}
}