# comments-plus/1.3.0/libs/factory/forms/controls/holders/control-group-item.php

Disable Comments &amp; Delete All Comments, version 1.3.0. 76 lines.

- Page: https://pluginprobe.com/plugins/comments-plus/1.3.0/code/libs/factory/forms/controls/holders/control-group-item.php
- Raw: https://pluginprobe.com/plugins/comments-plus/1.3.0/raw/libs/factory/forms/controls/holders/control-group-item.php
- Modified: 2024-12-10T00:10:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/comments-plus/1.3.0/code/libs/factory/forms/controls/holders/control-group-item.php#L10-L20`.

```php
<?php
	/**
	 * The file contains the class of Tab Control Holder.
	 *
	 * @author Alex Kovalev <alex.kovalevv@gmail.com>
	 * @copyright (c) 2018, Webcraftic Ltd
	 *
	 * @package factory-forms
	 * @since 1.0.0
	 */

	// Exit if accessed directly
	if( !defined('ABSPATH') ) {
		exit;
	}

	if( !class_exists('Wbcr_FactoryForms480_ControlGroupItem') ) {

		/**
		 * Tab Control Holder
		 *
		 * @since 1.0.0
		 */
		class Wbcr_FactoryForms480_ControlGroupItem extends Wbcr_FactoryForms480_Holder {

			/**
			 * A holder type.
			 *
			 * @since 1.0.0
			 * @var string
			 */
			public $type = 'control-group-item';


			/**
			 * Here we should render a beginning html of the tab.
			 *
			 * @since 1.0.0
			 * @return void
			 */
			public function beforeRendering()
			{
				$this->addCssClass('control-group-item');
				$this->addCssClass('factory-control-group-item-' . $this->options['name']);

				if( $this->parent->getValue() == $this->options['name'] ) {
					$this->addCssClass('current');

					foreach($this->elements as $val) {
						$val->setOption('isActive', 1);
					}
				} else {
					foreach($this->elements as $val) {
						$val->setOption('isActive', 0);
					}
				}

				?>
				<div <?php $this->attrs() ?>>
			<?php
			}

			/**
			 * Here we should render an end html of the tab.
			 *
			 * @since 1.0.0
			 * @return void
			 */
			public function afterRendering()
			{
				?>
				</div>
			<?php
			}
		}
	}
```
