Making WordPress.org

Changeset 11366


Ignore:
Timestamp:
12/14/2021 01:30:57 AM (3 years ago)
Author:
dd32
Message:

Handbooks / HelpHub: Internationalise the Title & Top links, allowing HelpHub to translate it with a different text-domain.

See #5979.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/table-of-contents.php

    r11354 r11366  
    4343        $this->args = (object) wp_parse_args( $args, array(
    4444            'header_text' => __( 'Topics', 'wporg' ),
     45            'top_text'    => __( 'Top ↑', 'wporg' ),
    4546        ) );
    4647    }
     
    187188
    188189            if ( ! $first ) {
    189                 $replacement .= '<p class="toc-jump"><a href="#top">' . __( 'Top &uarr;', 'wporg' ) . '</a></p>';
     190                $replacement .= '<p class="toc-jump"><a href="#top">' . $this->args->top_text . '</a></p>';
    190191            } else {
    191192                $first = false;
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/index.php

    r11365 r11366  
    1414    $post_types = array_keys( helphub_post_types()->post_types );
    1515
    16     new \WPorg_Handbook_TOC( $post_types );
     16    new \WPorg_Handbook_TOC( $post_types,  array(
     17        'header_text' => __( 'Topics', 'wporg-forums' ),
     18        'top_text'    => __( 'Top &uarr;', 'wporg-forums' ),
     19    ) );
    1720} );
    1821
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-helphub/inc/handbook-toc/table-of-contents.php

    r11365 r11366  
    4343        $this->args = (object) wp_parse_args( $args, array(
    4444            'header_text' => __( 'Topics', 'wporg' ),
     45            'top_text'    => __( 'Top &uarr;', 'wporg' ),
    4546        ) );
    4647    }
     
    187188
    188189            if ( ! $first ) {
    189                 $replacement .= '<p class="toc-jump"><a href="#top">' . __( 'Top &uarr;', 'wporg' ) . '</a></p>';
     190                $replacement .= '<p class="toc-jump"><a href="#top">' . $this->args->top_text . '</a></p>';
    190191            } else {
    191192                $first = false;
Note: See TracChangeset for help on using the changeset viewer.