diff --git a/assets/styles.css b/assets/styles.css index d0b8136..c6c9de0 100644 --- a/assets/styles.css +++ b/assets/styles.css @@ -1,9 +1,19 @@ +.hogan-module-expandable_list .hogan-expandable-list-item { + position: relative; +} + .hogan-module-expandable_list .hogan-expandable-list-item > a { display: block; position: relative; padding-right: 30px; } +.hogan-module-expandable_list .hogan-expandable-list-item > .anchor { + position: absolute; + width: 0; + padding: 0; +} + .hogan-module-expandable_list .hogan-expandable-list-item > a span { display: block; position: absolute; diff --git a/assets/template.php b/assets/template.php index 869c7f5..a5754f3 100644 --- a/assets/template.php +++ b/assets/template.php @@ -28,8 +28,9 @@ $list_item_id = ! empty( $item['item_id'] ) ? $item['item_id'] : 'panel-' . $this->counter . '-' . $key; ?>
+
 
- diff --git a/hogan-expandable-list.php b/hogan-expandable-list.php index ec9a250..c8eefc6 100644 --- a/hogan-expandable-list.php +++ b/hogan-expandable-list.php @@ -46,6 +46,14 @@ function register_module( \Dekode\Hogan\Core $core ) { $core->register_module( new \Dekode\Hogan\Expandable_List() ); } +/** + * Sanitize item id name to URL friendly string. + * + * @param string $value Item name. + * @param integer $id Item id. + * @param array $field Sanitized item name. + * @return string + */ function sanitize_item_id_on_save( string $value, int $id, array $field ) : string { return sanitize_title( $value ); }