Advertisement
acegiak

Untitled

May 27th, 2015
521
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.63 KB | None | 0 0
  1.     public static function publish ( $ID, $post=null) {
  2.         $cites = get_post_meta($ID, 'mf2_cite', true);
  3.  
  4.         error_log("WEBMENTION CITE CHECK ".print_r($cites,true));
  5.         if (empty($cites)) { return; error_log("WEBMENTION CITE NULL"); }  
  6.  
  7.         if (isset($cites['url'])) {
  8.             send_webmention(get_permalink($ID), $cites['url']);
  9.              error_log("WEBMENTION CALLED".get_permalink($ID)." : ".$cites['url']);
  10.         }else{
  11.             foreach ($cites as $cite) {
  12.             if (!empty($cite) && isset($cite['url'])) {
  13.                 send_webmention(get_permalink($ID), $cite['url']);
  14.                 error_log("WEBMENTIONS CALLED".get_permalink($ID)." : ".$cite['url']);
  15.                 }
  16.         }
  17.    
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement