• After update my wordpress widget stopped working. How fix ?

    Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use __construct()

    <?php
    
    class Whatsapp extends WP_Widget {
    
    public function __construct() {
        $id_base = 'whatsapp';
        $name = 'Whatsapp';
        $widget_options = array('description' => 'WhatsApp');
        parent::__construct($id_base, $name, $widget_options);
    }
    public function form($instance) {
    
     }
    
    public function update($new_instance, $old_instance) {
    
     }
    
    public function widget($args, $instance) {
    
    echo '<div class="whatsapp"style="padding:10px 20px; background-color:#2ab200; border-radius:4px; color:#FFF; font-size:14px; font-weight:bold font-family: sans-serif; margin-top:20px; height:41px;
    "><img src="https://www.valedosolfm.com.br/wp-content/uploads/2015/08/whats.png"><p style="margin:0; padding:0; position:relative; bottom: 26px; color#FFF; float:right; font-weight:bold; font-family: sans-serif;">43 9648-4713</p></div>';
     }
    
    }
    
    function register_whatsapp(){
        //Registra o widget que criamos
         register_widget( 'Whatsapp' );
    }
    
    //Com fun??o add_action, atribuimos uma fun??o, usando o gancho widgets_init
    add_action( 'widgets_init', 'register_whatsapp' );
    
    ?>
Viewing 1 replies (of 1 total)
  • I also am having an issue with a WP update – currenty using WordPress 4.3.1 running Twenty Fourteen Child theme.

    I cannot access these items from the Appearance menu:
    – Customise
    – Widgets
    – Header
    – Background

    It takes me to an error page:
    “Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
    More information about this error may be available in the server error log.
    Web Server at bobbin.com.au”

    I can access Themes, Menus & Editor

    This was the dev site I built it in… https://www.artesque.com.au/Bobbins/
    I cloned it across to a live dev site… https://bobbin.com.au/151003/

    Any help would be greatly appreciated.

    Regards… s

Viewing 1 replies (of 1 total)
  • The topic ‘My Custom Widget Not Work – WordPress 4.3’ is closed to new replies.