first commit

This commit is contained in:
DESKTOP-GBA0BK8\Admin
2023-04-08 12:19:53 -04:00
commit 7c8c8b1c76
4586 changed files with 2050693 additions and 0 deletions
@@ -0,0 +1,49 @@
<?php
/**
* Buttonset control class.
*
* @package OceanWP WordPress theme
* @subpackage Controls
* @see https://github.com/justintadlock/butterbean
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Buttonset control
*
* @since 1.0.0
* @access public
*/
class OceanWP_ButterBean_Control_Buttonset extends ButterBean_Control {
/**
* The type of control.
*
* @since 1.0.0
* @access public
* @var string
*/
public $type = 'buttonset';
/**
* Get the value for the setting.
*
* @since 1.0.0
* @access public
* @param string $setting
* @return mixed
*/
public function get_value( $setting = 'default' ) {
$value = parent::get_value( $setting );
$object = $this->get_setting( $setting );
return ! $value && $object ? $object->default : $value;
}
}
@@ -0,0 +1,24 @@
<div class="oceanwp-mb-desc">
<# if ( data.label ) { #>
<span class="butterbean-label">{{ data.label }}</span>
<# } #>
<# if ( data.description ) { #>
<span class="butterbean-description">{{{ data.description }}}</span>
<# } #>
</div>
<div class="oceanwp-mb-field">
<ul class="butterbean-buttonset">
<# for ( key in data.choices ) { #>
<li>
<input type="radio" class="buttonset-input" value="{{ key }}" name="{{ data.field_name }}" id="{{ data.field_name }}_{{ key }}" <# if ( data.value === key ) { #> checked="checked" <# } #> />
<label class="buttonset-label" for="{{ data.field_name }}_{{ key }}">{{ data.choices[ key ] }}</label>
</li>
<# } #>
</ul>
</div>