Tooltips in widgets broken in 2.2
-
Wasn’t getting any tooltips on my widget items. Tracked it down to line 102 in class-google-calendar-events.php, load_scripts function:
if ( ( strpos( $post->post_content, '[gcal' ) !== false ) || ( $post->post_type == 'gce_feed' )) {
Widgets aren’t a post. So it never loads the scripts. I assume you were trying to be a good WP coder and not load script when not necessary. Not sure if there is some way to also loop through the widget contents.
FYI, in my particular case my GCE widget is actually done using shortcode (not with the actual GCE widget). The actual widget tooltips are also broken though (I added a widget during my debug).
For anyone wanting a work around for now, change that line to this:
if ( ( strpos( $post->post_content, '[gcal' ) !== false ) || ( $post->post_type == 'gce_feed' ) || 1==1) {
This will cause it to load on every page though.
- The topic ‘Tooltips in widgets broken in 2.2’ is closed to new replies.