Plugin Directory

Changeset 2261952


Ignore:
Timestamp:
03/16/2020 05:59:35 PM (6 years ago)
Author:
Shmidtelson
Message:

Add 1.0.3.1 version

Location:
wp-post-rating/trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • wp-post-rating/trunk/README.md

    r1972411 r2261952  
    1212* Wordpress >= 4.9.8
    1313* PHP >= 5.6
     14
     15## Links ##
     16https://wordpress.org/plugins/wp-post-rating/
     17
    1418## License ##
    1519[MIT](https://raw.githubusercontent.com/shmidtelson/wp-post-rating/master/LICENSE)
  • wp-post-rating/trunk/assets/css/wp-post-rating.min.css

    r2189001 r2261952  
    1 @charset "UTF-8";@font-face{font-family:fontello;src:url(../font/fontello.eot?34932983);src:url(../font/fontello.eot?34932983#iefix) format("embedded-opentype"),url(../font/fontello.woff2?34932983) format("woff2"),url(../font/fontello.woff?34932983) format("woff"),url(../font/fontello.ttf?34932983) format("truetype"),url(../font/fontello.svg?34932983#fontello) format("svg");font-weight:400;font-style:normal}[class*=" icon-"]:before,[class^=icon-]:before{font-family:fontello,serif;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.1em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-spin4:before{content:'\e834'}.animate-spin{-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;display:inline-block}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.wpr-hide{display:none!important}.icon-star{line-height:0;display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;color:#fdd835}.icon-star:before{content:'\e800'}.icon-star-filled:before{content:'\e801'}.icon-star:before{position:relative}.wpr-wrapp{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;padding:15px 0}.wpr-wrapp .wpr-rating{overflow:hidden;display:-webkit-box;display:flex;position:relative;max-width:200px;font-size:30px;height:40px;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;flex-direction:row-reverse}.wpr-wrapp .wpr-rating-loader{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.wpr-wrapp .wpr-info-container{display:-webkit-box;display:flex;position:relative;-webkit-box-align:center;align-items:center;background:#fff;border:1px solid #000;margin-left:10px;cursor:pointer;padding:0 5px}.wpr-wrapp .wpr-info-container:hover{background:#f5f5f5}.wpr-wrapp .wpr-info-container:before{content:"";position:absolute;width:8px;height:8px;left:-5px;top:auto;z-index:1;background:#fff;border:1px solid #000;-webkit-transform:rotate(45deg);transform:rotate(45deg);border-top:none;border-right:none}.wpr-wrapp .icon-star.checked:before,.wpr-wrapp .icon-star.checked~.icon-star:before{content:'\e801'}.wpr-wrapp .icon-star:hover{cursor:pointer}.wpr-wrapp .icon-star:hover .icon-star:before{content:'\e801'}.wpr-wrapp .icon-star:hover:before,.wpr-wrapp .icon-star:hover~.icon-star:before{content:'\e801';color:#fbc02d}.wpr_rating_list{display:inline-block}.wpr_rating_list .icon-star{float:left}.wpr_rating_list .icon-star:before{content:'\e801'}
     1@charset "UTF-8";@font-face{font-family:fontello;src:url(../font/fontello.eot?34932983);src:url(../font/fontello.eot?34932983#iefix) format("embedded-opentype"),url(../font/fontello.woff2?34932983) format("woff2"),url(../font/fontello.woff?34932983) format("woff"),url(../font/fontello.ttf?34932983) format("truetype"),url(../font/fontello.svg?34932983#fontello) format("svg");font-weight:400;font-style:normal}[class*=" icon-"]:before,[class^=icon-]:before{font-family:fontello,serif;font-style:normal;font-weight:400;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.1em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.1em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-spin4:before{content:'\e834'}.animate-spin{-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;display:inline-block}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(359deg)}}.wpr-hide{display:none!important}.icon-star{line-height:0;display:flex;align-items:center;color:#fdd835}.icon-star:before{content:'\e800'}.icon-star-filled:before{content:'\e801'}.icon-star:before{position:relative}.wpr-wrapp{display:flex;justify-content:center;padding:15px 0}.wpr-wrapp .wpr-rating{overflow:hidden;display:flex;position:relative;max-width:200px;font-size:30px;height:40px;flex-direction:row-reverse}.wpr-wrapp .wpr-rating-loader{display:flex;align-items:center}.wpr-wrapp .wpr-info-container{display:flex;position:relative;align-items:center;background:#fff;border:1px solid #000;margin-left:10px;cursor:pointer;padding:0 5px}.wpr-wrapp .wpr-info-container:hover{background:#f5f5f5}.wpr-wrapp .wpr-info-container:before{content:"";position:absolute;width:8px;height:8px;left:-5px;top:auto;z-index:1;background:#fff;border:1px solid #000;transform:rotate(45deg);border-top:none;border-right:none}.wpr-wrapp .icon-star.checked:before,.wpr-wrapp .icon-star.checked~.icon-star:before{content:'\e801'}.wpr-wrapp .icon-star:hover{cursor:pointer}.wpr-wrapp .icon-star:hover .icon-star:before{content:'\e801'}.wpr-wrapp .icon-star:hover:before,.wpr-wrapp .icon-star:hover~.icon-star:before{content:'\e801';color:#fbc02d}.wpr_rating_list{display:inline-block}.wpr_rating_list .icon-star{float:left}.wpr_rating_list .icon-star:before{content:'\e801'}
  • wp-post-rating/trunk/assets/js/min/wp-post-rating.min.js

    r2189136 r2261952  
    1 var AjaxSendRequest=function(){var n=this;this.ajax_response="",this.ajaxVars={ajaxurl:"/wp-admin/admin-ajax.php",nonce:document.querySelector("meta[name='_wpr_nonce']").getAttribute("content")},this.request=new XMLHttpRequest,this.ajax_vote=function(e,t){var s={action:"wpr_voted",nonce:this.ajaxVars.nonce,post_id:e,vote:t},a=Object.keys(s).map(function(e){return[e,s[e]].map(encodeURIComponent).join("=")}).join("&");this.request.open("POST",this.ajaxVars.ajaxurl,!0),this.request.setRequestHeader("Content-type","application/x-www-form-urlencoded"),this.request.onreadystatechange=function(){4===this.readyState&&200===this.status&&(null!=this.responseText?n.ajax_response=this.responseText:console.log("Ajax error: No data received"))},this.request.send(a)}},ajaxClient=new AjaxSendRequest,Stars=function(){var a=this;for(this.stars=document.querySelectorAll(".wpr-wrapp .icon-star"),console.log(this.stars),this.hasClass=function(e,t){return-1<(" "+e.className+" ").indexOf(" "+t+" ")},i=0;i<this.stars.length;i++)this.stars[i].addEventListener("click",function(){var t=this.parentElement,s=t.parentElement.children[1];s.classList.remove("wpr-hide"),t.classList.add("wpr-hide"),childrens=t.children;var e=this.dataset.value;ajaxClient.ajax_vote(t.dataset.id,e),setTimeout(function(){var e=JSON.parse(ajaxClient.ajax_response);for(i in childrens)a.hasClass(childrens[i],"checked")&&childrens[i].classList.remove("checked");childrens[Math.abs(parseInt(e.avg)-5)].classList.add("checked"),document.querySelector("#wpr-widget-"+t.dataset.id+" .wpr-total").innerHTML="("+parseInt(e.total)+")",s.classList.add("wpr-hide"),t.classList.remove("wpr-hide")},500)})};new Stars;
     1var AjaxSendRequest=function(){var n=this;this.ajax_response="",this.ajaxVars={ajaxurl:"/wp-admin/admin-ajax.php",nonce:document.querySelector("meta[name='_wpr_nonce']").getAttribute("content")},this.request=new XMLHttpRequest,this.ajax_vote=function(e,t){var s={action:"wpr_voted",nonce:this.ajaxVars.nonce,post_id:e,vote:t},a=Object.keys(s).map(function(e){return[e,s[e]].map(encodeURIComponent).join("=")}).join("&");this.request.open("POST",this.ajaxVars.ajaxurl,!0),this.request.setRequestHeader("Content-type","application/x-www-form-urlencoded"),this.request.onreadystatechange=function(){4===this.readyState&&200===this.status&&(null!=this.responseText?n.ajax_response=this.responseText:console.log("Ajax error: No data received"))},this.request.send(a)}},ajaxClient=new AjaxSendRequest,Stars=function(){var a=this;for(this.stars=document.querySelectorAll(".wpr-wrapp .icon-star"),this.hasClass=function(e,t){return-1<(" "+e.className+" ").indexOf(" "+t+" ")},i=0;i<this.stars.length;i++)this.stars[i].addEventListener("click",function(){var t=this.parentElement,s=t.parentElement.getElementsByClassName("wpr-rating-loader")[0];s.classList.remove("wpr-hide"),t.classList.add("wpr-hide"),childrens=t.children;var e=this.dataset.value;ajaxClient.ajax_vote(t.dataset.id,e),setTimeout(function(){var e=JSON.parse(ajaxClient.ajax_response);for(i in childrens)a.hasClass(childrens[i],"checked")&&childrens[i].classList.remove("checked");childrens[Math.abs(parseInt(e.avg)-5)].classList.add("checked"),document.querySelector("#wpr-widget-"+t.dataset.id+" .wpr-total").innerHTML="("+parseInt(e.total)+")",s.classList.add("wpr-hide"),t.classList.remove("wpr-hide")},500)})};new Stars;
  • wp-post-rating/trunk/assets/js/wp-post-rating.js

    r2189136 r2261952  
    4848            var parent = this.parentElement;
    4949            var superparent = parent.parentElement;
    50             var loader = superparent.children[1];
     50            var loader = superparent.getElementsByClassName('wpr-rating-loader')[0];
    5151            loader.classList.remove('wpr-hide');
    5252            parent.classList.add('wpr-hide');
  • wp-post-rating/trunk/readme.txt

    r2189136 r2261952  
    44Tags: 5 star,google rating,postrating,rating,ratings,seo rating,rating snippet
    55Requires at least: 4.9.8
    6 Tested up to: 5.2.4
     6Tested up to: 5.3.2
    77Requires PHP: 5.6
    88Stable tag: 1.0.0
     
    3939 
    4040== Changelog ==
     41= 1.0.3.1 =
     42* Fixes with loader and display data. Correct SEO schema
    4143= 1.0.3 =
    4244* Fix username in widget
  • wp-post-rating/trunk/templates/main.php

    r2189001 r2261952  
    11<?php
    22$id = get_the_ID();
     3$title = get_the_title($id);
    34$avg = $this->database->get_avg_rating($id, 0);
    4 $total = $this->database->get_total_votes($id)
     5$total = $this->database->get_total_votes($id);
    56?>
    6 <div class="wpr-wrapp" id="wpr-widget-<?php echo $id ?>" itemscope itemtype="http://schema.org/WebPage">
     7<div class="wpr-wrapp" id="wpr-widget-<?php echo $id ?>" itemscope itemtype="http://schema.org/Product">
    78    <div class="wpr-rating" data-id="<?php echo $id ?>" itemprop="aggregateRating" itemscope
    89         itemtype="http://schema.org/AggregateRating">
     
    1314        <meta itemprop="worstRating" content="1">
    1415        <meta itemprop="bestRating" content="5">
    15         <meta itemprop="reviewCount" content="<?php echo $total ?>">
    16         <meta itemprop="ratingValue" content="<?php echo $avg; ?>">
     16        <meta itemprop="reviewCount" content="<?php echo $total ? $total : '1' ?>">
     17        <meta itemprop="ratingValue" content="<?php echo $avg ? $avg : '5' ?>">
    1718    </div>
    1819    <div class="wpr-rating-loader wpr-hide">
     
    2829        <?php endif; ?>
    2930    </div>
     31    <meta itemprop="name" content="<?php echo $title; ?>">
    3032</div>
  • wp-post-rating/trunk/wp-post-rating.php

    r2189136 r2261952  
    55Plugin URI: http://romua1d.ru/wp_post_rating
    66Description: Powerful post rating wordpress plugin.
    7 Version: 1.0.3
     7Version: 1.0.3.1
    88Author: Romua1d
    99Author URI: https://romua1d.ru
Note: See TracChangeset for help on using the changeset viewer.