Skip to content

Commit

Permalink
Fixes admin bar site status html content
Browse files Browse the repository at this point in the history
  • Loading branch information
wpalani committed Jan 12, 2024
1 parent 98f13af commit 3e2eca9
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions includes/ComingSoon.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,12 @@ public function newfold_site_status( \WP_Admin_Bar $admin_bar ) {
if ( current_user_can( 'manage_options' ) ) {

$is_coming_soon = 'true' === get_option( 'nfd_coming_soon', 'false' );
$current_state = $is_coming_soon ? 'true' : 'false';
$current_state = $is_coming_soon ? true : false;
$content = '<div id="nfd-site-status" data-coming-soon="'.$current_state.'">';
$content .= $this->args['admin_bar_label'];
$content .= '<span id="nfd-site-status-coming-soon" class="nfd-coming-soon-active">';
$content .= $this->args['admin_bar_cs_active'];
$content .= '</span>';
$content .= '<span id="nfd-site-status-live" class="nfd-coming-soon-inactive">';
$content .= $this->args['admin_bar_cs_inactive'];
$content .= '</span>';
$content .= $current_state
? '<span id="nfd-site-status-text" style="color:#E01C1C;">' . $this->args['admin_bar_cs_active'] . '</span>'
: '<span id="nfd-site-status-text" style="color:#048200;">' . $this->args['admin_bar_cs_inactive'] . '</span>';
$content .= '</div>';

$site_status_menu = array(
Expand Down

0 comments on commit 3e2eca9

Please sign in to comment.