shortcode = (string) $args['shortcode']; // Plugin Profile self::$profile = Profile::getInstance(); } public function init(): void { add_shortcode($this->shortcode, [$this, 'generate']); } /** * Generate Output * * @param mixed $atts * @return string */ public function generate($atts = []): string { // Force to Array if (Str::is($atts) and Str::trim($atts) === '') $atts = []; // DayTidy Pre Shortcode $pre = apply_filters('DayTidy/F__DayTidy/Shortcode__generate/pre', '', $atts, $this->shortcode); if (Str::trim($pre)) { Assets::enqueueFrontend(['base']); return Kses::page('
' . $pre . '
'); } // Return Content return Kses::page('
' . $this->output($atts) . '
'); } protected function uiRootClasses(): string { return 'wui daytidy-ui'; } abstract public function output(array $atts = []): string; }