HEX
Server: Apache
System: Linux dinesh8149 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: usesambura1 (1212012)
PHP: 7.0.33
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: /home/storage/c/63/6c/usesambura1/public_html/yr/wp-content/themes/oceanwp/inc/third/class-pwa.php
<?php
/**
 * PWA support for Theme
 *
 * @package OceanWP WordPress theme
 *
 * @author Amit Singh (apprimit@gmail.com)
 * @since 1.8.8
 */

// Start and run class.
if ( ! class_exists( 'OceanWP_PWA' ) ) {

	/**
	 * OceanWP AMP Setup
	 */
	class OceanWP_PWA {

		/**
		 * Main Class Constructor
		 */
		public function __construct() {

			if ( ! $this->oceanwp_is_pwa() ) {
				return;
			}

			add_action( 'ocean_do_offline', array( $this, 'offline_default_template' ) );
			add_action( 'oceanwp_do_server_error', array( $this, 'server_error_default_template' ) );

		}

		/**
		 * Check if plugin exist or not.
		 */
		private function oceanwp_is_pwa() {
			return defined( 'PWA_VERSION' ) && function_exists( 'wp_service_worker_error_details_template' ) && function_exists( 'pwa_get_header' ) && function_exists( 'wp_service_worker_error_message_placeholder' ) && function_exists( 'pwa_get_footer' );
		}

		/**
		 *  Offline default template.
		 */
		public function offline_default_template() {
			?>
			<main>
				<h1><?php esc_html_e( 'Oops! It looks like you&#8217;re offline. Please check the network connection.', 'oceanwp' ); ?></h1>
				<?php wp_service_worker_error_message_placeholder(); ?>
			</main>
			<?php
		}

		/**
		 * Server error template.
		 */
		public function server_error_default_template() {

			?>
			<main>
				<h1><?php esc_html_e( 'Oops! Something went wrong. Please try again.', 'oceanwp' ); ?></h1>
				<?php wp_service_worker_error_message_placeholder(); ?>
				<?php wp_service_worker_error_details_template(); ?>
			</main>
			<?php
		}

	}

}
return new OceanWP_PWA();