diff --git wordcamp.org/public_html/wp-content/plugins/wordcamp-site-cloner/includes/source-site-id-setting.php wordcamp.org/public_html/wp-content/plugins/wordcamp-site-cloner/includes/source-site-id-setting.php
index ae450ea..27726e5 100644
|
|
class Source_Site_ID_Setting extends \WP_Customize_Setting { |
101 | 101 | |
102 | 102 | return $skip; |
103 | 103 | } |
104 | | |
105 | | /** |
106 | | * Clone the source site into the current site |
107 | | * |
108 | | * If the theme needs to be switched, Core will do that for us because we added the `?theme=` parameter |
109 | | * to the URL. |
110 | | * |
111 | | * @param int $source_site_id |
112 | | */ |
113 | | protected function update( $source_site_id ) { |
| 104 | |
| 105 | protected function update_css( $source_site_id ) { |
114 | 106 | switch_to_blog( $source_site_id ); |
115 | 107 | |
116 | 108 | if ( ! $source_cite_css_post = \Jetpack_Custom_CSS::get_current_revision() ) { |
… |
… |
class Source_Site_ID_Setting extends \WP_Customize_Setting { |
133 | 125 | 'content_width' => $source_site_content_width, |
134 | 126 | ) ); |
135 | 127 | } |
| 128 | |
| 129 | protected function update_widgets( $source_site_id ) { |
| 130 | switch_to_blog( $source_site_id ); |
| 131 | |
| 132 | $sidebars_widgets = get_option('sidebars_widgets'); |
| 133 | |
| 134 | restore_current_blog(); |
| 135 | |
| 136 | if ( !isset( $sidebars_widgets['array_version'] ) ) |
| 137 | $sidebars_widgets['array_version'] = 3; |
| 138 | update_option( 'sidebars_widgets', $sidebars_widgets ); |
| 139 | } |
| 140 | /** |
| 141 | * Clone the source site into the current site |
| 142 | * |
| 143 | * If the theme needs to be switched, Core will do that for us because we added the `?theme=` parameter |
| 144 | * to the URL. |
| 145 | * |
| 146 | * @param int $source_site_id |
| 147 | */ |
| 148 | protected function update( $source_site_id ) { |
| 149 | update_css( $source_site_id ); |
| 150 | update_widgets( $source_site_id ); |
| 151 | } |
| 152 | |
136 | 153 | } |