コード例 #1
0
    public static function render_stream_page()
    {
        $page_title = __('Stream Records', 'stream');
        self::$list_table->prepare_items();
        echo '<div class="wrap">';
        if (is_network_admin()) {
            $sites_connected = count(WP_Stream_Network::get_instance()->connected_sites);
            $site_count = '';
            if ($sites_connected > 0) {
                $site_count = sprintf(_n(' (1 site)', ' (%d sites)', $sites_connected, 'stream'), $sites_connected);
            }
            printf('<h2>%s%s</h2>', __('Stream Records', 'stream'), $site_count);
            // xss ok
        } else {
            printf('<h2>%s</h2>', __('Stream Records', 'stream'));
            // xss ok
        }
        if (is_network_admin() && !$sites_connected && !WP_Stream::is_development_mode()) {
            wp_enqueue_style('wp-stream-connect', WP_STREAM_URL . 'ui/css/connect.css', array(), WP_Stream::VERSION);
            ?>
			<div id="stream-message" class="updated stream-network-connect stream-connect" style="display:block !important;">
				<div class="stream-message-container">
					<div class="stream-message-text">
							<h4><?php 
            _e('Get started with Stream for Multisite!', 'stream');
            ?>
</h4>
							<p><?php 
            _e('Welcome to your Network Stream! Each site on your network must be connected individually by an admin on that site for it to show here.', 'stream');
            ?>
</p>
					</div>
				</div>
			</div>
			<?php 
        } elseif (is_network_admin()) {
            // TO DO: Add support for a network wide API Key. Until then, show this notice.
            ?>
			<div id="stream-message" class="error stream-network-connect stream-connect" style="display:block !important;">
				<div class="stream-message-container">
					<div class="stream-message-text">
							<h4><?php 
            _e('Stream for Multisite is coming soon!', 'stream');
            ?>
</h4>
							<p><?php 
            _e('Access to all the Stream feeds in your network is currently disabled.', 'stream');
            ?>
</p>
					</div>
				</div>
			</div>
			<?php 
        } else {
            self::$list_table->display();
        }
        echo '</div>';
    }
コード例 #2
0
 public static function render_stream_page()
 {
     $page_title = __('Stream Records', 'stream');
     self::$list_table->prepare_items();
     echo '<div class="wrap">';
     printf('<h2>%s</h2>', __('Stream Records', 'stream'));
     // xss ok
     self::$list_table->display();
     echo '</div>';
 }
コード例 #3
0
ファイル: admin.php プロジェクト: xwp/stream-legacy
 public static function stream_page()
 {
     $page_title = __('Stream Records', 'stream');
     echo '<div class="wrap">';
     if (is_network_admin()) {
         $site_count = sprintf(_n('1 site', '%d sites', get_blog_count(), 'stream'), get_blog_count());
         printf('<h2>%s (%s)</h2>', __('Stream Records', 'stream'), $site_count);
         // xss ok
     } else {
         printf('<h2>%s</h2>', __('Stream Records', 'stream'));
         // xss ok
     }
     self::$list_table->prepare_items();
     self::$list_table->display();
     echo '</div>';
 }