Plugin Directory

Changeset 1298069


Ignore:
Timestamp:
12/01/2015 08:00:10 AM (10 years ago)
Author:
VortexThemes
Message:

2.7.3 RELEASE

Location:
rating-system
Files:
87 added
7 edited

Legend:

Unmodified
Added
Removed
  • rating-system/trunk/Changelog.md

    r1277182 r1298069  
     1## [2.7.3]
     2### Fixed Custom text being displayed when cancelling vote.
     3### Fixed [rating-system-posts] shortcode only showing the like button.
     4### Fixed [rating-system-comments] shortcode only showing the like button.
     5### Added [rating-system-posts-disable-dislike] to show only the like button.
     6### Added [rating-system-comments-disable-dislike] to show only the like button for comments.
     7### Added [rating-system-top-posts].
     8### Added Arabic translation provided by [dev-ide.net](https://www.dev-ide.net/wordpress/plugins/plugin-rating-system-for-wordpress.html)
    19## [2.7.2]
    210### Fixed fatal error on PHP 5.2.4.
  • rating-system/trunk/admin/vortexlikedislike.php

    r1277182 r1298069  
    1717        'display_name'         => 'Rating System',
    1818        // Name that appears at the top of your panel
    19         'display_version'      => '2.7.2',
     19        'display_version'      => '2.7.3',
    2020        // Version that appears at the top of your panel
    2121        'menu_type'            => 'menu',
  • rating-system/trunk/comments.php

    r1277182 r1298069  
    9393                    update_comment_meta($post_id,$user_key,$user_data);
    9494                    do_action("vortex_com_dislike",'-likes','nothing',$current_user_id,$post_id);
    95                     if ($vortex_like_dislike['v_custom_text_com']){
    96                         $current_likes = $vortex_like_dislike['v_custom_text_com_like'];
    97                     };
    9895                       
    9996                        $response = array(
     
    212209                    update_comment_meta($post_id,$user_key,$user_data);
    213210                    do_action("vortex_com_dislike",'nothing','-dislikes',$current_user_id,$post_id);
    214                     if ($vortex_like_dislike['v_custom_text_com']){
    215                         $current_dislikes = $vortex_like_dislike['v_custom_text_com_dislike'];
    216                     }
     211                   
    217212                        $response = array(
    218213                            'dislikes' => $current_dislikes,
     
    421416        }
    422417       
    423         function vortex_render_for_comments(){
     418        function vortex_render_for_comments($dislike = true){
    424419           
    425420            global $vortex_like_dislike;
    426421           
    427             if(!$vortex_like_dislike['v-switch-dislike-comment']){
     422            if(!$vortex_like_dislike['v-switch-dislike-comment'] && $dislike){
    428423            //leave it inline because wordpress will add <p> tags creating a space I don't know why
    429424            $buttons = '<div class="vortex-container-vote-comment '.vortex_button_align_comment().'"><div class="vortex-container-like-comment"><input type="hidden" value="'.get_comment_ID().'" ></input><div class="vortex-p-like-comment '.get_comment_ID().' '.vortex_system_add_like_class_comment().' '.vortex_system_get_like_icon_comment().'">'.vortex_system_like_counter_comment().'</div></div>'.vortex_system_render_dislike_button_comment().'</div>';
  • rating-system/trunk/languages/vortex_system_ld.pot

    r1277182 r1298069  
    99"Project-Id-Version: PACKAGE VERSION\n"
    1010"Report-Msgid-Bugs-To: \n"
    11 "POT-Creation-Date: 2015-11-01 14:26+0200\n"
     11"POT-Creation-Date: 2015-12-01 09:33+0200\n"
    1212"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1313"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1818"Content-Transfer-Encoding: 8bit\n"
    1919
    20 #: comments.php:750 posts-pages.php:633
     20#: comments.php:745 posts-pages.php:626
    2121msgid "Likes"
    2222msgstr ""
    2323
    24 #: comments.php:753 posts-pages.php:636
     24#: comments.php:748 posts-pages.php:629
    2525msgid "Dislikes"
    2626msgstr ""
     
    7171msgstr ""
    7272
     73#: rating-system.php:131
     74msgid "Receive like for posts(content author)"
     75msgstr ""
     76
    7377#: rating-system.php:132
    74 msgid "Receive like for posts(content author)"
     78msgid "Receive like for posts(like author)"
    7579msgstr ""
    7680
    7781#: rating-system.php:133
    78 msgid "Receive like for posts(like author)"
     82msgid "Receive like for comments(content author)"
    7983msgstr ""
    8084
    8185#: rating-system.php:134
    82 msgid "Receive like for comments(content author)"
    83 msgstr ""
    84 
    85 #: rating-system.php:135
    8686msgid "Receive like for comments(like author)"
    8787msgstr ""
  • rating-system/trunk/posts-pages.php

    r1271191 r1298069  
    142142                    update_post_meta($post_id,$user_key,$user_data);
    143143                    do_action("vortex_post_dislike",'-likes','nothing',$current_user_id,$post_id);
    144                     global $vortex_like_dislike;
    145                     if ($vortex_like_dislike['v_custom_text']){
    146                             $current_likes = $vortex_like_dislike['v_custom_text_post_like'];
    147                     };
     144                   
    148145                        $response = array(
    149146                            'likes' => $current_likes,
     
    314311                    do_action("vortex_post_dislike",'nothing','-dislikes',$current_user_id,$post_id);
    315312                    update_post_meta($post_id,$user_key,$user_data);
    316                    
    317                     if ($vortex_like_dislike['v_custom_text']){
    318                         $current_dislikes = $vortex_like_dislike['v_custom_text_post_dislike'];
    319                     }
    320313
    321314                        $response = array(
  • rating-system/trunk/rating-system.php

    r1277182 r1298069  
    44* Plugin URI: http://github.com/VortexThemes/rating-system
    55* Description: The simple way to add like or dislike buttons.
    6 * Version: 2.7.2
     6* Version: 2.7.3
    77* Author: VortexThemes
    88* Author URI: https://github.com/VortexThemes
     
    2121include(plugin_dir_path( __FILE__).'tgmpa/class-tgm-plugin-activation.php');
    2222add_action( 'tgmpa_register', 'vortex_register_plugin' );
     23
    2324function vortex_register_plugin() {
    2425
     
    226227//add shortcode
    227228function vortex_rating_system_register_shortcodes(){
    228          add_shortcode('rating-system-posts', 'vortex_render_for_posts');
    229          add_shortcode('rating-system-comments', 'vortex_render_for_comments');
     229
     230        function vortex_shortcode_render_posts(){
     231                return vortex_render_for_posts();
     232        }
     233       
     234        function vortex_shortcode_render_posts_disable_dislike(){
     235                return vortex_render_for_posts(false);
     236        }
     237       
     238        function vortex_shortcode_render_comments(){
     239                return vortex_render_for_comments();
     240        }
     241       
     242        function vortex_shortcode_render_comments_disable_dislike(){
     243                return vortex_render_for_comments(false);
     244        }
     245       
     246        function vortex_shortcode_render_top_posts($atts){
     247           
     248            extract( shortcode_atts(  array(
     249                'number' => '5',
     250                'display_counter' => 'yes',
     251                'display_content' => 'no',
     252                'link_to_post'    => 'yes',
     253                'category_slugs'    => '',
     254            ), $atts ) );
     255           
     256            $args = array(
     257                    'orderby'           => 'meta_value_num',
     258                    'meta_key'          => 'vortex_system_likes',
     259                    'post_type'         => 'post',
     260                    'post_status'       => 'publish',
     261                    'posts_per_page'    => $number,
     262                    'category_name'     => $category_slugs
     263
     264            ); 
     265            // The Query
     266            $query = new WP_Query( $args );
     267            // The Loop
     268            if ( $query->have_posts() ) {
     269               
     270                echo '<ul>';
     271                while ( $query->have_posts() ) {
     272                    $query->the_post();
     273                        $current_likes = get_post_meta(get_the_ID(),'vortex_system_likes',true);
     274                        echo '<li class="top-posts '.get_the_ID().' ">';
     275                        echo '<div class="top-posts-title '.get_the_ID().'">';
     276                        if($link_to_post == "yes"){
     277                                echo '<a class="top-posts-link '.get_the_ID().'" href="'.get_the_permalink().'">'.get_the_title().'</a>';
     278                        } else {
     279                                the_title();
     280                        }
     281                           
     282                        if($display_counter == 'yes'){
     283                            echo ' '.$current_likes.' likes';
     284                        }
     285                        echo '</div>';
     286                       
     287                        if($display_content == 'yes'){
     288                            echo '<div class="top-posts-content '.get_the_ID().'">';
     289                                echo get_the_content();
     290                            echo '</div>';
     291                        }
     292                       
     293                        echo '</li>';
     294                }
     295                echo '</ul>';
     296            } else {
     297                echo 'No posts found.';
     298            }
     299            // Restore original Post Data
     300            wp_reset_postdata();
     301           
     302        }
     303       
     304        add_shortcode('rating-system-top-posts', 'vortex_shortcode_render_top_posts');
     305       
     306        add_shortcode('rating-system-posts', 'vortex_shortcode_render_posts');
     307        add_shortcode('rating-system-posts-disable-dislike', 'vortex_shortcode_render_posts_disable_dislike');
     308       
     309        add_shortcode('rating-system-comments', 'vortex_shortcode_render_comments');
     310        add_shortcode('rating-system-comments-disable-dislike', 'vortex_shortcode_render_comments_disable_dislike');
    230311}
    231312add_action( 'init', 'vortex_rating_system_register_shortcodes');
  • rating-system/trunk/readme.txt

    r1277182 r1298069  
    55Requires at least: 4.1
    66Tested up to: 4.3.1
    7 Stable tag: 2.7.2
     7Stable tag: 2.7.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2727* Free WordPress Dashboard widget. &#10004;
    2828* Shortcode [rating-system-posts](You must have turned on like or dislike for posts and pages and if you want you can disable display buttons on). &#10004;
    29 * Shortcode [rating-system-comments]. &#10004;
     29* Shortcode [rating-system-posts-disable-dislike](Displays only the like button, the above also applies here). &#10004;
    3030* Sort comments by likes. &#10004;
    3131* Check the screenshots tab we have a lot of cool features.
     
    3434* [Facebook](https://www.facebook.com/VortexThemes) [Twitter](https://twitter.com/VortexThemes) [Github](https://github.com/VortexThemes/rating-system)
    3535
     36> **How to use**
     37
     38* Use [rating-system-posts] to show  like & dislike for a page, post,bbPress,buddyPress etc (DO NOT USE FOR COMMENTS).
     39* Use [rating-system-posts-disable-dislike] to show only the like button for a page, post,bbPress,buddyPress etc (DO NOT USE FOR COMMENTS).
     40* Use [rating-system-comments] to show like & dislike for comments (USE ONLY FOR STANDARD WORDPRESS COMMENTS).
     41* Use [rating-system-comments-disable-dislike] to show only the like button for commens (USE ONLY FOR STANDARD WORDPRESS COMMENTS).
     42* Use [rating-system-top-posts] to display all posts ordered by their likes.
     43* Shortcode parameters:
     44* number = the number of posts to be dislayed (type a number here)(default 5)
     45* display_counter = display the number of likes after the title (type yes or no)(default yes)
     46* display_content = display the content for each post (type yes or no)(default no)
     47* link_to_post = make the title of the post a link to original post (type yes or no)(default yes)
     48* category_slugs = only display posts from certain categories (type categories slugs here)(default empty)
     49* Example:
     50* Display top 5 posts: [rating-system-top-posts number="5"]
     51* Display top 5 posts without link to original post: [rating-system-top-posts number="5" link_to_post="no"]
     52* Display top 5 posts from category with slug cats: [rating-system-top-posts number="5" category_slugs="cats"]
     53* Display top 10 posts from multiple categories: [rating-system-top-posts number="10" category_slugs="cats,dogs,planes"]
     54* Display top 10 posts from multiple categories with content and no counter: [rating-system-top-posts display_counter="no" display_content="yes" number="10" category_slugs="cats,dogs,planes"]
     55
     56> **Translation**
     57
     58* Avaible in Arabic.Translation provided by [dev-ide.net](https://www.dev-ide.net/wordpress/plugins/plugin-rating-system-for-wordpress.html)
    3659== Installation ==
    37 You can use this code to generate the like button inside the loop
    38 <?php   if(function_exists('vortex_render_for_posts')){
    39             echo vortex_render_for_posts(false);
    40         }
    41 ?>
    42 If you want to generate both(like and dislike) use this code
    43 <?php   if(function_exists('vortex_render_for_posts')){
    44             echo vortex_render_for_posts();
    45         }
    46 ?>
     60
    47611. After you download the plugin go to Plugins -> Add New -> Upload Plugin
    48622. Choose the zip and upload
     
    637712. WooCommerce support
    6478
    65 == Upgrade Notice ==
    66 
    67 notices
    68 
    6979== Frequently Asked Questions ==
    7080> **Question: Does this plugin support bbPress?**
    7181>
    72 > **Answer:** Yes.You will have to turn on bbPress support from the plugin option panel(check the screenshots tab to see our plugin in action).
     82> **Answer:** Yes.You will have to turn on bbPress support from the plugin option panel and on Display buttons on: check Custom post type single.(check the screenshots tab to see our plugin in action).
    7383>
    7484> **Question: Can I add like or dislike to WooCommerce products?**
     
    8090> **Answer:** Yes.
    8191>
     92> **For WordPress post, pages, bbPress  and buddyPress use [rating-system-posts] or [rating-system-posts-disable-dislike].**
     93>
    8294
    8395== Changelog ==
     96= 2.7.3 =
     97* Fixed Custom text being displayed when cancelling vote.
     98* Fixed [rating-system-posts] shortcode only showing the like button.
     99* Fixed [rating-system-comments] shortcode only showing the like button.
     100* Added [rating-system-posts-disable-dislike] to show only the like button.
     101* Added [rating-system-comments-disable-dislike] to show only the like button for comments.
     102* Added [rating-system-top-posts].
     103* Added Arabic translation provided by [dev-ide.net](https://www.dev-ide.net/wordpress/plugins/plugin-rating-system-for-wordpress.html)
    84104= 2.7.2 =
    85105* Fixed fatal error on PHP 5.2.4.
Note: See TracChangeset for help on using the changeset viewer.