Exemplo n.º 1
0
 /**
  * Find Featured Image and inserted image/link references to an attachment
  * 
  * Searches all post and page content to see if the attachment is used 
  * as a Featured Image or inserted in the post as an image or link.
  *
  * @since 0.1
  *
  * @param	int	post ID of attachment
  * @param	int	post ID of attachment's parent, if any
  * @param	boolean	True to compute references, false to return empty values
  *
  * @return	array	Reference information; see $references array comments
  */
 public static function mla_fetch_attachment_references($ID, $parent, $add_references = true)
 {
     /* 
      * The MLAReferences class is only loaded when needed.
      */
     if (!class_exists('MLAReferences')) {
         if (-1 === $ID) {
             return NULL;
         }
         require_once MLA_PLUGIN_PATH . 'includes/class-mla-data-references.php';
     }
     return MLAReferences::mla_fetch_attachment_references_handler($ID, $parent, $add_references);
 }