File "DefaultSetting.php"
Full Path: /home/u886502366/domains/almoasronppbags.com/public_html/newtest/wp-content/plugins/depicter/vendor/typerocket/core/src/Elements/Traits/DefaultSetting.php
File size: 774 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace TypeRocket\Elements\Traits;
trait DefaultSetting
{
/**
* Set default value
*
* @param mixed $value
*
* @return $this
*/
public function setDefault( $value = '' ) {
$this->setSetting('default', $value);
return $this;
}
/**
* Set default value
*
* @return $this
*/
public function getDefault() {
return $this->getSetting('default');
}
/**
* Maybe Set Default
*
* @param mixed|null $value value to set if none exists
*
* @return null
*/
public function maybeSetDefault( $value = null )
{
if ( ! $this->getDefault() ) {
$this->setSetting('default', $value);
}
return $this;
}
}