Making WordPress.org

Ticket #1548: 1548.diff

File 1548.diff, 3.0 KB (added by DrewAPicture, 9 years ago)
  • content-reference.php

     
    8383                <hr/>
    8484                <section class="explanation">
    8585                        <h2><?php _e( 'More Information', 'wporg' ); ?></h2>
    86                         <?php echo apply_filters( 'the_content', apply_filters( 'get_the_content', $explanation ) ); ?>
     86
     87                        <?php
     88                        if ( class_exists( 'WPorg_Handbook_TOC' ) ) :
     89                                $TOC = new \WPorg_Handbook_TOC( get_parsed_post_types() );
     90                                add_filter( 'the_content', array( $TOC, 'add_toc' ) );
     91                        endif;
     92
     93                        /** This filter is documented in wp-includes/post-template.php */
     94                        echo apply_filters( 'the_content', apply_filters( 'get_the_content', $explanation ) );
     95                        ?>
    8796                </section>
    8897        <?php endif; ?>
    8998
  • scss/main.scss

     
    10531053                .callout {
    10541054                        margin-top: 30px;
    10551055                }
     1056                .table-of-contents {
     1057                        width: 300px;
     1058                }
    10561059        }
    10571060
    10581061        .callout:before {
     
    16101613                                padding-left: 45px;
    16111614                                text-indent: -45px;
    16121615                        }
     1616
     1617                        .table-of-contents {
     1618                                width: 200px;
     1619                        }
    16131620                }
    16141621
    16151622                .two-columns .box {
     
    16411648                                text-indent: -20px;
    16421649                                font-size: 16px;
    16431650                        }
     1651                        .table-of-contents {
     1652                                width: 100%;
     1653                                margin-bottom: 10px;
     1654                        }
    16441655                }
    16451656
    16461657                &.single-wp-parser-function, &.single-wp-parser-method, &.single-wp-parser-hook {
  • stylesheets/main.css

     
    12621262.devhub-wrap .wp-parser-class .callout, .devhub-wrap .wp-parser-function .callout, .devhub-wrap .wp-parser-hook .callout, .devhub-wrap .wp-parser-method .callout {
    12631263  margin-top: 30px;
    12641264}
     1265.devhub-wrap .wp-parser-class .table-of-contents, .devhub-wrap .wp-parser-function .table-of-contents, .devhub-wrap .wp-parser-hook .table-of-contents, .devhub-wrap .wp-parser-method .table-of-contents {
     1266  width: 300px;
     1267}
    12651268.devhub-wrap .callout:before {
    12661269  top: 0.2em;
    12671270}
     
    16681671    padding-left: 45px;
    16691672    text-indent: -45px;
    16701673  }
     1674  .devhub-wrap .wp-parser-class .table-of-contents, .devhub-wrap .wp-parser-function .table-of-contents, .devhub-wrap .wp-parser-hook .table-of-contents, .devhub-wrap .wp-parser-method .table-of-contents {
     1675    width: 200px;
     1676  }
    16711677  .devhub-wrap .two-columns .box {
    16721678    width: 99%;
    16731679  }
     
    16901696    text-indent: -20px;
    16911697    font-size: 16px;
    16921698  }
     1699  .devhub-wrap .wp-parser-class .table-of-contents, .devhub-wrap .wp-parser-function .table-of-contents, .devhub-wrap .wp-parser-hook .table-of-contents, .devhub-wrap .wp-parser-method .table-of-contents {
     1700    width: 100%;
     1701    margin-bottom: 10px;
     1702  }
    16931703  .devhub-wrap.single-wp-parser-function .comment-list li, .devhub-wrap.single-wp-parser-method .comment-list li, .devhub-wrap.single-wp-parser-hook .comment-list li {
    16941704    padding-left: 0;
    16951705    padding-right: 0;