init()
Set up constants with default values, unless user overrides.
Description Description
Source Source
File: wp-includes/rss.php
640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 | 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); } } |
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
1.5.0 | Introduced. |