| 1 |
<?php |
| 2 |
namespace ABlocks\Frontend\DynamicContent\Interpreters; |
| 3 |
|
| 4 |
use ABlocks\Helper; |
| 5 |
if ( ! defined( 'ABSPATH' ) ) { |
| 6 |
exit; |
| 7 |
} |
| 8 |
abstract class SiteInfo extends Abstracts\Interpreter { |
| 9 |
abstract public function info() : string; |
| 10 |
|
| 11 |
public function content() : string { |
| 12 |
$this->setting = array_values( array_filter( $this->setting ) ); |
| 13 |
$info = $this->info(); |
| 14 |
return count( $this->setting ) > 2 ? ( $this->setting[0] ?? '' ) . ( empty( $info ) ? ( $this->setting[2] ?? '' ) : $info ) . ( $this->setting[1] ?? '' ) : $info; |
| 15 |
} |
| 16 |
} |
| 17 |
|