init [ WordPress Function ]
init ( No parameters )
| Defined at: |
|
Set up constants with default values, unless user overrides.
Source
<?php
function init () {
if ( defined('MAGPIE_INITALIZED') ) {
return;
}
else {
define('MAGPIE_INITALIZED', 1);
}
if ( !defined('MAGPIE_CACHE_ON') ) {
define('MAGPIE_CACHE_ON', 1);
}
if ( !defined('MAGPIE_CACHE_DIR') ) {
define('MAGPIE_CACHE_DIR', './cache');
}
if ( !defined('MAGPIE_CACHE_AGE') ) {
define('MAGPIE_CACHE_AGE', 60*60); // one hour
}
if ( !defined('MAGPIE_CACHE_FRESH_ONLY') ) {
define('MAGPIE_CACHE_FRESH_ONLY', 0);
}
if ( !defined('MAGPIE_DEBUG') ) {
define('MAGPIE_DEBUG', 0);
}
if ( !defined('MAGPIE_USER_AGENT') ) {
$ua = 'WordPress/' . $GLOBALS['wp_version'];
if ( MAGPIE_CACHE_ON ) {
$ua = $ua . ')';
}
else {
$ua = $ua . '; No cache)';
}
define('MAGPIE_USER_AGENT', $ua);
}
if ( !defined('MAGPIE_FETCH_TIME_OUT') ) {
define('MAGPIE_FETCH_TIME_OUT', 2); // 2 second timeout
}
// use gzip encoding to fetch rss files if supported?
if ( !defined('MAGPIE_USE_GZIP') ) {
define('MAGPIE_USE_GZIP', true);
}
}
?>
Examples [ wp-snippets.com ]
Top Google Search Results
- init - Wikipedia, the free encyclopedia
init (short for initialization) is a program for Unix-based computer operating systems that spawns all other processes. It runs as a daemon and typically has PID 1.
en.wikipedia.org - Init >> Your Life, In Style
Dynex Products Make Your Digital Life Less Complicated! Introducing a new choice in digital lifestyle products and accessories for your PC-centered activities.
www.initproducts.com - init records
www.initrecords.com - init - Linux Command - Unix Command
Linux / Unix Command Library: init. Learn about its synopsis, description, options, and examples.
linux.about.com
User discussions [ wordpress.org ]
- smarru on "[Plugin: Events Manager] How to disable scripts?"
- Umbrovskis.com on "[Plugin: BP Group Hierarchy] de-styles because of bp_group_hierarchy_extension_init"
- David Dean on "[Plugin: BP Group Hierarchy] de-styles because of bp_group_hierarchy_extension_init"
- Umbrovskis.com on "[Plugin: BP Group Hierarchy] de-styles because of bp_group_hierarchy_extension_init"
- Ricardo on "[Plugin: Events Manager] How to disable scripts?"
- Marcus on "[Plugin: Events Manager] How to disable scripts?"
- Ricardo on "[Plugin: Events Manager] How to disable scripts?"
- ClaytonJames on "script-init.php - URGENT!!!!!"
- dawgmanad on "script-init.php - URGENT!!!!!"
- ClaytonJames on "script-init.php - URGENT!!!!!"