来源
公共函数__construct(){ $widget_ops=数组( “classname”=>“widget_block”, “description”=>__(“包含块的小部件”), “customize_selective_refresh”=>true, “show_instance_in_rest”=>true, ); $control_ops=数组( “宽度”=>400, “高度”=>350, ); 父项::__construct('block',__('block'),$widget_ops,$control_ops); add_filter(“is_wide_widget_in_customizer”,数组($this,“set_is_wide _widget-in_customezer”),10,2); }