WordPress.org

Plugin Directory

Changeset 684361


Ignore:
Timestamp:
03/19/13 18:17:37 (5 years ago)
Author:
brandonferens
Message:

Meta data updating fix

Location:
perfect-quotes/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • perfect-quotes/trunk/perfect_quotes.php

    r680623 r684361  
    44Plugin URI: http://www.perfectspace.com/perfect-quotes 
    55Description: An easy to use plugin for quotes and testimonials! It integrates easily using a widget or shortcode. It does quotes perfectly! 
    6 Version: 0.3.4.1 
    7 Author: Brandon Ferens, Perfect Space, Inc. 
     6Version: 0.3.4.2 
     7Author: Brandon Ferens 
    88Author URI: http://www.perfectspace.com 
    99License: GPL2 
     
    126126 
    127127  // OK, we're authenticated: we need to find and save the data 
    128   $current_author = get_post_meta($post_id, 'perfect_quote_author', TRUE); 
     128  $current_author = get_post_meta($post_id, 'perfect_quote_author', false); 
    129129  $new_author = (isset($_POST['perfect_quote_author'])) ? $_POST['perfect_quote_author'] : ''; 
    130   $current_where  = get_post_meta($post_id, 'perfect_quote_where', TRUE); 
     130  $current_where  = get_post_meta($post_id, 'perfect_quote_where', false); 
    131131  $new_where = (isset($_POST['perfect_quote_where'])) ? $_POST['perfect_quote_where'] : '' ; 
    132132 
     
    134134  perfect_quotes_clean($new_where); 
    135135 
    136   if ($current_author) { 
     136  if (!empty($current_author)) { 
    137137    if (is_null($new_author)) { 
    138138      delete_post_meta($post_id,'perfect_quote_author'); 
     
    141141    } 
    142142  } elseif (!is_null($new_author)) { 
    143       add_post_meta($post_id,'perfect_quote_author',$new_author,TRUE); 
    144   } 
    145  
    146   if ($current_where) { 
     143      add_post_meta($post_id,'perfect_quote_author',$new_author,true); 
     144  } 
     145 
     146  if (!empty($current_where)) { 
    147147    if (is_null($new_where)) { 
    148148      delete_post_meta($post_id,'perfect_quote_where'); 
     
    151151    } 
    152152  } elseif (!is_null($new_where)) { 
    153       add_post_meta($post_id,'perfect_quote_where',$new_where,TRUE); 
     153      add_post_meta($post_id,'perfect_quote_where',$new_where,true); 
    154154  } 
    155155 
  • perfect-quotes/trunk/readme.txt

    r680623 r684361  
    11=== Perfect Quotes === 
    2 Contributors: Brandon Ferens, Perfect Space, Inc. 
     2Contributors: Brandon Ferens 
    33Donate link: http://www.perfectspace.com/ 
    44Tags: Perfect Quotes, perfect, quote, quotes, widget, plugin, shortcode, testimonial, testimonials, random 
    55Requires at least: 3.0 
    66Tested up to: 3.5.1 
    7 Stable tag: 0.3.4.1 
     7Stable tag: 0.3.4.2 
    88 
    99== Description == 
     
    9696== Changelog == 
    9797 
     98= 0.3.4.2 = 
     99* Fixed bug in which a quote would not let you save the "author" or "where" meta data if none was originally entered. Thank to Elisa Donin for allowing me onto her dev server to figure this one out. 
     100 
    98101= 0.3.4.1 = 
    99102* Removed debugging line 
     
    126129== Upgrade Notice == 
    127130 
     131= 0.3.4.2 = 
     132* Minor fix for updating meta data if no meta data existed before the update 
     133 
    128134= 0.3.4.1 = 
    129135* Minor fix that removed missed debug line 
Note: See TracChangeset for help on using the changeset viewer.