Skip to content

If a site's breakpoints change, the widgets break. #77

Description

@benlk

Here we see an array of options for a widget:

PHP message: array (
  'identifier' => 'cheese',
  'lazyLoad' => '1',
  'breakpoints' => NULL,
  'sizes' => 
  array (
    'mobile' => '',
    'desktop' => '',
  ),
  'size' => NULL,
  'widget_class' => 'default',
  'hidden_desktop' => 0,
  'hidden_tablet' => 0,
  'hidden_phone' => 0,
  'title_link' => '',
)

And here's what happens on the widget form, when the site has gone from using the named breakpoints "mobile" and "desktop" to using the named breakpoints "one" and "two":

PHP message: PHP Notice:  Undefined index: one in /wp-content/plugins/doubleclick-for-wp/dfw-widget.php on line 111
PHP message: PHP Notice:  Undefined index: two in /wp-content/plugins/doubleclick-for-wp/dfw-widget.php on line 111

The form and the widget should check to make sure that the widget breakpoint saved in the widget settings we're trying to get the sizes for exists in the site's breakpoint settings.

Sites are not likely to constantly change their breakpoints, so this is not a high-priority issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions