Plugin Directory

Changeset 469932


Ignore:
Timestamp:
12/01/2011 04:56:28 PM (14 years ago)
Author:
esserq
Message:

Ratings are now displayed at the bottom of each page by default.

Location:
rockhoist-ratings
Files:
7 added
2 edited

Legend:

Unmodified
Added
Removed
  • rockhoist-ratings/trunk/readme.txt

    r372767 r469932  
    11=== Rockhoist Ratings ===
    22Contributors: esserq
    3 Donate link: http://blarrr.com/ratings-plugin/
    43Tags: rating, thumbs, up, down, post, ajax
    54Requires at least: 3.1
    6 Tested up to: 3.1.1
    7 Stable tag: 1.1.2
     5Tested up to: 3.2.1
     6Stable tag: 1.1.3
    87
    98Rockhoist Ratings is a thumbs up/ thumbs down style rating widget for posts.
     
    2221Contact me if you find any bugs, issues or have a feature request and I will do my best to accommodate.
    2322
    24 More examples and information @ [blarrr.com](http://blarrr.com/ratings-plugin/)
    25 
    2623== Installation ==
    2724
     
    3734
    3835== Changelog ==
     36
     37= 1.1.3 =
     38* Added rating widget to bottom of posts by default.
    3939
    4040= 1.1.2 =
  • rockhoist-ratings/trunk/rh-ratings.php

    r372767 r469932  
    3939
    4040// Install the plugin.
    41 function rhr_installation() {
    42 
    43     global $wpdb;
    44 
    45     // Create the rh_ratings.
     41function rhr_activate() {
     42
     43    require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
     44
     45    global $wpdb;
     46
     47    // Create the rh_ratings table.
    4648
    4749    $table_name = $wpdb->prefix . "rh_ratings";
     
    5759        );";
    5860
    59         require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    6061        dbDelta( $sql );
    6162    }
     
    6566
    6667// Hook for registering the install function upon plugin activation.
    67 register_activation_hook(__FILE__,'rhr_installation');
     68register_activation_hook(__FILE__,'rhr_activate');
     69
     70// Install the plugin.
     71function rhr_deactivate() {
     72
     73    require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
     74
     75    global $wpdb;
     76
     77    // Drop the rh_ratings table.
     78    $table_name = $wpdb->prefix . "rh_ratings";
     79    $sql = "DROP TABLE IF EXISTS " . $table_name . ";";
     80    dbDelta( $sql );
     81
     82    delete_option('rhr_db_version');
     83}
     84
     85// Hook for registering the uninstall function upon plugin deactivation.
     86register_deactivation_hook( __FILE__, 'rhr_deactivate' );
    6887
    6988function rhr_set_rating( $args = '' ) {
     
    184203}
    185204
     205add_filter('the_content', 'rhr_the_rating');
     206
    186207// Link to Rockhoist Ratings stylesheet and apply some custom styles
    187208function rhr_css() {
Note: See TracChangeset for help on using the changeset viewer.