install_global_terms() WordPress Function

This function installs global terms for a site. Global terms are terms that are shared across all sites in a network. This function should be called after a site is created or when a network is first created.

install_global_terms() #

Install global terms.


Source

File: wp-admin/includes/upgrade.php

	function install_global_terms() {
		global $wpdb, $charset_collate;
		$ms_queries = "
CREATE TABLE $wpdb->sitecategories (
  cat_ID bigint(20) NOT NULL auto_increment,
  cat_name varchar(55) NOT NULL default '',
  category_nicename varchar(200) NOT NULL default '',
  last_updated timestamp NOT NULL,
  PRIMARY KEY  (cat_ID),
  KEY category_nicename (category_nicename),
  KEY last_updated (last_updated)
) $charset_collate;
";
		// Now create tables.
		dbDelta( $ms_queries );
	}


Top ↑

Changelog

Changelog
VersionDescription
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.