Changeset 2015231
- Timestamp:
- 01/19/2019 08:29:26 AM (7 years ago)
- Location:
- recobox/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (1 diff)
-
admin/class-rcb-comments-admin.php (modified) (1 diff)
-
public/partials/rcb-comment-template.php (modified) (4 diffs)
-
rcb-comments.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
recobox/trunk/README.txt
r2015214 r2015231 5 5 Requires at least: 3.0 6 6 Tested up to: 4.9.5 7 Stable tag: 1.0. 37 Stable tag: 1.0.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
recobox/trunk/admin/class-rcb-comments-admin.php
r2015211 r2015231 566 566 function comments_number_post($comment_text) { 567 567 global $post; 568 return '<span class="rcb-span-container" id="rcb-counter-' . htmlspecialchars($post->ID) . '">' . $comment_text . '</span>'; 568 $host = $_SERVER['HTTP_HOST']; 569 $host = str_replace('www.', '', $host); 570 $hosts = explode('.', $host); 571 if(count($hosts) > 2) { 572 $prefix = []; 573 for($i = 0; $i < (count($hosts) - 2); $i++) { 574 $prefix[] = $hosts[$i]; 575 } 576 $postId = implode('_', $prefix) . '_' . $post->ID; 577 } else { 578 $postId = $post->ID; 579 } 580 return '<span class="rcb-span-container" id="rcb-counter-' . htmlspecialchars($postId) . '">' . $comment_text . '</span>'; 569 581 } 570 582 } -
recobox/trunk/public/partials/rcb-comment-template.php
r2014437 r2015231 21 21 $sync = $settings['sync']; 22 22 } 23 do_action('comment_form_before'); 24 25 if(comments_open()) { 23 26 ?> 24 27 <div class="entry"> … … 39 42 </div> 40 43 </div> 44 <?php do_action('comment_form_after'); ?> 41 45 42 46 <script type="text/javascript"> 47 <?php 48 $host = $_SERVER['HTTP_HOST']; 49 $host = str_replace('www.', '', $host); 50 $hosts = explode('.', $host); 51 if(count($hosts) > 2) { 52 $prefix = []; 53 for($i = 0; $i < (count($hosts) - 2); $i++) { 54 $prefix[] = $hosts[$i]; 55 } 56 $postId = implode('_', $prefix) . '_' . $post->ID; 57 } else { 58 $postId = $post->ID; 59 } 60 ?> 43 61 (function () { 44 62 RCB = window.RCB || []; … … 46 64 widget: "Comments", 47 65 id: <?php echo $settings['widget_id'] ?>, 48 cname: <?php echo $post->ID ?>,66 cname: '<?php echo $postId ?>', 49 67 count_container: '#rcb-counter-<?php echo $post->ID ?>' 50 68 }; 51 <?php52 if(!comments_open()) {53 echo 'data.channel_close = true;';54 }55 ?>56 69 <?php 57 70 if ($sso && strlen($api_key) > 0) { … … 86 99 </script> 87 100 <?php 101 } 88 102 } 89 103 -
recobox/trunk/rcb-comments.php
r2015214 r2015231 3 3 /** 4 4 * @link https://recobox.ru 5 * @since 1.0. 35 * @since 1.0.4 6 6 * @package Rcb_Comments 7 7 * … … 10 10 * Plugin URI: https://recobox.ru 11 11 * Description: Система комментирования с различными вариантами социальной аутентификации(ВКонтакте, Одноклассники, FaceBook, Google+ и т.д.). 12 * Version: 1.0. 312 * Version: 1.0.4 13 13 * Author: Recobox 14 14 * Author URI: https://profiles.wordpress.org/deller21 … … 29 29 * Rename this for your plugin and update it as you release new versions. 30 30 */ 31 define( 'RCB_COMMENTS_VERSION', '1.0. 3' );31 define( 'RCB_COMMENTS_VERSION', '1.0.4' ); 32 32 33 33 /** … … 65 65 * not affect the page life cycle. 66 66 * 67 * @since 1.0. 367 * @since 1.0.4 68 68 */ 69 69 function rcb_comments_run() {
Note: See TracChangeset
for help on using the changeset viewer.