# comments-plus/trunk/libs/factory/forms/includes/custom-element.class.php

Disable Comments &amp; Delete All Comments, version trunk. 46 lines.

- Page: https://pluginprobe.com/plugins/comments-plus/trunk/code/libs/factory/forms/includes/custom-element.class.php
- Raw: https://pluginprobe.com/plugins/comments-plus/trunk/raw/libs/factory/forms/includes/custom-element.class.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/trunk/code/libs/factory/forms/includes/custom-element.class.php#L10-L20`.

```php
<?php
	/**
	 * The file contains the base class for all custom elements.
	 *
	 * @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_CustomElement') ) {
		/**
		 * The base class for all controls.
		 *
		 * @since 1.0.0
		 */
		abstract class Wbcr_FactoryForms480_CustomElement extends Wbcr_FactoryForms480_FormElement {

			/**
			 * Is this element a custom form element?
			 *
			 * @since 1.0.0
			 * @var bool
			 */
			public $is_custom = true;

			public function render()
			{

				// if the control is off, then ignore it
				$off = $this->getOption('off', false);

				if( $off ) {
					return;
				}

				$this->html();
			}
		}
	}
```
