添加主题支持功能中的Wordpress自定义标志选项有什么用途

添加主题支持功能中的Wordpress自定义标志选项有什么用途,wordpress,wordpress-theming,Wordpress,Wordpress Theming,我正在创建一个自定义主题,以了解更多关于WP under the hood Functionalites的信息。 到目前为止还不错 使用add_theme_support()函数设置自定义徽标选项时,可以根据设置传递一组选项 我做了一些测试,以更好地了解如何使用这些选项: add_theme_support( "custom-logo", array( "width" => 100, "height&quo

我正在创建一个自定义主题,以了解更多关于WP under the hood Functionalites的信息。 到目前为止还不错

使用add_theme_support()函数设置自定义徽标选项时,可以根据设置传递一组选项

我做了一些测试,以更好地了解如何使用这些选项:

add_theme_support( "custom-logo", array(

        "width" => 100,
        "height" => 100,
        "flex-width"    => true,
        "flex-height" => true,
        "header-text"   => array( "Site title", "Site description")
    ));
我用以下方法测试了输出:

$logo = wp_get_attachment_image_src( get_theme_mod( "custom_logo" ), "full" );
我得到:

   array(4) {
  [0]=>
  string(66) "http://domain.local/wp-content/uploads/2020/10/screenshot.png"
  [1]=>
  int(273)
  [2]=>
  int(214)
  [3]=>
  bool(false)
}
得到自己的标志不是一个问题,更重要的是,选择似乎没有任何影响

wordpress文档解释了该功能,但没有说明其自身的选项。 图像的原始大小为274px 214px。 无论“添加主题”支持阵列选项中的设置大小如何,徽标都是原始图像大小或交叉大小。 “弹性宽度”和“弹性高度”选项是什么

谢谢