Ticket #1847: 1847.patch
File 1847.patch, 8.2 KB (added by , 6 years ago) |
---|
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/function-reference.js
82 82 function toggleUsageListInit() { 83 83 84 84 // We only expect one used_by and uses per document 85 $usedByList = $( '.used-by ' ).find( 'li' );86 $usesList = $( '.uses ' ).find( 'li' );85 $usedByList = $( '.used-by tbody' ).find( 'tr' ); 86 $usesList = $( '.uses tbody' ).find( 'tr' ); 87 87 88 88 if ( $usedByList.length > 5 ) { 89 89 $usedByList = $usedByList.slice( 5 ).hide(); -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/reference/template-related.php
22 22 <?php if ( $has_uses ) : ?> 23 23 <article class="uses"> 24 24 <h3><?php _e( 'Uses', 'wporg' ); ?></h3> 25 <ul> 25 <table> 26 <caption class="screen-reader-text"><?php _e( 'Uses', 'wporg' ); ?></caption> 27 <thead> 28 <tr> 29 <th><?php _e( 'Uses', 'wporg' ); ?></th> 30 <th class="related-desc"><?php _e( 'Description', 'wporg' ); ?></th> 31 </tr> 32 </thead> 33 <tbody> 26 34 <?php 27 35 $uses_to_show = 5; 28 while ( $uses->have_posts() ) : $uses->the_post() 29 ?> 30 <li> 31 <span><?php echo esc_attr( get_source_file() ); ?>:</span> 32 <a href="<?php the_permalink(); ?>"><?php the_title(); ?><?php if ( ! in_array( get_post_type(), array( 'wp-parser-class', 'wp-parser-hook' ) ) ) : ?>()<?php endif; ?></a> 33 </li> 36 while ( $uses->have_posts() ) : $uses->the_post(); 37 $summary = get_summary(); 38 ?> 39 <tr> 40 <td> 41 <span><?php echo esc_attr( get_source_file() ); ?>:</span> 42 <a href="<?php the_permalink(); ?>"><?php the_title(); ?><?php if ( ! in_array( get_post_type(), array( 'wp-parser-class', 'wp-parser-hook' ) ) ) : ?>()<?php endif; ?></a> 43 </td> 44 <td class="related-desc"> 45 <?php echo $summary; ?> 46 </td> 47 </tr> 34 48 <?php endwhile; wp_reset_postdata(); ?> 49 <tbody> 50 </table> 35 51 <?php if ( $uses->post_count > $uses_to_show ) : ?> 36 52 <a href="#" class="show-more"><?php 37 53 /* translators: %d: remaining 'uses' count */ … … 41 57 ?></a> 42 58 <a href="#" class="hide-more"><?php _e( 'Hide more uses', 'wporg' ); ?></a> 43 59 <?php endif; ?> 44 </ul>45 60 </article> 46 61 <?php endif; ?> 47 62 48 63 <?php if ( $has_used_by ) : ?> 49 50 <?php if ( $has_uses ) { ?><hr /><?php } ?> 51 52 <article class="used-by"> 53 <h3><?php _e( 'Used By', 'wporg' ); ?></h3> 54 <ul> 55 <?php 56 $used_by_to_show = 5; 57 while ( $used_by->have_posts() ) : $used_by->the_post(); 58 ?> 59 <li> 60 <span><?php echo esc_attr( get_source_file() ); ?>:</span> 61 <a href="<?php the_permalink(); ?>"><?php the_title(); ?><?php if ( ! in_array( get_post_type(), array( 'wp-parser-class', 'wp-parser-hook' ) ) ) : ?>()<?php endif; ?></a> 62 </li> 63 <?php endwhile; wp_reset_postdata(); ?> 64 <?php if ( $uses->post_count > $uses_to_show ) { ?><hr /><?php } ?> 65 66 <article class="used-by"> 67 <h3><?php _e( 'Used By', 'wporg' ); ?></h3> 68 <table> 69 <caption class="screen-reader-text"><?php _e( 'Used By', 'wporg' ); ?></caption> 70 <thead> 71 <tr> 72 <th><?php _e( 'Used By', 'wporg' ); ?></th> 73 <th class="related-desc"><?php _e( 'Short Description', 'wporg' ); ?></th> 74 </tr> 75 </thead> 76 <tbody> 77 <?php 78 $used_by_to_show = 5; 79 while ( $used_by->have_posts() ) : $used_by->the_post(); 80 $summary = get_summary(); 81 ?> 82 <tr> 83 <td> 84 <span><?php echo esc_attr( get_source_file() ); ?>:</span> 85 <a href="<?php the_permalink(); ?>"><?php the_title(); ?><?php if ( ! in_array( get_post_type(), array( 'wp-parser-class', 'wp-parser-hook' ) ) ) : ?>()<?php endif; ?></a> 86 </td> 87 <td class="related-desc"> 88 <?php echo $summary; ?> 89 </td> 90 </tr> 91 <?php endwhile; wp_reset_postdata(); ?> 92 <tbody> 93 </table> 64 94 <?php if ( $used_by->post_count > $used_by_to_show ) : ?> 65 95 <a href="#" class="show-more"><?php 66 96 /* translators: %d: remaining 'used by' count */ … … 70 100 ?></a> 71 101 <a href="#" class="hide-more"><?php _e( 'Hide more used by', 'wporg' ); ?></a> 72 102 <?php endif; ?> 73 </ul> 74 </article> 103 </article> 75 104 <?php endif; ?> 76 77 105 </section> 78 106 <?php endif; ?> 79 107 <?php endif; ?> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss
1060 1060 /* = Related 1061 1061 ----------------------------------------------- */ 1062 1062 .related { 1063 ul { 1064 line-height: 1.7; /* Slightly increase the line height for more readability */ 1065 list-style-type: none; 1066 margin: 0; 1063 .show-more, .hide-more { 1064 display: none; 1065 } 1066 1067 /* Hide the title and toc links (same as .screen-reader-text) 1068 this allows for linking from the toc. */ 1069 h3, .uses .toc-jump, .used-by .toc-jump { 1070 height: 0; 1071 margin-bottom: 0; 1072 clip: rect(1px, 1px, 1px, 1px); 1073 position: absolute !important; 1074 } 1075 1076 .used-by, .uses { 1067 1077 overflow-x: auto; 1078 clear: right; 1068 1079 } 1080 1081 td p { 1082 margin-bottom: 0; 1083 } 1069 1084 1070 .show-more, .hide-more{1071 display: none;1085 th, td { 1086 width: 50%; 1072 1087 } 1088 1089 @media (max-width: 43em) { 1090 .related-desc, span { 1091 display: none; 1092 } 1093 } 1073 1094 } 1074 1095 1075 1076 1096 .source-content { 1077 1097 overflow: auto; 1078 1098 } … … 1105 1125 } 1106 1126 1107 1127 /* Changelog */ 1108 table {1128 .changelog table { 1109 1129 .changelog-version { 1110 1130 width: 10%; 1111 1131 } … … 1112 1132 .changelog-desc { 1113 1133 width: 90%; 1114 1134 } 1115 1116 1135 } 1117 1136 1118 1137 .loop-pagination { -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css
1445 1445 border-bottom-style: none; 1446 1446 } 1447 1447 1448 .devhub-wrap .related ul { 1449 line-height: 1.7; 1450 /* Slightly increase the line height for more readability */ 1451 list-style-type: none; 1452 margin: 0; 1453 overflow-x: auto; 1448 .devhub-wrap .related { 1449 /* Hide the title and toc links (same as .screen-reader-text) 1450 this allows for linking from the toc. */ 1454 1451 } 1455 1452 1456 1453 .devhub-wrap .related .show-more, .devhub-wrap .related .hide-more { … … 1457 1454 display: none; 1458 1455 } 1459 1456 1457 .devhub-wrap .related h3, .devhub-wrap .related .uses .toc-jump, .devhub-wrap .related .used-by .toc-jump { 1458 height: 0; 1459 margin-bottom: 0; 1460 clip: rect(1px, 1px, 1px, 1px); 1461 position: absolute !important; 1462 } 1463 1464 .devhub-wrap .related .used-by, .devhub-wrap .related .uses { 1465 overflow-x: auto; 1466 clear: right; 1467 } 1468 1469 .devhub-wrap .related td p { 1470 margin-bottom: 0; 1471 } 1472 1473 .devhub-wrap .related th, .devhub-wrap .related td { 1474 width: 50%; 1475 } 1476 1477 @media (max-width: 43em) { 1478 .devhub-wrap .related .related-desc, .devhub-wrap .related span { 1479 display: none; 1480 } 1481 } 1482 1460 1483 .devhub-wrap .source-content { 1461 1484 overflow: auto; 1462 1485 } … … 1488 1511 display: none; 1489 1512 } 1490 1513 1491 .devhub-wrap table .changelog-version {1514 .devhub-wrap .changelog table .changelog-version { 1492 1515 width: 10%; 1493 1516 } 1494 1517 1495 .devhub-wrap table .changelog-desc {1518 .devhub-wrap .changelog table .changelog-desc { 1496 1519 width: 90%; 1497 1520 } 1498 1521 … … 2446 2469 2447 2470 body.responsive-show #secondary { 2448 2471 left: 0; 2449 overflow: auto;2450 2472 } 2451 2473 2452 2474 body.responsive-show #primary-modal {