Filter hook 'customize_allowed_urls'

in WP Core File wp-includes/class-wp-customize-manager.php at line 4672

View Source

customize_allowed_urls

Filter Hook
Description
Filters the list of URLs allowed to be clicked and followed in the Customizer preview.

Hook Information

File Location wp-includes/class-wp-customize-manager.php View on GitHub
Hook Type Filter
Line Number 4672

Hook Parameters

Type Name Description
string[] $allowed_urls An array of allowed URLs.

Usage Examples

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

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

Source Code Context

wp-includes/class-wp-customize-manager.php:4672 - How this hook is used in WordPress core
<?php
4667  		 *
4668  		 * @since 3.4.0
4669  		 *
4670  		 * @param string[] $allowed_urls An array of allowed URLs.
4671  		 */
4672  		$allowed_urls = array_unique( apply_filters( 'customize_allowed_urls', $allowed_urls ) );
4673  
4674  		return $allowed_urls;
4675  	}
4676  
4677  	/**

PHP Documentation

<?php
/**
		 * Filters the list of URLs allowed to be clicked and followed in the Customizer preview.
		 *
		 * @since 3.4.0
		 *
		 * @param string[] $allowed_urls An array of allowed URLs.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/class-wp-customize-manager.php
Related Hooks

Related hooks will be displayed here in future updates.