PluginProbe
Disable Comments & Delete All Comments / 1.3.0
Disable Comments & Delete All Comments v1.3.0
1.3.3 1.3.2 trunk 1.0.0 1.0.4 1.0.5 1.0.8 1.0.9 1.1.1 1.1.3 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.3.0 1.3.1
comments-plus / libs / factory / forms / controls / holders / tab-item.php

tab-item.php in Disable Comments & Delete All Comments 1.3.0, at libs/factory/forms/controls/holders/tab-item.php

68 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The file contains the class of Tab Item Control Holder.
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 // Exit if accessed directly
12 if( !defined('ABSPATH') ) {
13 exit;
14 }
15
16 if( !class_exists('Wbcr_FactoryForms480_TabItemHolder') ) {
17 /**
18 * Tab Item Control Holder
19 *
20 * @since 1.0.0
21 */
22 class Wbcr_FactoryForms480_TabItemHolder extends Wbcr_FactoryForms480_Holder {
23
24 /**
25 * A holder type.
26 *
27 * @since 1.0.0
28 * @var string
29 */
30 public $type = 'tab-item';
31
32 /**
33 * Here we should render a beginning html of the tab.
34 *
35 * @since 1.0.0
36 * @return void
37 */
38 public function beforeRendering()
39 {
40
41 $this->addCssClass('tab-' . $this->getName());
42 $this->addHtmlAttr('id', $this->getName());
43
44 $this->addCssClass('tab-pane');
45
46 if( isset($this->options['isFirst']) && $this->options['isFirst'] ) {
47 $this->addCssClass('active');
48 }
49
50 ?>
51 <div <?php $this->attrs() ?>>
52 <?php
53 }
54
55 /**
56 * Here we should render an end html of the tab.
57 *
58 * @since 1.0.0
59 * @return void
60 */
61 public function afterRendering()
62 {
63 ?>
64 </div>
65 <?php
66 }
67 }
68 }