Changeset 31246
- Timestamp:
- 01/19/2015 09:14:39 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/upgrade.php
r31225 r31246 3 3 * WordPress Upgrade API 4 4 * 5 * Most of the functions are pluggable and can be overwritten 5 * Most of the functions are pluggable and can be overwritten. 6 6 * 7 7 * @package WordPress … … 21 21 if ( !function_exists('wp_install') ) : 22 22 /** 23 * Installs the blog 24 * 25 * {@internal Missing Long Description}} 23 * Installs the site. 24 * 25 * Runs the required functions to set up and populate the database, 26 * including primary admin user and initial options. 26 27 * 27 28 * @since 2.1.0 28 29 * 29 * @param string $blog_title Blog title.30 * @param string $user_name User's username.31 * @param string $user_email User's email.32 * @param bool $publicWhether blog is public.33 * @param string $deprecated Optional. Not used.34 * @param string $user_password Optional. User's chosen password. Will default to a random password.35 * @param string $language Optional. Language chosen.36 * @return array Array keys 'url', 'user_id', 'password', 'password_message'.30 * @param string $blog_title Blog title. 31 * @param string $user_name User's username. 32 * @param string $user_email User's email. 33 * @param bool $public Whether blog is public. 34 * @param string $deprecated Optional. Not used. 35 * @param string $user_password Optional. User's chosen password. Default empty (random password). 36 * @param string $language Optional. Language chosen. Default empty. 37 * @return array Array keys 'url', 'user_id', 'password', and 'password_message'. 37 38 */ 38 39 function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated = '', $user_password = '', $language = '' ) { … … 111 112 if ( !function_exists('wp_install_defaults') ) : 112 113 /** 113 * {@internal Missing Short Description}} 114 * 115 * {@internal Missing Long Description}} 114 * Creates the initial content for a newly-installed site. 115 * 116 * Adds the default "Uncategorized" category, the first post (with comment), 117 * first page, and default widgets for default theme for the current version. 116 118 * 117 119 * @since 2.1.0 … … 334 336 if ( !function_exists('wp_new_blog_notification') ) : 335 337 /** 336 * {@internal Missing Short Description}} 337 * 338 * {@internal Missing Long Description}} 338 * Notifies the site admin that the setup is complete. 339 * 340 * Sends an email with wp_mail to the new administrator that the site setup is complete, 341 * and provides them with a record of their login credentials. 339 342 * 340 343 * @since 2.1.0 341 344 * 342 345 * @param string $blog_title Blog title. 343 * @param string $blog_url Blog url.344 * @param int $user_idUser ID.345 * @param string $password User's Password.346 * @param string $blog_url Blog url. 347 * @param int $user_id User ID. 348 * @param string $password User's Password. 346 349 */ 347 350 function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password) { … … 372 375 if ( !function_exists('wp_upgrade') ) : 373 376 /** 374 * Run WordPress Upgrade functions.375 * 376 * {@internal Missing Long Description}}377 * Runs WordPress Upgrade functions. 378 * 379 * Upgrades the database if needed during a site update. 377 380 * 378 381 * @since 2.1.0 379 382 * 380 * @return null 383 * @return null If no update is necessary or site isn't completely installed, null. 381 384 */ 382 385 function wp_upgrade() { … … 423 426 * Functions to be called in install and upgrade scripts. 424 427 * 425 * {@internal Missing Long Description}} 428 * Contains conditional checks to determine which upgrade scripts to run, 429 * based on database version and WP version being updated-to. 426 430 * 427 431 * @since 1.0.1 432 * 433 * @return null If no update is necessary, null. 428 434 */ 429 435 function upgrade_all() { … … 1402 1408 1403 1409 /** 1404 * Execute network level changes1410 * Executes network-level upgrade routines. 1405 1411 * 1406 1412 * @since 3.0.0 … … 1499 1505 } 1500 1506 1501 // The functions we use to actually do stuff 1502 1503 // General 1504 1505 /** 1506 * {@internal Missing Short Description}} 1507 * 1508 * {@internal Missing Long Description}} 1507 // 1508 // General functions we use to actually do stuff 1509 // 1510 1511 /** 1512 * Creates a table in the database if it doesn't already exist. 1513 * 1514 * This method checks for an existing database and creates a new one if it's not 1515 * already present. It doesn't rely on MySQL's "IF NOT EXISTS" statement, but chooses 1516 * to query all tables first and then run the SQL statement creating the table. 1509 1517 * 1510 1518 * @since 1.0.0 … … 1534 1542 1535 1543 /** 1536 * {@internal Missing Short Description}} 1537 * 1538 * {@internal Missing Long Description}} 1544 * Drops a specified index from a table. 1539 1545 * 1540 1546 * @since 1.0.1 … … 1557 1563 1558 1564 /** 1559 * {@internal Missing Short Description}} 1560 * 1561 * {@internal Missing Long Description}} 1565 * Adds an index to a specified table. 1562 1566 * 1563 1567 * @since 1.0.1 … … 1575 1579 1576 1580 /** 1577 ** maybe_add_column() 1578 ** Add column to db table if it doesn't exist. 1579 ** Returns: true if already exists or on successful completion 1580 ** false on error 1581 * Adds column to a database table if it doesn't already exist. 1582 * 1583 * @since 1.3.0 1584 * 1585 * @param string $table_name The table name to modify. 1586 * @param string $column_name The column name to add to the table. 1587 * @param string $create_ddl The SQL statement used to add the column. 1588 * @return True if already exists or on successful completion, false on error. 1581 1589 */ 1582 1590 function maybe_add_column($table_name, $column_name, $create_ddl) { … … 1621 1629 1622 1630 /** 1623 * Version of get_option that is private to install/upgrade. 1624 * 1631 * Utility version of get_option that is private to install/upgrade. 1632 * 1633 * @ignore 1625 1634 * @since 1.5.1 1626 1635 * @access private … … 1650 1659 1651 1660 /** 1652 * {@internal Missing Short Description}} 1653 * 1654 * {@internal Missing Long Description}} 1661 * Filters for content to remove unnecessary slashes. 1655 1662 * 1656 1663 * @since 1.5.0 1657 1664 * 1658 * @param string $content 1659 * @return string 1665 * @param string $content The content to modify. 1666 * @return string The de-slashed content. 1660 1667 */ 1661 1668 function deslash($content) { … … 1681 1688 1682 1689 /** 1683 * {@internal Missing Short Description}}1684 * 1685 * {@internal Missing Long Description}}1690 * Modifies the database based on specified SQL statements. 1691 * 1692 * Useful for creating new tables and updating existing tables to a new structure. 1686 1693 * 1687 1694 * @since 1.5.0 1688 1695 * 1689 * @param string $queries 1690 * @param bool $execute 1691 * @return array 1696 * @param string|array $queries Optional. The query to run. Can be multiple queries 1697 * in an array, or a string of queries separated by 1698 * semicolons. Default empty. 1699 * @param bool $execute Optional. Whether or not to execute the query right away. 1700 * Default true. 1701 * @return array Strings containing the results of the various update queries. 1692 1702 */ 1693 1703 function dbDelta( $queries = '', $execute = true ) { … … 1932 1942 1933 1943 /** 1934 * {@internal Missing Short Description}} 1935 * 1936 * {@internal Missing Long Description}} 1944 * Updates the database tables to a new schema. 1945 * 1946 * By default, updates all the tables to use the latest defined schema, but can also 1947 * be used to update a specific set of tables in wp_get_db_schema(). 1937 1948 * 1938 1949 * @since 1.5.0 1950 * 1951 * @uses dbDelta 1952 * 1953 * @param string $tables Optional. Which set of tables to update. Default is 'all'. 1939 1954 */ 1940 1955 function make_db_current( $tables = 'all' ) { … … 1946 1961 1947 1962 /** 1948 * {@internal Missing Short Description}} 1949 * 1950 * {@internal Missing Long Description}} 1963 * Updates the database tables to a new schema, but without displaying results. 1964 * 1965 * By default, updates all the tables to use the latest defined schema, but can 1966 * also be used to update a specific set of tables in wp_get_db_schema(). 1951 1967 * 1952 1968 * @since 1.5.0 1969 * 1970 * @see make_db_current() 1971 * 1972 * @param string $tables Optional. Which set of tables to update. Default is 'all'. 1953 1973 */ 1954 1974 function make_db_current_silent( $tables = 'all' ) { … … 1957 1977 1958 1978 /** 1959 * {@internal Missing Short Description}}1979 * Creates a site theme from an existing theme. 1960 1980 * 1961 1981 * {@internal Missing Long Description}} … … 1963 1983 * @since 1.5.0 1964 1984 * 1965 * @param string $theme_name 1966 * @param string $template 1985 * @param string $theme_name The name of the theme. 1986 * @param string $template The directory name of the theme. 1967 1987 * @return bool 1968 1988 */ … … 2040 2060 2041 2061 /** 2042 * {@internal Missing Short Description}}2062 * Creates a site theme from the default theme. 2043 2063 * 2044 2064 * {@internal Missing Long Description}} … … 2046 2066 * @since 1.5.0 2047 2067 * 2048 * @param string $theme_name 2049 * @param string $template 2068 * @param string $theme_name The name of the theme. 2069 * @param string $template The directory name of the theme. 2050 2070 * @return null|false 2051 2071 */ … … 2104 2124 } 2105 2125 2106 // Create a site theme from the default theme. 2107 /** 2108 * {@internal Missing Short Description}} 2126 /** 2127 * Creates a site theme. 2109 2128 * 2110 2129 * {@internal Missing Long Description}} … … 2185 2204 2186 2205 /** 2187 * {@internal Missing Short Description}} 2188 * 2189 * {@internal Missing Long Description}} 2206 * Checks the version of the installed MySQL binary. 2190 2207 * 2191 2208 * @since 2.1.0 … … 2216 2233 2217 2234 /** 2218 * Disables the Link Manager on upgrade , ifat the time of upgrade, no links exist in the DB.2235 * Disables the Link Manager on upgrade if, at the time of upgrade, no links exist in the DB. 2219 2236 * 2220 2237 * @since 3.5.0
Note: See TracChangeset
for help on using the changeset viewer.