register_default_headers

函数
register_default_headers ( $headers )
参数
  • (array) $headers Array of headers keyed by a string ID. The IDs point to arrays containing 'url', 'thumbnail_url', and 'description' keys.
    Required:
定义位置
相关方法
unregister_default_headersregister_column_headersregister_sidebarsfilter_default_metadatarest_api_default_filters
引入
3.0.0
弃用
-

register_default_headers: 这个函数用来为一个主题注册默认的头像。它需要一个参数:$headers。$headers是一个头像数组,包括图片的URL、宽度、高度和描述。

注册选定的默认头像,以便由自定义头像管理界面显示。

function register_default_headers( $headers ) {
	global $_wp_default_headers;

	$_wp_default_headers = array_merge( (array) $_wp_default_headers, (array) $headers );
}

常见问题

FAQs
查看更多 >