Responsive Activation
mustafauysal opened this issue · comments
-
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 -
inc/activation.php
https://github.com/bu-ist/responsive-framework/blob/develop/inc/activation.php -
inc/migration-helpers.php
https://github.com/bu-ist/responsive-framework/blob/develop/inc/migration-helpers.php -
inc/upgrade.php
https://github.com/bu-ist/responsive-framework/blob/develop/inc/upgrade.php -
inc/wp-cli.php
https://github.com/bu-ist/responsive-framework/blob/develop/inc/wp-cli.php
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:
- http://10up-responsi.cms-devl.bu.edu/flexi/ (I'd recommend making another clone of this site to http://10up-responsi.cms-devl.bu.edu/flexi-activation for testing so you have a clean copy if you need to re-test)
- http://10up-responsi.cms-devl.bu.edu/responsi-1x/ (same recommendation as above)
- http://10up-responsi.cms-devl.bu.edu/responsi-2x/ (same recommendation as above)
To test:
- Switch themes
- Double check sidebars are the same/have the same widgets
- Site name, content, etc. should be roughly the same
@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