maybe_unserialize() - WordPress 函数参考中文文档

返回介绍

maybe_unserialize()

发布于 2017-09-11 字数1859 浏览 1018 评论 0

maybe_unserialize( string $original )

Unserialize value only if it was serialized.


描述


参数

$original

(string)
(Required)
Maybe unserialized original, if is needed.


返回值

(mixed) Unserialized data can be any type.


源代码

File: wp-includes/functions.php

function maybe_unserialize( $original ) {
	if ( is_serialized( $original ) ) // don't attempt to unserialize data that wasn't serialized going in
		return @unserialize( $original );
	return $original;
}

更新日志

Version 描述
2.0.0 Introduced.

相关函数

Uses

  • wp-includes/functions.php:
    is_serialized()

Used By

  • wp-includes/option.php:
    get_network_option()
  • wp-admin/includes/theme.php:
    themes_api()
  • wp-admin/includes/plugin-install.php:
    plugins_api()
  • wp-admin/includes/template.php:
    _list_meta_row()
  • wp-includes/option.php:
    wp_load_core_site_options()
  • wp-includes/option.php:
    get_option()
  • wp-includes/user.php:
    count_users()
  • wp-includes/ms-functions.php:
    wpmu_activate_signup()
  • wp-includes/meta.php:
    get_metadata()
  • wp-includes/meta.php:
    get_metadata_by_mid()
  • Show 5 more used by
    Hide more used by


User Contributed Notes

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!