How to check if you are on widget.php page?

I am trying to write a widget and I need to add the color picker to my widget form. I want to add the script only on widget.php page and not on all the admin pages.

Is there a way that I can detect the page inside the construct function of my widget? If not how I can include the script only when I’m on widget.php page?

Read more here:: How to check if you are on widget.php page?

Leave a Reply

Your email address will not be published. Required fields are marked *