Plugin Directory

Changeset 589574


Ignore:
Timestamp:
08/23/2012 10:12:38 PM (14 years ago)
Author:
submarine
Message:

bug fixed : checkboxes options were not saved correctly

Location:
category-icons/tags/2.2.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • category-icons/tags/2.2.3/category_icons.php

    r589563 r589574  
    11131113        update_option('igcaticons_max_icons', $_POST['igcaticons_max_icons']);
    11141114        update_option('igcaticons_before_name', $_POST['igcaticons_before_name']);
    1115         if (isset($_POST['igcaticons_templatecode_patch'])) update_option('igcaticons_templatecode_patch', $_POST['igcaticons_templatecode_patch']);
    1116         if (isset($_POST['igcaticons_templatecode_sidebar'])) update_option('igcaticons_templatecode_sidebar', $_POST['igcaticons_templatecode_sidebar']);
    1117         update_option('igcaticons_rssfeeds', $_POST['igcaticons_rssfeeds']);
    1118         if (isset($_POST['igcaticons_useseo_plugin'])) update_option('igcaticons_useseo_plugin', $_POST['igcaticons_useseo_plugin']);
    11191115        update_option('igcaticons_max_width', $_POST['igcaticons_max_width']);
    11201116        update_option('igcaticons_max_height', $_POST['igcaticons_max_height']);
    1121         if (isset($_POST['igcaticons_iconcatpage'])) update_option('igcaticons_iconcatpage', $_POST['igcaticons_iconcatpage']);
    11221117       
     1118        bm_caticons_updatemyoption('igcaticons_templatecode_patch');
     1119        bm_caticons_updatemyoption('igcaticons_templatecode_sidebar');
     1120        bm_caticons_updatemyoption('igcaticons_rssfeeds'); 
     1121        bm_caticons_updatemyoption('igcaticons_useseo_plugin');
     1122        bm_caticons_updatemyoption('igcaticons_iconcatpage');       
    11231123    }
    11241124   
     
    11371137}
    11381138
     1139function bm_caticons_updatemyoption($option) {
     1140    if (isset($_POST[$option])) {
     1141        update_option($option, $_POST[$option]);
     1142    }
     1143    else {
     1144        update_option($option, 0);
     1145    } 
     1146}
    11391147/**
    11401148 * Display the menu (Icons, Options, Template Tags)
     
    11891197            </div>
    11901198                <label><input type="checkbox" name="igcaticons_rssfeeds" id="rssfeeds" value="1" <?php checked('1', get_option('igcaticons_rssfeeds')); ?> />&nbsp;<?php _e('Display category icons in RSS feeds','category_icons'); ?></label>
    1191                 <label><input type="checkbox" name="igcaticons_iconcatpage" id="iconcatpage" value="1" <?php checked('0', get_option('igcaticons_iconcatpage')); ?> />&nbsp;<?php _e('Display only the icon of the selected category in the category page','category_icons'); ?></label>
     1199                <label><input type="checkbox" name="igcaticons_iconcatpage" id="iconcatpage" value="1" <?php checked('1', get_option('igcaticons_iconcatpage')); ?> />&nbsp;<?php _e('Display only the icon of the selected category in the category page','category_icons'); ?></label>
    11921200               
    11931201            <?php if (function_exists('seo_friendly_images')) : ?>
  • category-icons/tags/2.2.3/readme.txt

    r589562 r589574  
    6565= 2.2.3 =
    6666* I've added an option in the panel settings for this : "in the category page, only that category icon is displayed in front of the title if the post has more than one category".
     67* Bug fixed : the options with a checkbox were not saved correctly (!)
    6768
    6869= 2.2.2 =
Note: See TracChangeset for help on using the changeset viewer.