看来不是WP_Widget
正在更新,但它的引用方式。
我相信我们想要的是:
class mZ_Mindbody_day_schedule extends WP_Widget {
function mZ_Mindbody_day_schedule() {
$widget_ops = array(
\'classname\' => \'mZ_Mindbody_day_schedule_class\',
\'description\' => __(\'Display class schedule for current day.\', \'mz-mindbody-api\')
);
$this->WP_Widget(\'mZ_Mindbody_day_schedule\', __(\'Today\\\'s MindBody Schedule\', \'mz-mindbody-api\'),
$widget_ops );
}
对此:
class mZ_Mindbody_day_schedule extends WP_Widget {
function mZ_Mindbody_day_schedule() {
$widget_ops = array(
\'classname\' => \'mZ_Mindbody_day_schedule_class\',
\'description\' => __(\'Display class schedule for current day.\', \'mz-mindbody-api\')
);
parent::__construct(\'mZ_Mindbody_day_schedule\', __(\'Today\\\'s MindBody Schedule\', \'mz-mindbody-api\'),
$widget_ops );
}
只有上面代码的第六行得到了更新。