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,82 @@
<?php
/**
* Media 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
*/
/**
* Media control class.
*
* @since 1.0.0
* @access public
*/
class OceanWP_ButterBean_Control_Media extends ButterBean_Control {
/**
* The type of control.
*
* @since 1.0.0
* @access public
* @var string
*/
public $type = 'media';
/**
* Array of text labels to use for the media upload frame.
*
* @since 1.0.0
* @access public
* @var string
*/
public $l10n = array();
/**
* Creates a new control object.
*
* @since 1.0.0
* @access public
* @param object $manager
* @param string $name
* @param array $args
* @return void
*/
public function __construct( $manager, $name, $args = array() ) {
parent::__construct( $manager, $name, $args );
$this->l10n = wp_parse_args(
$this->l10n,
array(
'upload' => esc_html__( 'Browse', 'ocean-extra' ),
)
);
}
/**
* Enqueue scripts/styles for the control.
*
* @since 1.0.0
* @access public
* @return void
*/
public function enqueue() {
wp_enqueue_media();
}
/**
* Adds custom data to the json array.
*
* @since 1.0.0
* @access public
* @return void
*/
public function to_json() {
parent::to_json();
$this->json['l10n'] = $this->l10n;
}
}
@@ -0,0 +1,16 @@
<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">
<div class="uploader">
<input type="text" {{{ data.attr }}} name="{{ data.field_name }}" value="{{ data.value }}" />
<button type="button" class="button button-secondary oceanwp-add-media">{{ data.l10n.upload }}</button>
</div>
</div>