WordPress.org

Ready to get started?Download WordPress

Forums

EvoLve
Fatal errors with registering widgets (1 post)

  1. sswells
    Member
    Posted 4 months ago #

    Please fix your theme. This is causing big issues with other plugins that are doing things correctly.

    Change this:

    function evolve_carousel_init() {
    
    	register_widget('evolve_carousel_WP_Widget');
    
    	do_action('widgets_init');
    }
    
    add_action('init', 'evolve_carousel_init', 1);

    to this:

    function evolve_carousel_init() {
    
    	register_widget('evolve_carousel_WP_Widget');
    }
    
    add_action('widgets_init', 'evolve_carousel_init', 1);

    Please do not trigger a WordPress action like this. Init actions SHOULD NOT be triggered again. Here's more info on how to do this correctly.
    https://codex.wordpress.org/Widgets_API

Reply

You must log in to post.

About this Theme

About this Topic