get_jp_emblem() public static method

Return string containing the Jetpack logo.
Since: 3.9.0
public static get_jp_emblem ( ) : string
return string
コード例 #1
0
ファイル: class.jetpack.php プロジェクト: automattic/jetpack
 function jetpack_show_user_connected_icon($val, $col, $user_id)
 {
     if ('user_jetpack' == $col && Jetpack::is_user_connected($user_id)) {
         $emblem_html = sprintf('<a title="%1$s" class="jp-emblem-user-admin">%2$s</a>', esc_attr__('This user is linked and ready to fly with Jetpack.', 'jetpack'), Jetpack::get_jp_emblem());
         return $emblem_html;
     }
     return $val;
 }
コード例 #2
0
 function get_emblem()
 {
     return '<div class="jp-emblem">' . Jetpack::get_jp_emblem() . '</div>';
 }
コード例 #3
0
    /**
     * Display message in editor prompting user to enable stats.
     *
     * @since 3.9.0
     */
    function stats_msg()
    {
        $stats_active = Jetpack::is_module_active('stats');
        $normalized_site_url = Jetpack::build_raw_urls(get_home_url());
        ?>
		<div class="jp-jitm">
			<a href="#" data-module="stats" class="dismiss"><span class="genericon genericon-close"></span></a>

			<div class="jp-emblem">
				<?php 
        echo Jetpack::get_jp_emblem();
        ?>
			</div>
			<p class="msg">
				<?php 
        esc_html_e('Track detailed stats on this post and the rest of your site.', 'jetpack');
        ?>
			</p>
			<?php 
        if (!$stats_active) {
            ?>
				<p>
					<img class="j-spinner hide" src="<?php 
            echo esc_url(includes_url('images/spinner-2x.gif'));
            ?>
" alt="<?php 
            echo esc_attr__('Loading...', 'jetpack');
            ?>
" /><a href="#" data-module="stats" data-module-success="<?php 
            esc_attr_e('Success! Jetpack Stats is now activated.', 'jetpack');
            ?>
" class="activate button"><?php 
            esc_html_e('Enable Jetpack Stats', 'jetpack');
            ?>
</a>
				</p>
			<?php 
        }
        // stats inactive
        ?>
			<p class="show-after-enable <?php 
        echo $stats_active ? '' : 'hide';
        ?>
">
				<a href="<?php 
        echo esc_url('https://wordpress.com/stats/insights/' . $normalized_site_url);
        ?>
" target="_blank" title="<?php 
        esc_attr_e('Go to WordPress.com', 'jetpack');
        ?>
" data-module="stats" class="button button-jetpack launch show-after-enable"><?php 
        esc_html_e('Go to WordPress.com', 'jetpack');
        ?>
</a>
			</p>
		</div>
		<?php 
        //jitm is being viewed, track it
        $jetpack = Jetpack::init();
        $jetpack->stat('jitm', 'post-stats-viewed-' . JETPACK__VERSION);
        $jetpack->do_stats('server_side');
    }
コード例 #4
0
    function render_notice_header()
    {
        ?>
		<div class="jp-idc-notice__header">
			<div class="jp-idc-notice__header__emblem">
				<?php 
        echo Jetpack::get_jp_emblem();
        ?>
			</div>
			<p class="jp-idc-notice__header__text">
				<?php 
        esc_html_e('Jetpack Safe Mode', 'jetpack');
        ?>
			</p>
		</div>

		<div class="jp-idc-notice__separator"></div>
	<?php 
    }