• Merlyn Cooper

    (@merlyn-cooper)


    I have been working on trying to make a widget that has dynamically printed checkboxes in the front end and controls in the admin section.

    The problem I’ve had with both of these is that as soon as I use PHP functions to initialise an object of a class in another file in order to use that object’s functions the html execution ceases, I get either the “white screen of death” or I get all the html executed up until that point.

    Can a class that extends WP_Widget not use PHP in this way?

    What could I do instead? (will provide code later, catching a bus).

The topic ‘Using functions and PHP object initialisations in widgets’ is closed to new replies.