PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.9.2
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.9.2
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/Admin/Customizer/Sections/SingleDoc.php +79 -0 4.6.04.9.2 View file →
@@ -121,8 +121,87 @@
121 121 )
122 122 );
123 123 }
124 124
125 + /**
126 + * Content area width for the single doc, mirroring the Docs Page pair.
127 + *
128 + * Only meaningful on the layouts whose content wrapper is actually capped
129 + * by the stylesheet — 1, 5, 6, 8, 9 and 10. Layouts 2, 3 and 4 are
130 + * full-bleed by design and have no width to constrain, so both controls are
131 + * hidden for them in customizer-condition.js (the codebase drives control
132 + * visibility from JS bound to the layout setting, not active_callback).
133 + */
134 + public function single_doc_content_area_width() {
135 + $this->customizer->add_setting(
136 + 'betterdocs_single_doc_content_width',
137 + apply_filters(
138 + 'betterdocs_single_doc_content_width',
139 + [
140 + 'default' => $this->defaults['betterdocs_single_doc_content_width'],
141 + 'capability' => 'edit_theme_options',
142 + 'sanitize_callback' => [ $this->sanitizer, 'integer' ]
143 + ]
144 + )
145 + );
146 +
147 + $this->customizer->add_control(
148 + new RangeValueControl(
149 + $this->customizer,
150 + 'betterdocs_single_doc_content_width',
151 + [
152 + 'type' => 'betterdocs-range-value',
153 + 'section' => 'betterdocs_single_docs_settings',
154 + 'settings' => 'betterdocs_single_doc_content_width',
155 + 'label' => __( 'Content Area Width', 'betterdocs' ),
156 + 'priority' => 103,
157 + 'input_attrs' => [
158 + 'class' => 'betterdocs-range-value',
159 + 'min' => 0,
160 + 'max' => 100,
161 + 'step' => 1,
162 + 'suffix' => '%' //optional suffix
163 + ]
164 + ]
165 + )
166 + );
167 + }
168 +
169 + public function single_doc_content_area_max_width() {
170 + $this->customizer->add_setting(
171 + 'betterdocs_single_doc_content_max_width',
172 + apply_filters(
173 + 'betterdocs_single_doc_content_max_width',
174 + [
175 + 'default' => $this->defaults['betterdocs_single_doc_content_max_width'],
176 + 'capability' => 'edit_theme_options',
177 + 'sanitize_callback' => [ $this->sanitizer, 'integer' ]
178 + ]
179 + )
180 + );
181 +
182 + $this->customizer->add_control(
183 + new RangeValueControl(
184 + $this->customizer,
185 + 'betterdocs_single_doc_content_max_width',
186 + [
187 + 'type' => 'betterdocs-range-value',
188 + 'section' => 'betterdocs_single_docs_settings',
189 + 'settings' => 'betterdocs_single_doc_content_max_width',
190 + 'label' => __( 'Content Area Maximum Width', 'betterdocs' ),
191 + 'priority' => 103,
192 + 'input_attrs' => [
193 + 'class' => 'betterdocs-range-value',
194 + 'min' => 100,
195 + 'max' => 1600,
196 + 'step' => 1,
197 + 'suffix' => 'px' //optional suffix
198 + ]
199 + ]
200 + )
201 + );
202 + }
203 +
125 204 public function doc_single_content_area_bg_color() {
126 205 $this->customizer->add_setting(
127 206 'betterdocs_doc_single_content_area_bg_color',
128 207 [