Skip to content

Commit

Permalink
Improved the name of the function that determines if the Web Preview …
Browse files Browse the repository at this point in the history
…is enabled or not¡ (#99783)
  • Loading branch information
rcrdortiz authored Feb 14, 2025
1 parent a8306d2 commit f88273f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/my-sites/theme/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class ThemeSheet extends Component {
} );

// The embed live demo works only for WP.com themes
if ( this.isWpcomOnlyTheme() ) {
if ( this.isWebPreviewAvailable() ) {
const { preview } = this.props.options;
this.onBeforeOptionAction();
return preview.action( this.props.themeId );
Expand Down Expand Up @@ -423,7 +423,7 @@ class ThemeSheet extends Component {
);
}

isWpcomOnlyTheme() {
isWebPreviewAvailable() {
return (
this.props.isWpcomTheme &&
! this.props.isExternallyManagedTheme &&
Expand Down Expand Up @@ -1302,7 +1302,7 @@ class ThemeSheet extends Component {
</div>
{ ! isRemoved && (
<div className="theme__sheet-column-right">
{ this.isWpcomOnlyTheme() ? this.renderWebPreview() : this.renderScreenshot() }
{ this.isWebPreviewAvailable() ? this.renderWebPreview() : this.renderScreenshot() }
</div>
) }
</div>
Expand Down

0 comments on commit f88273f

Please sign in to comment.