Commit 6cc7015e authored by Vadim's avatar Vadim

Version 2.7.5

* Форматирование виджетов
parent 8cece857
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Plugin Name: Bg Az-Counter Plugin Name: Bg Az-Counter
Plugin URI: https://bogaiskov.ru Plugin URI: https://bogaiskov.ru
Description: Подсчет количества посещений страниц на базе stat.azbyka.ru Description: Подсчет количества посещений страниц на базе stat.azbyka.ru
Version: 2.7.4 Version: 2.7.5
Author: VBog Author: VBog
Author URI: https://bogaiskov.ru Author URI: https://bogaiskov.ru
License: GPL2 License: GPL2
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
if ( !defined('ABSPATH') ) { if ( !defined('ABSPATH') ) {
die( 'Sorry, you are not allowed to access this page directly.' ); die( 'Sorry, you are not allowed to access this page directly.' );
} }
define('BG_COUNTER_VERSION', '2.7.4'); define('BG_COUNTER_VERSION', '2.7.5');
define('BG_COUNTER_LOG', dirname(__FILE__ ).'/bg_counter.log'); define('BG_COUNTER_LOG', dirname(__FILE__ ).'/bg_counter.log');
define('BG_COUNTER_STAT_COUNTERS','https://stat.azbyka.ru/counters'); define('BG_COUNTER_STAT_COUNTERS','https://stat.azbyka.ru/counters');
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
} }
.widget-item li .bg-az-count, .widget-item li .bg-az-count,
.widget-item p .bg-az-counter-now, .widget-item p .bg-az-counter-now,
.widget-item p .bg-az-counter-unit,
.widget-item p .bg-az-counter-views, .widget-item p .bg-az-counter-views,
.widget-item p .bg-az-counter-posts { .widget-item p .bg-az-counter-posts {
color: #999; color: #999;
...@@ -42,6 +43,31 @@ i.fa-star-o:before { ...@@ -42,6 +43,31 @@ i.fa-star-o:before {
margin-left: 1em; margin-left: 1em;
} }
.widget-item .bg-az-counter,
.widget-item .bg-az-top-posts {
display: table;
width: 100%;
max-width: 35em;
margin: 0 auto;
}
.widget-item .bg-az-counter p,
.widget-item .bg-az-top-posts li {
display: table-row;
}
.widget-item .bg-az-counter p>span,
.widget-item li>a,
.widget-item li>span {
display: table-cell;
text-align: right;
}
.widget-item .bg-az-counter p>span.bg-az-counter-title,
.widget-item li>a {
width: 100%;
padding: 0 3px 5px 3px;
text-align: left;
}
/* Рейтинг */ /* Рейтинг */
.bg_counter_rating { .bg_counter_rating {
position: relative; position: relative;
......
...@@ -63,7 +63,7 @@ function getPopularPosts ($limit, $offset=0, $number=false) { ...@@ -63,7 +63,7 @@ function getPopularPosts ($limit, $offset=0, $number=false) {
if (!$post) continue; if (!$post) continue;
$title = $post->post_title; $title = $post->post_title;
$link = '<a href="'. get_permalink($post).'" title="'.$title.'" data-ID="'.$p->id.'" data-type="'.$p->type.'" data-value="'.$p->value.'" data-status="'.$post->post_status.'">'.$title.'</a>'; $link = '<a href="'. get_permalink($post).'" title="'.$title.'" data-ID="'.$p->id.'" data-type="'.$p->type.'" data-value="'.$p->value.'" data-status="'.$post->post_status.'">'.$title.'</a>';
$quote .= '<li>'.$link.' - <span class="bg-az-count">'.bg_counter_number_format($p->value).'</span></li>'. PHP_EOL; $quote .= '<li>'.$link.' <span class="bg-az-count">'.bg_counter_number_format($p->value).'</span></li>'. PHP_EOL;
} }
if ($number) $quote .= '</ol>'. PHP_EOL; if ($number) $quote .= '</ol>'. PHP_EOL;
else $quote .= '</ul>'. PHP_EOL; else $quote .= '</ul>'. PHP_EOL;
......
...@@ -108,10 +108,9 @@ class bg_counter_OnlineNowWidget extends WP_Widget { ...@@ -108,10 +108,9 @@ class bg_counter_OnlineNowWidget extends WP_Widget {
<div class="widget-item"> <div class="widget-item">
<div class="widget-inner"> <div class="widget-inner">
<span class="bg-az-counter"> <span class="bg-az-counter">
<p><?php echo $subtitle1; ?>: <span class="bg-az-counter-now"></span> <?php echo $unit1; ?></p> <p><span class="bg-az-counter-title"><?php echo $subtitle1; ?></span> <span><span class="bg-az-counter-now"></span>&nbsp;<span class="bg-az-counter-unit"><?php echo $unit1; ?></span></span></p>
<p><?php echo $subtitle2; ?>: <span class="bg-az-counter-views"></span></p> <p><span class="bg-az-counter-title"><?php echo $subtitle2; ?></span> <span class="bg-az-counter-views"></span></p>
<p><?php echo $subtitle3; ?>: <span class="bg-az-counter-posts"><?php echo $post_types_count; ?></span></p> <p><span class="bg-az-counter-title"><?php echo $subtitle3; ?></span> <span class="bg-az-counter-posts"><?php echo $post_types_count; ?></span></p>
</span> </span>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment