当前位置: 首页>>代码示例>>PHP>>正文


PHP WPCF7_ContactForm::upgrade方法代码示例

本文整理汇总了PHP中WPCF7_ContactForm::upgrade方法的典型用法代码示例。如果您正苦于以下问题:PHP WPCF7_ContactForm::upgrade方法的具体用法?PHP WPCF7_ContactForm::upgrade怎么用?PHP WPCF7_ContactForm::upgrade使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WPCF7_ContactForm的用法示例。


在下文中一共展示了WPCF7_ContactForm::upgrade方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: wpcf7_contact_form

function wpcf7_contact_form($id)
{
    global $wpdb;
    $table_name = wpcf7_table_name();
    $id = (int) $id;
    $query = $wpdb->prepare("SELECT * FROM {$table_name} WHERE cf7_unit_id = %d", $id);
    if (!($row = $wpdb->get_row($query))) {
        return false;
    }
    // No data
    $contact_form = new WPCF7_ContactForm();
    $contact_form->id = $row->cf7_unit_id;
    $contact_form->title = stripslashes_deep($row->title);
    $contact_form->form = stripslashes_deep(maybe_unserialize($row->form));
    $contact_form->mail = stripslashes_deep(maybe_unserialize($row->mail));
    $contact_form->mail_2 = stripslashes_deep(maybe_unserialize($row->mail_2));
    $contact_form->messages = stripslashes_deep(maybe_unserialize($row->messages));
    $contact_form->additional_settings = stripslashes_deep(maybe_unserialize($row->additional_settings));
    $contact_form->upgrade();
    return $contact_form;
}
开发者ID:bi0xid,项目名称:youare-plugins,代码行数:21,代码来源:classes.php

示例2: wpcf7_contact_form

function wpcf7_contact_form($id)
{
    $post = get_post($id);
    if (empty($post) || 'wpcf7_contact_form' != get_post_type($post)) {
        return false;
    }
    $contact_form = new WPCF7_ContactForm();
    $contact_form->id = $post->ID;
    $contact_form->title = $post->post_title;
    $contact_form->form = get_post_meta($post->ID, 'form', true);
    $contact_form->mail = get_post_meta($post->ID, 'mail', true);
    $contact_form->mail_2 = get_post_meta($post->ID, 'mail_2', true);
    $contact_form->messages = get_post_meta($post->ID, 'messages', true);
    $contact_form->additional_settings = get_post_meta($post->ID, 'additional_settings', true);
    $contact_form->upgrade();
    $contact_form = apply_filters_ref_array('wpcf7_contact_form', array(&$contact_form));
    return $contact_form;
}
开发者ID:xuandungpy,项目名称:vuong,代码行数:18,代码来源:classes.php

示例3: wpcf7_contact_form

function wpcf7_contact_form($id)
{
    global $wpdb, $wpcf7;
    $query = $wpdb->prepare("SELECT * FROM {$wpcf7->contactforms} WHERE cf7_unit_id = %d", $id);
    if (!($row = $wpdb->get_row($query))) {
        return false;
    }
    // No data
    $contact_form = new WPCF7_ContactForm();
    $contact_form->id = $row->cf7_unit_id;
    $contact_form->title = maybe_unserialize($row->title);
    $contact_form->form = maybe_unserialize($row->form);
    $contact_form->mail = maybe_unserialize($row->mail);
    $contact_form->mail_2 = maybe_unserialize($row->mail_2);
    $contact_form->messages = maybe_unserialize($row->messages);
    $contact_form->additional_settings = maybe_unserialize($row->additional_settings);
    $contact_form->upgrade();
    return $contact_form;
}
开发者ID:sontv1003,项目名称:thepdahoi,代码行数:19,代码来源:classes.php


注:本文中的WPCF7_ContactForm::upgrade方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。