當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。