wp_unregister_globals [ WordPress Function ]
wp_unregister_globals ( No parameters )
| Access: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: wp_unregister_widget_control, wp_register, wp_register_style, wp_register_script, unregister_sidebar
Turn register globals off.
Source
<?php
function wp_unregister_GLOBALS() {
if ( !ini_get( 'register_globals' ) )
return;
if ( isset( $_REQUEST['GLOBALS'] ) )
die( 'GLOBALS overwrite attempt detected' );
// Variables that shouldn't be unset
$no_unset = array( 'GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix' );
$input = array_merge( $_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset( $_SESSION ) && is_array( $_SESSION ) ? $_SESSION : array() );
foreach ( $input as $k => $v )
if ( !in_array( $k, $no_unset ) && isset( $GLOBALS[$k] ) ) {
$GLOBALS[$k] = null;
unset( $GLOBALS[$k] );
}
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- php - wp_unregister_GLOBALS() in wordpress - Stack Overflow
First: how does "$_REQUEST['GLOBALS']" overwrite the globals? This used to be possible in PHP with register_globals enabled. Due to that ...
stackoverflow.com - wp_unregister_globals
wp_unregister_globals(). Defined at: /wp-includes/load.php -> line 10. Referenced 2 times: /wp-settings.php -> line 40 · /wp-admin/setup-config.php -> line 54 ...
phpxref.ftwr.co.uk - Session variables in Wordpress | Ginchens Blog
Aug 15, 2008 ... function wp_unregister_GLOBALS() { if ( !ini_get('register_globals') ) return; if ( isset($_REQUEST['GLOBALS']) ) die('GLOBALS overwrite ...
blog.ginchen.de - Function Reference/wp unregister GLOBALS « WordPress Codex
Description. If register_globals is on, turn it off. Function will not unset values for ' _GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', and ...
codex.wordpress.org