HEX
Server: Apache/2
System: Linux vps33975.sdns.vn 3.10.0-1160.15.2.el7.x86_64 #1 SMP Wed Feb 3 15:06:38 UTC 2021 x86_64
User: agritom (1060)
PHP: 7.4.33
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/agritom/public_html/wp-content/plugins/breeze/views/option-tabs/heartbeat-tab.php
<?php
/**
 * Basic tab
 */

if ( ! defined( 'ABSPATH' ) ) {
	header( 'Status: 403 Forbidden' );
	header( 'HTTP/1.1 403 Forbidden' );
	exit;
}

set_as_network_screen();

$is_custom = false;
if ( ( ! defined( 'WP_NETWORK_ADMIN' ) || ( defined( 'WP_NETWORK_ADMIN' ) && false === WP_NETWORK_ADMIN ) ) && is_multisite() ) {
	$get_inherit = get_option( 'breeze_inherit_settings', '1' );
	$is_custom   = filter_var( $get_inherit, FILTER_VALIDATE_BOOLEAN );
}


$options = breeze_get_option( 'heartbeat_settings', true );

$icon = BREEZE_PLUGIN_URL . 'assets/images/heartbeat-active.png';
?>
<form data-section="heartbeat">
	<?php if ( true === $is_custom ) { ?>
		<div class="br-overlay-disable"><?php _e( 'Settings are inherited', 'breeze' ); ?></div>
	<?php } ?>
	<section>
		<div class="br-section-title">
			<img src="<?php echo $icon; ?>"/>
			<?php _e( 'HEARTBEAT API', 'breeze' ); ?>
		</div>

		<div class="br-option-group">
			<span class="section-title"><?php _e( 'Heartbeat Control', 'breeze' ); ?></span>
			<!-- START OPTION -->
			<div class="br-option-item br-top">
				<div class="br-label">
					<div class="br-option-text">
						<?php _e( 'Control Heartbeat', 'breeze' ); ?>
					</div>
				</div>
				<div class="br-option">
					<?php
					$basic_value = isset( $options['breeze-control-heartbeat'] ) ? filter_var( $options['breeze-control-heartbeat'], FILTER_VALIDATE_BOOLEAN ) : false;
					$is_enabled  = ( isset( $basic_value ) && true === $basic_value ) ? checked( $options['breeze-control-heartbeat'], '1', false ) : '';
					?>

					<div class="on-off-checkbox">
						<label class="br-switcher">
							<input id="breeze-control-hb" name="breeze-control-hb" type="checkbox" class="br-box" value="1" <?php echo $is_enabled; ?>>
							<div class="br-see-state">
							</div>
						</label><br>
					</div>

					<div class="br-note">
						<p>
							<?php
							_e( 'Can help save some of the server resources when it\'s controlled.', 'breeze' );
							?>
						</p>
					</div>
				</div>
			</div>
			<!-- END OPTION -->

			<?php
			$heartbeat_options = array(
				'default' => __( 'Default', 'breeze' ),
				'120'     => __( 'Every 2 minutes', 'breeze' ),
				'180'     => __( 'Every 3 minutes', 'breeze' ),
				'240'     => __( 'Every 4 minutes', 'breeze' ),
				'300'     => __( 'Every 5 minutes', 'breeze' ),
				'disable' => __( 'Disable', 'breeze' ),
			);

			?>
			<!-- START OPTION -->
			<div class="br-option-item">
				<div class="br-label">
					<div class="br-option-text">
						<?php _e( 'Heartbeat Front-end', 'breeze' ); ?>
					</div>
				</div>
				<div class="br-option">
					<?php
					$select_active = isset( $options['breeze-heartbeat-front'] ) ? $options['breeze-heartbeat-front'] : '';
					?>
					<select name="br-heartbeat-front" id="br-heartbeat-front">
						<?php
						foreach ( $heartbeat_options as $value => $label ) {
							$selected = '';
							if ( $select_active === (string) $value || empty( $select_active ) ) {
								$selected = 'selected';
							}
							echo "<option value='{$value}' {$selected}>{$label}</option>";
						}
						?>
					</select>
					<div class="br-note">
						<p>
							<?php
							_e( 'Change front-end Heartbeat behaviour or disable it completely', 'breeze' );
							?>
						</p>
						<p class="br-important">
							<?php
							echo '<strong>';
							_e( 'Important: ', 'breeze' );
							echo '</strong>';
							_e( 'Disabling Heartbeat may break some functionalities from plugins and themes which are dependent on Heartbeat API.', 'breeze' );
							?>
						</p>
					</div>
				</div>
			</div>
			<!-- END OPTION -->

			<!-- START OPTION -->
			<div class="br-option-item">
				<div class="br-label">
					<div class="br-option-text">
						<?php _e( 'Heartbeat Post Editor', 'breeze' ); ?>
					</div>
				</div>
				<div class="br-option">
					<?php
					$select_active = isset( $options['breeze-heartbeat-postedit'] ) ? $options['breeze-heartbeat-postedit'] : '';
					?>
					<select name="br-heartbeat-postedit" id="br-heartbeat-postedit">
						<?php
						foreach ( $heartbeat_options as $value => $label ) {
							$selected = '';

							if ( $select_active === (string) $value ) {
								$selected = 'selected';
							}
							echo "<option value='{$value}' {$selected}>{$label}</option>";
						}
						?>
					</select>
					<div class="br-note">
						<p>
							<?php
							_e( 'Change Heartbeat behaviour or disable it completely in post edit screen', 'breeze' );
							?>
						</p>
						<p class="br-important">
							<?php
							echo '<strong>';
							_e( 'Important: ', 'breeze' );
							echo '</strong>';
							_e( 'Disabling Heartbeat may break some functionalities from plugins and themes which are dependent on Heartbeat API.', 'breeze' );
							?>
						</p>
					</div>
				</div>
			</div>
			<!-- END OPTION -->

			<!-- START OPTION -->
			<div class="br-option-item">
				<div class="br-label">
					<div class="br-option-text">
						<?php _e( 'Heartbeat Back-end', 'breeze' ); ?>
					</div>
				</div>
				<div class="br-option">
					<?php
					$select_active = isset( $options['breeze-heartbeat-backend'] ) ? $options['breeze-heartbeat-backend'] : '';
					?>
					<select name="br-heartbeat-backend" id="br-heartbeat-backend">
						<?php
						foreach ( $heartbeat_options as $value => $label ) {
							$selected = '';

							if ( $select_active === (string) $value ) {
								$selected = 'selected';
							}
							echo "<option value='{$value}' {$selected}>{$label}</option>";
						}
						?>
					</select>
					<div class="br-note">
						<p>
							<?php
							_e( 'Change Heartbeat behaviour or disable it completely in the admin area', 'breeze' );
							?>
						</p>
						<p class="br-important">
							<?php
							echo '<strong>';
							_e( 'Important: ', 'breeze' );
							echo '</strong>';
							_e( 'Disabling Heartbeat may break some functionalities from plugins and themes which are dependent on Heartbeat API.', 'breeze' );
							?>
						</p>
					</div>
				</div>
			</div>
			<!-- END OPTION -->

		</div><!-- END GROUP -->
	</section>
	<div class="br-submit">
		<input type="submit" value="<?php echo __( 'Save Changes', 'breeze' ); ?>" class="br-submit-save"/>
	</div>
</form>