HEX
Server: Apache
System: Linux server1.ariadata.co 4.18.0-553.120.1.el8_10.x86_64 #1 SMP Mon Apr 20 18:04:27 EDT 2026 x86_64
User: nepi (1051)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,show_source,popen,proc_open
Upload Files
File: /home/nepi/pish.nepi.ir/wp-content/plugins/ohio-extra/helpers/coming_soon.php
<?php

add_filter( 'template_include', 'ohio_coming_soon_page_template', 99 );

function ohio_coming_soon_page_template( $template ) {
    if ( method_exists( 'OhioSettings', 'is_coming_soon_page' ) && OhioSettings::is_coming_soon_page() ) {
        wp_register_script( 'jquery-countdown', get_template_directory_uri() . '/assets/js/libs/jquery.countdown.min.js', [ 'jquery' ], '1.0.0', true );
        wp_enqueue_script( 'jquery-countdown' );
        $template = get_template_directory() . '/coming-soon.php';
    }

    return $template;
}

/*
Old way

add_action( 'init', function() {
    if ( method_exists( 'OhioSettings', 'is_coming_soon_page' ) && OhioSettings::is_coming_soon_page() ) {
        $charset = get_bloginfo('charset') ? get_bloginfo('charset') : 'UTF-8';

        ob_start();
        header("Content-type: text/html; charset=$charset");
        header("HTTP/1.0 503 Service Unavailable", true, 503);

        wp_register_script( 'jquery-countdown', get_template_directory_uri() . '/assets/js/libs/jquery.countdown.min.js', [ 'jquery' ], '1.0.0', true );
        wp_enqueue_script( 'jquery-countdown' );
        include_once( get_template_directory() . '/coming-soon.php' );

        ob_flush();

        exit;
    }
} );
*/