WordPress.org

Support

Support » How-To and Troubleshooting » How to hide dashboard widgets from plugin

How to hide dashboard widgets from plugin

  • I have a plugin that makes a number of admin dashboard widgets available by calling wp_add_dashboard_widget()

    I’d like to set each of these widgets as hidden unless the user has turned them on. Currently, the first time a user installs my plugin all of the widgets will show on their dashboard until they turn them off via the “Screen Options” dropdown

    I’ve found code that talks about un-setting values from $wp_meta_boxes – but I think this will make them always removed. Ideally I guess I want to check if the user has enabled them specifically and if so, then hide them.

    Any ideas of pointers?

  • The topic ‘How to hide dashboard widgets from plugin’ is closed to new replies.