Plugin Directory

Changeset 479603


Ignore:
Timestamp:
12/23/2011 01:07:00 AM (14 years ago)
Author:
digitalnature
Message:

fixed 2 bugs related to Atom-based themes

Location:
post-ratings
Files:
14 added
3 edited

Legend:

Unmodified
Added
Removed
  • post-ratings/trunk/post-ratings.php

    r476957 r479603  
    22/*
    33Plugin Name: Post Ratings
    4 Version: 1.3
     4Version: 1.4
    55Plugin URI: http://digitalnature.eu/forum/plugins/post-ratings/
    66Description: Simple, developer-friendly, straightforward post rating plugin. Relies on post meta to store avg. rating / vote count.
     
    4040
    4141  const
    42     VERSION   = '1.3',                                      // plugin version
     42    VERSION   = '1.4',                                      // plugin version
    4343    ID        = 'post_ratings',                             // internally used for text domain, theme option group name etc.
    4444    MIN_VOTES = 1,                                          // minimum vote count (MV)
     
    430430
    431431    // Atom-based themes alread have this variable "localized"
    432     if(!((defined('ATOM_VERSION') && version_compare(ATOM_VERSION, '2', '>')) || (defined('Atom::VERSION') && version_compare(Atom::VERSION, '2', '>'))))
     432    if(class_exists('Atom') && (defined('Atom::VERSION')))
    433433      wp_localize_script(self::ID, 'post_ratings', array('blog_url' => home_url('/')));
    434434  }
     
    803803
    804804    $args = wp_parse_args($args, array(
    805       'post_type'    => 'post',
    806       'number'       => 10,
    807       'offset'       => 0,
    808       'sortby'       => 'bayesian_rating',    // bayesian_rating, rating or votes
    809       'order'        => 'DESC',               // ASC or DESC (no reason to use ASC...)
    810       'date_limit'   => 0,                    // date limit in days
    811       'where'        => '',
    812 
     805      'post_type'        => 'post',
     806      'number'           => 10,
     807      'offset'           => 0,
     808      'sortby'           => 'bayesian_rating',    // bayesian_rating, rating or votes
     809      'order'            => 'DESC',               // ASC or DESC (no reason to use ASC...)
     810      'date_limit'       => 0,                    // date limit in days
     811      'where'            => '',
     812      'bayesian_formula' => $this->options('bayesian_formula'),
    813813    ));
    814814
  • post-ratings/trunk/readme.txt

    r476957 r479603  
    7575== Changelog ==
    7676
     77= 1.4 =
     78* Fixed two issues related to Atom themes
     79
    7780= 1.3 =
    7881* Fixed bug in which the user formula wasn't working outside the widget
  • post-ratings/trunk/widget.php

    r476957 r479603  
    33
    44// if this an Atom theme make a special widget for it ;)
    5 if(class_exists('AtomWidget') && ((defined('ATOM_VERSION') && version_compare(ATOM_VERSION, '2', '>')) || (defined('Atom::VERSION') && version_compare(Atom::VERSION, '2', '>')))){
     5if(class_exists('Atom') && (defined('Atom::VERSION'))){
    66
    77
     
    207207
    208208      if($instance['more'] && $next && Atom::app()->options('jquery')){
    209         $output .= '<div class="fadeThis clear-block"><a href="#" class="more" data-count="'.$instance['number'].'">'._a('Show More').'</a></div>';
     209        $output .= '<div class="fadeThis clear-block"><a href="#" class="more" data-count="'.$instance['number'].'">'.__('Show More', PostRatings::ID).'</a></div>';
    210210        $output .= $this->getShowMoreCtrl('get_top_rated');
    211211      }
Note: See TracChangeset for help on using the changeset viewer.