Skip to content

Commit 11a57c0

Browse files
Show staging url once staging created
1 parent dcb91fe commit 11a57c0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

includes/class-STL_Settings.php

+7
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,13 @@ public function sanitize( array $input ): array {
268268
return $new_input;
269269
}
270270

271+
public static function get_staging_domain(): string {
272+
$options_general = get_option( 'staging2live_settings' );
273+
$staging_name = empty( $options_general[ 'staging_name' ] ) ? STL_STAGING_NAME_DEFAULT : $this->options_general[ 'staging_name' ];
274+
275+
return trailingslashit( STL_General::get_site_url() ) . trailingslashit( $staging_name );
276+
}
277+
271278
/**
272279
* WP ajax request for creating staging site
273280
*/

includes/class-stl-admin.php

+2
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ public function render_admin_page() {
117117
return;
118118
}
119119

120+
$staging_domain = STL_Settings::get_staging_domain();
120121
$file_comparer = STL_File_Comparer::get_instance();
121122
$db_comparer = STL_DB_Comparer::get_instance();
122123

@@ -127,6 +128,7 @@ public function render_admin_page() {
127128
<div class="wrap">
128129
<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
129130

131+
Staging site: <a target="_blank" href="<?php echo $staging_domain; ?>"><?php echo $staging_domain; ?></a>
130132
<div class="stl-tabs">
131133
<ul class="stl-tabs-nav">
132134
<li><a href="#stl-tab-files"><?php esc_html_e( 'File Changes', 'staging2live' ); ?></a></li>

0 commit comments

Comments
 (0)