Plugin Directory

Changeset 834497


Ignore:
Timestamp:
01/07/2014 07:50:28 PM (12 years ago)
Author:
hberberoglu
Message:

version bump

Location:
wp-favorite-posts/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-favorite-posts/trunk/readme.txt

    r832779 r834497  
    66Requires at least: 3.5
    77Tested up to: 3.8
    8 Stable tag: 1.5.9.1
     8Stable tag: 1.6.0
    99
    1010Allows visitors to add favorite posts. This plugin use cookies for saving data so
     
    5353== Changelog ==
    5454
     55= 1.5.9.1 (2014-01-07) =
     56* Fix php warnings and deprecated thing.
     57
    5558= 1.5.9.1 (2014-01-04) =
    5659* fix php warnings
  • wp-favorite-posts/trunk/wp-favorite-posts.php

    r832779 r834497  
    44Plugin URI: http://nxsn.com/my-projects/wp-favorite-posts-plugin/
    55Description: Allows users to add favorite posts. This plugin use cookies for saving data so unregistered users can favorite a post. Put <code>&lt;?php wpfp_link(); ?&gt;</code> where ever you want on a single post. Then create a page which includes that text : <code>[wp-favorite-posts]</code> That's it!
    6 Version: 1.5.9.1
     6Version: 1.6.0
    77Author: Huseyin Berberoglu
    88Author URI: http://nxsn.com
     
    4242    if (isset($_REQUEST['wpfpaction'])):
    4343        global $ajax_mode;
    44         $ajax_mode = $_REQUEST['ajax'];
     44        $ajax_mode = isset($_REQUEST['ajax']) ? $_REQUEST['ajax'] : false;
    4545        if ($_REQUEST['wpfpaction'] == 'add') {
    4646            wpfp_add_favorite();
     
    135135function wpfp_link( $return = 0, $action = "", $show_span = 1, $args = array() ) {
    136136    global $post;
    137     $post_id = $post->ID;
     137    //print_r($post);
     138    $post_id = &$post->ID;
    138139    extract($args);
    139140    $str = "";
     
    338339    $wpfp_options['dont_load_css_file'] = 0;
    339340    $wpfp_options['post_per_page'] = 20;
    340     add_option('wpfp_options', $wpfp_options, 'Favorite Posts Options');
     341    $wpfp_options['autoshow'] = '';
     342    $wpfp_options['opt_only_registered'] = 0;
     343    add_option('wpfp_options', $wpfp_options);
    341344}
    342345add_action('activate_wp-favorite-posts/wp-favorite-posts.php', 'wpfp_init');
  • wp-favorite-posts/trunk/wpfp-admin.php

    r832779 r834497  
    44    if ( function_exists('current_user_can') && !current_user_can('manage_options') )
    55        die(__('Cheatin&#8217; uh?'));
    6     if ($_POST['show_remove_link'] == 'show_remove_link') $_POST['added'] = 'show remove link';
    7     if ($_POST['show_add_link'] == 'show_add_link') $_POST['removed'] = 'show add link';
     6
     7    if (isset($_POST['show_remove_link']) && $_POST['show_remove_link'] == 'show_remove_link')
     8        $_POST['added'] = 'show remove link';
     9
     10    if (isset($_POST['show_add_link']) && $_POST['show_add_link'] == 'show_add_link')
     11        $_POST['removed'] = 'show add link';
     12
    813    $wpfp_options['add_favorite'] = htmlspecialchars($_POST['add_favorite']);
    914    $wpfp_options['added'] = htmlspecialchars($_POST['added']);
     
    1520    $wpfp_options['rem'] = htmlspecialchars($_POST['rem']);
    1621    $wpfp_options['cookie_warning'] = htmlspecialchars($_POST['cookie_warning']);
    17     $wpfp_options['opt_only_registered'] = htmlspecialchars($_POST['opt_only_registered']);
    1822    $wpfp_options['text_only_registered'] = htmlspecialchars($_POST['text_only_registered']);
    1923    $wpfp_options['statics'] = htmlspecialchars($_POST['statics']);
    2024    $wpfp_options['before_image'] = htmlspecialchars($_POST['before_image']);
    2125    $wpfp_options['custom_before_image'] = htmlspecialchars($_POST['custom_before_image']);
    22     $wpfp_options['dont_load_js_file'] = htmlspecialchars($_POST['dont_load_js_file']);
    23     $wpfp_options['dont_load_css_file'] = htmlspecialchars($_POST['dont_load_css_file']);
    2426    $wpfp_options['autoshow'] = htmlspecialchars($_POST['autoshow']);
    2527    $wpfp_options['post_per_page'] = htmlspecialchars($_POST['post_per_page']);
    2628
    27     update_option('wpfp_options', $wpfp_options);
     29    $wpfp_options['dont_load_js_file'] = '';
     30    if (isset($_POST['dont_load_js_file']))
     31        $wpfp_options['dont_load_js_file'] = htmlspecialchars($_POST['dont_load_js_file']);
     32
     33    $wpfp_options['dont_load_css_file'] = '';
     34    if (isset($_POST['dont_load_css_file']))
     35        $wpfp_options['dont_load_css_file'] = htmlspecialchars($_POST['dont_load_css_file']);
     36
     37    $wpfp_options['opt_only_registered'] = '';
     38    if (isset($_POST['opt_only_registered']))
     39        $wpfp_options['opt_only_registered'] = htmlspecialchars($_POST['opt_only_registered']);
     40
     41    update_option('wpfp_options', $wpfp_options);
    2842}
    2943$message = "";
Note: See TracChangeset for help on using the changeset viewer.