presets/simple.php 0000644 00000000166 15154621112 0010234 0 ustar 00 <?php
return array(
'clean' => array(
'background_color' => '#FCFCFC',
'borders' => '1px solid #D0D0D0',
),
);
price-box.php 0000644 00000003014 15154621112 0007141 0 ustar 00 <?php
class SiteOrigin_Panels_Widget_Price_Box extends SiteOrigin_Panels_Widget {
function __construct() {
parent::__construct(
__('Price Box (PB)', 'siteorigin-panels'),
array(
'description' => __('Displays a bullet list of elements', 'siteorigin-panels'),
'default_style' => 'simple',
),
array(),
array(
'title' => array(
'type' => 'text',
'label' => __('Title', 'siteorigin-panels'),
),
'price' => array(
'type' => 'text',
'label' => __('Price', 'siteorigin-panels'),
),
'per' => array(
'type' => 'text',
'label' => __('Per', 'siteorigin-panels'),
),
'information' => array(
'type' => 'text',
'label' => __('Information Text', 'siteorigin-panels'),
),
'features' => array(
'type' => 'textarea',
'label' => __('Features Text', 'siteorigin-panels'),
'description' => __('Start each new point with an asterisk (*)', 'siteorigin-panels'),
),
'button_text' => array(
'type' => 'text',
'label' => __('Button Text', 'siteorigin-panels'),
),
'button_url' => array(
'type' => 'text',
'label' => __('Button URL', 'siteorigin-panels'),
),
'button_new_window' => array(
'type' => 'checkbox',
'label' => __('Open In New Window', 'siteorigin-panels'),
),
)
);
$this->add_sub_widget('button', __('Button', 'siteorigin-panels'), 'SiteOrigin_Panels_Widget_Button');
$this->add_sub_widget('list', __('Feature List', 'siteorigin-panels'), 'SiteOrigin_Panels_Widget_List');
}
} styles/simple.less 0000644 00000001053 15154621112 0010245 0 ustar 00 /*
Name: Simple
Template: simple
Author: Greg Priday
Author URI: http://siteorigin.com/
*/
@import "../../../less/mixins";
@borders: 1px solid #E0E0E0;
@background_color: #FCFCFC;
@box_shadow: 0 1px 2px rgba(0,0,0,0.1);
& {
padding: 25px 20px;
border: @borders;
background: @background_color;
.box-shadow(@box_shadow);
h2 {
line-height: 1;
margin: 0 0 0.25em 0;
text-align: center;
}
h4 {
line-height: 1;
margin: 0 0 1em 0;
text-align: center;
span {
font-size: 0.6em;
}
}
.origin-widget-button {
margin-top: 30px;
}
} tpl/simple.php 0000644 00000001162 15154621112 0007343 0 ustar 00 <h2><?php echo esc_html($instance['title']) ?></h2>
<h4><?php echo esc_html($instance['price']) ?><span> /<?php echo esc_html($instance['per']) ?></span></h4>
<p class="information"><?php echo wp_kses_post( $instance['information'] ) ?></p>
<?php
$this->sub_widget('list', array('title' => '', 'text' => $instance['features'], 'origin_style' => $instance['origin_style_list']));
$this->sub_widget('button', array(
'text' => $instance['button_text'],
'url' => $instance['button_url'],
'align' => 'center',
'origin_style' => $instance['origin_style_button'],
'new_window' => !empty($instance['button_new_window'])
));
?>