Skip to content

Commit

Permalink
Update wordpress.org links
Browse files Browse the repository at this point in the history
  • Loading branch information
taipeicoder committed Jul 9, 2024
1 parent 7b323d4 commit f739cd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function wpcom_enqueue_documentation_links_assets() {
$data = $wp_scripts->get_data( 'customize-controls', 'data' );

if ( $data ) {
$data = str_replace( 'https:\\/\\/wordpress.org\\/support\\/article\\/site-editor\\/\\', 'https:\\/\\/wordpress.com\\/support\\/site-editor\\/\\', $data );
$data = str_replace( 'https:\\/\\/wordpress.org\\/documentation\\/article\\/site-editor\\/\\', 'https:\\/\\/wordpress.com\\/support\\/site-editor\\/\\', $data );
$wp_scripts->registered['customize-controls']->extra['data'] = $data;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,21 @@ declare global {
*/
function overrideCoreDocumentationLinksToWpcom( translation: string, text: string ) {
switch ( text ) {
case 'https://wordpress.org/support/article/excerpt/':
case 'https://wordpress.org/support/article/settings-sidebar/#excerpt':
case 'https://wordpress.org/documentation/article/what-is-an-excerpt-classic-editor/':
case 'https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt':
return 'https://wordpress.com/support/excerpts/';
case 'https://wordpress.org/support/article/writing-posts/#post-field-descriptions':
case 'https://wordpress.org/support/article/settings-sidebar/#permalink':
case 'https://wordpress.org/documentation/article/write-posts-classic-editor/#post-field-descriptions':
case 'https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink':
return 'https://wordpress.com/support/permalinks-and-slugs/';
case 'https://wordpress.org/support/article/wordpress-editor/':
case 'https://wordpress.org/documentation/article/wordpress-block-editor/':
return 'https://wordpress.com/support/wordpress-editor/';
case 'https://wordpress.org/support/article/site-editor/':
case 'https://wordpress.org/documentation/article/site-editor/':
return 'https://wordpress.com/support/site-editor/';
case 'https://wordpress.org/support/article/block-based-widgets-editor/':
case 'https://wordpress.org/documentation/article/block-based-widgets-editor/':
return 'https://wordpress.com/support/widgets/';
case 'https://wordpress.org/plugins/classic-widgets/':
return 'https://wordpress.com/plugins/classic-widgets';
case 'https://wordpress.org/support/article/styles-overview/':
case 'https://wordpress.org/documentation/article/styles-overview/':
return 'https://wordpress.com/support/using-styles/';
}

Expand Down

0 comments on commit f739cd2

Please sign in to comment.