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

返回介绍

__get_option()

发布于 2017-09-11 字数 1610 浏览 991 评论 0

Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

__get_option( string $setting )

Version of get_option that is private to install/upgrade.


描述


参数

$setting

(string)
(Required)
Option name.


返回值

(mixed)


源代码

File: wp-admin/includes/upgrade.php

	global $wp_current_db_version, $wpdb;

	if ( $wp_current_db_version < 32364 ) {
		upgrade_430_fix_comments();
	}

	// Shared terms are split in a separate process.
	if ( $wp_current_db_version < 32814 ) {
		update_option( 'finished_splitting_shared_terms', 0 );
		wp_schedule_single_event( time() + ( 1 * MINUTE_IN_SECONDS ), 'wp_split_shared_term_batch' );
	}

	if ( $wp_current_db_version < 33055 && 'utf8mb4' === $wpdb->charset ) {
		if ( is_multisite() ) {
			$tables = $wpdb->tables( 'blog' );
		} else {
			$tables = $wpdb->tables( 'all' );
			if ( ! wp_should_upgrade_global_tables() ) {
				$global_tables = $wpdb->tables( 'global' );

更新日志

Version 描述
1.5.1 Introduced.

User Contributed Notes

上一篇:__clear_multi_author_cache()

下一篇:__ngettext()

发布评论

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

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