WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 3 months ago

Last modified 3 months ago

#47771 closed enhancement (fixed)

Replace Codex links with their HelpHub counterparts

Reported by: SergeyBiryukov Owned by: SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: General Keywords: good-first-bug has-patch
Focuses: docs Cc:
PR Number:

Description

Suggested by @tobifjellner in comment:5:ticket:47768:

Now that the new HelpHub is getting up to speed, it would probably be good to grep for all links to Codex in core?

At a glance, most Codex links used in core do indeed redirect to their HelpHub counterparts now, for example:

Let's update all the Codex URLs in core and bundled themes to link to the corresponding HelpHub articles.

Attachments (1)

47771.diff (58.0 KB) - added by ianbelanger 5 months ago.
First run at changing all codex links that redirect to HelpHub

Download all attachments as: .zip

Change History (17)

#1 @tobifjellner
5 months ago

At the same time: All links to HelpHub need to be "translatable" so that the locale community will be able to change the link to a localized version of the same content (if one exists).

@ianbelanger
5 months ago

First run at changing all codex links that redirect to HelpHub

#2 @ianbelanger
5 months ago

  • Keywords has-patch needs-testing added; needs-patch removed

The above patch changes all codex links that currently redirect to HelpHub, to the HelpHub links. Including docblock links. Many are translatable, but probably not all.

Last edited 5 months ago by ianbelanger (previous) (diff)

#3 @SergeyBiryukov
5 months ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#4 @SergeyBiryukov
5 months ago

In 45674:

General: First pass at replacing Codex URLs with a corresponding HelpHub or DevHub article.

Props ianbelanger, tobifjellner, SergeyBiryukov.
See #47771.

#5 @SergeyBiryukov
5 months ago

In 45675:

Bundled Themes: Replace Codex URLs with a corresponding HelpHub or DevHub article.

Props ianbelanger, tobifjellner, SergeyBiryukov.
See #47771.

#6 @SergeyBiryukov
5 months ago

In 45676:

I18N: Update translator comments after [45674].

See #47771.

#7 @SergeyBiryukov
5 months ago

In 45677:

I18N: Update translator comment missed in [45676].

See #47771.

#8 @SergeyBiryukov
5 months ago

There are still quite a few Codex URLs in core and some in bundled themes (mostly changelogs), however they don't seem to have a suitable HelpHub or DevHub equivalent at this time.

Keeping the ticket open for now just in case, but I think this is fixed for 5.3 and can continue in a future release.

#9 follow-up: @ianbelanger
4 months ago

Thanks @SergeyBiryukov,

That is correct, there are 185 total instances of codex URLs in Core and the Bundled Themes that don't have HelpHub or DevHub counterparts. 137 of the 185 are indeed Bundled Theme Changelogs.

Here is a list of those URLs for reference:

Codex pages without corresponding HelpHub pages

Located in Core
https://codex.wordpress.org/
https://codex.wordpress.org/IRC
https://codex.wordpress.org/AJAX_in_Plugins
https://codex.wordpress.org/Links_Screen
https://codex.wordpress.org/Links_Add_New_Screen
https://codex.wordpress.org/Links_Link_Categories_Screen
https://codex.wordpress.org/Appearance_Background_Screen
https://codex.wordpress.org/Appearance_Header_Screen
https://codex.wordpress.org/Dashboard_My_Sites_Screen
https://codex.wordpress.org/Network_Admin_Settings_Screen
https://codex.wordpress.org/Network_Admin_Themes_Screen
https://codex.wordpress.org/Network_Admin_Users_Screen
https://codex.wordpress.org/Update_Services
https://codex.wordpress.org/Author_Templates
https://codex.wordpress.org/Class_Reference/WP_Object_Cache
https://codex.wordpress.org/CSS
https://codex.wordpress.org/Function_Reference/is_main_query
https://codex.wordpress.org/Function_Reference/wpdb_Class

Located in Bundled Themes
https://codex.wordpress.org/Right_to_Left_Language_Support (duplicate pages in Codex)
https://codex.wordpress.org/Right-to-Left_Language_Support (duplicate pages in Codex)
https://codex.wordpress.org/Post_Thumbnails#Setting_a_Post_Thumbnail
https://codex.wordpress.org/Creating_an_Error_404_Page
https://codex.wordpress.org/Theme_Logo
https://codex.wordpress.org/Custom_Headers
https://codex.wordpress.org/Twenty_Ten
https://codex.wordpress.org/Twenty_Ten_Theme_Changelog#Version_X.X - 19 versions
https://codex.wordpress.org/Twenty_Eleven
https://codex.wordpress.org/Twenty_Eleven_Theme_Changelog#Version_X.X - 22 versions
https://codex.wordpress.org/Twenty_Twelve
https://codex.wordpress.org/Twenty_Twelve_Theme_Changelog#Version_X.X - 19 versions
https://codex.wordpress.org/Twenty_Thirteen
https://codex.wordpress.org/Twenty_Thirteen_Theme_Changelog#Version_X.X - 19 versions
https://codex.wordpress.org/Twenty_Fourteen
https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_X.X - 17 versions
https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_X.X - 15 versions
https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_X.X - 10 versions
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_X.X - 12 versions
https://codex.wordpress.org/Twenty_Nineteen_Theme_Changelog#Version_X.X - 4 versions

I'm not sure if there a plan to move the Bundled Theme Changelogs over to DevHub or HelpHub, but the rest of the pages should be moved over asap.

#11 in reply to: ↑ 10 @SergeyBiryukov
4 months ago

Replying to ramiy:

We do have a URL for:
https://codex.wordpress.org/Function_Reference/is_main_query
located in:
https://developer.wordpress.org/reference/functions/is_main_query/

Also, we can replace:
https://codex.wordpress.org/Function_Reference/wpdb_Class
With:
https://developer.wordpress.org/reference/classes/wpdb/

and:
https://codex.wordpress.org/Class_Reference/WP_Object_Cache
with:
https://developer.wordpress.org/reference/classes/wp_object_cache/

Thanks! I've considered all of these before [45674], but at the moment the Codex pages seem to have more information than the DevHub ones. I wouldn't object too strongly to replacing them too, though.

#12 in reply to: ↑ 10 @ianbelanger
4 months ago

  • Keywords needs-testing removed

Replying to ramiy:

Replying to ianbelanger:

We do have a URL for:
https://codex.wordpress.org/Function_Reference/is_main_query
located in:
https://developer.wordpress.org/reference/functions/is_main_query/

Also, we can replace:
https://codex.wordpress.org/Function_Reference/wpdb_Class
With:
https://developer.wordpress.org/reference/classes/wpdb/

and:
https://codex.wordpress.org/Class_Reference/WP_Object_Cache
with:
https://developer.wordpress.org/reference/classes/wp_object_cache/

Thanks @ramiy,

It appears that https://codex.wordpress.org/Class_Reference/WP_Object_Cache and https://codex.wordpress.org/Function_Reference/wpdb_Class are each used in 1 place in Core, within the docblocks of their respective classes. Since the Codex contains much more information describing what the classes are, and not just the class code itself, like in DevHub. I think that we should leave these 2 links alone in Core until there is either a HelpHub or more descriptive DevHub page.

Also, https://codex.wordpress.org/Function_Reference/is_main_query is used in only one place in Core in query.php It is referenced in a notification message describing how to use is_main_query when filtering pre_get_posts. It is referencing something that is specifically described in Codex, but is not described in DevHub. So IMO we should probably leave this link alone as well.

If anyone disagrees, please feel free to state your case.

#13 @SergeyBiryukov
4 months ago

In 45776:

Twenty Sixteen: Correct HelpHub URL in readme.txt.

See #47771.

#14 @desrosj
3 months ago

#47969 was marked as a duplicate.

#15 @SergeyBiryukov
3 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

#16 @SergeyBiryukov
3 months ago

#48058 was marked as a duplicate.

Note: See TracTickets for help on using tickets.