return $attr; } /** * Filters the attachment link and adds the 'itemprop' attribute. * * @since 1.0.0 * @access public * @param string $link * @return string */ public function get_attachment_link($link) { return preg_replace('/(<a.*?)>/i', '$1 itemprop="contentURL">', $link); } /** * Returns the instance. * * @since 1.0.0 * @access public * @return object */ public static function get_instance() { if (!self::$instance) { self::$instance = new self(); } return self::$instance; } } Hoot_Cleaner_Gallery::get_instance();
/** * Filters the attachment link and adds the 'itemprop' attribute. * * @since 1.0.0 * @access public * @param string $link * @return string */ public function get_attachment_link($link) { return preg_replace('/(<a.*?)>/i', '$1 itemprop="contentURL">', $link); } /** * Returns the instance. * * @since 1.0.0 * @access public * @return object */ public static function get_instance() { if (!self::$instance) { self::$instance = new self(); } return self::$instance; } } /* Initialize class */ global $hoot_cleaner_gallery; $hoot_cleaner_gallery = Hoot_Cleaner_Gallery::get_instance();