本文整理汇总了PHP中wpcf7_default_messages_template函数的典型用法代码示例。如果您正苦于以下问题:PHP wpcf7_default_messages_template函数的具体用法?PHP wpcf7_default_messages_template怎么用?PHP wpcf7_default_messages_template使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpcf7_default_messages_template函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wpcf7_get_default_template
function wpcf7_get_default_template( $prop = 'form' ) {
if ( 'form' == $prop )
$template = wpcf7_default_form_template();
elseif ( 'mail' == $prop )
$template = wpcf7_default_mail_template();
elseif ( 'mail_2' == $prop )
$template = wpcf7_default_mail_2_template();
elseif ( 'messages' == $prop )
$template = wpcf7_default_messages_template();
else
$template = null;
return apply_filters( 'wpcf7_default_template', $template, $prop );
}
示例2: wpcf7_install
function wpcf7_install()
{
global $wpdb, $wpcf7;
if (wpcf7_table_exists()) {
return;
}
// Exists already
$charset_collate = '';
if ($wpdb->has_cap('collation')) {
if (!empty($wpdb->charset)) {
$charset_collate = "DEFAULT CHARACTER SET {$wpdb->charset}";
}
if (!empty($wpdb->collate)) {
$charset_collate .= " COLLATE {$wpdb->collate}";
}
}
$wpdb->query("CREATE TABLE IF NOT EXISTS {$wpcf7->contactforms} (\r\n\t\tcf7_unit_id bigint(20) unsigned NOT NULL auto_increment,\r\n\t\ttitle varchar(200) NOT NULL default '',\r\n\t\tform text NOT NULL,\r\n\t\tmail text NOT NULL,\r\n\t\tmail_2 text NOT NULL,\r\n\t\tmessages text NOT NULL,\r\n\t\tadditional_settings text NOT NULL,\r\n\t\tPRIMARY KEY (cf7_unit_id)) {$charset_collate};");
if (!wpcf7_table_exists()) {
return false;
}
// Failed to create
$legacy_data = get_option('wpcf7');
if (is_array($legacy_data) && is_array($legacy_data['contact_forms']) && $legacy_data['contact_forms']) {
foreach ($legacy_data['contact_forms'] as $key => $value) {
$wpdb->insert($wpcf7->contactforms, array('cf7_unit_id' => $key, 'title' => $value['title'], 'form' => maybe_serialize($value['form']), 'mail' => maybe_serialize($value['mail']), 'mail_2' => maybe_serialize($value['mail_2']), 'messages' => maybe_serialize($value['messages']), 'additional_settings' => maybe_serialize($value['additional_settings'])), array('%d', '%s', '%s', '%s', '%s', '%s', '%s'));
}
} else {
wpcf7_load_plugin_textdomain();
$wpdb->insert($wpcf7->contactforms, array('title' => __('Contact form', 'wpcf7') . ' 1', 'form' => maybe_serialize(wpcf7_default_form_template()), 'mail' => maybe_serialize(wpcf7_default_mail_template()), 'mail_2' => maybe_serialize(wpcf7_default_mail_2_template()), 'messages' => maybe_serialize(wpcf7_default_messages_template())));
}
}
示例3: wpcf7_contact_form_default_pack
function wpcf7_contact_form_default_pack()
{
$contact_form = new WPCF7_ContactForm();
$contact_form->initial = true;
$contact_form->title = __('Untitled', 'wpcf7');
$contact_form->form = wpcf7_default_form_template();
$contact_form->mail = wpcf7_default_mail_template();
$contact_form->mail_2 = wpcf7_default_mail_2_template();
$contact_form->messages = wpcf7_default_messages_template();
return $contact_form;
}
示例4: wpcf7_contact_form_default_pack
function wpcf7_contact_form_default_pack($locale = null)
{
global $l10n;
if ($locale && $locale != get_locale()) {
$mo_orig = $l10n['wpcf7'];
unset($l10n['wpcf7']);
if ('en_US' != $locale) {
$mofile = wpcf7_plugin_path('languages/wpcf7-' . $locale . '.mo');
if (!load_textdomain('wpcf7', $mofile)) {
$l10n['wpcf7'] = $mo_orig;
unset($mo_orig);
}
}
}
$contact_form = new WPCF7_ContactForm();
$contact_form->initial = true;
$contact_form->title = __('Untitled', 'wpcf7');
$contact_form->form = wpcf7_default_form_template();
$contact_form->mail = wpcf7_default_mail_template();
$contact_form->mail_2 = wpcf7_default_mail_2_template();
$contact_form->messages = wpcf7_default_messages_template();
if (isset($mo_orig)) {
$l10n['wpcf7'] = $mo_orig;
}
return $contact_form;
}