Filter hook 'use_google_chrome_frame'

in WP Core File wp-includes/vars.php at line 89

View Source

use_google_chrome_frame

Filter Hook
Description
Filters whether Google Chrome Frame should be used, if available.

Hook Information

File Location wp-includes/vars.php View on GitHub
Hook Type Filter
Line Number 89

Hook Parameters

Type Name Description
bool $is_admin Whether to use the Google Chrome Frame. Default is the value of is_admin().

Usage Examples

Basic Usage
<?php
// Hook into use_google_chrome_frame
add_filter('use_google_chrome_frame', 'my_custom_filter', 10, 1);

function my_custom_filter($is_admin) {
    // Your custom filtering logic here
    return $is_admin;
}

Source Code Context

wp-includes/vars.php:89 - How this hook is used in WordPress core
<?php
  84  			 *
  85  			 * @since 3.2.0
  86  			 *
  87  			 * @param bool $is_admin Whether to use the Google Chrome Frame. Default is the value of is_admin().
  88  			 */
  89  			$is_chrome = apply_filters( 'use_google_chrome_frame', $is_admin );
  90  			if ( $is_chrome ) {
  91  				header( 'X-UA-Compatible: chrome=1' );
  92  			}
  93  			$is_winIE = ! $is_chrome;
  94  		} else {

PHP Documentation

<?php
/**
			 * Filters whether Google Chrome Frame should be used, if available.
			 *
			 * @since 3.2.0
			 *
			 * @param bool $is_admin Whether to use the Google Chrome Frame. Default is the value of is_admin().
			 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/vars.php
Related Hooks

Related hooks will be displayed here in future updates.