Initial commit
This commit is contained in:
30
inc/classes/Character.php
Normal file
30
inc/classes/Character.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Klasa Tables
|
||||
*
|
||||
* @link https://krzysztof-turek.com
|
||||
*
|
||||
* @package tylkofotografia.pl
|
||||
* @version 0.2
|
||||
*/
|
||||
class Character {
|
||||
|
||||
use Singleton;
|
||||
|
||||
function __construct() {
|
||||
$this->setupFilter();
|
||||
}
|
||||
|
||||
protected function setupFilter() {
|
||||
add_filter( 'the_content', [$this, 'fontAwesome'] );
|
||||
}
|
||||
public function fontAwesome( $content ) {
|
||||
$content = str_replace(
|
||||
[ '%v%', '%x%' ],
|
||||
[ '<i class="fa-solid fa-check text-success"></i>', '<i class="fa-solid fa-xmark text-danger
|
||||
"></i>'],
|
||||
$content
|
||||
);
|
||||
return $content;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user