public static function bbPress_active() { $roost_settings = Roost::roost_settings(); $bbPress = array('present' => false, 'enabled' => $roost_settings['bbPress']); if (class_exists('bbPress')) { $bbPress['present'] = true; } return $bbPress; }
public static function init() { if (is_null(self::$roost)) { self::$roost = new self(); self::add_actions(); $roost_settings = self::roost_settings(); if (empty($roost_settings) || self::$roost_version !== $roost_settings['version']) { self::install($roost_settings); } } return self::$roost; }
public static function send_notification($alert, $url, $image_url, $app_key, $app_secret, $device_tokens) { $alert = Roost::filter_string($alert); $remote_content = array('alert' => $alert); if (null === $remote_content['alert']) { $remote_content['alert'] = ''; } if ($url) { $remote_content['url'] = $url; } if ($image_url) { $remote_content['imageURL'] = $image_url; } if ($device_tokens) { $remote_content['device_tokens'] = $device_tokens; } $remote_data = array('method' => 'POST', 'remoteAction' => 'push', 'appkey' => $app_key, 'appsecret' => $app_secret, 'remoteContent' => json_encode($remote_content)); $response = self::decode_data($remote_data); return $response; }
<?php /** * Plugin Name: Roost Web Push * Plugin URI: https://goroost.com/ * Description: Drive traffic to your website with Roost Notifications -- which includes Chrome and Safari. * Version: 1.0.0 * Author: Roost * Author URI: https://goroost.com * License: GPLv2 or later */ if (!defined('ABSPATH')) { exit; } if (!defined('ROOST_URL')) { define('ROOST_URL', plugins_url('', __FILE__)); } require_once plugin_dir_path(__FILE__) . 'includes/class-roost-core.php'; require_once plugin_dir_path(__FILE__) . 'includes/class-roost-api.php'; Roost::init();
<span class="roost-left-link"><a href="https://go.goroost.com/login?forgot=true" target="_blank">forget password?</a></span> </div> <div id="roost-sso"> <div id="roost-sso-text"> Or sign in with </div> <div class="roost-sso-option"> <a href="<?php echo( Roost::login_url( 'FACEBOOK' ) ); ?>" class="roost-sso-link"> <span id="roost-sso-facebook" class="roost-plugin-image">Facebook</span> </a> </div> <div class="roost-sso-option"> <a href="<?php echo( Roost::login_url( 'TWITTER' ) ); ?>" class="roost-sso-link"><span id="roost-sso-twitter" class="roost-plugin-image">Twitter</span></a> </div> <div class="roost-sso-option"> <a href="<?php echo( Roost::login_url( 'GOOGLE' ) ); ?>" class="roost-sso-link"><span id="roost-sso-google" class="roost-plugin-image">Google</span></a> </div> </div> </div> </div> </form> <?php } ?> <!--END USER LOGIN SECTION--> <!--BEGIN ALL TIME STATS SECTION--> <?php if ( $roost_active_key ) { ?> <div id="roost-activity" class="roost-admin-section"> <div id="roost-all-stats"> <div class="roost-no-collapse"> <div class="roostStats"> <div class="roost-stats-metric">
<a href="<?php echo Roost::login_url('FACEBOOK'); ?> " class="roost-sso-link"> <span id="roost-sso-facebook" class="roost-plugin-image">Facebook</span> </a> </div> <div class="roost-sso-option"> <a href="<?php echo Roost::login_url('TWITTER'); ?> " class="roost-sso-link"><span id="roost-sso-twitter" class="roost-plugin-image">Twitter</span></a> </div> <div class="roost-sso-option"> <a href="<?php echo Roost::login_url('GOOGLE'); ?> " class="roost-sso-link"><span id="roost-sso-google" class="roost-plugin-image">Google</span></a> </div> </div> </div> </div> </form> <?php } ?> <!--END USER LOGIN SECTION--> <!--BEGIN ALL TIME STATS SECTION--> <?php if ($roost_active_key) {
</div> </div> <?php } ?> <div id="roost-signin-wrapper" class="roost-login-account"> <div id="roost-primary-logo"> <img src="<?php echo esc_url(ROOST_URL . 'layout/images/roost_logo.png'); ?> " alt="" /> </div> <div class="roost-primary-heading"> <span class="roost-primary-cta">Welcome! Log in to your Roost account below.</span> <span class="roost-secondary-cta">If you don’t have a Roost account <a href="<?php echo esc_url(Roost::registration_url()); ?> " class="roost-signin-link">sign up now!</a></span> </div> <div class="roost-section-content"> <!--USER NAME--> <div class="roost-login-input"> <span class="roost-label">Email:</span> <input name="roostuserlogin" type="text" class="roost-control-login" value="<?php echo isset($_POST['roostuserlogin']) ? esc_attr($_POST['roostuserlogin']) : ''; ?> " size="50" tabindex="1" /> </div> <div class="roost-login-input"> <!--PASSWORD--> <span class="roost-label">Password:</span>