diff --git a/panopoly_magic.install b/panopoly_magic.install index 9a0168a..29abc8b 100644 --- a/panopoly_magic.install +++ b/panopoly_magic.install @@ -43,3 +43,12 @@ function panopoly_magic_update_7101() { function panopoly_magic_update_7102() { views_flush_caches(); } + +/** + * Preserve the old 'Add content' preview default. + */ +function panopoly_magic_update_7103() { + if (!variable_get('panopoly_magic_pane_add_preview', FALSE)) { + variable_set('panopoly_magic_pane_add_preview', PANOPOLY_ADD_PREVIEW_AUTOMATIC); + } +} diff --git a/panopoly_magic.module b/panopoly_magic.module index 8edea42..039e58d 100644 --- a/panopoly_magic.module +++ b/panopoly_magic.module @@ -6,7 +6,7 @@ define('PANOPOLY_ADD_PREVIEW_MANUAL', 0); define('PANOPOLY_ADD_PREVIEW_AUTOMATIC', 1); define('PANOPOLY_ADD_PREVIEW_DISABLED', 2); define('PANOPOLY_ADD_PREVIEW_SINGLE', 3); -define('PANOPOLY_ADD_PREVIEW_DEFAULT', PANOPOLY_ADD_PREVIEW_AUTOMATIC); +define('PANOPOLY_ADD_PREVIEW_DEFAULT', PANOPOLY_ADD_PREVIEW_SINGLE); /** * The default list of view modes to exclude from pane configuration forms. @@ -1516,7 +1516,7 @@ function panopoly_magic_process_panels_add_content_modal(&$vars) { $title = $vars['preview_single_title']; $legend_title = !empty($title) ? $title : t('Select a widget to show its preview'); - $add_content_link = !empty($vars['preview_single']) ? _panopoly_magic_render_add_content_link($vars, $content[$title]) : ''; + $add_content_link = !empty($title) ? _panopoly_magic_render_add_content_link($vars, $content[$title]) : ''; $preview = !empty($vars['preview_single']) ? $vars['preview_single'] : t('No Preview'); $vars['columns'][0] = _panopoly_magic_render_link_or_preview($legend_title, $add_content_link, $preview);