File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed
plugins/hwp-previews/src/Integration Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -198,22 +198,22 @@ public function is_faust_rewrites_enabled(): bool {
198
198
* @param string $url The URL to be rewritten.
199
199
*/
200
200
public function replace_faust_preview_rewrite ($ url ): string {
201
- if ( function_exists ( '\WPE\FaustWP\Settings\faustwp_get_setting ' ) ) {
202
- $ frontend_uri = \WPE \FaustWP \Settings \faustwp_get_setting ( 'frontend_uri ' );
201
+ if ( ! function_exists ( '\WPE\FaustWP\Settings\faustwp_get_setting ' ) ) {
202
+ return $ url ;
203
+ }
203
204
204
- // Return the URL as is if frontend uri is empty.
205
- if ( ! $ frontend_uri ) {
206
- return $ url ;
207
- }
205
+ $ frontend_uri = \WPE \FaustWP \Settings \faustwp_get_setting ( 'frontend_uri ' );
208
206
209
- $ frontend_uri = trailingslashit ( $ frontend_uri );
210
- $ home_url = trailingslashit ( get_home_url () );
207
+ // Return the URL as is if frontend uri is empty.
208
+ if ( ! $ frontend_uri ) {
209
+ return $ url ;
210
+ }
211
211
212
+ $ frontend_uri = trailingslashit ( $ frontend_uri );
213
+ $ home_url = trailingslashit ( get_home_url () );
212
214
213
- return str_replace ( $ frontend_uri , $ home_url , $ url );
214
- }
215
215
216
- return $ url ;
216
+ return str_replace ( $ frontend_uri , $ home_url , $ url ) ;
217
217
}
218
218
219
219
/**
You can’t perform that action at this time.
0 commit comments