PluginProbe ʕ •ᴥ•ʔ
Disable Admin Notices – Hide Dashboard Notifications / trunk
Disable Admin Notices – Hide Dashboard Notifications vtrunk
1.4.5 trunk 1.0.0 1.0.2 1.0.3 1.0.5 1.0.6 1.1.1 1.1.3 1.1.4 1.2.0 1.2.2 1.2.3 1.2.4 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4
disable-admin-notices / libs / factory / forms / controls / customs / html.php
disable-admin-notices / libs / factory / forms / controls / customs Last commit date
html.php 1 year ago index.php 3 years ago separator.php 1 year ago
html.php
46 lines
1 <?php
2 /**
3 * Html Markup
4 *
5 * @author Alex Kovalev <alex.kovalevv@gmail.com>
6 * @copyright (c) 2018, Webcraftic Ltd
7 *
8 * @package factory-forms
9 * @since 1.0.0
10 */
11
12 // Exit if accessed directly
13 if( !defined('ABSPATH') ) {
14 exit;
15 }
16
17 if( !class_exists('Wbcr_FactoryForms480_Html') ) {
18
19 class Wbcr_FactoryForms480_Html extends Wbcr_FactoryForms480_CustomElement {
20
21 public $type = 'html';
22
23 /**
24 * Shows the html markup of the element.
25 *
26 * @since 1.0.0
27 * @return void
28 */
29 public function html()
30 {
31 $html = $this->getOption('html', '');
32
33 // if the data options is a valid callback for an object method
34 if( (is_array($html) && count($html) == 2 && gettype($html[0]) == 'object') || function_exists($html) ) {
35
36 call_user_func($html, $this);
37
38 return;
39 }
40
41 // if the data options is an array of values
42 echo $html;
43 }
44 }
45 }
46