HEX
Server: Apache
System: Linux sxb1plzcpnl503971.prod.sxb1.secureserver.net 4.18.0-553.52.1.lve.el8.x86_64 #1 SMP Wed May 21 15:31:29 UTC 2025 x86_64
User: nciq25gegoxa (9650876)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/nciq25gegoxa/public_html/wp-content/plugins/learnpress/inc/Shortcodes/AbstractShortcode.php
<?php

namespace LearnPress\Shortcodes;

/**
 * Class AbstractShortcode
 *
 * @package LearnPress\Shortcodes
 * @since 4.2.3
 * @version 1.0.0
 */
abstract class AbstractShortcode {
	protected $prefix = 'learn_press_';
	protected $shortcode_name;

	protected function init() {
		// Register shortcode.
		add_shortcode( $this->prefix . $this->shortcode_name, array( $this, 'render' ) );
	}

	/**
	 * Render template of shortcode.
	 * If not set any attribute on short, $attrs is empty string.
	 *
	 * @param string|array $attrs
	 *
	 * @return string
	 */
	abstract public function render( $attrs ): string;
}