PluginProbe
Assistant – Every Day Productivity Apps / 1.0.3
Assistant – Every Day Productivity Apps v1.0.3
1.5.5 trunk 0.1.0 0.2.0 0.2.1 0.2.2 0.3.0 0.3.1 0.4 0.4.1 0.4.2 0.5.0 0.5.1 0.6.0 0.7.0 0.7.0.2 0.7.0.3 0.7.0.4 0.7.0.5 0.7.0.6 0.7.0.7 0.7.0.8 0.7.0.9 0.7.1 1.0 All 71 releases
← All changes | backend/src/Services/CustomizerService.php +2 -2 1.01.0.3 View file →
@@ -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;