Changeset 135833
- Timestamp:
- 07/16/2009 07:40:09 PM (17 years ago)
- Location:
- post-to-facebook/trunk
- Files:
-
- 2 edited
-
post-to-facebook.php (modified) (4 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
post-to-facebook/trunk/post-to-facebook.php
r135604 r135833 2 2 /* 3 3 Plugin Name: Post-to-Faceook 4 Version: 1.0. 34 Version: 1.0.4 5 5 Plugin URI: http://blog.yeticode.co.uk/post-to-facebook 6 6 Description: Provides the ability to quickly post a blog item to your facebook mini feed. … … 9 9 */ 10 10 11 session_start();12 11 $url = get_bloginfo('wpurl').'/wp-content/plugins/post-to-facebook/'; 13 12 wp_register_script( 'post-to-facebook',$url. 'post-to-facebook.js',array( 'jquery' ), ''); … … 16 15 function post_to_facebook_gui() 17 16 { 18 if($_SESSION['post_to_facebook']) 17 $options = get_option('P2FB_Options',""); 18 if($options != '') 19 19 { 20 20 ?> 21 21 <script type="text/javascript"> 22 22 jQuery(document).ready(function(){ 23 p2fb_init("<?php print $ _SESSION['post_to_facebook']?>");23 p2fb_init("<?php print $options ?>"); 24 24 }); 25 25 </script> 26 26 <?php 27 27 // clear the session value that was 28 $_SESSION['post_to_facebook'] = '';28 update_option('P2FB_Options',''); 29 29 } 30 30 ?> … … 38 38 $permalink = get_permalink($post_id); 39 39 // is there a better way to do this? what about multiple posting? 40 $_SESSION['post_to_facebook'] = $permalink;40 update_option('P2FB_Options',$permalink); 41 41 } 42 42 } -
post-to-facebook/trunk/readme.txt
r135604 r135833 32 32 15/07/2009 - enabled session start, sorted out version numbers 33 33 15/07/2009 - change including of scripts so that js file does not appear on public side of site 34 16/07/2009 - changed from using session to options 34 35 35 36 == Screenshots ==
Note: See TracChangeset
for help on using the changeset viewer.