コード例 #1
0
    public static function setup_notice()
    {
        global $hook_suffix;
        $roost_page = 'toplevel_page_roost-web-push';
        $roost_settings = self::roost_settings();
        $app_key = $roost_settings['appKey'];
        if (false === self::roost_active() && $hook_suffix !== $roost_page) {
            ?>
		<div class="updated" id="roost-setup-notice">
            <div id="roost-notice-logo">
                <img src="<?php 
            echo ROOST_URL . 'layout/images/roost_logo.png';
            ?>
" />
            </div>
            <div id="roost-notice-text">
                <p>
                    Thanks for installing the Roost plugin! You’re almost finished with<br />setup, all you need to do is create an account and login.
                </p>
            </div>
            <div id="roost-notice-target">
                <a href="<?php 
            echo admin_url('admin.php?page=roost-web-push');
            ?>
" id="roost-notice-CTA" >
                    <span id="roost-notice-CTA-highlight"></span>
                    Finish Setup
                </a>
            </div>
		</div>
    <?php 
        } else {
            if (!$app_key && $hook_suffix === $roost_page) {
                $api_check = Roost_API::api_check();
                if (is_wp_error($api_check)) {
                    ?>
        <div class="error" id="roost-api-error">There was a problem accessing the <strong>Roost API</strong>. You may not be able to log in. Contact Roost support at <a href="mailto:support@goroost.com" target="_blank">support@goroost.com</a> for more information.</div>
    <?php 
                }
            }
        }
    }