Plugin Directory

Changeset 2374358


Ignore:
Timestamp:
09/03/2020 09:00:46 AM (6 years ago)
Author:
hberberoglu
Message:

updated to 1.6.7

Location:
wp-favorite-posts/trunk
Files:
1 added
1 deleted
2 edited

Legend:

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

    r1372356 r2374358  
    66Requires at least: 3.5
    77Tested up to: 4.4.2
    8 Stable tag: 1.6.6
     8Stable tag: 1.6.7
    99
    1010Allows visitors to add favorite posts. This plugin use cookies for saving data so
     
    5252
    5353== Changelog ==
     54= 1.6.7 (2020-09-03) =
     55* Tested with 5.5.1 and fixed compatibility issues.
     56
    5457= 1.6.6 (2016-03-16) =
    5558* Security update: Fix cross-site scripting (XSS) vulnerability props: JPCERT/CC Vulnerability Handling Team & Gen Sato
  • wp-favorite-posts/trunk/wp-favorite-posts.php

    r1372356 r2374358  
    44Plugin URI: https://github.com/hberberoglu/wp-favorite-posts
    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.6.6
     6Version: 1.6.7
    77Author: Huseyin Berberoglu
    88Author URI: https://github.com/hberberoglu
     
    2828*/
    2929
     30define('WPFP_VERSION', "1.6.6");
    3031define('WPFP_PATH', plugins_url() . '/wp-favorite-posts');
    3132define('WPFP_META_KEY', "wpfp_favorites");
     
    125126function wpfp_add_to_usermeta($post_id) {
    126127    $wpfp_favorites = wpfp_get_user_meta();
     128    if(empty($wpfp_favorites) or !is_array($wpfp_favorites)) $wpfp_favorites = array();
    127129    $wpfp_favorites[] = $post_id;
    128130    wpfp_update_user_meta($wpfp_favorites);
     
    320322function wpfp_add_js_script() {
    321323    if (!wpfp_get_option('dont_load_js_file'))
    322         wp_enqueue_script( "wp-favorite-posts", WPFP_PATH . "/wpfp.js", array( 'jquery' ) );
     324        wp_enqueue_script( "wp-favorite-posts", WPFP_PATH . "/script.js", array( 'jquery' ), WPFP_VERSION );
    323325}
    324326add_action('wp_print_scripts', 'wpfp_add_js_script');
     
    394396function wpfp_get_user_id() {
    395397    global $current_user;
    396     get_currentuserinfo();
     398    $current_user = wp_get_current_user();
    397399    return $current_user->ID;
    398400}
Note: See TracChangeset for help on using the changeset viewer.