Making WordPress.org


Ignore:
Timestamp:
07/30/2014 10:08:42 PM (11 years ago)
Author:
coffee2code
Message:

Code Reference: fixes for, and selective activation of, handbooks

  • Landing page:
    • Permit members of site to access the page
    • Set proper links to handbooks
    • Don't display the page content
  • Redirect naked '/handbook/' requests to home page
  • Remove 'Handbook' from handbook breadcrumbs
  • Base site section title for handbooks on is_post_type_archive()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php

    r771 r773  
    336336     */
    337337    function get_site_section_title() {
     338        if ( is_post_type_archive( array( 'plugin-handbook' ) ) ) {
     339            return __( 'Plugin Handbook', 'wporg' );
     340        }
     341
     342        if ( is_post_type_archive( array ( 'theme-handbook' ) ) ) {
     343            return __( 'Theme Handbook', 'wporg' );
     344        }
     345
    338346        $parts = explode( '/', $_SERVER['REQUEST_URI'] );
    339347        switch ( $parts[1] ) {
    340348            case 'reference':
    341                 return 'Code Reference';
    342             case 'theme-handbook':
    343                 return 'Theme Handbook';
    344             case 'plugin-handbook':
    345                 return 'Plugin Handbook';
     349                return __( 'Code Reference', 'wporg' );
    346350            default:
    347                 return 'Developer Resources';
     351                return __( 'Developer Resources', 'wporg' );
    348352        }
    349353    }
Note: See TracChangeset for help on using the changeset viewer.