GC_Customize_Manager::get_allowed_urls()

最后更新于:2021-11-27 00:55:50

GC_Customize_Manager::get_allowed_urls()

Get URLs allowed to be previewed.

响应

(array) Allowed URLs.

源文件

文件: gc-includes/class-gc-customize-manager.php

	public function get_allowed_urls() {
		$allowed_urls = array( home_url( '/' ) );

		if ( is_ssl() && ! $this->is_cross_domain() ) {
			$allowed_urls[] = home_url( '/', 'https' );
		}

		/**
		 * 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.
		 */
		$allowed_urls = array_unique( apply_filters( 'customize_allowed_urls', $allowed_urls ) );

		return $allowed_urls;
	}