Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

If the theme is a child theme, save patterns to the child theme #69

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

kienstra
Copy link
Contributor

@kienstra kienstra commented Feb 22, 2023

Before

If the theme was a child theme, this saved patterns in its parent theme.

After

If the theme is a child theme, this saves patterns in the child theme.


Fixes part of #57 (Make sure child themes work)

Testing Steps

  1. Activate a child theme
  2. Create a new pattern
  3. Expected: The pattern is saved to the child theme's patterns/ directory, not its parent: Screenshot 2023-02-22 at 12 56 48 PM

@kienstra kienstra mentioned this pull request Feb 22, 2023
11 tasks
@kienstra
Copy link
Contributor Author

This looks good so far.

@kienstra kienstra changed the title See if get_stylesheet_directory() will support child themes If the theme is a child theme, save patterns to the child theme Feb 22, 2023
@kienstra kienstra marked this pull request as ready for review February 22, 2023 19:00
Copy link
Contributor

@johnstonphilip johnstonphilip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@kienstra
Copy link
Contributor Author

Thanks, Phil!

@kienstra kienstra merged commit d0785ae into main Feb 22, 2023
@kienstra kienstra deleted the update/child-themes branch February 22, 2023 19:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants