Ticket #1548: 1548.2.diff
File 1548.2.diff, 3.8 KB (added by , 9 years ago) |
---|
-
content-reference.php
83 83 <hr/> 84 84 <section class="explanation"> 85 85 <h2><?php _e( 'More Information', 'wporg' ); ?></h2> 86 <?php echo apply_filters( 'the_content', apply_filters( 'get_the_content', $explanation ) ); ?> 86 87 <?php 88 // Output the explanation. Passed through 'the_content' on retrieval, thus no escaping. 89 echo $explanation; 90 ?> 87 91 </section> 88 92 <?php endif; ?> 89 93 -
inc/template-tags.php
1317 1317 if ( ! $explanation = get_explanation( $post, $published = true ) ) { 1318 1318 return ''; 1319 1319 } 1320 return get_post_field( $field, $explanation, $context ); 1320 1321 $post_field = get_post_field( $field, $explanation, $context ); 1322 1323 // If retrieving the explanation content for display, add the TOC if available. 1324 if ( 'post_content' === $field && 'display' === $context ) { 1325 if ( class_exists( 'WPorg_Handbook_TOC' ) ) : 1326 $TOC = new \WPorg_Handbook_TOC( get_parsed_post_types() ); 1327 1328 add_filter( 'the_content', array( $TOC, 'add_toc' ) ); 1329 $post_field = apply_filters( 'the_content', apply_filters( 'get_the_content', $post_field ) ); 1330 remove_filter( 'the_content', array( $TOC, 'add_toc' ) ); 1331 else : 1332 $post_field = apply_filters( 'the_content', apply_filters( 'get_the_content', $post_field ) ); 1333 endif; 1334 } 1335 1336 return $post_field; 1321 1337 } 1322 1338 1323 1339 /** -
scss/main.scss
1053 1053 .callout { 1054 1054 margin-top: 30px; 1055 1055 } 1056 .table-of-contents { 1057 width: 300px; 1058 } 1056 1059 } 1057 1060 1058 1061 .callout:before { … … 1610 1613 padding-left: 45px; 1611 1614 text-indent: -45px; 1612 1615 } 1616 1617 .table-of-contents { 1618 width: 200px; 1619 } 1613 1620 } 1614 1621 1615 1622 .two-columns .box { … … 1641 1648 text-indent: -20px; 1642 1649 font-size: 16px; 1643 1650 } 1651 .table-of-contents { 1652 width: 100%; 1653 margin-bottom: 10px; 1654 } 1644 1655 } 1645 1656 1646 1657 &.single-wp-parser-function, &.single-wp-parser-method, &.single-wp-parser-hook { -
stylesheets/main.css
1262 1262 .devhub-wrap .wp-parser-class .callout, .devhub-wrap .wp-parser-function .callout, .devhub-wrap .wp-parser-hook .callout, .devhub-wrap .wp-parser-method .callout { 1263 1263 margin-top: 30px; 1264 1264 } 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 } 1265 1268 .devhub-wrap .callout:before { 1266 1269 top: 0.2em; 1267 1270 } … … 1668 1671 padding-left: 45px; 1669 1672 text-indent: -45px; 1670 1673 } 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 } 1671 1677 .devhub-wrap .two-columns .box { 1672 1678 width: 99%; 1673 1679 } … … 1690 1696 text-indent: -20px; 1691 1697 font-size: 16px; 1692 1698 } 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 } 1693 1703 .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 { 1694 1704 padding-left: 0; 1695 1705 padding-right: 0;