ActionsGenerator.php
2 months ago
AddRatingGenerator.php
2 months ago
CourseMetaGenerator.php
2 months ago
ElementGenerator.php
2 months ago
MaterialGenerator.php
2 months ago
Preview.php
2 months ago
PriceGenerator.php
2 months ago
SocialLinkGenerator.php
2 months ago
ThumbnailGenerator.php
2 months ago
ElementGenerator.php
42 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Preview script for html markup generator |
| 4 | * |
| 5 | * @package tutor-kirki-elements |
| 6 | */ |
| 7 | |
| 8 | namespace TutorLMSKirki\ElementGenerator; |
| 9 | |
| 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | exit; // Exit if accessed directly. |
| 12 | } |
| 13 | |
| 14 | /** |
| 15 | * Class ElementGenerator |
| 16 | * |
| 17 | * This class is used to define all helper functions. |
| 18 | */ |
| 19 | class ElementGenerator { |
| 20 | |
| 21 | /** |
| 22 | * ElementGenerator constructor. |
| 23 | */ |
| 24 | public function __construct() { |
| 25 | add_filter( 'kirki_element_generator_' . TDE_APP_PREFIX, array( $this, 'kirki_element_generator' ), 10, 2 ); |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Kirki element generator |
| 30 | * This function is used to generate the kirki elements |
| 31 | * |
| 32 | * @param string $string string. |
| 33 | * @param array $props array. //this props contains all the attributes of the kirki element. |
| 34 | * |
| 35 | * @return string html. |
| 36 | */ |
| 37 | public function kirki_element_generator( $string, $props ) { |
| 38 | $preview = new Preview( $props ); |
| 39 | return $preview->generate_elements(); |
| 40 | } |
| 41 | } |
| 42 |