Presumably, these are widgets that you are writing. If so, basic PHP class methods should do it– set a static class property to hold your “overlap” data.
class Foo extends WP_Widget {
static $overlap;
/*constructs etc*/
function __construct($id = 'twidg', $descr="Test Widget", $opts = array()) {
$widget_opts = array();
parent::__construct($id,$descr,$widget_opts);
/*do stuff*/
}
function widget() {
// set static::$overlap
static::$overlap .= 'something-';
echo 'test widget :: '.static::$overlap;
}
}
You could even create a “parent” widget to handle the “overlap” logic for all of your “child” widgets. For that see: