0
我遇到问题,而不是尝试查看现在无法找到它的位置。 WordPress的返回我以下警告:缺少WP_Widget参数1 y 2
Missing argument 1 for WP_Widget :: __ construct()
Missing argument 2 for WP_Widget::__construct()
我的代码是:
class WP_Mrw_Widget extends WP_Widget {
function Mrw_Widget(){
$widget_ops = array('classname' => 'MiRegata', 'description' => 'Plugin para mostrar las regatas ya finalizadas');
$control_ops = array('width' => 300, 'height' => 350, 'id_base' => 'mrw_widget');
$this->WP_Widget('mrw_widget', 'Mi Regata Widget', $widget_ops, $control_ops);
}
function widget($args, $instance){
}
function update($new_instance, $old_instance){
}
function form($instance){
}
}
的问题仍然存在,我的新代码是:函数__construct(){ \t \t父:: __结构( \t \t \t“mrw_widget ',// Base ID \t \t \t __('Widget Title','MiRegata'),//名称 \t \t \t array('description'=> __('Mrw_Widget','Plugin para mostrar las regatas y finalizadas'),// //参数 \t \t); \t} –
您应该提供您在问题中使用的完整代码。 – henrywright
顶部已写满代码 –