diff --git a/client/my-sites/theme/controller.jsx b/client/my-sites/theme/controller.jsx index 34f146cb0ca2d4..0f6b2c72c7fb93 100644 --- a/client/my-sites/theme/controller.jsx +++ b/client/my-sites/theme/controller.jsx @@ -59,7 +59,8 @@ export function details( context, next ) { } context.primary = ; + section={ section } + pathName={ context.pathname } />; context.secondary = null; // When we're logged in, we need to remove the sidebar. next(); } diff --git a/client/my-sites/theme/main.jsx b/client/my-sites/theme/main.jsx index a442fba9a8e268..ea20b474433486 100644 --- a/client/my-sites/theme/main.jsx +++ b/client/my-sites/theme/main.jsx @@ -583,8 +583,7 @@ const ConnectedThemeSheet = connectOptions( } return ( - + ); diff --git a/client/my-sites/themes/multi-site.jsx b/client/my-sites/themes/multi-site.jsx index 05cb3049873a4f..bc8e5f59383446 100644 --- a/client/my-sites/themes/multi-site.jsx +++ b/client/my-sites/themes/multi-site.jsx @@ -15,7 +15,7 @@ const MultiSiteThemeShowcase = connectOptions( ( props ) => (
- + diff --git a/client/my-sites/themes/themes-site-selector-modal.jsx b/client/my-sites/themes/themes-site-selector-modal.jsx index ff5f4c68931481..92d75833ba68cc 100644 --- a/client/my-sites/themes/themes-site-selector-modal.jsx +++ b/client/my-sites/themes/themes-site-selector-modal.jsx @@ -30,7 +30,7 @@ const ThemesSiteSelectorModal = React.createClass( { defaultOption: OPTION_SHAPE, secondaryOption: OPTION_SHAPE, // Will be prepended to site slug for a redirect on selection - sourcePath: PropTypes.string.isRequired, + pathName: PropTypes.string.isRequired, }, getInitialState() { @@ -43,9 +43,15 @@ const ThemesSiteSelectorModal = React.createClass( { trackAndCallAction( site ) { const action = this.state.selectedOption.action; const themeId = this.state.selectedThemeId; + const { search } = this.props; + + let redirectTarget = this.props.pathName + '/' + site.slug; + if ( search ) { + redirectTarget += '?s=' + search; + } trackClick( 'site selector', this.props.name ); - page( this.props.sourcePath + '/' + site.slug ); + page( redirectTarget ); /** * Since this implies a route change, defer it in case other state