Open mustafauysal opened 4 years ago
bu-site-init.php https://github.com/bu-ist/responsive-framework/blob/develop/bu-site-init.php - the child theme can handle the init instead of the parent
@ashleykolodziej It seems theme-specific initializer strictly tied to the template file. - https://github.com/bu-ist/site-manager/blob/master/lib/api.php#L89
We can use after_switch_theme
or plugin activation hook with the custom plugin. However, it can possibly be triggered more than once (let's say you switch theme later on) and raise problems such as deleting the published contents.
IMO, https://github.com/bu-ist/site-manager would be a better home for this functionality.
thoughts?
I think this makes sense. I'm going to see if I can find someone on the webteam to help us out and double check our plan. As long as this is done in a way that only affects Responsive 3x, I think we'll be in good shape. :)
Couple of sites you can test this against:
To test:
@ashleykolodziej Thanks for setting up the test sites.
I've cloned them and activated the custom plugin and Responsive Framework 3x
I've also created a new website for testing theme initialization (removing default contents, adding menu items etc..) is working as expected. - http://10up-responsi.cms-devl.bu.edu/cleantest/
Let's keep this open till https://github.com/bu-ist/site-manager/pull/11 get merged
bu-site-init.php
https://github.com/bu-ist/responsive-framework/blob/develop/bu-site-init.php - the child theme can handle the init instead of the parentinc/activation.php
https://github.com/bu-ist/responsive-framework/blob/develop/inc/activation.phpinc/migration-helpers.php
https://github.com/bu-ist/responsive-framework/blob/develop/inc/migration-helpers.phpinc/upgrade.php
https://github.com/bu-ist/responsive-framework/blob/develop/inc/upgrade.phpinc/wp-cli.php
https://github.com/bu-ist/responsive-framework/blob/develop/inc/wp-cli.php