| @@ -141,13 +141,13 @@ | ||
| 141 | 141 | */ |
| 142 | 142 | public function can_import_settings( $data ) { |
| 143 | 143 | $theme = $data->theme; |
| 144 | 144 | $slug = $theme->slug; |
| 145 | - $parentSlug = $theme->parent ? $theme->parent->slug : null; | |
| 145 | + $parent_slug = $theme->parent ? $theme->parent->slug : null; | |
| 146 | 146 | $stylesheet = get_stylesheet(); |
| 147 | 147 | $template = get_template(); |
| 148 | 148 | |
| 149 | - if ( $slug !== $stylesheet && $slug !== $template && $parentSlug !== $stylesheet ) { | |
| 149 | + if ( ( $theme->parent && $parent_slug !== $template ) || $slug !== $stylesheet ) { | |
| 150 | 150 | return new \WP_Error( 'import', __( 'Import failed! These settings are not for the current theme.' ) ); |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | return true; |