Changeset 834497
- Timestamp:
- 01/07/2014 07:50:28 PM (12 years ago)
- Location:
- wp-favorite-posts/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (2 diffs)
-
wp-favorite-posts.php (modified) (4 diffs)
-
wpfp-admin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-favorite-posts/trunk/readme.txt
r832779 r834497 6 6 Requires at least: 3.5 7 7 Tested up to: 3.8 8 Stable tag: 1. 5.9.18 Stable tag: 1.6.0 9 9 10 10 Allows visitors to add favorite posts. This plugin use cookies for saving data so … … 53 53 == Changelog == 54 54 55 = 1.5.9.1 (2014-01-07) = 56 * Fix php warnings and deprecated thing. 57 55 58 = 1.5.9.1 (2014-01-04) = 56 59 * fix php warnings -
wp-favorite-posts/trunk/wp-favorite-posts.php
r832779 r834497 4 4 Plugin URI: http://nxsn.com/my-projects/wp-favorite-posts-plugin/ 5 5 Description: Allows users to add favorite posts. This plugin use cookies for saving data so unregistered users can favorite a post. Put <code><?php wpfp_link(); ?></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.16 Version: 1.6.0 7 7 Author: Huseyin Berberoglu 8 8 Author URI: http://nxsn.com … … 42 42 if (isset($_REQUEST['wpfpaction'])): 43 43 global $ajax_mode; 44 $ajax_mode = $_REQUEST['ajax'];44 $ajax_mode = isset($_REQUEST['ajax']) ? $_REQUEST['ajax'] : false; 45 45 if ($_REQUEST['wpfpaction'] == 'add') { 46 46 wpfp_add_favorite(); … … 135 135 function wpfp_link( $return = 0, $action = "", $show_span = 1, $args = array() ) { 136 136 global $post; 137 $post_id = $post->ID; 137 //print_r($post); 138 $post_id = &$post->ID; 138 139 extract($args); 139 140 $str = ""; … … 338 339 $wpfp_options['dont_load_css_file'] = 0; 339 340 $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); 341 344 } 342 345 add_action('activate_wp-favorite-posts/wp-favorite-posts.php', 'wpfp_init'); -
wp-favorite-posts/trunk/wpfp-admin.php
r832779 r834497 4 4 if ( function_exists('current_user_can') && !current_user_can('manage_options') ) 5 5 die(__('Cheatin’ 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 8 13 $wpfp_options['add_favorite'] = htmlspecialchars($_POST['add_favorite']); 9 14 $wpfp_options['added'] = htmlspecialchars($_POST['added']); … … 15 20 $wpfp_options['rem'] = htmlspecialchars($_POST['rem']); 16 21 $wpfp_options['cookie_warning'] = htmlspecialchars($_POST['cookie_warning']); 17 $wpfp_options['opt_only_registered'] = htmlspecialchars($_POST['opt_only_registered']);18 22 $wpfp_options['text_only_registered'] = htmlspecialchars($_POST['text_only_registered']); 19 23 $wpfp_options['statics'] = htmlspecialchars($_POST['statics']); 20 24 $wpfp_options['before_image'] = htmlspecialchars($_POST['before_image']); 21 25 $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']);24 26 $wpfp_options['autoshow'] = htmlspecialchars($_POST['autoshow']); 25 27 $wpfp_options['post_per_page'] = htmlspecialchars($_POST['post_per_page']); 26 28 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); 28 42 } 29 43 $message = "";
Note: See TracChangeset
for help on using the changeset viewer.