WPCF7_ContactForm::get_template() public CF7 1.0
{} Это метод класса: WPCF7_ContactForm{}
Хуки из метода
Возвращает
Null. Ничего.
Использование
$result = WPCF7_ContactForm::get_template( $args );
- $args **
- -
По умолчанию: ''
Код WPCF7_ContactForm::get_template() WPCF7 ContactForm::get template CF7 5.4
public static function get_template( $args = '' ) {
$args = wp_parse_args( $args, array(
'locale' => '',
'title' => __( 'Untitled', 'contact-form-7' ),
) );
$locale = $args['locale'];
$title = $args['title'];
if ( ! $switched = wpcf7_load_textdomain( $locale ) ) {
$locale = determine_locale();
}
$contact_form = new self;
$contact_form->title = $title;
$contact_form->locale = $locale;
$properties = $contact_form->get_properties();
foreach ( $properties as $key => $value ) {
$properties[$key] = WPCF7_ContactFormTemplate::get_default( $key );
}
$contact_form->properties = $properties;
$contact_form = apply_filters( 'wpcf7_contact_form_default_pack',
$contact_form, $args
);
if ( $switched ) {
wpcf7_load_textdomain();
}
self::$current = $contact_form;
return $contact_form;
}