PluginProbe ʕ •ᴥ•ʔ
Disable Admin Notices – Hide Dashboard Notifications / 1.4.7
Disable Admin Notices – Hide Dashboard Notifications v1.4.7
1.4.7 1.4.6 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 / holders / control-group-item.php
disable-admin-notices / libs / factory / forms / controls / holders Last commit date
accordion-item.php 1 year ago accordion.php 1 year ago columns.php 1 year ago control-group-item.php 1 year ago control-group.php 1 year ago div.php 1 year ago form-group.php 1 year ago index.php 3 years ago more-link.php 1 year ago tab-item.php 1 year ago tab.php 1 year ago
control-group-item.php
76 lines
1 <?php
2 /**
3 * The file contains the class of Tab 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
12 // Exit if accessed directly
13 if( !defined('ABSPATH') ) {
14 exit;
15 }
16
17 if( !class_exists('Wbcr_FactoryForms480_ControlGroupItem') ) {
18
19 /**
20 * Tab Control Holder
21 *
22 * @since 1.0.0
23 */
24 class Wbcr_FactoryForms480_ControlGroupItem extends Wbcr_FactoryForms480_Holder {
25
26 /**
27 * A holder type.
28 *
29 * @since 1.0.0
30 * @var string
31 */
32 public $type = 'control-group-item';
33
34
35 /**
36 * Here we should render a beginning html of the tab.
37 *
38 * @since 1.0.0
39 * @return void
40 */
41 public function beforeRendering()
42 {
43 $this->addCssClass('control-group-item');
44 $this->addCssClass('factory-control-group-item-' . $this->options['name']);
45
46 if( $this->parent->getValue() == $this->options['name'] ) {
47 $this->addCssClass('current');
48
49 foreach($this->elements as $val) {
50 $val->setOption('isActive', 1);
51 }
52 } else {
53 foreach($this->elements as $val) {
54 $val->setOption('isActive', 0);
55 }
56 }
57
58 ?>
59 <div <?php $this->attrs() ?>>
60 <?php
61 }
62
63 /**
64 * Here we should render an end html of the tab.
65 *
66 * @since 1.0.0
67 * @return void
68 */
69 public function afterRendering()
70 {
71 ?>
72 </div>
73 <?php
74 }
75 }
76 }