[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-admin/includes/ -> upgrade.php (summary)

WordPress Upgrade API Most of the functions are pluggable and can be overwritten.

File Size: 3564 lines (110 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 66 functions

  wp_install()
  wp_install_defaults()
  wp_install_maybe_enable_pretty_permalinks()
  wp_new_blog_notification()
  wp_upgrade()
  upgrade_all()
  upgrade_100()
  upgrade_101()
  upgrade_110()
  upgrade_130()
  upgrade_160()
  upgrade_210()
  upgrade_230()
  upgrade_230_options_table()
  upgrade_230_old_tables()
  upgrade_old_slugs()
  upgrade_250()
  upgrade_252()
  upgrade_260()
  upgrade_270()
  upgrade_280()
  upgrade_290()
  upgrade_300()
  upgrade_330()
  upgrade_340()
  upgrade_350()
  upgrade_370()
  upgrade_372()
  upgrade_380()
  upgrade_400()
  upgrade_420()
  upgrade_430()
  upgrade_430_fix_comments()
  upgrade_431()
  upgrade_440()
  upgrade_450()
  upgrade_460()
  upgrade_500()
  upgrade_510()
  upgrade_530()
  upgrade_550()
  upgrade_560()
  upgrade_590()
  upgrade_600()
  upgrade_network()
  maybe_create_table()
  drop_index()
  add_clean_index()
  maybe_add_column()
  maybe_convert_table_to_utf8mb4()
  get_alloptions_110()
  __get_option()
  deslash()
  dbDelta()
  make_db_current()
  make_db_current_silent()
  make_site_theme_from_oldschool()
  make_site_theme_from_default()
  make_site_theme()
  translate_level_to_role()
  wp_check_mysql_version()
  maybe_disable_automattic_widgets()
  maybe_disable_link_manager()
  pre_schema_upgrade()
  install_global_terms()
  wp_should_upgrade_global_tables()

Functions
Functions that are not part of a class:

wp_install( $blog_title, $user_name, $user_email, $is_public, $deprecated = '', $user_password = '', $language = '' )   X-Ref
Installs the site.

Runs the required functions to set up and populate the database,
including primary admin user and initial options.

since: 2.1.0
return: array {
param: string $blog_title    Site title.
param: string $user_name     User's username.
param: string $user_email    User's email.
param: bool   $is_public     Whether the site is public.
param: string $deprecated    Optional. Not used.
param: string $user_password Optional. User's chosen password. Default empty (random password).
param: string $language      Optional. Language chosen. Default empty.

wp_install_defaults( $user_id )   X-Ref
Creates the initial content for a newly-installed site.

Adds the default "Uncategorized" category, the first post (with comment),
first page, and default widgets for default theme for the current version.

since: 2.1.0
param: int $user_id User ID.

wp_install_maybe_enable_pretty_permalinks()   X-Ref
Maybe enable pretty permalinks on installation.

If after enabling pretty permalinks don't work, fallback to query-string permalinks.

since: 4.2.0
return: bool Whether pretty permalinks are enabled. False otherwise.

wp_new_blog_notification( $blog_title, $blog_url, $user_id, $password )   X-Ref
Notifies the site admin that the installation of WordPress is complete.

Sends an email to the new administrator that the installation is complete
and provides them with a record of their login credentials.

since: 2.1.0
param: string $blog_title Site title.
param: string $blog_url   Site URL.
param: int    $user_id    Administrator's user ID.
param: string $password   Administrator's password. Note that a placeholder message is

wp_upgrade()   X-Ref
Runs WordPress Upgrade functions.

Upgrades the database if needed during a site update.

since: 2.1.0

upgrade_all()   X-Ref
Functions to be called in installation and upgrade scripts.

Contains conditional checks to determine which upgrade scripts to run,
based on database version and WP version being updated-to.

since: 1.0.1

upgrade_100()   X-Ref
Execute changes made in WordPress 1.0.

since: 1.0.0

upgrade_101()   X-Ref
Execute changes made in WordPress 1.0.1.

since: 1.0.1

upgrade_110()   X-Ref
Execute changes made in WordPress 1.2.

since: 1.2.0

upgrade_130()   X-Ref
Execute changes made in WordPress 1.5.

since: 1.5.0

upgrade_160()   X-Ref
Execute changes made in WordPress 2.0.

since: 2.0.0

upgrade_210()   X-Ref
Execute changes made in WordPress 2.1.

since: 2.1.0

upgrade_230()   X-Ref
Execute changes made in WordPress 2.3.

since: 2.3.0

upgrade_230_options_table()   X-Ref
Remove old options from the database.

since: 2.3.0

upgrade_230_old_tables()   X-Ref
Remove old categories, link2cat, and post2cat database tables.

since: 2.3.0

upgrade_old_slugs()   X-Ref
Upgrade old slugs made in version 2.2.

since: 2.2.0

upgrade_250()   X-Ref
Execute changes made in WordPress 2.5.0.

since: 2.5.0

upgrade_252()   X-Ref
Execute changes made in WordPress 2.5.2.

since: 2.5.2

upgrade_260()   X-Ref
Execute changes made in WordPress 2.6.

since: 2.6.0

upgrade_270()   X-Ref
Execute changes made in WordPress 2.7.

since: 2.7.0

upgrade_280()   X-Ref
Execute changes made in WordPress 2.8.

since: 2.8.0

upgrade_290()   X-Ref
Execute changes made in WordPress 2.9.

since: 2.9.0

upgrade_300()   X-Ref
Execute changes made in WordPress 3.0.

since: 3.0.0

upgrade_330()   X-Ref
Execute changes made in WordPress 3.3.

since: 3.3.0

upgrade_340()   X-Ref
Execute changes made in WordPress 3.4.

since: 3.4.0

upgrade_350()   X-Ref
Execute changes made in WordPress 3.5.

since: 3.5.0

upgrade_370()   X-Ref
Execute changes made in WordPress 3.7.

since: 3.7.0

upgrade_372()   X-Ref
Execute changes made in WordPress 3.7.2.

since: 3.7.2

upgrade_380()   X-Ref
Execute changes made in WordPress 3.8.0.

since: 3.8.0

upgrade_400()   X-Ref
Execute changes made in WordPress 4.0.0.

since: 4.0.0

upgrade_420()   X-Ref
Execute changes made in WordPress 4.2.0.

since: 4.2.0

upgrade_430()   X-Ref
Executes changes made in WordPress 4.3.0.

since: 4.3.0

upgrade_430_fix_comments()   X-Ref
Executes comments changes made in WordPress 4.3.0.

since: 4.3.0

upgrade_431()   X-Ref
Executes changes made in WordPress 4.3.1.

since: 4.3.1

upgrade_440()   X-Ref
Executes changes made in WordPress 4.4.0.

since: 4.4.0

upgrade_450()   X-Ref
Executes changes made in WordPress 4.5.0.

since: 4.5.0

upgrade_460()   X-Ref
Executes changes made in WordPress 4.6.0.

since: 4.6.0

upgrade_500()   X-Ref
Executes changes made in WordPress 5.0.0.

since: 5.0.0

upgrade_510()   X-Ref
Executes changes made in WordPress 5.1.0.

since: 5.1.0

upgrade_530()   X-Ref
Executes changes made in WordPress 5.3.0.

since: 5.3.0

upgrade_550()   X-Ref
Executes changes made in WordPress 5.5.0.

since: 5.5.0

upgrade_560()   X-Ref
Executes changes made in WordPress 5.6.0.

since: 5.6.0

upgrade_590()   X-Ref
Executes changes made in WordPress 5.9.0.

since: 5.9.0

upgrade_600()   X-Ref
Executes changes made in WordPress 6.0.0.

since: 6.0.0

upgrade_network()   X-Ref
Executes network-level upgrade routines.

since: 3.0.0

maybe_create_table( $table_name, $create_ddl )   X-Ref
Creates a table in the database, if it doesn't already exist.

This method checks for an existing database and creates a new one if it's not
already present. It doesn't rely on MySQL's "IF NOT EXISTS" statement, but chooses
to query all tables first and then run the SQL statement creating the table.

since: 1.0.0
return: bool True on success or if the table already exists. False on failure.
param: string $table_name Database table name.
param: string $create_ddl SQL statement to create table.

drop_index( $table, $index )   X-Ref
Drops a specified index from a table.

since: 1.0.1
return: true True, when finished.
param: string $table Database table name.
param: string $index Index name to drop.

add_clean_index( $table, $index )   X-Ref
Adds an index to a specified table.

since: 1.0.1
return: true True, when done with execution.
param: string $table Database table name.
param: string $index Database table index column.

maybe_add_column( $table_name, $column_name, $create_ddl )   X-Ref
Adds column to a database table, if it doesn't already exist.

since: 1.3.0
return: bool True on success or if the column already exists. False on failure.
param: string $table_name  Database table name.
param: string $column_name Table column name.
param: string $create_ddl  SQL statement to add column.

maybe_convert_table_to_utf8mb4( $table )   X-Ref
If a table only contains utf8 or utf8mb4 columns, convert it to utf8mb4.

since: 4.2.0
return: bool True if the table was converted, false if it wasn't.
param: string $table The table to convert.

get_alloptions_110()   X-Ref
Retrieve all options as it was for 1.2.

since: 1.2.0
return: stdClass List of options.

__get_option( $setting )   X-Ref
Utility version of get_option that is private to installation/upgrade.

since: 1.5.1
return: mixed
param: string $setting Option name.

deslash( $content )   X-Ref
Filters for content to remove unnecessary slashes.

since: 1.5.0
return: string The de-slashed content.
param: string $content The content to modify.

dbDelta( $queries = '', $execute = true )   X-Ref
Modifies the database based on specified SQL statements.

Useful for creating new tables and updating existing tables to a new structure.

since: 1.5.0
return: array Strings containing the results of the various update queries.
param: string[]|string $queries Optional. The query to run. Can be multiple queries
param: bool            $execute Optional. Whether or not to execute the query right away.

make_db_current( $tables = 'all' )   X-Ref
Updates the database tables to a new schema.

By default, updates all the tables to use the latest defined schema, but can also
be used to update a specific set of tables in wp_get_db_schema().

since: 1.5.0
param: string $tables Optional. Which set of tables to update. Default is 'all'.

make_db_current_silent( $tables = 'all' )   X-Ref
Updates the database tables to a new schema, but without displaying results.

By default, updates all the tables to use the latest defined schema, but can
also be used to update a specific set of tables in wp_get_db_schema().

since: 1.5.0
param: string $tables Optional. Which set of tables to update. Default is 'all'.

make_site_theme_from_oldschool( $theme_name, $template )   X-Ref
Creates a site theme from an existing theme.

{@internal Missing Long Description}}

since: 1.5.0
return: bool
param: string $theme_name The name of the theme.
param: string $template   The directory name of the theme.

make_site_theme_from_default( $theme_name, $template )   X-Ref
Creates a site theme from the default theme.

{@internal Missing Long Description}}

since: 1.5.0
return: void|false
param: string $theme_name The name of the theme.
param: string $template   The directory name of the theme.

make_site_theme()   X-Ref
Creates a site theme.

{@internal Missing Long Description}}

since: 1.5.0
return: string|false

translate_level_to_role( $level )   X-Ref
Translate user level to user role name.

since: 2.0.0
return: string User role name.
param: int $level User level.

wp_check_mysql_version()   X-Ref
Checks the version of the installed MySQL binary.

since: 2.1.0

maybe_disable_automattic_widgets()   X-Ref
Disables the Automattic widgets plugin, which was merged into core.

since: 2.2.0

maybe_disable_link_manager()   X-Ref
Disables the Link Manager on upgrade if, at the time of upgrade, no links exist in the DB.

since: 3.5.0

pre_schema_upgrade()   X-Ref
Runs before the schema is upgraded.

since: 2.9.0

install_global_terms()   X-Ref
Install global terms.

since: 3.0.0

wp_should_upgrade_global_tables()   X-Ref
Determine if global tables should be upgraded.

This function performs a series of checks to ensure the environment allows
for the safe upgrading of global WordPress database tables. It is necessary
because global tables will commonly grow to millions of rows on large
installations, and the ability to control their upgrade routines can be
critical to the operation of large networks.

In a future iteration, this function may use `wp_is_large_network()` to more-
intelligently prevent global table upgrades. Until then, we make sure
WordPress is on the main site of the main network, to avoid running queries
more than once in multi-site or multi-network environments.

since: 4.3.0
return: bool Whether to run the upgrade routines on global tables.



Generated: Tue Mar 19 01:00:02 2024 Cross-referenced by PHPXref 0.7.1