Plugin Directory

Changeset 135833


Ignore:
Timestamp:
07/16/2009 07:40:09 PM (17 years ago)
Author:
linal
Message:

changed from using session to options

Location:
post-to-facebook/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • post-to-facebook/trunk/post-to-facebook.php

    r135604 r135833  
    22/*
    33Plugin Name: Post-to-Faceook
    4 Version: 1.0.3
     4Version: 1.0.4
    55Plugin URI: http://blog.yeticode.co.uk/post-to-facebook
    66Description: Provides the ability to quickly post a blog item to your facebook mini feed.
     
    99*/
    1010
    11 session_start();
    1211$url = get_bloginfo('wpurl').'/wp-content/plugins/post-to-facebook/';
    1312wp_register_script( 'post-to-facebook',$url. 'post-to-facebook.js',array( 'jquery' ), '');
     
    1615function post_to_facebook_gui()
    1716{
    18     if($_SESSION['post_to_facebook'])
     17    $options  = get_option('P2FB_Options',"");
     18    if($options != '')
    1919    {
    2020        ?>
    2121            <script type="text/javascript">
    2222                jQuery(document).ready(function(){
    23                     p2fb_init("<?php print $_SESSION['post_to_facebook'] ?>");
     23                    p2fb_init("<?php print $options ?>");
    2424                });
    2525            </script>
    2626        <?php
    2727        // clear the session value that was
    28         $_SESSION['post_to_facebook'] = '';
     28        update_option('P2FB_Options','');
    2929    }
    3030?>
     
    3838        $permalink = get_permalink($post_id);
    3939        // is there a better way to do this? what about multiple posting?
    40         $_SESSION['post_to_facebook'] = $permalink;
     40        update_option('P2FB_Options',$permalink);
    4141    }
    4242}
  • post-to-facebook/trunk/readme.txt

    r135604 r135833  
    323215/07/2009 - enabled session start, sorted out version numbers
    333315/07/2009 - change including of scripts so that js file does not appear on public side of site
     3416/07/2009 - changed from using session to options
    3435
    3536== Screenshots ==
Note: See TracChangeset for help on using the changeset viewer.