class-hidden.php
<?php
/**
* Hidden field.
*
* @package HivePress\Fields
*/
namespace HivePress\Fields;
use HivePress\Helpers as hp;
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
/**
* Hidden value.
*/
class Hidden extends Text {
/**
* Class initializer.
*
* @param array $meta Class meta values.
*/
public static function init( $meta = [] ) {
$meta = hp\merge_arrays(
[
'label' => null,
'filterable' => false,
'sortable' => false,
],
$meta
);
parent::init( $meta );
}
/**
* Class constructor.
*
* @param array $args Field arguments.
*/
public function __construct( $args = [] ) {
$args = hp\merge_arrays(
$args,
[
'display_type' => 'hidden',
]
);
parent::__construct( $args );
}
/**
* Bootstraps field properties.
*/
protected function boot() {
Field::boot();
}
}