2
我想在我的主题的functions.php中加入wordpress核心类,&我试图扩展的类是wp-includes中类wp-customize-control.php
的WP_Customize_Image_Control
。在functions.php中扩展wordpress核心类
它已经扩展了“WP_Customize_Upload_Control”。
我想允许在主题定制程序中上传.svg mime类型。
在我的主题的functions.php的我加上几行:
class WP_Customize_Image_Control_SVG extends WP_Customize_Image_Control {
public $extensions = array('jpg', 'jpeg', 'gif', 'png', 'svg');
};
但遗憾的是这打破了一切。
任何帮助,提示或技巧赞赏。
如果您介绍有关您遇到的错误的更多详细信息,您可能会对此有所帮助。 “这打破了一切”并不是特别有用。 – cfx