Same filename and directory in other branches
  1. 7.x developer/globals.php

These are the global variables that Drupal uses.

File

developer/globals.php
View source
<?php

/**
 * @file
 * These are the global variables that Drupal uses.
 */

/**
 * Stores timers that have been created by timer_start().
 *
 * @see timer_start()
 * @see timer_read()
 * @see timer_stop()
 */
global $timers;

/**
 * The base URL of the drupal installation.
 *
 * @see conf_init()
 */
global $base_url;

/**
 * The base path of the drupal installation. At least will default to /.
 *
 * @see conf_init()
 */
global $base_path;

/**
 * The root URL of the host excludes the path.
 *
 * @see conf_init()
 */
global $base_root;

/**
 * The url of the database. Thorough documentation provided in default.settings.php.
 */
global $db_url;

/**
 * The prefix to be placed on all database tables.
 */
global $db_prefix;

/**
 * The domain to be used for session cookies.
 *
 * Cookie domains must contain at least one dot other than the first (RFC 2109).
 * For hosts such as 'localhost' or an IP Addresses the cookie domain will not
 * be set.
 */
global $cookie_domain;

/**
 * Array of persistent variables stored in 'variable' table.
 * 
 * @see variable_get()
 * @see variable_set()
 * @see variable_del()
 */
global $conf;

/**
 * The name of the profile that has just been installed.
 */
global $installed_profile;

/**
 * Access control for update.php script. Allows the update.php script to be run when
 * not logged in as and administrator.
 */
global $update_free_access;

/**
 * An object representing the user currently visiting the site.
 *
 * Contains preferences and other account information for logged-in users. When
 * a user is not logged-in, $user->uid property is set to 0.
 *
 * Contains preferences and other user information.
 */
global $user;

/**
 * An object containing the information for the active language.
 *
 * Example values:
 *  - 'language' => 'en',
 *  - 'name' => 'English',
 *  - 'native' => 'English',
 *  - 'direction' => 0,
 *  - 'enabled' => 1,
 *  - 'plurals' => 0,
 *  - 'formula' => '',
 *  - 'domain' => '',
 *  - 'prefix' => '',
 *  - 'weight' => 0,
 *  - 'javascript' => '' 
 */
global $language;

/**
 * The name of the currently installed profile.
 */
global $profile;

/**
 * The type of database being used.
 *
 * Example: mysql.
 */
global $db_type;

/**
 * Active database connection.
 *
 * @see db_set_active()
 */
global $active_db;

/**
 * Array of queries that have been executed.
 */
global $queries;

/**
 * Resource of the query executed.
 */
global $last_result;

/**
 * The locale to use during installation
 *
 * @see st()
 */
global $install_locale;

/**
 * Result of pager_query() that is utilized by other functions.
 */
global $pager_page_array;

/**
 * Array of the total number of pages per pager. The key is will be 0 by defualt, but
 * can be specified via the $element parameter of pager_query().
 */
global $pager_total;

/**
 * Array of the total number of items per pager. The key is will be 0 by defualt, but
 * can be specified via the $element parameter of pager_query().
 */
global $pager_total_items;

/**
 * Name of the active theme.
 */
global $theme;

/**
 * Name of custom theme to override default theme.
 *
 * @see init_theme()
 */
global $custom_theme;

/**
 * Name of the active theme.
 *
 * @see init_theme()
 */
global $theme_key;

/**
 * Active theme object. For documentation of the theme object see _init_theme().
 *
 * @see _init_theme()
 */
global $theme_info;

/**
 * An array of objects that reperesent the base theme. For documentation of the
 * theme object see _init_theme().
 *
 * @see _init_theme()
 */
global $base_theme_info;

/**
 * The active theme engine related to the active theme.
 */
global $theme_engine;

/**
 * Path to the active theme.
 */
global $theme_path;

/**
 * The current multibyte mode.
 * Possible values: UNICODE_ERROR, UNICODE_SINGLEBYTE, UNICODE_MULTIBYTE.
 */
global $multibyte;

/**
 * General string or array.
 *
 * @see aggregator_element_start()
 */
global $item;

/**
 * Structured array describing the data to be rendered.
 *
 * @see aggregator_element_start()
 */
global $element;

/**
 * Active tag name.
 *
 * @see aggregator_element_start()
 */
global $tag;

/**
 * Array of items used by aggregator.
 *
 * @see aggregator_element_start()
 */
global $items;

/**
 * An associative array containing title, link, description and other keys.
 * The link should be an absolute URL.
 *
 * @see aggregator_element_start()
 */
global $channel;

/**
 * Current image tag used by aggregator.
 */
global $image;

/**
 * Active blog node id.
 */
global $nid;

/**
 * An array of topic header information.
 */
global $forum_topic_list_header;

/**
 * Boolean indicating that a menu administrator is running the menu access check.
 */
global $menu_admin;

/**
 * Array used by XRDS XML parser for OpenID to track parsing state.
 */
global $xrds_services;

/**
 * Array used by XRDS XML parser for OpenID to track parsing state.
 */
global $xrds_open_elements;

/**
 * Array used by XRDS XML parser for OpenID to track parsing state.
 */
global $xrds_current_service;

/**
 * Recent activity statistics generated by statistics_exit().
 */
global $recent_activity;

/**
 * Active statistics record id.
 */
global $id;

Globals

Namesort descending Description
$active_db Active database connection.
$base_path The base path of the drupal installation. At least will default to /.
$base_root The root URL of the host excludes the path.
$base_theme_info An array of objects that reperesent the base theme. For documentation of the theme object see _init_theme().
$base_url The base URL of the drupal installation.
$channel An associative array containing title, link, description and other keys. The link should be an absolute URL.
$conf Array of persistent variables stored in 'variable' table.
$cookie_domain The domain to be used for session cookies.
$custom_theme Name of custom theme to override default theme.
$db_prefix The prefix to be placed on all database tables.
$db_type The type of database being used.
$db_url The url of the database. Thorough documentation provided in default.settings.php.
$element Structured array describing the data to be rendered.
$forum_topic_list_header An array of topic header information.
$id Active statistics record id.
$image Current image tag used by aggregator.
$installed_profile The name of the profile that has just been installed.
$install_locale The locale to use during installation
$item General string or array.
$items Array of items used by aggregator.
$language An object containing the information for the active language.
$last_result Resource of the query executed.
$menu_admin Boolean indicating that a menu administrator is running the menu access check.
$multibyte The current multibyte mode. Possible values: UNICODE_ERROR, UNICODE_SINGLEBYTE, UNICODE_MULTIBYTE.
$nid Active blog node id.
$pager_page_array Result of pager_query() that is utilized by other functions.
$pager_total Array of the total number of pages per pager. The key is will be 0 by defualt, but can be specified via the $element parameter of pager_query().
$pager_total_items Array of the total number of items per pager. The key is will be 0 by defualt, but can be specified via the $element parameter of pager_query().
$profile The name of the currently installed profile.
$queries Array of queries that have been executed.
$recent_activity Recent activity statistics generated by statistics_exit().
$tag Active tag name.
$theme Name of the active theme.
$theme_engine The active theme engine related to the active theme.
$theme_info Active theme object. For documentation of the theme object see _init_theme().
$theme_key Name of the active theme.
$theme_path Path to the active theme.
$timers Stores timers that have been created by timer_start().
$update_free_access Access control for update.php script. Allows the update.php script to be run when not logged in as and administrator.
$user An object representing the user currently visiting the site.
$xrds_current_service Array used by XRDS XML parser for OpenID to track parsing state.
$xrds_open_elements Array used by XRDS XML parser for OpenID to track parsing state.
$xrds_services Array used by XRDS XML parser for OpenID to track parsing state.