Changeset 488965
- Timestamp:
- 01/12/2012 07:43:24 PM (14 years ago)
- File:
-
- 1 edited
-
joemobi/trunk/joemobi-api.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
joemobi/trunk/joemobi-api.php
r488350 r488965 96 96 97 97 function joemobi_post_notification( $post ) { 98 $context = stream_context_create(array( 99 'http' => array( 100 'header'=>'Connection: close', 101 'timeout' => 3 102 ) 103 )); 104 @file_get_contents('http://api.joemobi.com/notify/?id=' . $post . '&url=' . urlencode(get_bloginfo('url')), false, $context); 98 $p = get_post($post); 99 100 // Don't notify on edits. 101 // We're assuming here an "edit" is when the modification date is > the published date. 102 if (@strtotime($p->post_date) >= @strtotime($p->post_modified)) { 103 $context = stream_context_create(array( 104 'http' => array( 105 'header'=>'Connection: close', 106 'timeout' => 3 107 ) 108 )); 109 @file_get_contents('http://api.joemobi.com/notify/?id=' . $post . '&url=' . urlencode(get_bloginfo('url')), false, $context); 110 } 111 105 112 } 106 113
Note: See TracChangeset
for help on using the changeset viewer.