本文整理汇总了PHP中maybe_serialize函数的典型用法代码示例。如果您正苦于以下问题:PHP maybe_serialize函数的具体用法?PHP maybe_serialize怎么用?PHP maybe_serialize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了maybe_serialize函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: siw_update_community_day_options
function siw_update_community_day_options()
{
//haal cd-datums op
for ($x = 1; $x <= 9; $x++) {
$community_days[] = get_option("siw_community_day_{$x}");
}
asort($community_days);
$hide_form_days_before_cd = siw_get_hide_form_days_before_cd();
$limit_date = date("Y-m-d", strtotime(date("Y-m-d") . "+" . $hide_form_days_before_cd . " days"));
foreach ($community_days as $community_day => $community_day_date) {
if ($community_day_date >= $limit_date) {
$future_community_days[]['label'] = siw_get_date_in_text($community_day_date, false);
}
}
//zoek cd-formuliervraag
$field_id = siw_get_vfb_field_id('community_day_datums');
global $wpdb;
if (!isset($wpdb->vfbp_fields)) {
$wpdb->vfbp_fields = $wpdb->prefix . 'vfbp_fields';
}
$query = "SELECT {$wpdb->vfbp_fields}.data\n\t\t\t\tFROM {$wpdb->vfbp_fields}\n\t\t\t\tWHERE {$wpdb->vfbp_fields}.id = %d";
$data = $wpdb->get_var($wpdb->prepare($query, $field_id));
$data = maybe_unserialize($data);
//update formuliervraag
$data['options'] = $future_community_days;
$query = "update {$wpdb->vfbp_fields} set {$wpdb->vfbp_fields}.data = %s where {$wpdb->vfbp_fields}.id = %d;";
$wpdb->query($wpdb->prepare($query, maybe_serialize($data), $field_id));
}
开发者ID:siwvolunteers,项目名称:siw,代码行数:28,代码来源:siw-vfb.php
示例2: __construct
public function __construct()
{
/*
* Check for transient. If none, then execute Query
*/
if (false === ($widgetopts_tabs = get_transient('widgetopts_tabs_transient'))) {
$widgetopts_tabs = array('visibility' => get_option('widgetopts_tabmodule-visibility'), 'devices' => get_option('widgetopts_tabmodule-devices'), 'alignment' => get_option('widgetopts_tabmodule-alignment'), 'hide_title' => get_option('widgetopts_tabmodule-hide_title'), 'classes' => get_option('widgetopts_tabmodule-classes'), 'logic' => get_option('widgetopts_tabmodule-logic'));
$widgetopts_tabs = maybe_serialize($widgetopts_tabs);
// Put the results in a transient. Expire after 4 weeks.
set_transient('widgetopts_tabs_transient', $widgetopts_tabs, 4 * WEEK_IN_SECONDS);
}
$this->widgetopts_tabs = unserialize($widgetopts_tabs);
$this->settings = unserialize(get_option('widgetopts_tabmodule-settings'));
if ('activate' == $this->widgetopts_tabs['visibility']) {
add_action('extended_widget_opts_tabs', array(&$this, 'tab_visibility'));
add_action('extended_widget_opts_tabcontent', array(&$this, 'content_visibility'));
}
if ('activate' == $this->widgetopts_tabs['devices']) {
add_action('extended_widget_opts_tabs', array(&$this, 'tab_devices'));
add_action('extended_widget_opts_tabcontent', array(&$this, 'content_devices'));
}
if ('activate' == $this->widgetopts_tabs['alignment']) {
add_action('extended_widget_opts_tabs', array(&$this, 'tab_alignment'));
add_action('extended_widget_opts_tabcontent', array(&$this, 'content_alignment'));
}
if ('activate' == $this->widgetopts_tabs['classes'] || 'activate' == $this->widgetopts_tabs['hide_title']) {
add_action('extended_widget_opts_tabs', array(&$this, 'tab_class'));
add_action('extended_widget_opts_tabcontent', array(&$this, 'content_class'));
}
add_action('extended_widget_opts_tabs', array(&$this, 'tab_gopro'));
add_action('extended_widget_opts_tabcontent', array(&$this, 'gopro_alignment'));
}
开发者ID:phpbits,项目名称:widget-options,代码行数:32,代码来源:functions.option.tabs.php
示例3: display
/**
*
* @return string of html to display the field
*/
function display()
{
$input = $this->_input;
$raw_value = maybe_serialize($input->raw_value());
if ($input instanceof EE_Text_Area_Input) {
$rows = $input->get_rows();
$cols = $input->get_cols();
} else {
$rows = 4;
$cols = 20;
}
$html = '<textarea';
$html .= ' id="' . $input->html_id() . '"';
$html .= ' name="' . $input->html_name() . '"';
$html .= ' class="' . $input->html_class() . '"';
$html .= ' style="' . $input->html_style() . '"';
$html .= $input->other_html_attributes();
$html .= ' rows= "' . $rows . '" cols="' . $cols . '">';
$html .= $raw_value;
$html .= '</textarea>';
foreach ($this->_input->get_validation_strategies() as $validation_strategy) {
if ($validation_strategy instanceof EE_Simple_HTML_Validation_Strategy || $validation_strategy instanceof EE_Full_HTML_Validation_Strategy) {
$html .= sprintf(__('%1$s(allowed tags: %2$s)%3$s', 'event_espresso'), '<p class="ee-question-desc">', $validation_strategy->get_list_of_allowed_tags(), '</p>');
}
}
return $html;
}
开发者ID:aaronfrey,项目名称:PepperLillie-GSP,代码行数:31,代码来源:EE_Text_Area_Display_Strategy.strategy.php
示例4: wpsc_delete_meta
/**
* Deletes meta data from the database
*
* @internal
*/
function wpsc_delete_meta($object_id = 0, $meta_key, $meta_value, $type, $global = false)
{
global $wpdb;
if (!is_numeric($object_id) || empty($object_id) && !$global) {
return false;
}
$cache_object_id = $object_id = (int) $object_id;
$object_type = $type;
$meta_key = wpsc_sanitize_meta_key($meta_key);
$meta_tuple = compact('object_type', 'object_id', 'meta_key', 'meta_value', 'type');
$meta_tuple = apply_filters('wpsc_delete_meta', $meta_tuple);
extract($meta_tuple, EXTR_OVERWRITE);
$meta_value = maybe_serialize($meta_value);
if (empty($meta_value)) {
$meta_sql = $wpdb->prepare("SELECT `meta_id` FROM `" . WPSC_TABLE_META . "` WHERE `object_type` = %s AND `object_id` = %d AND `meta_key` = %s", $object_type, $object_id, $meta_key);
} else {
$meta_sql = $wpdb->prepare("SELECT `meta_id` FROM `" . WPSC_TABLE_META . "` WHERE `object_type` = %s AND `object_id` = %d AND `meta_key` = %s AND `meta_value` = %s", $object_type, $object_id, $meta_key, $meta_value);
}
if (!($meta_id = $wpdb->get_var($meta_sql))) {
return false;
}
$wpdb->query($wpdb->prepare("DELETE FROM `" . WPSC_TABLE_META . "` WHERE `meta_id` = %d", $meta_id));
wp_cache_delete($cache_object_id, $object_type);
return true;
}
开发者ID:VanessaGarcia-Freelance,项目名称:ButtonHut,代码行数:30,代码来源:meta.functions.php
示例5: delete_metadata
function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = false)
{
if (!$meta_type || !$meta_key || !$delete_all && !(int) $object_id) {
return false;
}
if (!($table = _get_meta_table($meta_type))) {
return false;
}
global $wpdb;
$type_column = esc_sql($meta_type . '_id');
$id_column = 'user' == $meta_type ? 'umeta_id' : 'meta_id';
// expected_slashed ($meta_key)
$meta_key = stripslashes($meta_key);
$meta_value = maybe_serialize(stripslashes_deep($meta_value));
$query = $wpdb->prepare("SELECT {$id_column} FROM {$table} WHERE meta_key = %s", $meta_key);
if (!$delete_all) {
$query .= $wpdb->prepare(" AND {$type_column} = %d", $object_id);
}
if ($meta_value) {
$query .= $wpdb->prepare(" AND meta_value = %s", $meta_value);
}
$meta_ids = $wpdb->get_col($query);
if (!count($meta_ids)) {
return false;
}
$query = "DELETE FROM {$table} WHERE {$id_column} IN( " . implode(',', $meta_ids) . " )";
$count = $wpdb->query($query);
if (!$count) {
return false;
}
wp_cache_delete($object_id, $meta_type . '_meta');
do_action("deleted_{$meta_type}_meta", $meta_ids, $object_id, $meta_key, $meta_value);
return true;
}
开发者ID:gigikiri,项目名称:bcnAutoWallpaperSite,代码行数:34,代码来源:meta.php
示例6: get_tags_from_current_posts
/**
* Get tags from current post views
*
* @return boolean
*/
public static function get_tags_from_current_posts()
{
if (is_array(self::$posts) && count(self::$posts) > 0) {
// Generate SQL from post id
$postlist = implode("', '", self::$posts);
// Generate key cache
$key = md5(maybe_serialize($postlist));
$results = array();
// Get cache if exist
$cache = wp_cache_get('generate_keywords', 'simpletags');
if ($cache === false) {
foreach (self::$posts as $object_id) {
// Get terms
$terms = get_object_term_cache($object_id, 'post_tag');
if (false === $terms) {
$terms = wp_get_object_terms($object_id, 'post_tag');
}
if ($terms != false) {
$results = array_merge($results, $terms);
}
}
$cache[$key] = $results;
wp_cache_set('generate_keywords', $cache, 'simpletags');
} else {
if (isset($cache[$key])) {
return $cache[$key];
}
}
return $results;
}
return array();
}
开发者ID:EasterAndJay,项目名称:tamichelew.com,代码行数:37,代码来源:class.client.autolinks.php
示例7: pmxi_wp_ajax_auto_detect_sf
function pmxi_wp_ajax_auto_detect_sf()
{
if (!check_ajax_referer('wp_all_import_secure', 'security', false)) {
exit(json_encode(array('result' => array(), 'msg' => __('Security check', 'wp_all_import_plugin'))));
}
if (!current_user_can(PMXI_Plugin::$capabilities)) {
exit(json_encode(array('result' => array(), 'msg' => __('Security check', 'wp_all_import_plugin'))));
}
$input = new PMXI_Input();
$fieldName = $input->post('name', '');
$post_type = $input->post('post_type', 'post');
global $wpdb;
$result = array();
if ($fieldName) {
if ($post_type == 'import_users') {
$values = $wpdb->get_results("\n\t\t\t\tSELECT DISTINCT usermeta.meta_value\n\t\t\t\tFROM " . $wpdb->usermeta . " as usermeta\n\t\t\t\tWHERE usermeta.meta_key='" . $fieldName . "'\n\t\t\t", ARRAY_A);
} else {
$values = $wpdb->get_results("\n\t\t\t\tSELECT DISTINCT postmeta.meta_value\n\t\t\t\tFROM " . $wpdb->postmeta . " as postmeta\n\t\t\t\tWHERE postmeta.meta_key='" . $fieldName . "'\n\t\t\t", ARRAY_A);
}
if (!empty($values)) {
foreach ($values as $key => $value) {
if (!empty($value['meta_value']) and is_serialized($value['meta_value'])) {
$v = unserialize($value['meta_value']);
if (!empty($v) and is_array($v)) {
foreach ($v as $skey => $svalue) {
$result[] = array('key' => $skey, 'val' => maybe_serialize($svalue));
}
break;
}
}
}
}
}
exit(json_encode(array('result' => $result)));
}
开发者ID:estrategasdigitales,项目名称:rufiatta,代码行数:35,代码来源:wp_ajax_auto_detect_sf.php
示例8: pmxi_wp_ajax_auto_detect_sf
function pmxi_wp_ajax_auto_detect_sf()
{
$input = new PMXI_Input();
$fieldName = $input->post('name', '');
$post_type = $input->post('post_type', 'post');
global $wpdb;
$result = array();
if ($fieldName) {
if ($post_type == 'import_users') {
$values = $wpdb->get_results("\n\t\t\t\tSELECT DISTINCT usermeta.meta_value\n\t\t\t\tFROM " . $wpdb->usermeta . " as usermeta\n\t\t\t\tWHERE usermeta.meta_key='" . $fieldName . "'\n\t\t\t", ARRAY_A);
} else {
$values = $wpdb->get_results("\n\t\t\t\tSELECT DISTINCT postmeta.meta_value\n\t\t\t\tFROM " . $wpdb->postmeta . " as postmeta\n\t\t\t\tWHERE postmeta.meta_key='" . $fieldName . "'\n\t\t\t", ARRAY_A);
}
if (!empty($values)) {
foreach ($values as $key => $value) {
if (!empty($value['meta_value']) and is_serialized($value['meta_value'])) {
$v = unserialize($value['meta_value']);
if (!empty($v) and is_array($v)) {
foreach ($v as $skey => $svalue) {
$result[] = array('key' => $skey, 'val' => maybe_serialize($svalue));
}
break;
}
}
}
}
}
exit(json_encode(array('result' => $result)));
}
开发者ID:rebeccayshen,项目名称:kitlist,代码行数:29,代码来源:wp_ajax_auto_detect_sf.php
示例9: my_action_callback
function my_action_callback()
{
global $wpdb;
// this is how you get access to the database
if ($_POST) {
extract($_POST);
parse_str($whatever, $output);
extract($output);
if ($action == 'update_setting') {
$output = array_map('stripslashes_deep', $output);
$theme_setting = $output;
$theme_setting = maybe_serialize($theme_setting);
update_option("_sportstheme_setting", $theme_setting, 'no');
/* if ($output['_footer_credit_link']=='yes') {
add_option("_display_footer_links","yes");
} else {
delete_option("_display_footer_links");
}*/
echo 'Setting has been saved';
} else {
echo 'Something went wrong please try again.';
}
}
die;
}
开发者ID:kleitz,项目名称:ProSports,代码行数:25,代码来源:sm-theme-setting.php
示例10: update_meta
function update_meta($id = false, $key = false, $value = false, $duplicate = false)
{
if ($id === false) {
return false;
}
if ($key === false) {
return false;
}
if ($value === false) {
return false;
}
$value = maybe_serialize($value);
if ($duplicate === true) {
$media_meta = $this->model->insert(array('media_id' => $id, 'meta_key' => $key, 'meta_value' => $value));
} else {
if ($this->get_single_meta($id, $key)) {
$meta = array('meta_value' => $value);
$where = array('media_id' => $id, 'meta_key' => $key);
$media_meta = $this->model->update($meta, $where);
} else {
$media_meta = $this->model->insert(array('media_id' => $id, 'meta_key' => $key, 'meta_value' => $value));
}
}
return $media_meta;
}
开发者ID:paulmedwal,项目名称:edxforumspublic,代码行数:25,代码来源:RTMediaMeta.php
示例11: thatcamp_registrations_add_registration
/**
* Adds a single registration entry. This is a motley function.
*
* @param string The status of the registration record.
**/
function thatcamp_registrations_add_registration($status = 'pending')
{
global $wpdb;
$table = $wpdb->prefix . "thatcamp_registrations";
$_POST = stripslashes_deep($_POST);
// The user_id is set to the posted user ID, or null.
$user_id = isset($_POST['user_id']) ? $_POST['user_id'] : null;
$applicant_info = array();
$applicant_fields = wp_list_pluck(thatcamp_registrations_fields(), 'id');
foreach ($applicant_fields as $field) {
$applicant_info[$field] = isset($_POST[$field]) ? $_POST[$field] : null;
}
$date = isset($_POST['date']) ? $_POST['date'] : null;
$applicationText = isset($_POST['application_text']) ? $_POST['application_text'] : null;
// Lets serialize the applicant_info before putting it in the database.
$applicant_info = maybe_serialize($applicant_info);
$applicant_email = isset($_POST['user_email']) ? $_POST['user_email'] : null;
// Check for an existing registration
$user_exists = false;
if (!is_null($user_id) && thatcamp_registrations_get_registration_by_user_id($user_id) || thatcamp_registrations_get_registration_by_applicant_email($applicant_email)) {
$user_exists = true;
}
if ($user_exists) {
return 'You have already submitted your registration.';
} else {
$reg_id = $wpdb->insert($table, array('applicant_info' => $applicant_info, 'applicant_email' => $applicant_email, 'application_text' => $applicationText, 'status' => $status, 'date' => $date, 'user_id' => $user_id));
thatcamp_registrations_send_applicant_email($applicant_email);
thatcamp_registrations_send_admin_notification($wpdb->insert_id);
}
}
开发者ID:kosir,项目名称:thatcamp-org,代码行数:35,代码来源:thatcamp-registrations-functions.php
示例12: generate_transient_key
private function generate_transient_key($params)
{
$params = array_merge($params, array('walker' => get_class($this->walker)));
$transient_key_params = apply_filters('awpcp-categories-list-transient-key-params', $params);
$transient_key = 'awpcp-categories-list-cache-' . hash('crc32b', maybe_serialize($transient_key_params));
return $transient_key;
}
开发者ID:sabdev1,项目名称:ljcdevsab,代码行数:7,代码来源:class-categories-renderer.php
示例13: write_data
/**
*
* @see Ai1ec_Write_Data_To_Cache::write_data()
*
*/
public function write_data($key, $value)
{
$result = $this->model_option->set($this->_key($key), maybe_serialize($value));
if (false === $result) {
throw new Ai1ec_Cache_Write_Exception('An error occured while saving data to \'' . $key . '\'');
}
}
开发者ID:sedici,项目名称:wpmu-istec,代码行数:12,代码来源:db.php
示例14: set
/**
* Set a session variable
*
* @param string $key
* @param mixed $value
*/
public function set($key, $value)
{
if ($value !== $this->get($key)) {
$this->_data[sanitize_key($key)] = maybe_serialize($value);
$this->_dirty = true;
}
}
开发者ID:CannedHead,项目名称:feelingsurf,代码行数:13,代码来源:abstract-wc-session.php
示例15: delete_metadata
function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '')
{
if (!$meta_type || !$meta_key) {
return false;
}
if (!($table = _get_meta_table($meta_type))) {
return false;
}
global $wpdb;
$column = esc_sql($meta_type . '_id');
// expected_slashed ($meta_key)
$meta_key = stripslashes($meta_key);
$meta_value = maybe_serialize(stripslashes_deep($meta_value));
$query = $wpdb->prepare("DELETE FROM {$table} WHERE meta_key = %s", $meta_key);
if ($meta_value) {
$query .= $wpdb->prepare("AND meta_value = %s", $meta_value);
}
$count = $wpdb->query($query);
if (!$count) {
return false;
}
wp_cache_delete($object_id, $meta_type . '_meta');
do_action("deleted_{$meta_type}_meta", $object_id, $meta_key, $meta_value);
return true;
}
开发者ID:bluedanbob,项目名称:wordpress,代码行数:25,代码来源:meta.php
示例16: update
function update($args = array())
{
if (count($args) == 0) {
return false;
}
$name = OP_SN . '_' . $args[0];
$val = array_pop($args);
$cur = $this->get($args);
$update_val = false;
if (count($args) > 1) {
$option = array_shift($args);
$options = $this->get($option);
$options = $options ? $options : array();
for ($i = 0, $al = count($args); $i < $al; $i++) {
$is_array = $i >= $al - 1;
if (!isset($tmp)) {
$tmp =& $options;
}
if (!isset($tmp[$args[$i]])) {
$tmp[$args[$i]] = $is_array ? array() : false;
}
$tmp =& $tmp[$args[$i]];
}
$tmp = $val;
$this->_options[$name] = $options;
$update_val = $options;
} else {
$this->_options[$name] = $val;
$update_val = $val;
}
if (isset($update_val)) {
update_option($name, maybe_serialize($update_val));
}
}
开发者ID:shahadat014,项目名称:geleyi,代码行数:34,代码来源:options.php
示例17: AutoResponderMailChimp
function AutoResponderMailChimp($that, $ar, $wpm_id, $email, $unsub = false)
{
$listID = $ar['mcID'][$wpm_id];
// get the list ID of the Membership Level
$mcAPI = $ar['mcapi'];
// get the MailChimp API
$WishlistAPIQueueInstance = new WishlistAPIQueue();
$WLM_AUTORESPONDER_MAILCHIMP_INIT = new WLM_AUTORESPONDER_MAILCHIMP_INIT();
if ($listID) {
//$listID should not be empty
list($fName, $lName) = explode(" ", $that->ARSender['name'], 2);
//split the name into First and Last Name
$emailAddress = $that->ARSender['email'];
$data = false;
if ($unsub) {
// if the Unsubscribe
$mcOnRemCan = isset($ar['mcOnRemCan'][$wpm_id]) ? $ar['mcOnRemCan'][$wpm_id] : "";
if ($mcOnRemCan == "unsub") {
//$res = $this->mcListUnsubscribe($mcAPI, $listID, $emailAddress, true);
$data = array("apikey" => $mcAPI, "action" => "unsubscribe", "listID" => $listID, "email" => $emailAddress, "delete_member" => true);
} elseif ($mcOnRemCan == "move" || $mcOnRemCan == "add") {
$gp = $ar['mcRCGp'][$wpm_id];
$gping = $ar['mcRCGping'][$wpm_id];
$groupings = array();
if ($gp != "" && $gping != "") {
$groupings = array(array('name' => $gp, 'groups' => $gping));
}
$replace_interests = $mcOnRemCan == "move" ? true : false;
#add name or else this will still fail
$merge_vars = array('FNAME' => $fName, 'LNAME' => $lName, 'NAME' => "{$fName} {$lName}", 'GROUPINGS' => $groupings);
// populate the merger vars for MailChimp
//$res = $this->mcListSubscribe($mcAPI, $listID, $emailAddress, $merge_vars, true, true, $replace_interests);
$data = array("apikey" => $mcAPI, "action" => "subscribe", "listID" => $listID, "email" => $emailAddress, "mergevars" => $merge_vars, "optin" => true, "update_existing" => true, "replace_interests" => $replace_interests);
}
} else {
//else Subscribe
$gp = $ar['mcGp'][$wpm_id];
$gping = $ar['mcGping'][$wpm_id];
$groupings = array();
if ($gp != "") {
$groupings = array(array('name' => $gp, 'groups' => $gping));
}
$optin = $ar['optin'];
// get the MailChimp API
$optin = $optin == 1 ? false : true;
#add name or else this will still fail
$merge_vars = array('FNAME' => $fName, 'LNAME' => $lName, 'NAME' => "{$fName} {$lName}", 'GROUPINGS' => $groupings);
// populate the merger vars for MailChimp
//$res = $this->mcListSubscribe($mcAPI, $listID, $emailAddress, $merge_vars, $optin, true, false);
$data = array("apikey" => $mcAPI, "action" => "subscribe", "listID" => $listID, "email" => $emailAddress, "mergevars" => $merge_vars, "optin" => $optin, "update_existing" => 1, "replace_interests" => false);
}
if ($data) {
$qname = "mailchimp_" . time();
$data = maybe_serialize($data);
$WishlistAPIQueueInstance->add_queue($qname, $data, "For Queueing");
$WLM_AUTORESPONDER_MAILCHIMP_INIT->mcProcessQueue();
}
}
}
开发者ID:brooklyntri,项目名称:btc-plugins,代码行数:59,代码来源:integration.autoresponder.mailchimp.php
示例18: saveStandings
/**
* save custom standings
*
* @param int $team_id
* @return void
*/
function saveStandings($team_id)
{
global $wpdb, $leaguemanager;
$team = $wpdb->get_results("SELECT `custom` FROM {$wpdb->leaguemanager_teams} WHERE `id` = {$team_id}");
$custom = maybe_unserialize($team->custom);
$custom = $this->getStandingsData($team_id, $custom);
$wpdb->query($wpdb->prepare("UPDATE {$wpdb->leaguemanager_teams} SET `custom` = '%s' WHERE `id` = '%d'", maybe_serialize($custom), $team_id));
}
开发者ID:afftt,项目名称:infos-ping,代码行数:14,代码来源:volleyball.php
示例19: king_setcookie
/**
* Create a cookie.
*/
function king_setcookie($name, $value = array(), $time = null)
{
$time = $time != null ? $time : time() + 60 * 60 * 24 * 30;
$value = maybe_serialize(stripslashes_deep($value));
$expiration = apply_filters('king_wishlist_cookie_expiration_time', $time);
// Default 30 days
return setcookie($name, $value, $expiration, '/');
}
开发者ID:pivotlearning,项目名称:wpsite,代码行数:11,代码来源:functions-wishlist.php
示例20: write_data
/**
*
* @see Ai1ec_Write_Data_To_Cache::write_data()
*
*/
public function write_data($key, $value)
{
$result = $this->db_adapter->write_data_to_config($this->_key($key), maybe_serialize($value));
if (false === $result) {
$this->inject_logger()->warn('Failed to save \'' . $key . '\'');
throw new Ai1ec_Cache_Write_Exception('An error occured while saving data to \'' . $key . '\'');
}
}
开发者ID:briancompton,项目名称:knightsplaza,代码行数:13,代码来源:class-ai1ec-db-cache.php
注:本文中的maybe_serialize函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论