Editing Articles

Codex to Code Reference Codex to Code Reference

As an example, let’s compare two pages of add_action to understand which sections are transferred to which areas:

Codex (archives):
https://codex.wordpress.org/index.php?title=Function_Reference/add_action&oldid=152725

Code Reference:
https://developer.wordpress.org/reference/functions/add_action/

Description, Syntax and Parameters Description, Syntax and Parameters

The Description, Syntax, and Parameters should be converted to inline docs in the function header. These inline docs are automatically converted and added to the Code Reference.

For our example, refer to this source code. https://core.trac.wordpress.org/browser/tags/5.2/src/wp-includes/plugin.php#L384. As you can see, the function header includes description and @since, @param and @return tags. Those tags form the Description, Syntax, and Parameters for this function and have been automatically added to the Code Reference.

All functions already have inline docs but not with the same level of information as the Codex. A lot of information was dropped during initial function header creation.

To add/update inline docs, refer to this page:
https://make.wordpress.org/docs/handbook/code-reference/inline-documentation/. You will need some development skills to build the environment and contribute.

Top ↑

Usage and Programming Topics Usage and Programming Topics

These should be migrated to the Explanation field of the Code Reference and are displayed in the “More Information” section.

To edit the Explanation field, your WordPress.org account must have been added as an editor role or above on the Developer Reference.

Need to be added? Go to the #docs channel on slack and ask someone to add you.

Top ↑

Usage Examples Usage Examples

Usage examples are migrated as the User Comments for each page.

Refer to this document for more details: https://make.wordpress.org/docs/handbook/code-reference/editing-articles/migrating-from-codex/

Top ↑

Getting Started Getting Started

We’re tracking the migration of the Codex to the Code Reference in this spreadsheet: 
https://docs.google.com/spreadsheets/d/15hpEbbnuWJZ0DJafyCeG3CFRMtSxX1gY-RObrrjzzdw/edit#gid=0

Top ↑

First reserve the page where you want to edit. First reserve the page where you want to edit.

  1. In the tracking spreadsheet, search for ‘Partially done’ rows using the Status column (Column H).
  2. Enter your name in the Editor column (Column F) and change the Status column (Column H) to ‘In Progress’.

Top ↑

Compare Codex and Code Reference Compare Codex and Code Reference

  1. Open Codex page and Code Reference page and compare them
  2. If Code Reference has full information of Codex, then OK
  3. If Code Reference does not have some information, refer above Codex to Code Reference and migrate missing information on the Codex page to the Code Reference appropriately.
    • When you create a Ticket to modify the inline documentation, change the status to ‘Waiting’, and leave the ticket number in Notes (Column I).
    • If you cannot migrate every section, leave a comment in the Notes column (Column I) noting what’s left and change the Status to ‘Partially done’.

Top ↑

Redirect the page from Codex to Code Reference. Redirect the page from Codex to Code Reference.

After the migration complete, redirect codex page to Code Reference.

When the Codex page has a language locator When the Codex page has a language locator

  1. From the Codex page, click Edit on right side menu.
  2. Put following message below the language locator, and comment out the current Codex contents using:
<!-- and -->
{{Languages|
{{en|WordPress Features}}
{{ja|WordPress Features}}
}}
This page was moved to https://wordpress.org/support/article/< HelpHub page> except above language locator.
  1. Click Show Preview at the bottom of the page and confirm your changes.
  2. Enter the text “Transferred to HelpHub” in the Summary box and click Save page.

Top ↑

When the Codex page does not have a language locator When the Codex page does not have a language locator

  1. From the Codex page, click Edit on right side menu.
  2. Put following tag at the top of the page, and adjust the URL.
{{#dotorgredirect: https://developer.wordpress.org/reference/functions/(function name)/}}
  1. Enter the text “Transferred to HelpHub” in the Summary box and click Save page.

NOTE: Once you save the page, viewing the page will redirect you to the HelpHub version of the page. If you want to modify the saved page, add &action=edit to the URL.
e.g. https://codex.wordpress.org/index.php?title=Function_Reference/add_action&action=edit

Top ↑

Release this page Release this page

Change the “In Progress” status to “Done” (Column H).

Top ↑

Progress Stats Progress Stats

https://docs.google.com/spreadsheets/d/15hpEbbnuWJZ0DJafyCeG3CFRMtSxX1gY-RObrrjzzdw/edit#gid=1576070270