Plugin Tabs noticias
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
$block_folders = array();
|
||||
$block_folders[$option['block']] = $option['block'] . '/templates';
|
||||
|
||||
$templates = lightspeed_get_block_templates( $block_folders );
|
||||
?>
|
||||
|
||||
<select
|
||||
name="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
type="text"
|
||||
id="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
data-form-type="other"
|
||||
data-default="<?php echo esc_attr( $option['default'] ) ?>"
|
||||
>
|
||||
<?php foreach ( $templates[$option['block']] as $template_key => $template ) : ?>
|
||||
<option
|
||||
<?php echo esc_attr( ( $value == $template['value'] ) || ( !$value && $template['value'] == $option['default'] ) ? 'selected="selected"' : '' ) ?>
|
||||
value="<?php echo esc_attr( $template['value'] ) ?>"
|
||||
>
|
||||
<?php echo esc_attr( $template['label'] ) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
@@ -0,0 +1,11 @@
|
||||
<label for="<?php echo esc_attr( $option['name'] ) ?>">
|
||||
<input
|
||||
name="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
type="checkbox"
|
||||
id="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
value="1"
|
||||
data-form-type="other"
|
||||
<?php echo esc_attr( $value ? 'checked="checked"' : '' ) ?>
|
||||
data-default="<?php echo esc_attr( $option['default'] ) ?>"
|
||||
>
|
||||
</label>
|
||||
@@ -0,0 +1,21 @@
|
||||
<div class="areoi-variable-row <?php echo esc_attr( $is_variable ? 'areoi-is-variable' : '' ) ?>">
|
||||
<div class="areoi-field areoi-field-visual">
|
||||
<input
|
||||
name="<?php echo esc_attr( $option['name'] ) ?>-color-picker"
|
||||
type="text"
|
||||
value="<?php echo esc_attr( $is_variable ? '' : $value ) ?>"
|
||||
class="regular-text areoi-colour-picker"
|
||||
data-form-type="other"
|
||||
data-default="<?php echo esc_attr( $option['default'] ) ?>"
|
||||
data-alpha-enabled="true"
|
||||
>
|
||||
<div></div>
|
||||
<button type="button" class="areoi-toggle-field">Use SASS variable</button>
|
||||
</div>
|
||||
|
||||
<div class="areoi-field areoi-field-variable">
|
||||
<?php include( AREOI__PLUGIN_DIR . 'views/inputs/text.php' ); ?>
|
||||
<div></div>
|
||||
<button type="button" class="areoi-toggle-field">Use color picker</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
$block_folders = array();
|
||||
$block_folders['dividers'] = 'dividers';
|
||||
|
||||
$templates = lightspeed_get_block_templates( $block_folders, false );
|
||||
?>
|
||||
|
||||
<select
|
||||
name="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
type="text"
|
||||
id="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
data-form-type="other"
|
||||
data-default="<?php echo esc_attr( $option['default'] ) ?>"
|
||||
>
|
||||
<?php foreach ( $templates['dividers'] as $template_key => $template ) : ?>
|
||||
<option
|
||||
<?php echo esc_attr( ( $value == $template['value'] ) || ( !$value && $template['value'] == $option['default'] ) ? 'selected="selected"' : '' ) ?>
|
||||
value="<?php echo esc_attr( $template['value'] ) ?>"
|
||||
>
|
||||
<?php echo esc_attr( $template['label'] ) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
$fonts = array(
|
||||
'Roboto',
|
||||
'Open Sans',
|
||||
'Lato',
|
||||
'Montserrat',
|
||||
'Oswald',
|
||||
'Source Sans Pro',
|
||||
'Roboto Condensed',
|
||||
'Poppins',
|
||||
'Noto Sans',
|
||||
'Roboto Mono',
|
||||
'Raleway',
|
||||
'Ubuntu',
|
||||
'PT Sans',
|
||||
'Merriweather',
|
||||
'Roboto Slab',
|
||||
'Nunito',
|
||||
'Playfair Display',
|
||||
'Lora',
|
||||
'Rubik',
|
||||
'Open Sans Condensed'
|
||||
);
|
||||
?>
|
||||
<div class="areoi-variable-row <?php echo esc_attr( $is_variable ? 'areoi-is-variable' : '' ) ?>">
|
||||
<div class="areoi-field areoi-field-visual">
|
||||
<select
|
||||
name="<?php echo esc_attr( $option['name'] ) ?>-font-picker"
|
||||
type="text"
|
||||
class="regular-text areoi-font-picker"
|
||||
data-form-type="other"
|
||||
data-default="<?php echo esc_attr( $option['default'] ) ?>"
|
||||
>
|
||||
<option value="<?php echo esc_attr( $option['default'] ) ?>">Default</option>
|
||||
<?php foreach ( $fonts as $select_option_key => $select_option ) : ?>
|
||||
<option
|
||||
<?php echo esc_attr( $value == $select_option ? 'selected="selected"' : '' ) ?>
|
||||
value="<?php echo esc_attr( $select_option ) ?>"
|
||||
style="font-family: <?php echo esc_attr( $select_option ) ?>; font-size: 22px;"
|
||||
>
|
||||
<?php echo esc_attr( $select_option ) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<div></div>
|
||||
<button type="button" class="areoi-toggle-field">Use SASS variable</button>
|
||||
</div>
|
||||
|
||||
<div class="areoi-field areoi-field-variable">
|
||||
<?php include( AREOI__PLUGIN_DIR . 'views/inputs/text.php' ); ?>
|
||||
<div></div>
|
||||
<button type="button" class="areoi-toggle-field">Use font picker</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php $icons = json_decode( file_get_contents( AREOI__PLUGIN_DIR . 'blocks/icon/icons.json' ), true ); ?>
|
||||
|
||||
<select
|
||||
name="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
type="text"
|
||||
id="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
data-form-type="other"
|
||||
data-default="<?php echo esc_attr( $option['default'] ) ?>"
|
||||
>
|
||||
<option value="">None</option>
|
||||
<?php foreach ( $icons as $icon_key => $icon ) : ?>
|
||||
<option
|
||||
<?php echo esc_attr( ( $value == $icon ) || ( !$value && $icon == $option['default'] ) ? 'selected="selected"' : '' ) ?>
|
||||
value="<?php echo esc_attr( $icon ) ?>"
|
||||
>
|
||||
<?php echo esc_attr( $icon ) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
|
||||
<p>You can browse all available icons <a href="https://icons.getbootstrap.com/" target="_blank">here</a>.</p>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php //echo '<pre>'; print_r( $value ); echo '</pre>'; die; ?>
|
||||
<div class="areoi-variable-row <?php echo esc_attr( $is_variable ? 'areoi-is-variable' : '' ) ?>">
|
||||
<div class="areoi-field areoi-field-visual">
|
||||
<div class="areoi-upl-container <?php echo esc_attr( $value ? 'with-image' : '' ) ?>">
|
||||
<a href="#" class="areoi-upl areoi-image-opaque">
|
||||
<img src="<?php echo esc_url( $value ) ?>" style="width: 100%; height: auto;" />
|
||||
<span class="button">Upload image</span>
|
||||
</a>
|
||||
<a href="#" class="areoi-rmv">Remove image</a>
|
||||
</div><!-- .areoi-upl-container -->
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
<div class="areoi-field areoi-field-variable">
|
||||
<?php include( AREOI__PLUGIN_DIR . 'views/inputs/text.php' ); ?>
|
||||
<div></div>
|
||||
<button type="button" class="areoi-toggle-field">Use media uploader</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
$block_folders = array();
|
||||
$block_folders['masks'] = 'masks';
|
||||
|
||||
$templates = lightspeed_get_block_templates( $block_folders, false );
|
||||
?>
|
||||
|
||||
<select
|
||||
name="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
type="text"
|
||||
id="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
data-form-type="other"
|
||||
data-default="<?php echo esc_attr( $option['default'] ) ?>"
|
||||
>
|
||||
<?php foreach ( $templates['masks'] as $template_key => $template ) : ?>
|
||||
<option
|
||||
<?php echo esc_attr( ( $value == $template['value'] ) || ( !$value && $template['value'] == $option['default'] ) ? 'selected="selected"' : '' ) ?>
|
||||
value="<?php echo esc_attr( $template['value'] ) ?>"
|
||||
>
|
||||
<?php echo esc_attr( $template['label'] ) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
$block_folders = array();
|
||||
$block_folders['patterns'] = 'patterns';
|
||||
|
||||
$templates = lightspeed_get_block_templates( $block_folders, false );
|
||||
?>
|
||||
|
||||
<select
|
||||
name="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
type="text"
|
||||
id="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
data-form-type="other"
|
||||
data-default="<?php echo esc_attr( $option['default'] ) ?>"
|
||||
>
|
||||
<?php foreach ( $templates['patterns'] as $template_key => $template ) : ?>
|
||||
<option
|
||||
<?php echo esc_attr( ( $value == $template['value'] ) || ( !$value && $template['value'] == $option['default'] ) ? 'selected="selected"' : '' ) ?>
|
||||
value="<?php echo esc_attr( $template['value'] ) ?>"
|
||||
>
|
||||
<?php echo esc_attr( $template['label'] ) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
$block_folders = array();
|
||||
$block_folders['placeholders'] = 'placeholders';
|
||||
|
||||
$templates = lightspeed_get_block_templates( $block_folders, false );
|
||||
?>
|
||||
|
||||
<select
|
||||
name="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
type="text"
|
||||
id="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
data-form-type="other"
|
||||
data-default="<?php echo esc_attr( $option['default'] ) ?>"
|
||||
>
|
||||
<?php foreach ( $templates['placeholders'] as $template_key => $template ) : ?>
|
||||
<option
|
||||
<?php echo esc_attr( ( $value == $template['value'] ) || ( !$value && $template['value'] == $option['default'] ) ? 'selected="selected"' : '' ) ?>
|
||||
value="<?php echo esc_attr( $template['value'] ) ?>"
|
||||
>
|
||||
<?php echo esc_attr( $template['label'] ) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php if ( $option['input'] == 'header' ) : ?>
|
||||
|
||||
<tr>
|
||||
<th scope="row" colspan="2">
|
||||
<h3 id="<?php echo esc_attr( sanitize_title( $option['label'] ) ) ?>" class="areoi-table-header">
|
||||
<?php echo esc_attr( $option['label'] ) ?>
|
||||
</h3>
|
||||
|
||||
<?php if ( $option['description'] ) : ?>
|
||||
<p style="margin: 1rem 0; font-weight: normal;"><?php echo esc_attr( $option['description'] ) ?></p>
|
||||
<?php endif; ?>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<?php
|
||||
$theme_json = '';
|
||||
if ( areoi2_has_theme_json() && areoi2_has_theme_json_value( $option['name'] ) ) {
|
||||
$theme_json = '<p style="text-align:center; max-width: 250px">' . __( 'This field is being populated by your theme.json file. The current value is: ', AREOI__TEXT_DOMAIN ) . '<span class="abb-highlight">' . areoi2_get_theme_json_value( $option['name'] ) . '</span></p>';
|
||||
}
|
||||
?>
|
||||
|
||||
<tr class="areoi-row-input">
|
||||
<th>
|
||||
<label for="<?php echo esc_attr( $option['name'] ) ?>">
|
||||
<?php echo esc_attr( $option['label'] ) ?>
|
||||
</label>
|
||||
<div></div>
|
||||
<p><code style="font-size: 12px;"><?php echo $option['name'] ?></code></p>
|
||||
|
||||
<?php if ( !empty( $option['allow_reset'] ) ) : ?>
|
||||
<button
|
||||
class="areoi-reset"
|
||||
type="button"
|
||||
data-id="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
>
|
||||
Reset to Bootstrap default
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
|
||||
</th>
|
||||
|
||||
<td>
|
||||
<?php if ( $theme_json ) : ?>
|
||||
|
||||
<?php echo $theme_json; ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<?php
|
||||
if ( !empty( $option['input'] ) ) :
|
||||
$value = get_option( $option['name'], $option['default'] );
|
||||
$is_variable = ( $value && strpos( $value, '$' ) === false ) && ( strpos( $value, 'theme-json-' ) === false ) ? false : true;
|
||||
include( AREOI__PLUGIN_DIR . 'views/inputs/' . $option['input'] . '.php' );
|
||||
endif;
|
||||
?>
|
||||
|
||||
<?php if ( $option['description'] ) : ?>
|
||||
<p class="areoi-description" id="<?php echo esc_attr( $option['name'] ) ?>-description">
|
||||
<?php echo esc_attr( $option['description'] ) ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1,16 @@
|
||||
<select
|
||||
name="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
type="text"
|
||||
id="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
data-form-type="other"
|
||||
data-default="<?php echo esc_attr( $option['default'] ) ?>"
|
||||
>
|
||||
<?php foreach ( $option['options'] as $select_option_key => $select_option ) : ?>
|
||||
<option
|
||||
<?php echo esc_attr( ( $value == $select_option['id'] ) || ( !$value && $select_option['id'] == $option['default'] ) ? 'selected="selected"' : '' ) ?>
|
||||
value="<?php echo esc_attr( $select_option['id'] ) ?>"
|
||||
>
|
||||
<?php echo esc_attr( $select_option['label'] ) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
@@ -0,0 +1,23 @@
|
||||
<div class="areoi-field">
|
||||
<input
|
||||
name="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
type="text"
|
||||
id="<?php echo esc_attr( $option['name'] ) ?>"
|
||||
value="<?php echo esc_attr( $value ) ?>"
|
||||
class="areoi-input-text"
|
||||
data-form-type="other"
|
||||
data-default="<?php echo esc_attr( $option['default'] ) ?>"
|
||||
placeholder="<?php echo esc_attr( $option['default'] ) ?>"
|
||||
>
|
||||
<?php if ( empty( $option['exclude_variables'] ) ) : ?>
|
||||
<select class="areoi-select-variable" name="areoi-select-variable">
|
||||
<option value="">Populate with variable</option>
|
||||
</select>
|
||||
|
||||
<?php if ( !empty( $has_theme_json ) ) : ?>
|
||||
<select class="areoi-select-theme-json" name="areoi-select-theme-json">
|
||||
<option value="">Populate with theme.json</option>
|
||||
</select>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user