Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter profilpr

    (@profilpr)

    Hi thanks for your reply. That did the trick!

    I am using the following in my themes functions.php:

    function sidebar_has_active_widgets($sidebar) {
      include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
      if ( is_plugin_active('dynamic-widgets/dynamic-widgets.php') ) {
        $DW = &$GLOBALS['DW'];
        if (!empty($sidebar) && is_array($DW->removelist) && array_key_exists($sidebar, $DW->removelist)) {
          return false;
        }
      }
      return true;
    }
    Thread Starter profilpr

    (@profilpr)

    Brilliant I’ve never thought of that. The question was ment to be a tip to improve your plugin.

Viewing 2 replies - 1 through 2 (of 2 total)