first commit
This commit is contained in:
34
shortcode.php
Normal file
34
shortcode.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
|
||||
class PlgContentShortcode extends JPlugin {
|
||||
|
||||
|
||||
|
||||
protected $autoloadLanguage = true;
|
||||
|
||||
|
||||
function onContentPrepare ($context, $article, $params, $limitstart )
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$article->text = str_replace('[[::', '<a href="https://octopart.com/search?q=', $article->text);
|
||||
$article->text = str_replace('::]]','" target="_blank"> ⇗ OctoPart.com</a>', $article->text);
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
Reference in New Issue
Block a user