diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-28 17:50:05 +0000 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-28 17:50:05 +0000 |
| commit | efcc664aba9f2f11de92c69a7f3159bfd2b4696a (patch) | |
| tree | 55feb2032cd3ab23c81ea5afd8c340f99e2601d3 /update/plugin | |
| parent | f894a67b52aaaeba19ebfa8a9e8cb2441093b375 (diff) | |
| download | instadisc-efcc664aba9f2f11de92c69a7f3159bfd2b4696a.tar.gz instadisc-efcc664aba9f2f11de92c69a7f3159bfd2b4696a.tar.bz2 instadisc-efcc664aba9f2f11de92c69a7f3159bfd2b4696a.zip | |
Update: Modifed Wordpress plugin
Closes #66
Diffstat (limited to 'update/plugin')
| -rw-r--r-- | update/plugin/wordpress/trunk/instadisc/instadisc.php | 19 |
1 files changed, 15 insertions, 4 deletions
| diff --git a/update/plugin/wordpress/trunk/instadisc/instadisc.php b/update/plugin/wordpress/trunk/instadisc/instadisc.php index b56bb20..3cb711c 100644 --- a/update/plugin/wordpress/trunk/instadisc/instadisc.php +++ b/update/plugin/wordpress/trunk/instadisc/instadisc.php | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | <?php | 1 | <?php |
| 2 | /* | 2 | /* |
| 3 | Plugin Name: InstaDisc Update Server | 3 | Plugin Name: InstaDisc Update Server |
| 4 | Plugin URI: http://fourisland.com/projects/instadisc/wiki/Update_Wordpress_Plugin | 4 | Plugin URI: http://instadisc.org/Wordpress |
| 5 | Description: This plugin provides two InstaDisc feeds for your Wordpress blog, a post subscription and a comment subscription. | 5 | Description: This plugin provides two InstaDisc feeds for your Wordpress blog, a post subscription and a comment subscription. |
| 6 | Version: 1.0 | 6 | Version: 1.0 |
| 7 | Author: Starla Insigna | 7 | Author: Starla Insigna |
| @@ -43,8 +43,7 @@ if ((get_option('instaDisc_comment_password') === FALSE) || !extension_loaded('m | |||
| 43 | add_action('admin_menu', 'am_pages'); | 43 | add_action('admin_menu', 'am_pages'); |
| 44 | 44 | ||
| 45 | function am_pages() | 45 | function am_pages() |
| 46 | { | 46 | { add_options_page('InstaDisc Settings', 'InstaDisc', 8, 'instadisc', 'id_settings_page'); |
| 47 | add_options_page('InstaDisc Settings', 'InstaDisc', 8, 'instadisc', 'id_settings_page'); | ||
| 48 | } | 47 | } |
| 49 | 48 | ||
| 50 | function id_settings_page() | 49 | function id_settings_page() |
| @@ -114,6 +113,18 @@ function sendPost($id) | |||
| 114 | $authorName = $author->display_name; | 113 | $authorName = $author->display_name; |
| 115 | $url = get_permalink($id); | 114 | $url = get_permalink($id); |
| 116 | 115 | ||
| 116 | foreach (wp_get_post_categories($id) as $value) | ||
| 117 | { | ||
| 118 | $tags[] = get_cat_name($value); | ||
| 119 | } | ||
| 120 | |||
| 121 | foreach (wp_get_post_tags($id) as $value) | ||
| 122 | { | ||
| 123 | $tags[] = $value->name; | ||
| 124 | } | ||
| 125 | |||
| 126 | $semantics = array('tag' => implode($tags,',')); | ||
| 127 | |||
| 117 | $subscriptionURL = 'http://' . $_SERVER['SERVER_NAME'] . '/blog-post/' . generateSlug(get_option('instaDisc_subscription_title')) . '/'; | 128 | $subscriptionURL = 'http://' . $_SERVER['SERVER_NAME'] . '/blog-post/' . generateSlug(get_option('instaDisc_subscription_title')) . '/'; |
| 118 | 129 | ||
| 119 | $encID = 0; | 130 | $encID = 0; |
| @@ -129,7 +140,7 @@ function sendPost($id) | |||
| 129 | new xmlrpcval($title, 'string'), | 140 | new xmlrpcval($title, 'string'), |
| 130 | new xmlrpcval($authorName, 'string'), | 141 | new xmlrpcval($authorName, 'string'), |
| 131 | new xmlrpcval($url, 'string'), | 142 | new xmlrpcval($url, 'string'), |
| 132 | new xmlrpcval(serialize(array()), 'string'), | 143 | new xmlrpcval(serialize($semantics), 'string'), |
| 133 | new xmlrpcval($encID, 'int'))); | 144 | new xmlrpcval($encID, 'int'))); |
| 134 | $resp = $client->send($msg); | 145 | $resp = $client->send($msg); |
| 135 | $val = $resp->value()->scalarVal(); | 146 | $val = $resp->value()->scalarVal(); |
