Custom_Image_Header::process_default_headers()
最后更新于:2021-11-25 19:47:15
Custom_Image_Header::process_default_headers()Process the default headers
源文件
文件: gc-admin/includes/class-custom-image-header.php
public function process_default_headers() {
global $_gc_default_headers;
if ( ! isset( $_gc_default_headers ) ) {
return;
}
if ( ! empty( $this->default_headers ) ) {
return;
}
$this->default_headers = $_gc_default_headers;
$template_directory_uri = get_template_directory_uri();
$stylesheet_directory_uri = get_stylesheet_directory_uri();
foreach ( array_keys( $this->default_headers ) as $header ) {
$this->default_headers[ $header ]['url'] = sprintf(
$this->default_headers[ $header ]['url'],
$template_directory_uri,
$stylesheet_directory_uri
);
$this->default_headers[ $header ]['thumbnail_url'] = sprintf(
$this->default_headers[ $header ]['thumbnail_url'],
$template_directory_uri,
$stylesheet_directory_uri
);
}
}