AAAAUsage:
*
*
* or
*
* or
*
* or
*
*
* @package Joomla.Plugin
* @subpackage Content.pagebreak
* @since 1.6
*/
class plgContentPagebreak extends JPlugin
{
/**
* Constructor
*
* @access protected
* @param object $subject The object to observe
* @param array $config An array that holds the plugin configuration
* @since 1.5
*/
public function __construct(& $subject, $config)
{
parent::__construct($subject, $config);
$this->loadLanguage();
}
/**
* @param string The context of the content being passed to the plugin.
* @param object The article object. Note $article->text is also available
* @param object The article params
* @param int The 'page' number
*
* @return void
* @since 1.6
*/
public function onContentPrepare($context, &$row, &$params, $page = 0)
{
$canProceed = $context == 'com_content.article';
if (!$canProceed) {
return;
}
$style = $this->params->get('style', 'pages');
// Expression to search for.
$regex = '#