block.json 0000644 00000003373 15153333174 0006544 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/list",
"title": "List",
"category": "text",
"allowedBlocks": [ "core/list-item" ],
"description": "Create a bulleted or numbered list.",
"keywords": [ "bullet list", "ordered list", "numbered list" ],
"textdomain": "default",
"attributes": {
"ordered": {
"type": "boolean",
"default": false,
"__experimentalRole": "content"
},
"values": {
"type": "string",
"source": "html",
"selector": "ol,ul",
"multiline": "li",
"__unstableMultilineWrapperTags": [ "ol", "ul" ],
"default": "",
"__experimentalRole": "content"
},
"type": {
"type": "string"
},
"start": {
"type": "number"
},
"reversed": {
"type": "boolean"
},
"placeholder": {
"type": "string"
}
},
"supports": {
"anchor": true,
"className": false,
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true
}
},
"spacing": {
"margin": true,
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"__unstablePasteTextInline": true,
"__experimentalSelector": "ol,ul",
"__experimentalOnMerge": true,
"__experimentalSlashInserter": true,
"interactivity": {
"clientNavigation": true
}
},
"editorStyle": "wp-block-list-editor",
"style": "wp-block-list"
}
style-rtl.css 0000644 00000000142 15153333174 0007217 0 ustar 00 ol,ul{
box-sizing:border-box;
}
ol.has-background,ul.has-background{
padding:1.25em 2.375em;
} style-rtl.min.css 0000644 00000000127 15153333174 0010004 0 ustar 00 ol,ul{box-sizing:border-box}ol.has-background,ul.has-background{padding:1.25em 2.375em} style.css 0000644 00000000142 15153333174 0006420 0 ustar 00 ol,ul{
box-sizing:border-box;
}
ol.has-background,ul.has-background{
padding:1.25em 2.375em;
} style.min.css 0000644 00000000127 15153333174 0007205 0 ustar 00 ol,ul{box-sizing:border-box}ol.has-background,ul.has-background{padding:1.25em 2.375em} list.php 0000644 00000001655 15154713300 0006236 0 ustar 00 <?php
class SiteOrigin_Panels_Widget_List extends SiteOrigin_Panels_Widget {
function __construct() {
parent::__construct(
__('List (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'),
),
'text' => array(
'type' => 'textarea',
'label' => __('Text', 'siteorigin-panels'),
'description' => __('Start each new point with an asterisk (*)', 'siteorigin-panels'),
),
)
);
}
static function create_list($text){
// Add the list items
$text = preg_replace( "/\*+(.*)?/i", "<ul><li>$1</li></ul>", $text );
$text = preg_replace( "/(\<\/ul\>\n(.*)\<ul\>*)+/", "", $text );
$text = wpautop( $text );
// Return sanitized version of the list
return wp_kses_post($text);
}
} presets/simple.php 0000644 00000000703 15154713300 0010232 0 ustar 00 <?php
return array(
'charcoal' => array(
'image' => 'charcoal',
),
'pink' => array(
'image' => 'pink',
),
'orange' => array(
'image' => 'orange',
),
'green' => array(
'image' => 'green',
),
'blue' => array(
'image' => 'blue',
),
'purple' => array(
'image' => 'purple',
),
'turquoise' => array(
'image' => 'turquoise',
),
'slate' => array(
'image' => 'slate',
),
'black' => array(
'image' => 'black',
),
);
styles/simple.less 0000644 00000000505 15154713300 0010247 0 ustar 00 /*
Name: Simple
Template: simple
Author: Greg Priday
Author URI: http://siteorigin.com/
*/
@import "../../../less/mixins";
@image: white;
ul {
margin: 0;
padding: 0;
li {
@image_url: 'checks/@{image}.png';
list-style: url(widgetimage(@image_url));
line-height: 2em;
margin-left: 24px;
padding-left: 6px;
}
} tpl/simple.php 0000644 00000000256 15154713300 0007347 0 ustar 00 <?php
if ( !empty( $instance['title'] ) ) {
echo $args['before_title'] . esc_html( $instance['title'] ) . $args['after_title'];
}
echo $this->create_list($instance['text']);