PluginProbe
Code Snippets / 4.0.0-beta.2
Code Snippets v4.0.0-beta.2
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
← All changes | php/Admin/Contextual_Help.php +217 -7 3.10.24.0.0-beta.2 View file →
@@ -53,11 +53,35 @@
53 53 case 'edit':
54 54 $this->load_edit_help();
55 55 break;
56 56
57 + case 'cloud-library':
58 + $this->load_cloud_library_help();
59 + break;
60 +
61 + case 'blueprints':
62 + $this->load_blueprints_help();
63 + break;
64 +
65 + case 'ai-agent':
66 + $this->load_ai_agent_help();
67 + break;
68 +
69 + case 'insights':
70 + $this->load_insights_help();
71 + break;
72 +
57 73 case 'import':
58 74 $this->load_import_help();
59 75 break;
76 +
77 + case 'settings':
78 + $this->load_settings_help();
79 + break;
80 +
81 + case 'welcome':
82 + $this->load_welcome_help();
83 + break;
60 84 }
61 85
62 86 $this->load_help_sidebar();
63 87 }
@@ -132,10 +156,12 @@
132 156 private function load_manage_help() {
133 157 $this->add_help_tab(
134 158 'overview',
135 159 __( 'Overview', 'code-snippets' ),
136 - $this->get_intro_text() .
137 - __( 'Here you can manage your existing snippets and perform tasks on them such as activating, deactivating, deleting and exporting.', 'code-snippets' )
160 + [
161 + $this->get_intro_text(),
162 + __( 'Here you can manage your existing snippets and perform tasks on them such as activating, deactivating, deleting and exporting.', 'code-snippets' ),
163 + ]
138 164 );
139 165
140 166 $this->add_help_tab(
141 167 'safe-mode',
@@ -174,8 +200,115 @@
174 200 );
175 201 }
176 202
177 203 /**
204 + * Register and handle the help tabs for the Cloud Library demo page.
205 + */
206 + private function load_cloud_library_help() {
207 + $this->add_help_tab(
208 + 'overview',
209 + __( 'Overview', 'code-snippets' ),
210 + [
211 + $this->get_intro_text(),
212 + __( 'Cloud Library lets you reuse snippets across the sites connected to your Code Snippets Cloud.', 'code-snippets' ),
213 + ]
214 + );
215 + }
216 +
217 + /**
218 + * Register and handle the help tabs for the Blueprints demo page.
219 + */
220 + private function load_blueprints_help() {
221 + $this->add_help_tab(
222 + 'overview',
223 + __( 'Overview', 'code-snippets' ),
224 + [
225 + $this->get_intro_text(),
226 + __( 'Blueprints help you create snippets from templates for supported WordPress features.', 'code-snippets' ),
227 + ]
228 + );
229 +
230 + $this->add_help_tab(
231 + 'using-blueprints',
232 + __( 'Using Blueprints', 'code-snippets' ),
233 + [
234 + __( 'Blueprints provide guided forms for creating snippets from supported WordPress features.', 'code-snippets' ),
235 + __( 'Choose a blueprint, complete its fields and review the generated snippet before saving it.', 'code-snippets' ),
236 + ]
237 + );
238 +
239 + $this->add_help_tab(
240 + 'generating-snippets',
241 + __( 'Generating Snippets', 'code-snippets' ),
242 + [
243 + __( 'Code Snippets Pro combines your choices with the required boilerplate to generate a complete snippet.', 'code-snippets' ),
244 + __( 'Review the generated snippet before saving or activating it on your site.', 'code-snippets' ),
245 + ]
246 + );
247 + }
248 +
249 + /**
250 + * Register and handle the help tabs for the AI Agent demo page.
251 + */
252 + private function load_ai_agent_help() {
253 + $this->add_help_tab(
254 + 'overview',
255 + __( 'Overview', 'code-snippets' ),
256 + [
257 + $this->get_intro_text(),
258 + __( 'The AI Agent can plan, build and refine snippets from prompts.', 'code-snippets' ),
259 + ]
260 + );
261 +
262 + $this->add_help_tab(
263 + 'writing-prompts',
264 + __( 'Writing Prompts', 'code-snippets' ),
265 + [
266 + __( 'Describe what you want your site to do in plain language, including any relevant details.', 'code-snippets' ),
267 + __( 'The AI Agent uses your prompt to prepare a plan before creating snippets.', 'code-snippets' ),
268 + ]
269 + );
270 +
271 + $this->add_help_tab(
272 + 'reviewing-plans',
273 + __( 'Reviewing Plans', 'code-snippets' ),
274 + [
275 + __( 'Review the plan to see what the AI Agent intends to build before it creates any snippets.', 'code-snippets' ),
276 + __( 'Accept the plan to continue, or ask for changes when it does not match your requirements.', 'code-snippets' ),
277 + ]
278 + );
279 +
280 + $this->add_help_tab(
281 + 'reviewing-snippets',
282 + __( 'Reviewing Snippets', 'code-snippets' ),
283 + [
284 + __( 'New snippets are added inactive, so you can review the code before it runs on your site.', 'code-snippets' ),
285 + __( 'Activate each snippet only after confirming that it does what you expect.', 'code-snippets' ),
286 + ]
287 + );
288 + }
289 +
290 + /**
291 + * Register and handle the help tabs for the Insights admin page.
292 + */
293 + private function load_insights_help() {
294 + $this->add_help_tab(
295 + 'overview',
296 + __( 'Overview', 'code-snippets' ),
297 + [
298 + $this->get_intro_text() .
299 + __( 'Here you can view snippets statistics, and get insights how the snippets are being used on this website.', 'code-snippets' ),
300 + ]
301 + );
302 +
303 + $this->add_help_tab(
304 + 'insights',
305 + __( 'Insights', 'code-snippets' ),
306 + __( 'Get detailed information about your snippets usage, including which snippets types are being most used, their activation status, where they are located, and more.', 'code-snippets' )
307 + );
308 + }
309 +
310 + /**
178 311 * Register and handle the help tabs for the import snippets admin page
179 312 */
180 313 private function load_import_help() {
181 314 $manage_url = code_snippets()->get_menu_url( 'manage' );
@@ -182,18 +315,22 @@
182 315
183 316 $this->add_help_tab(
184 317 'overview',
185 318 __( 'Overview', 'code-snippets' ),
186 - $this->get_intro_text() .
187 - __( 'Here you can load snippets from a code snippets export file into the database alongside existing snippets.', 'code-snippets' )
319 + [
320 + $this->get_intro_text() .
321 + __( 'Here you can load snippets from a code snippets export file into the database alongside existing snippets.', 'code-snippets' ),
322 + ]
188 323 );
189 324
190 325 $this->add_help_tab(
191 326 'import',
192 327 __( 'Importing', 'code-snippets' ),
193 - __( 'You can load your snippets from a code snippets export file using this page.', 'code-snippets' ) .
194 - /* translators: %s: URL to Snippets admin menu */
195 - sprintf( __( 'Imported snippets will be added to the database along with your existing snippets. Regardless of whether the snippets were active on the previous site, imported snippets are always inactive until activated using the <a href="%s">Manage Snippets</a> page.', 'code-snippets' ), $manage_url )
328 + [
329 + __( 'You can load your snippets from a code snippets export file using this page.', 'code-snippets' ) .
330 + /* translators: %s: URL to Snippets admin menu */
331 + sprintf( __( 'Imported snippets will be added to the database along with your existing snippets. Regardless of whether the snippets were active on the previous site, imported snippets are always inactive until activated using the <a href="%s">Manage Snippets</a> page.', 'code-snippets' ), $manage_url ),
332 + ]
196 333 );
197 334
198 335 $this->add_help_tab(
199 336 'export',
@@ -199,7 +336,80 @@
199 336 'export',
200 337 __( 'Exporting', 'code-snippets' ),
201 338 /* translators: %s: URL to Manage Snippets admin menu */
202 339 sprintf( __( 'You can save your snippets to a code snippets export file using the <a href="%s">Manage Snippets</a> page.', 'code-snippets' ), $manage_url )
340 + );
341 +
342 + $this->add_help_tab(
343 + 'migrating',
344 + __( 'Migrating', 'code-snippets' ),
345 + __( 'If you are using another snippets plugin, you can import those existing snippets to your Code Snippets library.', 'code-snippets' )
346 + );
347 + }
348 +
349 + /**
350 + * Register and handle the help tabs for the settings admin page.
351 + */
352 + private function load_settings_help() {
353 + $this->add_help_tab(
354 + 'overview',
355 + __( 'Overview', 'code-snippets' ),
356 + [
357 + $this->get_intro_text() .
358 + __( 'Here you can configure how Code Snippets works on your site, including snippet editing, execution and display preferences.', 'code-snippets' ),
359 + ]
360 + );
361 +
362 + $this->add_help_tab(
363 + 'editing',
364 + __( 'Editing', 'code-snippets' ),
365 + __( 'Configure snippet fields and the code editor, including its theme, indentation and display preferences.', 'code-snippets' ),
366 + );
367 +
368 + $this->add_help_tab(
369 + 'running',
370 + __( 'Running', 'code-snippets' ),
371 + __( 'Choose how snippets run and whether new snippets are activated when you save them.', 'code-snippets' ),
372 + );
373 +
374 + $this->add_help_tab(
375 + 'library',
376 + __( 'Library', 'code-snippets' ),
377 + __( 'Manage snippet revisions, deleted snippets and cloud library connections.', 'code-snippets' ),
378 + );
379 +
380 + $this->add_help_tab(
381 + 'interface',
382 + __( 'Interface', 'code-snippets' ),
383 + __( 'Configure the snippets list, code highlighting, the admin bar menu and upgrade notices.', 'code-snippets' ),
384 + );
385 +
386 + $this->add_help_tab(
387 + 'advanced',
388 + __( 'Advanced', 'code-snippets' ),
389 + __( 'Control access, maintenance actions, version changes and complete uninstallation.', 'code-snippets' ),
390 + );
391 + }
392 +
393 + /**
394 + * Register and handle the help tabs for the welcome admin page.
395 + */
396 + private function load_welcome_help() {
397 + $this->add_help_tab(
398 + 'overview',
399 + __( 'Overview', 'code-snippets' ),
400 + [
401 + $this->get_intro_text() .
402 + __( 'Here you can find the latest Code Snippets news and release updates, plus helpful articles and partner offers.', 'code-snippets' ),
403 + ]
404 + );
405 +
406 + $this->add_help_tab(
407 + 'whats-new',
408 + __( "What's New", 'code-snippets' ),
409 + [
410 + __( 'The Latest Changes section summarizes new features, improvements, bug fixes, security updates and other changes in recent releases.', 'code-snippets' ),
411 + __( 'Select View Changelog to read the complete release notes.', 'code-snippets' ),
412 + ]
203 413 );
204 414 }
205 415 }