Plugin Directory

Changeset 917767


Ignore:
Timestamp:
05/20/2014 10:00:14 AM (12 years ago)
Author:
jakob42
Message:

fixed an error in the new widget controls

Location:
reaction-buttons
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • reaction-buttons/tags/1.8.1/reaction_buttons.php

    r913734 r917767  
    44   Plugin URI: http://blog.jl42.de/reaction-buttons/
    55   Description: Adds Buttons for very simple and fast feedback to your post. Inspired by Blogger.
    6    Version: 1.8.0
     6   Version: 1.8.1
    77   Author: Jakob Lenfers
    88   Author URI: http://blog.jl42.de
     
    11871187 */
    11881188function reaction_buttons_widget_control(){
     1189    // save the settings if submitted
     1190        if (isset($_REQUEST['savewidgets']) && $_REQUEST['savewidgets']) {
     1191        // validate the input and update the settings
     1192        if (isset($_POST['reaction_buttons_widget_title'])){
     1193            update_option('reaction_buttons_widget_title', esc_attr($_POST['reaction_buttons_widget_title']));
     1194        }
     1195
     1196        if (isset($_POST['reaction_buttons_widget_count'])){
     1197            $count = $_POST['reaction_buttons_widget_count'];
     1198            if (is_numeric($count) && 0 < intval($count)) {
     1199                update_option('reaction_buttons_widget_count', esc_attr($count));
     1200            }
     1201            else {
     1202                reaction_buttons_message(__("Please input a positiv number!", 'reaction_buttons'));
     1203            }
     1204        }
     1205   
     1206        if (isset($_POST['reaction_buttons_widget_excerpt'])){
     1207            $excerpt = $_POST['reaction_buttons_widget_excerpt'];
     1208            if (is_numeric($excerpt)) {
     1209                update_option('reaction_buttons_widget_excerpt', esc_attr($excerpt));
     1210            }
     1211            else {
     1212                update_option('reaction_buttons_widget_excerpt', 0);
     1213            }
     1214        }
     1215        if (isset($_POST['reaction_buttons_widget_buttons'])){
     1216            update_option('reaction_buttons_widget_buttons', esc_attr($_POST['reaction_buttons_widget_buttons']));
     1217        }
     1218        if (isset($_POST['reaction_buttons_widget_thumb']) && $_POST['reaction_buttons_widget_thumb']){
     1219            update_option('reaction_buttons_widget_thumb', true);
     1220        }
     1221        else{
     1222            update_option('reaction_buttons_widget_thumb', false);
     1223        }
     1224    }
     1225
     1226    // show the current settings and the dialog
    11891227    echo "<p>" . __("This widget shows the posts with the most clicks for each button.", 'reaction_buttons') . "</p>";
    1190 
    1191     // show the current settings and the dialog
    11921228    ?>
    11931229    <p><label><?php _e("Title:", 'reaction_buttons') ?><br />
     
    12011237    <p><label><?php _e("Show a possible post thumbnail? (Might need some manual adaptations in your CSS to look nice.)", 'reaction_buttons') ?><br />
    12021238    <input name="reaction_buttons_widget_thumb" type="checkbox" <?php checked(get_option('reaction_buttons_widget_thumb', false), true); ?> /></label></p>
    1203 
    1204     <?php
    1205     // validate the input and update the settings
    1206     if (isset($_POST['reaction_buttons_widget_title'])){
    1207         update_option('reaction_buttons_widget_title', esc_attr($_POST['reaction_buttons_widget_title']));
    1208     }
    1209 
    1210     if (isset($_POST['reaction_buttons_widget_count'])){
    1211         $count = $_POST['reaction_buttons_widget_count'];
    1212         if (is_numeric($count) && 0 < intval($count)) {
    1213             update_option('reaction_buttons_widget_count', esc_attr($count));
    1214         }
    1215         else {
    1216             reaction_buttons_message(__("Please input a positiv number!", 'reaction_buttons'));
    1217         }
    1218     }
    1219    
    1220     if (isset($_POST['reaction_buttons_widget_excerpt'])){
    1221         $excerpt = $_POST['reaction_buttons_widget_excerpt'];
    1222         if (is_numeric($excerpt)) {
    1223             update_option('reaction_buttons_widget_excerpt', esc_attr($excerpt));
    1224         }
    1225         else {
    1226             update_option('reaction_buttons_widget_excerpt', 0);
    1227         }
    1228     }
    1229     if (isset($_POST['reaction_buttons_widget_buttons'])){
    1230         update_option('reaction_buttons_widget_buttons', esc_attr($_POST['reaction_buttons_widget_buttons']));
    1231     }
    1232     if (isset($_POST['reaction_buttons_widget_thumb']) && $_POST['reaction_buttons_widget_thumb']){
    1233         update_option('reaction_buttons_widget_thumb',true);
    1234     }
    1235     else{
    1236         update_option('reaction_buttons_widget_thumb',false);
    1237     }
     1239<?php
    12381240}
    12391241
     
    12701272 */
    12711273function reaction_buttons_clicked_widget_control(){
     1274    // save the settings if submitted
     1275        if (isset($_REQUEST['savewidgets']) && $_REQUEST['savewidgets']) {
     1276    // validate the input and update the settings
     1277        if (isset($_POST['reaction_buttons_clicked_widget_title'])){
     1278            update_option('reaction_buttons_clicked_widget_title', esc_attr($_POST['reaction_buttons_clicked_widget_title']));
     1279        }
     1280
     1281        if (isset($_POST['reaction_buttons_clicked_widget_count'])){
     1282            $count = $_POST['reaction_buttons_clicked_widget_count'];
     1283            if (is_numeric($count) && 0 < intval($count)) {
     1284                update_option('reaction_buttons_clicked_widget_count', esc_attr($count));
     1285            }
     1286            else {
     1287                reaction_buttons_message(__("Please input a positiv number!", 'reaction_buttons'));
     1288            }
     1289        }
     1290   
     1291        if (isset($_POST['reaction_buttons_clicked_widget_excerpt'])){
     1292            $excerpt = $_POST['reaction_buttons_clicked_widget_excerpt'];
     1293            if (is_numeric($excerpt)) {
     1294                update_option('reaction_buttons_clicked_widget_excerpt', esc_attr($excerpt));
     1295            }
     1296            else {
     1297                update_option('reaction_buttons_clicked_widget_excerpt', 0);
     1298            }
     1299        }
     1300        if (isset($_POST['reaction_buttons_clicked_widget_thumb']) && $_POST['reaction_buttons_clicked_widget_thumb']){
     1301            update_option('reaction_buttons_clicked_widget_thumb',true);
     1302        }
     1303        else{
     1304            update_option('reaction_buttons_clicked_widget_thumb',false);
     1305        }
     1306    }
     1307
     1308    // show the current settings and the dialog
    12721309    echo "<p>" . __("This widget shows the posts with the most clicks over all buttons.", 'reaction_buttons') . "</p>";
    1273 
    1274     // show the current settings and the dialog
    12751310    ?>
    12761311    <p><label><?php _e("Title:", 'reaction_buttons') ?><br />
     
    12841319
    12851320    <?php
    1286     // validate the input and update the settings
    1287     if (isset($_POST['reaction_buttons_clicked_widget_title'])){
    1288         update_option('reaction_buttons_clicked_widget_title', esc_attr($_POST['reaction_buttons_clicked_widget_title']));
    1289     }
    1290 
    1291     if (isset($_POST['reaction_buttons_clicked_widget_count'])){
    1292         $count = $_POST['reaction_buttons_clicked_widget_count'];
    1293         if (is_numeric($count) && 0 < intval($count)) {
    1294             update_option('reaction_buttons_clicked_widget_count', esc_attr($count));
    1295         }
    1296         else {
    1297             reaction_buttons_message(__("Please input a positiv number!", 'reaction_buttons'));
    1298         }
    1299     }
    1300    
    1301     if (isset($_POST['reaction_buttons_clicked_widget_excerpt'])){
    1302         $excerpt = $_POST['reaction_buttons_clicked_widget_excerpt'];
    1303         if (is_numeric($excerpt)) {
    1304             update_option('reaction_buttons_clicked_widget_excerpt', esc_attr($excerpt));
    1305         }
    1306         else {
    1307             update_option('reaction_buttons_clicked_widget_excerpt', 0);
    1308         }
    1309     }
    1310     if (isset($_POST['reaction_buttons_clicked_widget_thumb']) && $_POST['reaction_buttons_clicked_widget_thumb']){
    1311         update_option('reaction_buttons_clicked_widget_thumb',true);
    1312     }
    1313     else{
    1314         update_option('reaction_buttons_clicked_widget_thumb',false);
    1315     }
    1316 
    13171321}
    13181322
  • reaction-buttons/tags/1.8.1/readme.txt

    r913716 r917767  
    33Requires at least: 3.3
    44Tested up to: 3.9.1
    5 Stable tag: 1.8.0
     5Stable tag: 1.8.1
    66License: GPLv2 or later
    77Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MLX3Z7ZD5AJ4Q
     
    5858
    5959== Changelog ==
     60= 1.8.1 =
     61* fixed an error in the new widget controls
     62
    6063= 1.8 =
    6164* added option for post thumbs to the widgets
  • reaction-buttons/trunk/reaction_buttons.php

    r913734 r917767  
    44   Plugin URI: http://blog.jl42.de/reaction-buttons/
    55   Description: Adds Buttons for very simple and fast feedback to your post. Inspired by Blogger.
    6    Version: 1.8.0
     6   Version: 1.8.1
    77   Author: Jakob Lenfers
    88   Author URI: http://blog.jl42.de
     
    11871187 */
    11881188function reaction_buttons_widget_control(){
     1189    // save the settings if submitted
     1190        if (isset($_REQUEST['savewidgets']) && $_REQUEST['savewidgets']) {
     1191        // validate the input and update the settings
     1192        if (isset($_POST['reaction_buttons_widget_title'])){
     1193            update_option('reaction_buttons_widget_title', esc_attr($_POST['reaction_buttons_widget_title']));
     1194        }
     1195
     1196        if (isset($_POST['reaction_buttons_widget_count'])){
     1197            $count = $_POST['reaction_buttons_widget_count'];
     1198            if (is_numeric($count) && 0 < intval($count)) {
     1199                update_option('reaction_buttons_widget_count', esc_attr($count));
     1200            }
     1201            else {
     1202                reaction_buttons_message(__("Please input a positiv number!", 'reaction_buttons'));
     1203            }
     1204        }
     1205   
     1206        if (isset($_POST['reaction_buttons_widget_excerpt'])){
     1207            $excerpt = $_POST['reaction_buttons_widget_excerpt'];
     1208            if (is_numeric($excerpt)) {
     1209                update_option('reaction_buttons_widget_excerpt', esc_attr($excerpt));
     1210            }
     1211            else {
     1212                update_option('reaction_buttons_widget_excerpt', 0);
     1213            }
     1214        }
     1215        if (isset($_POST['reaction_buttons_widget_buttons'])){
     1216            update_option('reaction_buttons_widget_buttons', esc_attr($_POST['reaction_buttons_widget_buttons']));
     1217        }
     1218        if (isset($_POST['reaction_buttons_widget_thumb']) && $_POST['reaction_buttons_widget_thumb']){
     1219            update_option('reaction_buttons_widget_thumb', true);
     1220        }
     1221        else{
     1222            update_option('reaction_buttons_widget_thumb', false);
     1223        }
     1224    }
     1225
     1226    // show the current settings and the dialog
    11891227    echo "<p>" . __("This widget shows the posts with the most clicks for each button.", 'reaction_buttons') . "</p>";
    1190 
    1191     // show the current settings and the dialog
    11921228    ?>
    11931229    <p><label><?php _e("Title:", 'reaction_buttons') ?><br />
     
    12011237    <p><label><?php _e("Show a possible post thumbnail? (Might need some manual adaptations in your CSS to look nice.)", 'reaction_buttons') ?><br />
    12021238    <input name="reaction_buttons_widget_thumb" type="checkbox" <?php checked(get_option('reaction_buttons_widget_thumb', false), true); ?> /></label></p>
    1203 
    1204     <?php
    1205     // validate the input and update the settings
    1206     if (isset($_POST['reaction_buttons_widget_title'])){
    1207         update_option('reaction_buttons_widget_title', esc_attr($_POST['reaction_buttons_widget_title']));
    1208     }
    1209 
    1210     if (isset($_POST['reaction_buttons_widget_count'])){
    1211         $count = $_POST['reaction_buttons_widget_count'];
    1212         if (is_numeric($count) && 0 < intval($count)) {
    1213             update_option('reaction_buttons_widget_count', esc_attr($count));
    1214         }
    1215         else {
    1216             reaction_buttons_message(__("Please input a positiv number!", 'reaction_buttons'));
    1217         }
    1218     }
    1219    
    1220     if (isset($_POST['reaction_buttons_widget_excerpt'])){
    1221         $excerpt = $_POST['reaction_buttons_widget_excerpt'];
    1222         if (is_numeric($excerpt)) {
    1223             update_option('reaction_buttons_widget_excerpt', esc_attr($excerpt));
    1224         }
    1225         else {
    1226             update_option('reaction_buttons_widget_excerpt', 0);
    1227         }
    1228     }
    1229     if (isset($_POST['reaction_buttons_widget_buttons'])){
    1230         update_option('reaction_buttons_widget_buttons', esc_attr($_POST['reaction_buttons_widget_buttons']));
    1231     }
    1232     if (isset($_POST['reaction_buttons_widget_thumb']) && $_POST['reaction_buttons_widget_thumb']){
    1233         update_option('reaction_buttons_widget_thumb',true);
    1234     }
    1235     else{
    1236         update_option('reaction_buttons_widget_thumb',false);
    1237     }
     1239<?php
    12381240}
    12391241
     
    12701272 */
    12711273function reaction_buttons_clicked_widget_control(){
     1274    // save the settings if submitted
     1275        if (isset($_REQUEST['savewidgets']) && $_REQUEST['savewidgets']) {
     1276    // validate the input and update the settings
     1277        if (isset($_POST['reaction_buttons_clicked_widget_title'])){
     1278            update_option('reaction_buttons_clicked_widget_title', esc_attr($_POST['reaction_buttons_clicked_widget_title']));
     1279        }
     1280
     1281        if (isset($_POST['reaction_buttons_clicked_widget_count'])){
     1282            $count = $_POST['reaction_buttons_clicked_widget_count'];
     1283            if (is_numeric($count) && 0 < intval($count)) {
     1284                update_option('reaction_buttons_clicked_widget_count', esc_attr($count));
     1285            }
     1286            else {
     1287                reaction_buttons_message(__("Please input a positiv number!", 'reaction_buttons'));
     1288            }
     1289        }
     1290   
     1291        if (isset($_POST['reaction_buttons_clicked_widget_excerpt'])){
     1292            $excerpt = $_POST['reaction_buttons_clicked_widget_excerpt'];
     1293            if (is_numeric($excerpt)) {
     1294                update_option('reaction_buttons_clicked_widget_excerpt', esc_attr($excerpt));
     1295            }
     1296            else {
     1297                update_option('reaction_buttons_clicked_widget_excerpt', 0);
     1298            }
     1299        }
     1300        if (isset($_POST['reaction_buttons_clicked_widget_thumb']) && $_POST['reaction_buttons_clicked_widget_thumb']){
     1301            update_option('reaction_buttons_clicked_widget_thumb',true);
     1302        }
     1303        else{
     1304            update_option('reaction_buttons_clicked_widget_thumb',false);
     1305        }
     1306    }
     1307
     1308    // show the current settings and the dialog
    12721309    echo "<p>" . __("This widget shows the posts with the most clicks over all buttons.", 'reaction_buttons') . "</p>";
    1273 
    1274     // show the current settings and the dialog
    12751310    ?>
    12761311    <p><label><?php _e("Title:", 'reaction_buttons') ?><br />
     
    12841319
    12851320    <?php
    1286     // validate the input and update the settings
    1287     if (isset($_POST['reaction_buttons_clicked_widget_title'])){
    1288         update_option('reaction_buttons_clicked_widget_title', esc_attr($_POST['reaction_buttons_clicked_widget_title']));
    1289     }
    1290 
    1291     if (isset($_POST['reaction_buttons_clicked_widget_count'])){
    1292         $count = $_POST['reaction_buttons_clicked_widget_count'];
    1293         if (is_numeric($count) && 0 < intval($count)) {
    1294             update_option('reaction_buttons_clicked_widget_count', esc_attr($count));
    1295         }
    1296         else {
    1297             reaction_buttons_message(__("Please input a positiv number!", 'reaction_buttons'));
    1298         }
    1299     }
    1300    
    1301     if (isset($_POST['reaction_buttons_clicked_widget_excerpt'])){
    1302         $excerpt = $_POST['reaction_buttons_clicked_widget_excerpt'];
    1303         if (is_numeric($excerpt)) {
    1304             update_option('reaction_buttons_clicked_widget_excerpt', esc_attr($excerpt));
    1305         }
    1306         else {
    1307             update_option('reaction_buttons_clicked_widget_excerpt', 0);
    1308         }
    1309     }
    1310     if (isset($_POST['reaction_buttons_clicked_widget_thumb']) && $_POST['reaction_buttons_clicked_widget_thumb']){
    1311         update_option('reaction_buttons_clicked_widget_thumb',true);
    1312     }
    1313     else{
    1314         update_option('reaction_buttons_clicked_widget_thumb',false);
    1315     }
    1316 
    13171321}
    13181322
  • reaction-buttons/trunk/readme.txt

    r913716 r917767  
    33Requires at least: 3.3
    44Tested up to: 3.9.1
    5 Stable tag: 1.8.0
     5Stable tag: 1.8.1
    66License: GPLv2 or later
    77Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MLX3Z7ZD5AJ4Q
     
    5858
    5959== Changelog ==
     60= 1.8.1 =
     61* fixed an error in the new widget controls
     62
    6063= 1.8 =
    6164* added option for post thumbs to the widgets
Note: See TracChangeset for help on using the changeset viewer.