Edit File by line
/home/barbar84/www/wp-admin/includes
File: upgrade.php
array(
[1500] Fix | Delete
'object_id' => $link_id,
[1501] Fix | Delete
'term_taxonomy_id' => $tt_id,
[1502] Fix | Delete
)
[1503] Fix | Delete
);
[1504] Fix | Delete
}
[1505] Fix | Delete
}
[1506] Fix | Delete
[1507] Fix | Delete
if ( $wp_current_db_version < 4772 ) {
[1508] Fix | Delete
// Obsolete linkcategories table.
[1509] Fix | Delete
$wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'linkcategories' );
[1510] Fix | Delete
}
[1511] Fix | Delete
[1512] Fix | Delete
// Recalculate all counts.
[1513] Fix | Delete
$terms = $wpdb->get_results( "SELECT term_taxonomy_id, taxonomy FROM $wpdb->term_taxonomy" );
[1514] Fix | Delete
foreach ( (array) $terms as $term ) {
[1515] Fix | Delete
if ( 'post_tag' === $term->taxonomy || 'category' === $term->taxonomy ) {
[1516] Fix | Delete
$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status = 'publish' AND post_type = 'post' AND term_taxonomy_id = %d", $term->term_taxonomy_id ) );
[1517] Fix | Delete
} else {
[1518] Fix | Delete
$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $term->term_taxonomy_id ) );
[1519] Fix | Delete
}
[1520] Fix | Delete
$wpdb->update( $wpdb->term_taxonomy, array( 'count' => $count ), array( 'term_taxonomy_id' => $term->term_taxonomy_id ) );
[1521] Fix | Delete
}
[1522] Fix | Delete
}
[1523] Fix | Delete
[1524] Fix | Delete
/**
[1525] Fix | Delete
* Remove old options from the database.
[1526] Fix | Delete
*
[1527] Fix | Delete
* @ignore
[1528] Fix | Delete
* @since 2.3.0
[1529] Fix | Delete
*
[1530] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1531] Fix | Delete
*/
[1532] Fix | Delete
function upgrade_230_options_table() {
[1533] Fix | Delete
global $wpdb;
[1534] Fix | Delete
$old_options_fields = array( 'option_can_override', 'option_type', 'option_width', 'option_height', 'option_description', 'option_admin_level' );
[1535] Fix | Delete
$wpdb->hide_errors();
[1536] Fix | Delete
foreach ( $old_options_fields as $old ) {
[1537] Fix | Delete
$wpdb->query( "ALTER TABLE $wpdb->options DROP $old" );
[1538] Fix | Delete
}
[1539] Fix | Delete
$wpdb->show_errors();
[1540] Fix | Delete
}
[1541] Fix | Delete
[1542] Fix | Delete
/**
[1543] Fix | Delete
* Remove old categories, link2cat, and post2cat database tables.
[1544] Fix | Delete
*
[1545] Fix | Delete
* @ignore
[1546] Fix | Delete
* @since 2.3.0
[1547] Fix | Delete
*
[1548] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1549] Fix | Delete
*/
[1550] Fix | Delete
function upgrade_230_old_tables() {
[1551] Fix | Delete
global $wpdb;
[1552] Fix | Delete
$wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'categories' );
[1553] Fix | Delete
$wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'link2cat' );
[1554] Fix | Delete
$wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'post2cat' );
[1555] Fix | Delete
}
[1556] Fix | Delete
[1557] Fix | Delete
/**
[1558] Fix | Delete
* Upgrade old slugs made in version 2.2.
[1559] Fix | Delete
*
[1560] Fix | Delete
* @ignore
[1561] Fix | Delete
* @since 2.2.0
[1562] Fix | Delete
*
[1563] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1564] Fix | Delete
*/
[1565] Fix | Delete
function upgrade_old_slugs() {
[1566] Fix | Delete
// Upgrade people who were using the Redirect Old Slugs plugin.
[1567] Fix | Delete
global $wpdb;
[1568] Fix | Delete
$wpdb->query( "UPDATE $wpdb->postmeta SET meta_key = '_wp_old_slug' WHERE meta_key = 'old_slug'" );
[1569] Fix | Delete
}
[1570] Fix | Delete
[1571] Fix | Delete
/**
[1572] Fix | Delete
* Execute changes made in WordPress 2.5.0.
[1573] Fix | Delete
*
[1574] Fix | Delete
* @ignore
[1575] Fix | Delete
* @since 2.5.0
[1576] Fix | Delete
*
[1577] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1578] Fix | Delete
*/
[1579] Fix | Delete
function upgrade_250() {
[1580] Fix | Delete
global $wp_current_db_version;
[1581] Fix | Delete
[1582] Fix | Delete
if ( $wp_current_db_version < 6689 ) {
[1583] Fix | Delete
populate_roles_250();
[1584] Fix | Delete
}
[1585] Fix | Delete
[1586] Fix | Delete
}
[1587] Fix | Delete
[1588] Fix | Delete
/**
[1589] Fix | Delete
* Execute changes made in WordPress 2.5.2.
[1590] Fix | Delete
*
[1591] Fix | Delete
* @ignore
[1592] Fix | Delete
* @since 2.5.2
[1593] Fix | Delete
*
[1594] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1595] Fix | Delete
*/
[1596] Fix | Delete
function upgrade_252() {
[1597] Fix | Delete
global $wpdb;
[1598] Fix | Delete
[1599] Fix | Delete
$wpdb->query( "UPDATE $wpdb->users SET user_activation_key = ''" );
[1600] Fix | Delete
}
[1601] Fix | Delete
[1602] Fix | Delete
/**
[1603] Fix | Delete
* Execute changes made in WordPress 2.6.
[1604] Fix | Delete
*
[1605] Fix | Delete
* @ignore
[1606] Fix | Delete
* @since 2.6.0
[1607] Fix | Delete
*
[1608] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1609] Fix | Delete
*/
[1610] Fix | Delete
function upgrade_260() {
[1611] Fix | Delete
global $wp_current_db_version;
[1612] Fix | Delete
[1613] Fix | Delete
if ( $wp_current_db_version < 8000 ) {
[1614] Fix | Delete
populate_roles_260();
[1615] Fix | Delete
}
[1616] Fix | Delete
}
[1617] Fix | Delete
[1618] Fix | Delete
/**
[1619] Fix | Delete
* Execute changes made in WordPress 2.7.
[1620] Fix | Delete
*
[1621] Fix | Delete
* @ignore
[1622] Fix | Delete
* @since 2.7.0
[1623] Fix | Delete
*
[1624] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1625] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1626] Fix | Delete
*/
[1627] Fix | Delete
function upgrade_270() {
[1628] Fix | Delete
global $wp_current_db_version, $wpdb;
[1629] Fix | Delete
[1630] Fix | Delete
if ( $wp_current_db_version < 8980 ) {
[1631] Fix | Delete
populate_roles_270();
[1632] Fix | Delete
}
[1633] Fix | Delete
[1634] Fix | Delete
// Update post_date for unpublished posts with empty timestamp.
[1635] Fix | Delete
if ( $wp_current_db_version < 8921 ) {
[1636] Fix | Delete
$wpdb->query( "UPDATE $wpdb->posts SET post_date = post_modified WHERE post_date = '0000-00-00 00:00:00'" );
[1637] Fix | Delete
}
[1638] Fix | Delete
}
[1639] Fix | Delete
[1640] Fix | Delete
/**
[1641] Fix | Delete
* Execute changes made in WordPress 2.8.
[1642] Fix | Delete
*
[1643] Fix | Delete
* @ignore
[1644] Fix | Delete
* @since 2.8.0
[1645] Fix | Delete
*
[1646] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1647] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1648] Fix | Delete
*/
[1649] Fix | Delete
function upgrade_280() {
[1650] Fix | Delete
global $wp_current_db_version, $wpdb;
[1651] Fix | Delete
[1652] Fix | Delete
if ( $wp_current_db_version < 10360 ) {
[1653] Fix | Delete
populate_roles_280();
[1654] Fix | Delete
}
[1655] Fix | Delete
if ( is_multisite() ) {
[1656] Fix | Delete
$start = 0;
[1657] Fix | Delete
while ( $rows = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options ORDER BY option_id LIMIT $start, 20" ) ) {
[1658] Fix | Delete
foreach ( $rows as $row ) {
[1659] Fix | Delete
$value = maybe_unserialize( $row->option_value );
[1660] Fix | Delete
if ( $value === $row->option_value ) {
[1661] Fix | Delete
$value = stripslashes( $value );
[1662] Fix | Delete
}
[1663] Fix | Delete
if ( $value !== $row->option_value ) {
[1664] Fix | Delete
update_option( $row->option_name, $value );
[1665] Fix | Delete
}
[1666] Fix | Delete
}
[1667] Fix | Delete
$start += 20;
[1668] Fix | Delete
}
[1669] Fix | Delete
clean_blog_cache( get_current_blog_id() );
[1670] Fix | Delete
}
[1671] Fix | Delete
}
[1672] Fix | Delete
[1673] Fix | Delete
/**
[1674] Fix | Delete
* Execute changes made in WordPress 2.9.
[1675] Fix | Delete
*
[1676] Fix | Delete
* @ignore
[1677] Fix | Delete
* @since 2.9.0
[1678] Fix | Delete
*
[1679] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1680] Fix | Delete
*/
[1681] Fix | Delete
function upgrade_290() {
[1682] Fix | Delete
global $wp_current_db_version;
[1683] Fix | Delete
[1684] Fix | Delete
if ( $wp_current_db_version < 11958 ) {
[1685] Fix | Delete
// Previously, setting depth to 1 would redundantly disable threading,
[1686] Fix | Delete
// but now 2 is the minimum depth to avoid confusion.
[1687] Fix | Delete
if ( get_option( 'thread_comments_depth' ) == '1' ) {
[1688] Fix | Delete
update_option( 'thread_comments_depth', 2 );
[1689] Fix | Delete
update_option( 'thread_comments', 0 );
[1690] Fix | Delete
}
[1691] Fix | Delete
}
[1692] Fix | Delete
}
[1693] Fix | Delete
[1694] Fix | Delete
/**
[1695] Fix | Delete
* Execute changes made in WordPress 3.0.
[1696] Fix | Delete
*
[1697] Fix | Delete
* @ignore
[1698] Fix | Delete
* @since 3.0.0
[1699] Fix | Delete
*
[1700] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1701] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1702] Fix | Delete
*/
[1703] Fix | Delete
function upgrade_300() {
[1704] Fix | Delete
global $wp_current_db_version, $wpdb;
[1705] Fix | Delete
[1706] Fix | Delete
if ( $wp_current_db_version < 15093 ) {
[1707] Fix | Delete
populate_roles_300();
[1708] Fix | Delete
}
[1709] Fix | Delete
[1710] Fix | Delete
if ( $wp_current_db_version < 14139 && is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_site_option( 'siteurl' ) === false ) {
[1711] Fix | Delete
add_site_option( 'siteurl', '' );
[1712] Fix | Delete
}
[1713] Fix | Delete
[1714] Fix | Delete
// 3.0 screen options key name changes.
[1715] Fix | Delete
if ( wp_should_upgrade_global_tables() ) {
[1716] Fix | Delete
$sql = "DELETE FROM $wpdb->usermeta
[1717] Fix | Delete
WHERE meta_key LIKE %s
[1718] Fix | Delete
OR meta_key LIKE %s
[1719] Fix | Delete
OR meta_key LIKE %s
[1720] Fix | Delete
OR meta_key LIKE %s
[1721] Fix | Delete
OR meta_key LIKE %s
[1722] Fix | Delete
OR meta_key LIKE %s
[1723] Fix | Delete
OR meta_key = 'manageedittagscolumnshidden'
[1724] Fix | Delete
OR meta_key = 'managecategoriescolumnshidden'
[1725] Fix | Delete
OR meta_key = 'manageedit-tagscolumnshidden'
[1726] Fix | Delete
OR meta_key = 'manageeditcolumnshidden'
[1727] Fix | Delete
OR meta_key = 'categories_per_page'
[1728] Fix | Delete
OR meta_key = 'edit_tags_per_page'";
[1729] Fix | Delete
$prefix = $wpdb->esc_like( $wpdb->base_prefix );
[1730] Fix | Delete
$wpdb->query(
[1731] Fix | Delete
$wpdb->prepare(
[1732] Fix | Delete
$sql,
[1733] Fix | Delete
$prefix . '%' . $wpdb->esc_like( 'meta-box-hidden' ) . '%',
[1734] Fix | Delete
$prefix . '%' . $wpdb->esc_like( 'closedpostboxes' ) . '%',
[1735] Fix | Delete
$prefix . '%' . $wpdb->esc_like( 'manage-' ) . '%' . $wpdb->esc_like( '-columns-hidden' ) . '%',
[1736] Fix | Delete
$prefix . '%' . $wpdb->esc_like( 'meta-box-order' ) . '%',
[1737] Fix | Delete
$prefix . '%' . $wpdb->esc_like( 'metaboxorder' ) . '%',
[1738] Fix | Delete
$prefix . '%' . $wpdb->esc_like( 'screen_layout' ) . '%'
[1739] Fix | Delete
)
[1740] Fix | Delete
);
[1741] Fix | Delete
}
[1742] Fix | Delete
[1743] Fix | Delete
}
[1744] Fix | Delete
[1745] Fix | Delete
/**
[1746] Fix | Delete
* Execute changes made in WordPress 3.3.
[1747] Fix | Delete
*
[1748] Fix | Delete
* @ignore
[1749] Fix | Delete
* @since 3.3.0
[1750] Fix | Delete
*
[1751] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1752] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1753] Fix | Delete
* @global array $wp_registered_widgets
[1754] Fix | Delete
* @global array $sidebars_widgets
[1755] Fix | Delete
*/
[1756] Fix | Delete
function upgrade_330() {
[1757] Fix | Delete
global $wp_current_db_version, $wpdb, $wp_registered_widgets, $sidebars_widgets;
[1758] Fix | Delete
[1759] Fix | Delete
if ( $wp_current_db_version < 19061 && wp_should_upgrade_global_tables() ) {
[1760] Fix | Delete
$wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key IN ('show_admin_bar_admin', 'plugins_last_view')" );
[1761] Fix | Delete
}
[1762] Fix | Delete
[1763] Fix | Delete
if ( $wp_current_db_version >= 11548 ) {
[1764] Fix | Delete
return;
[1765] Fix | Delete
}
[1766] Fix | Delete
[1767] Fix | Delete
$sidebars_widgets = get_option( 'sidebars_widgets', array() );
[1768] Fix | Delete
$_sidebars_widgets = array();
[1769] Fix | Delete
[1770] Fix | Delete
if ( isset( $sidebars_widgets['wp_inactive_widgets'] ) || empty( $sidebars_widgets ) ) {
[1771] Fix | Delete
$sidebars_widgets['array_version'] = 3;
[1772] Fix | Delete
} elseif ( ! isset( $sidebars_widgets['array_version'] ) ) {
[1773] Fix | Delete
$sidebars_widgets['array_version'] = 1;
[1774] Fix | Delete
}
[1775] Fix | Delete
[1776] Fix | Delete
switch ( $sidebars_widgets['array_version'] ) {
[1777] Fix | Delete
case 1:
[1778] Fix | Delete
foreach ( (array) $sidebars_widgets as $index => $sidebar ) {
[1779] Fix | Delete
if ( is_array( $sidebar ) ) {
[1780] Fix | Delete
foreach ( (array) $sidebar as $i => $name ) {
[1781] Fix | Delete
$id = strtolower( $name );
[1782] Fix | Delete
if ( isset( $wp_registered_widgets[ $id ] ) ) {
[1783] Fix | Delete
$_sidebars_widgets[ $index ][ $i ] = $id;
[1784] Fix | Delete
continue;
[1785] Fix | Delete
}
[1786] Fix | Delete
$id = sanitize_title( $name );
[1787] Fix | Delete
if ( isset( $wp_registered_widgets[ $id ] ) ) {
[1788] Fix | Delete
$_sidebars_widgets[ $index ][ $i ] = $id;
[1789] Fix | Delete
continue;
[1790] Fix | Delete
}
[1791] Fix | Delete
[1792] Fix | Delete
$found = false;
[1793] Fix | Delete
[1794] Fix | Delete
foreach ( $wp_registered_widgets as $widget_id => $widget ) {
[1795] Fix | Delete
if ( strtolower( $widget['name'] ) == strtolower( $name ) ) {
[1796] Fix | Delete
$_sidebars_widgets[ $index ][ $i ] = $widget['id'];
[1797] Fix | Delete
$found = true;
[1798] Fix | Delete
break;
[1799] Fix | Delete
} elseif ( sanitize_title( $widget['name'] ) == sanitize_title( $name ) ) {
[1800] Fix | Delete
$_sidebars_widgets[ $index ][ $i ] = $widget['id'];
[1801] Fix | Delete
$found = true;
[1802] Fix | Delete
break;
[1803] Fix | Delete
}
[1804] Fix | Delete
}
[1805] Fix | Delete
[1806] Fix | Delete
if ( $found ) {
[1807] Fix | Delete
continue;
[1808] Fix | Delete
}
[1809] Fix | Delete
[1810] Fix | Delete
unset( $_sidebars_widgets[ $index ][ $i ] );
[1811] Fix | Delete
}
[1812] Fix | Delete
}
[1813] Fix | Delete
}
[1814] Fix | Delete
$_sidebars_widgets['array_version'] = 2;
[1815] Fix | Delete
$sidebars_widgets = $_sidebars_widgets;
[1816] Fix | Delete
unset( $_sidebars_widgets );
[1817] Fix | Delete
[1818] Fix | Delete
// Intentional fall-through to upgrade to the next version.
[1819] Fix | Delete
case 2:
[1820] Fix | Delete
$sidebars_widgets = retrieve_widgets();
[1821] Fix | Delete
$sidebars_widgets['array_version'] = 3;
[1822] Fix | Delete
update_option( 'sidebars_widgets', $sidebars_widgets );
[1823] Fix | Delete
}
[1824] Fix | Delete
}
[1825] Fix | Delete
[1826] Fix | Delete
/**
[1827] Fix | Delete
* Execute changes made in WordPress 3.4.
[1828] Fix | Delete
*
[1829] Fix | Delete
* @ignore
[1830] Fix | Delete
* @since 3.4.0
[1831] Fix | Delete
*
[1832] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1833] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1834] Fix | Delete
*/
[1835] Fix | Delete
function upgrade_340() {
[1836] Fix | Delete
global $wp_current_db_version, $wpdb;
[1837] Fix | Delete
[1838] Fix | Delete
if ( $wp_current_db_version < 19798 ) {
[1839] Fix | Delete
$wpdb->hide_errors();
[1840] Fix | Delete
$wpdb->query( "ALTER TABLE $wpdb->options DROP COLUMN blog_id" );
[1841] Fix | Delete
$wpdb->show_errors();
[1842] Fix | Delete
}
[1843] Fix | Delete
[1844] Fix | Delete
if ( $wp_current_db_version < 19799 ) {
[1845] Fix | Delete
$wpdb->hide_errors();
[1846] Fix | Delete
$wpdb->query( "ALTER TABLE $wpdb->comments DROP INDEX comment_approved" );
[1847] Fix | Delete
$wpdb->show_errors();
[1848] Fix | Delete
}
[1849] Fix | Delete
[1850] Fix | Delete
if ( $wp_current_db_version < 20022 && wp_should_upgrade_global_tables() ) {
[1851] Fix | Delete
$wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key = 'themes_last_view'" );
[1852] Fix | Delete
}
[1853] Fix | Delete
[1854] Fix | Delete
if ( $wp_current_db_version < 20080 ) {
[1855] Fix | Delete
if ( 'yes' === $wpdb->get_var( "SELECT autoload FROM $wpdb->options WHERE option_name = 'uninstall_plugins'" ) ) {
[1856] Fix | Delete
$uninstall_plugins = get_option( 'uninstall_plugins' );
[1857] Fix | Delete
delete_option( 'uninstall_plugins' );
[1858] Fix | Delete
add_option( 'uninstall_plugins', $uninstall_plugins, null, 'no' );
[1859] Fix | Delete
}
[1860] Fix | Delete
}
[1861] Fix | Delete
}
[1862] Fix | Delete
[1863] Fix | Delete
/**
[1864] Fix | Delete
* Execute changes made in WordPress 3.5.
[1865] Fix | Delete
*
[1866] Fix | Delete
* @ignore
[1867] Fix | Delete
* @since 3.5.0
[1868] Fix | Delete
*
[1869] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1870] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1871] Fix | Delete
*/
[1872] Fix | Delete
function upgrade_350() {
[1873] Fix | Delete
global $wp_current_db_version, $wpdb;
[1874] Fix | Delete
[1875] Fix | Delete
if ( $wp_current_db_version < 22006 && $wpdb->get_var( "SELECT link_id FROM $wpdb->links LIMIT 1" ) ) {
[1876] Fix | Delete
update_option( 'link_manager_enabled', 1 ); // Previously set to 0 by populate_options().
[1877] Fix | Delete
}
[1878] Fix | Delete
[1879] Fix | Delete
if ( $wp_current_db_version < 21811 && wp_should_upgrade_global_tables() ) {
[1880] Fix | Delete
$meta_keys = array();
[1881] Fix | Delete
foreach ( array_merge( get_post_types(), get_taxonomies() ) as $name ) {
[1882] Fix | Delete
if ( false !== strpos( $name, '-' ) ) {
[1883] Fix | Delete
$meta_keys[] = 'edit_' . str_replace( '-', '_', $name ) . '_per_page';
[1884] Fix | Delete
}
[1885] Fix | Delete
}
[1886] Fix | Delete
if ( $meta_keys ) {
[1887] Fix | Delete
$meta_keys = implode( "', '", $meta_keys );
[1888] Fix | Delete
$wpdb->query( "DELETE FROM $wpdb->usermeta WHERE meta_key IN ('$meta_keys')" );
[1889] Fix | Delete
}
[1890] Fix | Delete
}
[1891] Fix | Delete
[1892] Fix | Delete
if ( $wp_current_db_version < 22422 ) {
[1893] Fix | Delete
$term = get_term_by( 'slug', 'post-format-standard', 'post_format' );
[1894] Fix | Delete
if ( $term ) {
[1895] Fix | Delete
wp_delete_term( $term->term_id, 'post_format' );
[1896] Fix | Delete
}
[1897] Fix | Delete
}
[1898] Fix | Delete
}
[1899] Fix | Delete
[1900] Fix | Delete
/**
[1901] Fix | Delete
* Execute changes made in WordPress 3.7.
[1902] Fix | Delete
*
[1903] Fix | Delete
* @ignore
[1904] Fix | Delete
* @since 3.7.0
[1905] Fix | Delete
*
[1906] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1907] Fix | Delete
*/
[1908] Fix | Delete
function upgrade_370() {
[1909] Fix | Delete
global $wp_current_db_version;
[1910] Fix | Delete
[1911] Fix | Delete
if ( $wp_current_db_version < 25824 ) {
[1912] Fix | Delete
wp_clear_scheduled_hook( 'wp_auto_updates_maybe_update' );
[1913] Fix | Delete
}
[1914] Fix | Delete
}
[1915] Fix | Delete
[1916] Fix | Delete
/**
[1917] Fix | Delete
* Execute changes made in WordPress 3.7.2.
[1918] Fix | Delete
*
[1919] Fix | Delete
* @ignore
[1920] Fix | Delete
* @since 3.7.2
[1921] Fix | Delete
* @since 3.8.0
[1922] Fix | Delete
*
[1923] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1924] Fix | Delete
*/
[1925] Fix | Delete
function upgrade_372() {
[1926] Fix | Delete
global $wp_current_db_version;
[1927] Fix | Delete
[1928] Fix | Delete
if ( $wp_current_db_version < 26148 ) {
[1929] Fix | Delete
wp_clear_scheduled_hook( 'wp_maybe_auto_update' );
[1930] Fix | Delete
}
[1931] Fix | Delete
}
[1932] Fix | Delete
[1933] Fix | Delete
/**
[1934] Fix | Delete
* Execute changes made in WordPress 3.8.0.
[1935] Fix | Delete
*
[1936] Fix | Delete
* @ignore
[1937] Fix | Delete
* @since 3.8.0
[1938] Fix | Delete
*
[1939] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1940] Fix | Delete
*/
[1941] Fix | Delete
function upgrade_380() {
[1942] Fix | Delete
global $wp_current_db_version;
[1943] Fix | Delete
[1944] Fix | Delete
if ( $wp_current_db_version < 26691 ) {
[1945] Fix | Delete
deactivate_plugins( array( 'mp6/mp6.php' ), true );
[1946] Fix | Delete
}
[1947] Fix | Delete
}
[1948] Fix | Delete
[1949] Fix | Delete
/**
[1950] Fix | Delete
* Execute changes made in WordPress 4.0.0.
[1951] Fix | Delete
*
[1952] Fix | Delete
* @ignore
[1953] Fix | Delete
* @since 4.0.0
[1954] Fix | Delete
*
[1955] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1956] Fix | Delete
*/
[1957] Fix | Delete
function upgrade_400() {
[1958] Fix | Delete
global $wp_current_db_version;
[1959] Fix | Delete
[1960] Fix | Delete
if ( $wp_current_db_version < 29630 ) {
[1961] Fix | Delete
if ( ! is_multisite() && false === get_option( 'WPLANG' ) ) {
[1962] Fix | Delete
if ( defined( 'WPLANG' ) && ( '' !== WPLANG ) && in_array( WPLANG, get_available_languages(), true ) ) {
[1963] Fix | Delete
update_option( 'WPLANG', WPLANG );
[1964] Fix | Delete
} else {
[1965] Fix | Delete
update_option( 'WPLANG', '' );
[1966] Fix | Delete
}
[1967] Fix | Delete
}
[1968] Fix | Delete
}
[1969] Fix | Delete
}
[1970] Fix | Delete
[1971] Fix | Delete
/**
[1972] Fix | Delete
* Execute changes made in WordPress 4.2.0.
[1973] Fix | Delete
*
[1974] Fix | Delete
* @ignore
[1975] Fix | Delete
* @since 4.2.0
[1976] Fix | Delete
*/
[1977] Fix | Delete
function upgrade_420() {}
[1978] Fix | Delete
[1979] Fix | Delete
/**
[1980] Fix | Delete
* Executes changes made in WordPress 4.3.0.
[1981] Fix | Delete
*
[1982] Fix | Delete
* @ignore
[1983] Fix | Delete
* @since 4.3.0
[1984] Fix | Delete
*
[1985] Fix | Delete
* @global int $wp_current_db_version The old (current) database version.
[1986] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[1987] Fix | Delete
*/
[1988] Fix | Delete
function upgrade_430() {
[1989] Fix | Delete
global $wp_current_db_version, $wpdb;
[1990] Fix | Delete
[1991] Fix | Delete
if ( $wp_current_db_version < 32364 ) {
[1992] Fix | Delete
upgrade_430_fix_comments();
[1993] Fix | Delete
}
[1994] Fix | Delete
[1995] Fix | Delete
// Shared terms are split in a separate process.
[1996] Fix | Delete
if ( $wp_current_db_version < 32814 ) {
[1997] Fix | Delete
update_option( 'finished_splitting_shared_terms', 0 );
[1998] Fix | Delete
wp_schedule_single_event( time() + ( 1 * MINUTE_IN_SECONDS ), 'wp_split_shared_term_batch' );
[1999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function