<?php

/**
 * @package         Google Structured Data
 * @version         6.2.1 Free
 *
 * @author          Tassos Marinos <info@tassos.gr>
 * @link            http://www.tassos.gr
 * @copyright       Copyright © 2026 Tassos Marinos All Rights Reserved
 * @license         GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> or later
 */

defined('_JEXEC') or die;

require_once __DIR__ . '/script.install.helper.php';

class PlgSystemGSDInstallerScript extends PlgSystemGSDInstallerScriptHelper
{
	public $name           = 'GSD';
	public $alias          = 'gsd';
	public $extension_type = 'plugin';

	/**
	 * Make sure the GSD system plugin runs after late-processing shortcode
	 * plugins (e.g. Regular Labs ReReplacer) at the onAfterRender stage. The
	 * Markdown Component Buffer method extracts the article from the fully
	 * rendered page, so those plugins must have expanded their shortcodes
	 * first. Bumping our ordering just past Regular Labs keeps us comfortably
	 * before System - SEF (ordering 19), which our onAfterRoute relies on.
	 *
	 * @return  void
	 */
	public function onAfterInstall()
	{
		$this->pluginOrderAfter(['rereplacer', 'regularlabs']);
	}
}