WordPress小部件单选按钮不保存→仅使用PHP没有Js / JQuery

时间:2017-08-12 09:18:48

标签: php wordpress widget

这是Widget的完整代码→

        <p> <input type="radio" <?php checked(  $instance[ 'what_to_check_for' ], 'check_for_counter' ); ?> id="<?php echo $this->get_field_id( 'check_for_counter' ); ?>" value="check_for_counter" name="what_to_check_for" />
        <label for="<?php echo $this->get_field_id( 'check_for_counter' ); ?>">Check whether to display description or not</label> </p>

        <p> <input type="radio" <?php checked( $instance[ 'what_to_check_for' ], 'check_for_image' ); ?> id="<?php echo $this->get_field_id( 'check_for_image' ); ?>" value="check_for_image" name="what_to_check_for" />
        <label for="<?php echo $this->get_field_id( 'check_for_image' ); ?>">Select to Post with Thumbnails</label> </p>

问题→

问题是单选按钮没有保存。我正在为此附上录像。 单选按钮未保存→https://www.screencast.com/t/pLad8AwrOXiS

  

请指导我哪里出错了。此isset缺失   单选按钮?如果是的话,请帮我完成。

0 个答案:

没有答案