WordPress.org

Plugin Directory

Changeset 326535


Ignore:
Timestamp:
12/28/10 05:23:43 (3 years ago)
Author:
vhauri
Message:

Updating to version 2.2. Small bug fix with taglines potentially not displaying

Location:
tagline-rotator/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tagline-rotator/trunk/readme.txt

    r326515 r326535  
    6262Version 2.0 - 12-26-2010 - Changed plugin to class-based structure and cleaned up a lot of the logic. Removed all MySQL queries and switched to using options for storing taglines. Added an upgrade function to pull old taglines from table-based versions of the plugin that is called on activation. 
    6363Version 2.1 - 12-27-2010 - Fixes an issue with slashes not being properly escaped, and an issue with sorting that could cause a duplicate tagline to appear when changing an existing tagline. If you have version 2.0, you should upgrade immediately. 
     64Version 2.2 - 12-28-2010 - Fixes a bug that could cause taglines not to display. 
  • tagline-rotator/trunk/tagline-rotator.php

    r326515 r326535  
    55Plugin URI: http://neverblog.net/tagline-rotator-plugin-for-wordpress 
    66Description: Displays a random tagline from a database list. You can manage taglines through Settings->Tagline Rotator. 
    7 Version: 2.1  
     7Version: 2.2  
    88Author: Vasken Hauri 
    99Author URI: http://neverblog.net 
     
    130130            if($show == 'description'){ 
    131131                $taglines = get_option('tagline_rotator_taglines'); 
    132                 if($taglines !== FALSE){ 
    133                     $tagline_counter = count($taglines); 
     132                foreach($taglines as $tagline){ 
     133                    $tagline_array[] = $tagline; 
     134                } 
     135                if($tagline_array !== FALSE){ 
     136                    $tagline_counter = count($tagline_array); 
    134137                    $key = rand(0, $tagline_counter - 1);    
    135                     $output = $taglines[$key]; 
     138                    $output = $tagline_array[$key]; 
    136139                } 
    137140            } 
    138             return $output; 
     141            return stripslashes($output); 
    139142        }    
    140143 
Note: See TracChangeset for help on using the changeset viewer.