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, Parameters and Returns Description, Syntax, Parameters and Returns

The Description, Syntax, Parameters and Returns should be converted to inline docs in the function headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes.. 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.

Notes: Inline docs may not have enough syntax or space to describe every detail parameters or returned values. In these cases, use Explanation field.

Top ↑

Usage, Notes and Programming Topics Usage, Notes 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.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ account must have been added as an editor role or above on the Developer Reference.

Note: Because it is trivial, you don’t need migrate one line Usage such as

<?php get_post_comments_feed_link( $post_id, $feed ) ?>

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 migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. of the Codex to the Code Reference in this spreadsheet: 
https://docs.google.com/spreadsheets/d/15hpEbbnuWJZ0DJafyCeG3CFRMtSxX1gY-RObrrjzzdw/edit#gid=1679372392

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’. If you don’t have write permission to the spreadsheet, please DM your Google account to @atachibana on #docs channel.

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://developer.wordpress.org/reference/functions/(function name)/ except above language locator.
  1. Click Show Preview at the bottom of the page and confirm your changes.
  2. Enter the text “Transferred to DevHub” 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 URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org.
{{#dotorgredirect: https://developer.wordpress.org/reference/functions/(function name)/}}
  1. Enter the text “Transferred to DevHub” in the Summary box and click Save page.

NOTE: Once you save the page, viewing the page will redirect you to the DevHub 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 ↑

ReleaseRelease A release is the distribution of the final version of an application. A software release may be either public or private and generally constitutes the initial or new generation of a new or upgraded application. A release is preceded by the distribution of alpha and then beta versions of the software. 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

Last updated: