Beispiel #1
0
    public static function list_history_post_be_rate($history)
    {
        if ($history['type'] !== 'post-be-rate') {
            return false;
        }
        ?>
		<li class="list-group-item">
			<?php 
        theme_custom_point::the_list_icon('thumbs-up');
        ?>
			<?php 
        theme_custom_point::the_point_sign($history['points']);
        ?>
			
			<span class="history-text">
				<?php 
        $post = theme_cache::get_post($history['post-id']);
        if (!$post) {
            echo ___('The post has been deleted.');
        } else {
            echo sprintf(___('You post %1$s has been rated %2$d %3$s by %4$s.'), '<a href="' . theme_cache::get_permalink($history['post-id']) . '">' . theme_cache::get_the_title($history['post-id']) . '</a>', abs($history['points']), theme_custom_point::get_point_name(), esc_html(get_author_meta('display_name', $history['rater-id'])));
        }
        ?>
			</span>
			
			<?php 
        theme_custom_point::the_time($history);
        ?>
		</li>
		<?php 
    }
Beispiel #2
0
    public static function list_history_for_target($history)
    {
        if ($history['type'] !== 'be-bomb') {
            return false;
        }
        $attacker_name = theme_cache::get_the_author_meta('display_name', $history['attacker-id']);
        $attacker_name = '<a href="' . theme_cache::get_author_posts_url($history['attacker-id']) . '" target="_blank"><img src="' . theme_cache::get_avatar_url($history['attacker-id']) . '" alt="' . $attacker_name . '" width="16" height="16" class="avatar"> ' . $attacker_name . '</a>';
        if (class_exists('number_user_nicename')) {
            $fight_back_url = self::get_tabs('bomb', $history['attacker-id'] + number_user_nicename::$prefix_number)['url'];
        } else {
            $fight_back_url = self::get_tabs('bomb', $history['attacker-id'])['url'];
        }
        $says = isset($history['says']) && trim($history['says']) !== '' ? esc_html($history['says']) : false;
        ?>
		<li class="list-group-item">
			
			<?php 
        theme_custom_point::the_list_icon('bomb');
        ?>
			<?php 
        theme_custom_point::the_point_sign($history['points']);
        ?>
			
			<span class="history-text">
				<?php 
        if ($says) {
            ?>
					<span class="label label-primary says"><?php 
            echo $says;
            ?>
</span>
					<?php 
        }
        if ($history['hit']) {
            echo sprintf(___('%1$s bombed you and hit. You lost %2$s %3$s.'), $attacker_name, '<strong>' . (0 - abs($history['points'])) . '</strong>', theme_custom_point::get_point_name());
            ?>
					<a class="label label-danger" href="<?php 
            echo $fight_back_url;
            ?>
" target="_blank" >
						<?php 
            echo ___('It is time to fight back');
            ?>
					</a>
					<?php 
        } else {
            echo sprintf(___('%1$s bombed you but miss. You got %2$s %3$s.'), $attacker_name, '<strong>+' . abs($history['points']) . '</strong>', theme_custom_point::get_point_name());
        }
        ?>
			</span>
			
			<?php 
        theme_custom_point::the_time($history);
        ?>
		</li>
		<?php 
    }
    public static function list_history($meta)
    {
        if ($meta['type'] !== self::$type_key) {
            return;
        }
        global $post;
        $post = theme_cache::get_post($meta['post-id']);
        setup_postdata($post);
        ?>
		<li class="list-group-item">
			<?php 
        theme_custom_point::the_list_icon('eye');
        ?>
			<?php 
        theme_custom_point::the_point_sign($meta['points']);
        ?>
			<span class="history-text">
				<?php 
        echo sprintf(___('Your post %1$s reached per hundred views, %2$s %3$s. Views are %4$s.'), '<a href="' . theme_cache::get_permalink($post->ID) . '" target="_blank">' . theme_cache::get_the_title($post->ID) . ' <i class="fa fa-external-link"></i></a>', '<strong>+' . $meta['points'] . '</strong>', theme_custom_point::get_point_name(), '<strong>' . $meta['views'] . '</strong>');
        ?>
			</span>
			
			<?php 
        theme_custom_point::the_time($meta);
        ?>
		</li>
		<?php 
        wp_reset_postdata();
    }
    public static function list_history_save_avatar($history)
    {
        if ($history['type'] !== 'save-avatar') {
            return false;
        }
        ?>
		<li class="list-group-item">
			<?php 
        theme_custom_point::the_list_icon('github-alt');
        ?>
			<?php 
        theme_custom_point::the_point_sign(0 - abs(theme_custom_point::get_point_value('save-avatar')));
        ?>
			
			<span class="history-text">
				<?php 
        echo ___('You modified your avatar.');
        ?>
			</span>
			
			<?php 
        theme_custom_point::the_time($history);
        ?>
		</li>
		<?php 
    }
Beispiel #5
0
    public static function list_history_signin_daily($history)
    {
        if ($history['type'] !== 'signin-daily') {
            return false;
        }
        ?>
		<li class="list-group-item">
			<?php 
        theme_custom_point::the_list_icon('user');
        ?>
			<?php 
        self::the_point_sign(self::get_point_value('signin-daily'));
        ?>
			
			<span class="history-text">
				<?php 
        echo ___('Log-in daily reward.');
        ?>
			</span>
			
			<?php 
        self::the_time($history);
        ?>
		</li>
		<?php 
    }