PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 3.8.9
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v3.8.9
4.9.2 4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 All 200 releases
← All changes | includes/Shortcodes/CategoryGrid.php +6 -32 4.4.13.8.9 View file →
@@ -63,11 +63,9 @@
63 63 'category_title_link' => false,
64 64 'layout_type' => '',
65 65 'list_icon_url' => '',
66 66 'list_icon_name' => 'list',
67 - 'show_list_icon' => true,
68 - 'sidebar_layout' => '',
69 - 'wrapper_class' => []
67 + 'sidebar_layout' => ''
70 68 ];
71 69 }
72 70
73 71 public function generate_attributes() {
@@ -108,9 +106,8 @@
108 106 $attributes['class'][] = 'single-kb';
109 107 }
110 108 }
111 109
112 -
113 110 return $attributes;
114 111 }
115 112
116 113 public function header_layout_sequence( $sequence, $layout, $widget_type, $args ) {
@@ -179,31 +176,10 @@
179 176 if ( $this->attributes['multiple_knowledge_base'] && ( ! empty( $this->attributes['kb_slug'] ) ) && ( ! betterdocs()->helper->is_templates() ) ) {
180 177 $inner_wrapper_attr['data-mkb-slug'] = $this->attributes['kb_slug'];
181 178 }
182 179
183 - // Prepare wrapper attributes with custom classes
184 - $wrapper_attr_classes = [ 'betterdocs-category-grid-wrapper' ];
185 -
186 - // Add custom wrapper classes if provided
187 - if ( $this->isset( 'wrapper_class' ) ) {
188 - $wrapper_classes = $this->attributes['wrapper_class'];
189 -
190 - // Handle both array and string formats
191 - if ( is_string( $wrapper_classes ) ) {
192 - // Split by comma or space and clean up
193 - $wrapper_classes = preg_split( '/[,\s]+/', $wrapper_classes );
194 - $wrapper_classes = array_filter( array_map( 'trim', $wrapper_classes ) );
195 - } elseif ( is_array( $wrapper_classes ) ) {
196 - $wrapper_classes = array_filter( $wrapper_classes );
197 - }
198 -
199 - if ( ! empty( $wrapper_classes ) ) {
200 - $wrapper_attr_classes = array_merge( $wrapper_attr_classes, $wrapper_classes );
201 - }
202 - }
203 -
204 180 return [
205 - 'wrapper_attr' => [ 'class' => $wrapper_attr_classes ],
181 + 'wrapper_attr' => [ 'class' => [ 'betterdocs-category-grid-wrapper' ] ],
206 182 'inner_wrapper_attr' => $inner_wrapper_attr,
207 183 'layout' => 'default',
208 184 'widget_type' => 'category-grid',
209 185 'terms_query_args' => $terms_query,
@@ -208,9 +184,9 @@
208 184 'widget_type' => 'category-grid',
209 185 'terms_query_args' => $terms_query,
210 186 'docs_query_args' => $docs_query,
211 187 'nested_docs_query_args' => $docs_query,
212 - 'list_icon_name' => ($this->attributes['list_icon_name'] ?? 'list') == 'list' ? 'list' : [ 'value' => $this->attributes['list_icon_name'] ?? 'list' ],
188 + 'list_icon_name' => $this->attributes['list_icon_name'] == 'list' ? 'list' : [ 'value' => $this->attributes['list_icon_name'] ],
213 189 'show_header' => true,
214 190 'show_list' => true,
215 191 'show_title' => true,
216 192 'show_button' => $show_button,
@@ -216,14 +192,12 @@
216 192 'show_button' => $show_button,
217 193 'button_text' => $button_text,
218 194 'show_button_icon' => true,
219 195 'button_icon_position' => true,
220 - 'title_tag' => $this->attributes['title_tag'] ?? 'h2',
221 196 'button_icon' => true,
222 197 'category_title_link' => $category_title_link,
223 - 'layout_type' => $this->attributes['layout_type'] ?? '',
224 - 'list_icon_url' => $this->attributes['list_icon_url'] ?? '',
225 - 'show_list_icon' => $this->attributes['show_list_icon'] ?? true,
226 - 'sidebar_layout' => $this->attributes['sidebar_layout'] ?? ''
198 + 'layout_type' => $this->attributes['layout_type'],
199 + 'list_icon_url' => $this->attributes['list_icon_url'],
200 + 'sidebar_layout' => $this->attributes['sidebar_layout']
227 201 ];
228 202 }
229 203 }