Title: Code Snippets Review
Author: Courtney Robertson
Published: October 31, 2020

---

# Code Snippets Review

## In this article

 * [Proofreading Pass](https://make.wordpress.org/training/handbook/guidelines/lesson-plans/auditing-lesson-plans/code-snippets-review/?output_format=md#proofreading-pass)
 * [Code Snippet Testing](https://make.wordpress.org/training/handbook/guidelines/lesson-plans/auditing-lesson-plans/code-snippets-review/?output_format=md#code-snippet-testing)
 * [Let Us Know](https://make.wordpress.org/training/handbook/guidelines/lesson-plans/auditing-lesson-plans/code-snippets-review/?output_format=md#let-us-know)

Our lesson plans have code snippets. We’ve moved from storing the lesson plans on
this team handbook to GitHubGitHub GitHub is a website that offers online implementation
of git repositories that can easily be shared, copied and modified by other developers.
Public repositories are free to host, private repositories require a paid subscription.
GitHub introduced the concept of the ‘pull request’ where code changes done in branches
by contributors can be reviewed and discussed before being merged by the repository
owner. [https://github.com/](https://github.com/) and then to Learn. As such, some
bits of code may not be formatted correctly.

We are using the [Edit Flow plugin](https://editflow.org/) to create administrative
taxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some
common taxonomies are category, link, tag, or post format. [https://codex.wordpress.org/Taxonomies#Default_Taxonomies](https://codex.wordpress.org/Taxonomies#Default_Taxonomies)..
This will not display on the published view of the site.

When you visit **Lesson Plans > All Lessons**, you can view the columns where the
taxonomy is available.

[[

Within each lesson, look also at the Editorial Metadata. This may appear in the 
right sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used
by WordPress themes to display information that is not a part of the main content.
It is not always a vertical column on the side. It can be a horizontal rectangle
below or above the content area, footer, header, or any where in the theme. under
the document tab OR beneath the post editor content.

[[

## 󠀁[Proofreading Pass](https://make.wordpress.org/training/handbook/guidelines/lesson-plans/auditing-lesson-plans/code-snippets-review/?output_format=md#proofreading-pass)󠁿

Contributions are welcome to do a quick pass to ensure formatting has been established
and for any obvious code conversion issues.

 1. Leave a message in the [Training team Slack](https://wordpress.slack.com/archives/C02RW657Q)
    for the fastest access to the Learn siteLearn site The Training Team publishes 
    its completed lesson plans at https://learn.wordpress.org/ which is often referred
    to as the “Learn” site. expressing interest in contributing.
 2. View **Lesson Plans > All Lessons** on Learn to locate which plans contain a **
    code snippet**.
 3. Edit a lesson that contains a snippet.

When converting posts to the BlockBlock Block is the abstract term used to describe
units of markup that, composed together, form the content or layout of a webpage
using the WordPress editor. The idea combines concepts of what in the past may have
achieved with shortcodes, custom HTML, and embed discovery into a single consistent
API and user experience. Editor mode, code snippets will default to a **Code** block.
Modify this to the **Syntax Highlighter** block.

![](https://make.wordpress.org/training/files/2020/09/image-5.png)

At this point, it may be beneficial to cross-check code with what appears on [GitHub](https://github.com/wptrainingteam).
A few cases of code not displaying in the editor but being live and inaccurate have
occurred on published lesson plans. Copy/pasting from GitHub to Syntax Highlighter
block usually works.

Then in the right sidebar, select the language with Line Numbers enabled.

![](https://make.wordpress.org/training/files/2020/09/image-6.png)

When you’ve finished proofreading each lesson, check the Edit Flow box for 
**`Code
snippet proofread`**.

## 󠀁[Code Snippet Testing](https://make.wordpress.org/training/handbook/guidelines/lesson-plans/auditing-lesson-plans/code-snippets-review/?output_format=md#code-snippet-testing)󠁿

 1. Leave a message in the [Training team Slack](https://wordpress.slack.com/archives/C02RW657Q)
    for the fastest access to the Learn site expressing interest in contributing.
 2. View **Lesson Plans > All Lessons** on Learn to locate which plans contain a **
    code snippet**.
 3. Edit a lesson that contains a snippet.

Many of these code snippets are rather dated. Run through the lesson and test the
snippets displayed.

 * If you are able to confirm that it works, great! Check 
   `Code snippet passes`
 * If the code does not work but you can provide new code that does work, great!
   `
   Code provided`
 * If the code in the lesson does not work and needs a different contributor to 
   provide that, great. 
   `Code did not pass`

Indicate in Edit Flow the status of the code snippets as you have reviewed each.

## 󠀁[Let Us Know](https://make.wordpress.org/training/handbook/guidelines/lesson-plans/auditing-lesson-plans/code-snippets-review/?output_format=md#let-us-know)󠁿

We don’t have a great way to detect the progress made and do want to give props 
to those contributing.

After your pass through lesson plans, please leave a message in the [Training team Slack](https://wordpress.slack.com/archives/C02RW657Q)
indicating which plans you have updated.

First published

October 31, 2020

Last updated

October 31, 2020

[  Previous: Omit Details Moved to Taxonomy](https://make.wordpress.org/training/handbook/guidelines/lesson-plans/auditing-lesson-plans/omit-details-moved-to-taxonomy/)

[  Next: Tutorials](https://make.wordpress.org/training/handbook/guidelines/tutorials/)