Making WordPress.org

Changeset 3488


Ignore:
Timestamp:
06/19/2016 10:08:49 PM (9 years ago)
Author:
coffee2code
Message:

W.org P2 child theme: For handbook-related templates, use the current post type instead of hard-coding 'handbook' when getting archive url and dynamic sidebar.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-p2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-p2/sidebar-handbook.php

    r7 r3488  
    66 */
    77
    8 
    9 if ( is_active_sidebar( 'handbook' ) ) : ?>
     8if ( is_active_sidebar( wporg_get_current_handbook() ) ) : ?>
    109    <div id="sidebar">
    1110        <?php do_action( 'before_sidebar' ); ?>
    1211        <ul>
    13             <?php dynamic_sidebar( 'handbook' ); ?>
     12            <?php dynamic_sidebar( wporg_get_current_handbook() ); ?>
    1413        </ul>
    1514        <div class="clear"></div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-p2/single-handbook.php

    r3487 r3488  
    88<?php get_header(); ?>
    99
    10 <div class="handbook-name"><span><a href="<?php echo esc_url( get_post_type_archive_link( 'handbook' ) ); ?>"><?php echo esc_html( WPorg_Handbook::get_name() ); ?></a></span></div>
     10<div class="handbook-name"><span><a href="<?php echo esc_url( get_post_type_archive_link( wporg_get_current_handbook() ) ); ?>"><?php echo esc_html( wporg_get_current_handbook_name() ); ?></a></span></div>
    1111
    1212<!-- Also called on in footer but will not display the second time. -->
Note: See TracChangeset for help on using the changeset viewer.