Make WordPress Core


Ignore:
Timestamp:
10/02/2008 01:03:26 AM (17 years ago)
Author:
ryan
Message:

phpdoc for wp-admin/includes from jacobsantos. see #7527

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/upgrade.php

    r8989 r9053  
    11<?php
    2 
     2/**
     3 * WordPress Upgrade API
     4 *
     5 * Most of the functions are pluggable and can be overwritten
     6 *
     7 * @package WordPress
     8 * @subpackage Administration
     9 */
     10
     11/** Include user install customize script. */
    312if ( file_exists(WP_CONTENT_DIR . '/install.php') )
    413    require (WP_CONTENT_DIR . '/install.php');
     14
     15/** WordPress Administration API */
    516require_once(ABSPATH . 'wp-admin/includes/admin.php');
     17
     18/** WordPress Schema API */
    619require_once(ABSPATH . 'wp-admin/includes/schema.php');
    720
    821if ( !function_exists('wp_install') ) :
     22/**
     23 * {@internal Missing Short Description}}
     24 *
     25 * {@internal Missing Long Description}}
     26 *
     27 * @since unknown
     28 *
     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 $public Whether blog is public.
     33 * @param null $deprecated Optional. Not used.
     34 * @return array Array keys 'url', 'user_id', 'password'.
     35 */
    936function wp_install($blog_title, $user_name, $user_email, $public, $deprecated='') {
    1037    global $wp_rewrite;
     
    5481
    5582if ( !function_exists('wp_install_defaults') ) :
     83/**
     84 * {@internal Missing Short Description}}
     85 *
     86 * {@internal Missing Long Description}}
     87 *
     88 * @since unknown
     89 *
     90 * @param int $user_id User ID.
     91 */
    5692function wp_install_defaults($user_id) {
    5793    global $wpdb;
     
    108144
    109145if ( !function_exists('wp_new_blog_notification') ) :
     146/**
     147 * {@internal Missing Short Description}}
     148 *
     149 * {@internal Missing Long Description}}
     150 *
     151 * @since unknown
     152 *
     153 * @param string $blog_title Blog title.
     154 * @param string $blog_url Blog url.
     155 * @param int $user_id User ID.
     156 * @param string $password User's Password.
     157 */
    110158function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password) {
    111159    $user = new WP_User($user_id);
     
    133181
    134182if ( !function_exists('wp_upgrade') ) :
     183/**
     184 * Run WordPress Upgrade functions.
     185 *
     186 * {@internal Missing Long Description}}
     187 *
     188 * @since unknown
     189 *
     190 * @return null
     191 */
    135192function wp_upgrade() {
    136193    global $wp_current_db_version, $wp_db_version;
     
    142199        return;
    143200
    144     if(!is_blog_installed())
     201    if( ! is_blog_installed() )
    145202        return;
    146203
     
    153210endif;
    154211
    155 // Functions to be called in install and upgrade scripts
     212/**
     213 * Functions to be called in install and upgrade scripts.
     214 *
     215 * {@internal Missing Long Description}}
     216 *
     217 * @since unknown
     218 */
    156219function upgrade_all() {
    157220    global $wp_current_db_version, $wp_db_version, $wp_rewrite;
     
    221284}
    222285
     286/**
     287 * Execute changes made in WordPress 1.0.
     288 *
     289 * @since 1.0.0
     290 */
    223291function upgrade_100() {
    224292    global $wpdb;
     
    242310        }
    243311    }
    244 
    245312
    246313    $wpdb->query("UPDATE $wpdb->options SET option_value = REPLACE(option_value, 'wp-links/links-images/', 'wp-images/links/')
     
    273340}
    274341
     342/**
     343 * Execute changes made in WordPress 1.0.1.
     344 *
     345 * @since 1.0.1
     346 */
    275347function upgrade_101() {
    276348    global $wpdb;
     
    286358}
    287359
    288 
     360/**
     361 * Execute changes made in WordPress 1.2.
     362 *
     363 * @since 1.2.0
     364 */
    289365function upgrade_110() {
    290366    global $wpdb;
     
    305381        }
    306382    }
    307 
    308383
    309384    // Get the GMT offset, we'll use that later on
     
    343418}
    344419
     420/**
     421 * Execute changes made in WordPress 1.5.
     422 *
     423 * @since 1.5.0
     424 */
    345425function upgrade_130() {
    346426    global $wpdb;
     
    420500}
    421501
     502/**
     503 * Execute changes made in WordPress 2.0.
     504 *
     505 * @since 2.0.0
     506 */
    422507function upgrade_160() {
    423508    global $wpdb, $wp_current_db_version;
     
    498583}
    499584
     585/**
     586 * Execute changes made in WordPress 2.1.
     587 *
     588 * @since 2.1.0
     589 */
    500590function upgrade_210() {
    501591    global $wpdb, $wp_current_db_version;
     
    537627}
    538628
     629/**
     630 * Execute changes made in WordPress 2.3.
     631 *
     632 * @since 2.3.0
     633 */
    539634function upgrade_230() {
    540635    global $wp_current_db_version, $wpdb;
     
    707802}
    708803
     804/**
     805 * Remove old options from the database.
     806 *
     807 * @since 2.3.0
     808 */
    709809function upgrade_230_options_table() {
    710810    global $wpdb;
     
    716816}
    717817
     818/**
     819 * Remove old categories, link2cat, and post2cat database tables.
     820 *
     821 * @since 2.3.0
     822 */
    718823function upgrade_230_old_tables() {
    719824    global $wpdb;
     
    723828}
    724829
     830/**
     831 * Upgrade old slugs made in version 2.2.
     832 *
     833 * @since 2.2.0
     834 */
    725835function upgrade_old_slugs() {
    726836    // upgrade people who were using the Redirect Old Slugs plugin
     
    729839}
    730840
    731 
     841/**
     842 * Execute changes made in WordPress 2.5.0.
     843 *
     844 * @since 2.5.0
     845 */
    732846function upgrade_250() {
    733847    global $wp_current_db_version;
     
    739853}
    740854
     855/**
     856 * Execute changes made in WordPress 2.5.1.
     857 *
     858 * @since 2.5.1
     859 */
    741860function upgrade_251() {
    742861    global $wp_current_db_version;
     
    746865}
    747866
     867/**
     868 * Execute changes made in WordPress 2.5.2.
     869 *
     870 * @since 2.5.2
     871 */
    748872function upgrade_252() {
    749873    global $wpdb;
     
    752876}
    753877
     878/**
     879 * Execute changes made in WordPress 2.6.
     880 *
     881 * @since 2.6.0
     882 */
    754883function upgrade_260() {
    755884    global $wp_current_db_version;
     
    764893}
    765894
     895/**
     896 * Execute changes made in WordPress 2.7.
     897 *
     898 * @since 2.7.0
     899 */
    766900function upgrade_270() {
    767901    global $wpdb, $wp_current_db_version;
     
    779913
    780914// General
     915
     916/**
     917 * {@internal Missing Short Description}}
     918 *
     919 * {@internal Missing Long Description}}
     920 *
     921 * @since unknown
     922 *
     923 * @param string $table_name Database table name to create.
     924 * @param string $create_ddl SQL statement to create table.
     925 * @return bool If table already exists or was created by function.
     926 */
    781927function maybe_create_table($table_name, $create_ddl) {
    782928    global $wpdb;
     
    797943}
    798944
     945/**
     946 * {@internal Missing Short Description}}
     947 *
     948 * {@internal Missing Long Description}}
     949 *
     950 * @since unknown
     951 *
     952 * @param string $table Database table name.
     953 * @param string $index Index name to drop.
     954 * @return bool True, when finished.
     955 */
    799956function drop_index($table, $index) {
    800957    global $wpdb;
     
    809966}
    810967
     968/**
     969 * {@internal Missing Short Description}}
     970 *
     971 * {@internal Missing Long Description}}
     972 *
     973 * @since unknown
     974 *
     975 * @param string $table Database table name.
     976 * @param string $index Database table index column.
     977 * @return bool True, when done with execution.
     978 */
    811979function add_clean_index($table, $index) {
    812980    global $wpdb;
     
    8411009}
    8421010
    843 
    844 // get_alloptions as it was for 1.2.
     1011/**
     1012 * Retrieve all options as it was for 1.2.
     1013 *
     1014 * @since 1.2.0
     1015 *
     1016 * @return array List of options.
     1017 */
    8451018function get_alloptions_110() {
    8461019    global $wpdb;
     
    8581031}
    8591032
    860 // Version of get_option that is private to install/upgrade.
     1033/**
     1034 * Version of get_option that is private to install/upgrade.
     1035 *
     1036 * @since unknown
     1037 * @access private
     1038 *
     1039 * @param string $setting Option name.
     1040 * @return mixed
     1041 */
    8611042function __get_option($setting) {
    8621043    global $wpdb;
     
    8851066}
    8861067
     1068/**
     1069 * {@internal Missing Short Description}}
     1070 *
     1071 * {@internal Missing Long Description}}
     1072 *
     1073 * @since unknown
     1074 *
     1075 * @param string $content
     1076 * @return string
     1077 */
    8871078function deslash($content) {
    8881079    // Note: \\\ inside a regex denotes a single backslash.
     
    9021093}
    9031094
     1095/**
     1096 * {@internal Missing Short Description}}
     1097 *
     1098 * {@internal Missing Long Description}}
     1099 *
     1100 * @since unknown
     1101 *
     1102 * @param unknown_type $queries
     1103 * @param unknown_type $execute
     1104 * @return unknown
     1105 */
    9041106function dbDelta($queries, $execute = true) {
    9051107    global $wpdb;
     
    11031305}
    11041306
     1307/**
     1308 * {@internal Missing Short Description}}
     1309 *
     1310 * {@internal Missing Long Description}}
     1311 *
     1312 * @since unknown
     1313 */
    11051314function make_db_current() {
    11061315    global $wp_queries;
     
    11121321}
    11131322
     1323/**
     1324 * {@internal Missing Short Description}}
     1325 *
     1326 * {@internal Missing Long Description}}
     1327 *
     1328 * @since unknown
     1329 */
    11141330function make_db_current_silent() {
    11151331    global $wp_queries;
     
    11181334}
    11191335
     1336/**
     1337 * {@internal Missing Short Description}}
     1338 *
     1339 * {@internal Missing Long Description}}
     1340 *
     1341 * @since unknown
     1342 *
     1343 * @param unknown_type $theme_name
     1344 * @param unknown_type $template
     1345 * @return unknown
     1346 */
    11201347function make_site_theme_from_oldschool($theme_name, $template) {
    11211348    $home_path = get_home_path();
     
    11861413}
    11871414
     1415/**
     1416 * {@internal Missing Short Description}}
     1417 *
     1418 * {@internal Missing Long Description}}
     1419 *
     1420 * @since unknown
     1421 *
     1422 * @param unknown_type $theme_name
     1423 * @param unknown_type $template
     1424 * @return unknown
     1425 */
    11881426function make_site_theme_from_default($theme_name, $template) {
    11891427    $site_dir = WP_CONTENT_DIR . "/themes/$template";
     
    12411479
    12421480// Create a site theme from the default theme.
     1481/**
     1482 * {@internal Missing Short Description}}
     1483 *
     1484 * {@internal Missing Long Description}}
     1485 *
     1486 * @since unknown
     1487 *
     1488 * @return unknown
     1489 */
    12431490function make_site_theme() {
    12441491    // Name the theme after the blog.
     
    12821529}
    12831530
     1531/**
     1532 * Translate user level to user role name.
     1533 *
     1534 * @since unknown
     1535 *
     1536 * @param int $level User level.
     1537 * @return string User role name.
     1538 */
    12841539function translate_level_to_role($level) {
    12851540    switch ($level) {
     
    13031558}
    13041559
     1560/**
     1561 * {@internal Missing Short Description}}
     1562 *
     1563 * {@internal Missing Long Description}}
     1564 *
     1565 * @since unknown
     1566 */
    13051567function wp_check_mysql_version() {
    13061568    global $wpdb;
     
    13101572}
    13111573
     1574/**
     1575 * {@internal Missing Short Description}}
     1576 *
     1577 * {@internal Missing Long Description}}
     1578 *
     1579 * @since unknown
     1580 */
    13121581function maybe_disable_automattic_widgets() {
    13131582    $plugins = __get_option( 'active_plugins' );
Note: See TracChangeset for help on using the changeset viewer.