Changeset 1675
- Timestamp:
- 06/18/2015 08:42:09 PM (9 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/archive.php
r1267 r1675 23 23 <?php while ( have_posts() ) : the_post(); ?> 24 24 25 <?php get_template_part( 'content', ( is_parsed_post_type() ? 'reference-archive' : '') ); ?>25 <?php get_template_part( 'content', ( is_parsed_post_type() ? 'reference-archive' : get_post_type() ) ); ?> 26 26 27 27 <?php endwhile; ?> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/comments.php
r988 r1675 40 40 * See wporg_developer_comment() in inc/template-tags.php for more. 41 41 */ 42 wp_list_comments( array( 'callback' => 'wporg_developer_user_note' ) ); 42 if ( is_singular( 'post' ) ) { 43 wp_list_comments(); 44 } else { 45 wp_list_comments( array( 'callback' => 'wporg_developer_user_note' ) ); 46 } 43 47 ?> 44 48 </ol><!-- .comment-list --> … … 54 58 <?php endif; // have_comments() ?> 55 59 56 <?php if ( DevHub\can_user_post_note( false, get_the_ID() ) ) : ?>60 <?php if ( \DevHub\is_parsed_post_type() && DevHub\can_user_post_note( false, get_the_ID() ) ) : ?> 57 61 58 <p id="add-user-note" style="display:none;"><a href=""><?php _e( 'Have a note to contribute?', 'wporg' ); ?></a></p>62 <p id="add-user-note" style="display:none;"><a href=""><?php _e( 'Have a note to contribute?', 'wporg' ); ?></a></p> 59 63 60 <?php comment_form( array(61 'comment_field' => DevHub_User_Submitted_Content::wp_editor_comments(),62 'comment_notes_after' => '<p>' .63 __( 'Notes should supplement code reference entries, for example examples, tips, explanations, use-cases, and best practices.', 'wporg' ) .64 '</p><p>' .65 __( 'Do not use this form for support requests, discussions, spam, bug reports, complaints, or self-promotion. Entries of this nature will be deleted.', 'wporg' ) .66 '</p><p>' .67 __( 'You can enter text and code. Use the php, js, or inline code buttons to wrap code snippets.', 'wporg' ) .68 '</p><p class="user-notes-are-gpl">' .69 sprintf( __( '<strong>NOTE:</strong> All contributions are licensed under <a href="%s">GFDL</a> and are moderated before appearing on the site.', 'wporg' ), 'https://gnu.org/licenses/fdl.html' ) .70 '</p>',71 'label_submit' => __( 'Add Note', 'wporg' ),72 'must_log_in' => '<p>' . sprintf( __( 'You must <a href="%s">log in</a> before being able to contribute a note.', 'wporg' ), 'https://wordpress.org/support/bb-login.php' ) . '</p>',73 'title_reply' => '', //'Add Example'74 ) ); ?>64 <?php comment_form( array( 65 'comment_field' => DevHub_User_Submitted_Content::wp_editor_comments(), 66 'comment_notes_after' => '<p>' . 67 __( 'Notes should supplement code reference entries, for example examples, tips, explanations, use-cases, and best practices.', 'wporg' ) . 68 '</p><p>' . 69 __( 'Do not use this form for support requests, discussions, spam, bug reports, complaints, or self-promotion. Entries of this nature will be deleted.', 'wporg' ) . 70 '</p><p>' . 71 __( 'You can enter text and code. Use the php, js, or inline code buttons to wrap code snippets.', 'wporg' ) . 72 '</p><p class="user-notes-are-gpl">' . 73 sprintf( __( '<strong>NOTE:</strong> All contributions are licensed under <a href="%s">GFDL</a> and are moderated before appearing on the site.', 'wporg' ), 'https://gnu.org/licenses/fdl.html' ) . 74 '</p>', 75 'label_submit' => __( 'Add Note', 'wporg' ), 76 'must_log_in' => '<p>' . sprintf( __( 'You must <a href="%s">log in</a> before being able to contribute a note.', 'wporg' ), 'https://wordpress.org/support/bb-login.php' ) . '</p>', 77 'title_reply' => '', //'Add Example' 78 ) ); ?> 75 79 76 80 <?php endif; ?> 77 81 82 <?php if ( ! \DevHub\is_parsed_post_type() && comments_open() ) : ?> 83 <p id="add-user-note" style="display:none;"><a href=""><?php _e( 'Leave a reply', 'wporg' ); ?></a></p> 84 85 <?php comment_form(); ?> 86 <?php endif; ?> 87 78 88 </div><!-- #comments --> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/functions.php
r1529 r1675 83 83 84 84 function init() { 85 86 register_nav_menus(); 85 87 86 88 add_action( 'after_switch_theme', __NAMESPACE__ . '\\add_roles' ); … … 222 224 } 223 225 226 function register_nav_menus() { 227 228 \register_nav_menus( array( 229 'devhub-menu' => __( 'Developer Resources Menu', 'wporg' ), 230 ) ); 231 } 232 224 233 function method_permalink( $link, $post ) { 225 234 if ( $post->post_type !== 'wp-parser-method' ) -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/header.php
r1327 r1675 23 23 </<?php echo $tag; ?>> 24 24 </div> 25 <div class="devhub-menu"> 26 <?php wp_nav_menu( array( 27 'theme_location' => 'devhub-menu', 28 'container_class' => 'menu-container', 29 ) ); ?> 30 </div> 25 31 </div><!-- .inner-wrap --> 26 32 </header><!-- #masthead --> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
r1526 r1675 1128 1128 // Only proceed if for a parsed post type. 1129 1129 if ( ! is_parsed_post_type( get_post_type( $post ) ) ) { 1130 // Temporarily disable commenting that isn't for a note since various 1131 // changes need to take place to enable regular commenting. 1132 return false; //$open; 1130 return $open; 1133 1131 } 1134 1132 -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/js/user-notes.js
r988 r1675 5 5 6 6 ( function( $ ) { 7 $( '#respond, #add-user-note' ).toggle(); 8 $( '#add-user-note' ).click( function( e ) { 9 e.preventDefault(); 7 8 function showCommentForm() { 10 9 $( '#respond, #add-user-note' ).toggle(); 11 10 … … 20 19 } 21 20 } 21 } 22 23 $( '#respond, #add-user-note' ).toggle(); 24 $( '#add-user-note' ).click( function( e ) { 25 e.preventDefault(); 26 27 showCommentForm(); 22 28 } ); 29 30 if ( '#respond' === document.location.hash ) { 31 showCommentForm(); 32 } 23 33 24 34 // Add php and js buttons to QuickTags. -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/scss/main.scss
r1528 r1675 46 46 .page-header { 47 47 margin-top: 1em; 48 } 49 50 .devhub-menu .menu { 51 list-style: none; 52 float: right; 53 font-size: 14px; 54 font-weight: bold; 55 padding-top: 22px; 56 margin-right: 15px; 57 58 li { 59 display: inline; 60 padding-left: 20px; 61 } 62 63 a { 64 color: #555; 65 font-weight: 400; 66 } 48 67 } 49 68 … … 355 374 object { 356 375 max-width: 100%; 357 }358 359 /* =Comments360 ----------------------------------------------- */361 362 .comment-content a {363 word-wrap: break-word;364 }365 .bypostauthor {366 background: #eee;367 376 } 368 377 … … 1103 1112 1104 1113 /* Comments */ 1105 .comment-list, 1106 .comment-list ol { 1107 list-style: none; 1108 margin: 0 0 1.5em 0; 1109 padding: 0; 1110 } 1111 1112 .comment-list li { 1113 padding: 2rem 1.5rem 1rem; 1114 border: 0 solid #eee; 1115 border-bottom-width: 1px; 1116 background: #fff; 1117 1118 &:first-child { 1119 padding-top: 1rem; 1120 } 1121 } 1122 1123 .comment-list .avatar { 1124 float: left; 1125 width: 2.5em; 1126 height: 2.5em; 1127 margin: -0.5em 1em 0.5em 0; 1128 padding: 0.125em; 1129 border: 1px solid #eee; 1130 } 1131 1132 .comment-author-attribution { 1133 font-weight: bold; 1134 } 1135 1136 .comment-meta { 1137 margin: 0 0 1.5em 0; 1138 font-size: 0.75em; 1139 } 1140 1141 .comment-meta .comment-author cite, 1142 .comment-meta .comment-author cite a { 1143 } 1144 .comment-meta a { 1145 } 1146 1147 .comment-meta a:hover { 1148 } 1149 1150 .comment-content { 1151 margin-left: 60px; 1152 margin-left: 3.75rem; 1153 margin-left: 0; 1154 clear: both; 1155 } 1156 1157 .comment-content ol { 1158 list-style: decimal inside; 1159 margin: 0 0 1.5em 0; 1160 border-top: none; 1161 margin: 0 0 1.5em 1.5em; 1162 padding: 0; 1163 } 1164 1165 .comment-content ul { 1166 list-style: square inside; 1167 margin: 0 0 1.5em 0; 1168 border-top: none; 1169 margin: 0 0 1.5em 1.5em; 1170 padding: 0; 1171 } 1172 1173 .comment-content li { 1174 border: none; 1175 padding: 0; 1176 } 1177 1178 .comment-text { 1179 } 1180 1181 #respond { 1182 overflow: hidden; 1183 } 1184 1185 .comment-list #respond { 1186 margin: 1.5em 0 0; 1187 } 1188 1189 #respond .log-in-out { 1190 1191 } 1192 1193 #respond .log-in-out a { 1194 font-style: italic; 1195 } 1196 1197 #reply-title small a { 1198 font-style: italic; 1199 } 1200 1201 #respond label { 1202 } 1203 1204 #respond p.req label { 1205 } 1206 1207 #respond span.required { 1208 } 1209 1210 #respond #submit { 1211 float: left; 1212 margin:0 0 1.5em; 1114 .comment-content a { 1115 word-wrap: break-word; 1116 } 1117 1118 // User contributed notes 1119 &.single-wp-parser-function, &.single-wp-parser-method, &.single-wp-parser-hook { 1120 .comment-list, 1121 .comment-list ol { 1122 list-style: none; 1123 margin: 0 0 1.5em 0; 1124 padding: 0; 1125 } 1126 1127 .comment-list li { 1128 padding: 2rem 1.5rem 1rem; 1129 border: 0 solid #eee; 1130 border-bottom-width: 1px; 1131 background: #fff; 1132 1133 &:first-child { 1134 padding-top: 1rem; 1135 } 1136 } 1137 1138 .comment-list .avatar { 1139 float: left; 1140 width: 2.5em; 1141 height: 2.5em; 1142 margin: -0.5em 1em 0.5em 0; 1143 padding: 0.125em; 1144 border: 1px solid #eee; 1145 } 1146 1147 .comment-author-attribution { 1148 font-weight: bold; 1149 } 1150 1151 .comment-meta { 1152 margin: 0 0 1.5em 0; 1153 font-size: 0.75em; 1154 } 1155 1156 .comment-meta .comment-author cite, 1157 .comment-meta .comment-author cite a { 1158 } 1159 .comment-meta a { 1160 } 1161 1162 .comment-meta a:hover { 1163 } 1164 1165 .comment-content { 1166 margin-left: 60px; 1167 margin-left: 3.75rem; 1168 margin-left: 0; 1169 clear: both; 1170 } 1171 1172 .comment-content ol { 1173 list-style: decimal inside; 1174 margin: 0 0 1.5em 0; 1175 border-top: none; 1176 margin: 0 0 1.5em 1.5em; 1177 padding: 0; 1178 } 1179 1180 .comment-content ul { 1181 list-style: square inside; 1182 margin: 0 0 1.5em 0; 1183 border-top: none; 1184 margin: 0 0 1.5em 1.5em; 1185 padding: 0; 1186 } 1187 1188 .comment-content li { 1189 border: none; 1190 padding: 0; 1191 } 1192 1193 .comment-text { 1194 } 1195 1196 #respond { 1197 overflow: hidden; 1198 } 1199 1200 #respond .log-in-out { 1201 1202 } 1203 1204 #respond .log-in-out a { 1205 font-style: italic; 1206 } 1207 1208 #reply-title small a { 1209 font-style: italic; 1210 } 1211 1212 #respond label { 1213 } 1214 1215 #respond p.req label { 1216 } 1217 1218 #respond span.required { 1219 } 1220 1221 #respond #submit { 1222 float: left; 1223 margin: 0 0 1.5em; 1224 } 1225 1226 .comment-author { 1227 float: left; 1228 } 1229 } 1230 1231 &.single-post { 1232 .comment-list, 1233 .comment-list ol { 1234 list-style: none; 1235 margin: 1.5em 0; 1236 padding: 0; 1237 } 1238 1239 .comment-list { 1240 li { 1241 margin: 1.5em 0; 1242 padding: 1em 0 0 0; 1243 border-top: 1px solid #ddd; 1244 } 1245 1246 p { 1247 margin: 0 0 0 42px; 1248 } 1249 1250 .alt { 1251 background: inherit; 1252 } 1253 } 1254 1255 .comment-meta { 1256 font-size: 0.65em; 1257 color: #888; 1258 float: right; 1259 margin-top: -15px; 1260 1261 a { 1262 } 1263 } 1264 1265 .comment-author { 1266 img { 1267 float: left; 1268 margin: 0 10px 0 0; 1269 } 1270 } 1271 1272 .comments-area { 1273 margin: 1.5em 0 0 0; 1274 } 1213 1275 } 1214 1276 … … 1309 1371 } 1310 1372 1311 .comment-author {1312 float: left;1313 }1314 1373 .user-note-voting { 1315 1374 font-size: 1.5em; … … 1342 1401 max-width: 100% !important; 1343 1402 width: inherit !important; 1403 } 1404 1405 &.archive, &.blog { 1406 .hentry { 1407 padding: 0 0 1.5em 0; 1408 border-bottom: 1px solid #ddd; 1409 } 1344 1410 } 1345 1411 } -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/single.php
r1267 r1675 16 16 <?php while ( have_posts() ) : the_post(); ?> 17 17 18 <?php get_template_part( 'content', ( is_parsed_post_type() ? 'reference' : '') ); ?>18 <?php get_template_part( 'content', ( is_parsed_post_type() ? 'reference' : get_post_type() ) ); ?> 19 19 20 20 <?php //wporg_developer_post_nav(); ?> -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/stylesheets/main.css
r1528 r1675 283 283 ----------------------------------------------- */ 284 284 /* Make sure embeds and iframes fit their containers */ 285 /* =Comments286 ----------------------------------------------- */287 285 /* =Widgets 288 286 ----------------------------------------------- */ … … 339 337 margin-top: 1em; 340 338 } 339 .devhub-wrap .devhub-menu .menu { 340 list-style: none; 341 float: right; 342 font-size: 14px; 343 font-weight: bold; 344 padding-top: 22px; 345 margin-right: 15px; 346 } 347 .devhub-wrap .devhub-menu .menu li { 348 display: inline; 349 padding-left: 20px; 350 } 351 .devhub-wrap .devhub-menu .menu a { 352 color: #555; 353 font-weight: 400; 354 } 341 355 .devhub-wrap a { 342 356 color: #21759b; … … 650 664 max-width: 100%; 651 665 } 652 .devhub-wrap .comment-content a {653 word-wrap: break-word;654 }655 .devhub-wrap .bypostauthor {656 background: #eee;657 }658 666 .devhub-wrap .widget select { 659 667 max-width: 100%; … … 1276 1284 margin-bottom: 20px; 1277 1285 } 1278 .devhub-wrap .comment-list, 1279 .devhub-wrap .comment-list ol { 1286 .devhub-wrap .comment-content a { 1287 word-wrap: break-word; 1288 } 1289 .devhub-wrap.single-wp-parser-function .comment-list, 1290 .devhub-wrap.single-wp-parser-function .comment-list ol, .devhub-wrap.single-wp-parser-method .comment-list, 1291 .devhub-wrap.single-wp-parser-method .comment-list ol, .devhub-wrap.single-wp-parser-hook .comment-list, 1292 .devhub-wrap.single-wp-parser-hook .comment-list ol { 1280 1293 list-style: none; 1281 1294 margin: 0 0 1.5em 0; 1282 1295 padding: 0; 1283 1296 } 1284 .devhub-wrap .comment-list li {1297 .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 { 1285 1298 padding: 2rem 1.5rem 1rem; 1286 1299 border: 0 solid #eee; … … 1288 1301 background: #fff; 1289 1302 } 1290 .devhub-wrap .comment-list li:first-child {1303 .devhub-wrap.single-wp-parser-function .comment-list li:first-child, .devhub-wrap.single-wp-parser-method .comment-list li:first-child, .devhub-wrap.single-wp-parser-hook .comment-list li:first-child { 1291 1304 padding-top: 1rem; 1292 1305 } 1293 .devhub-wrap .comment-list .avatar {1306 .devhub-wrap.single-wp-parser-function .comment-list .avatar, .devhub-wrap.single-wp-parser-method .comment-list .avatar, .devhub-wrap.single-wp-parser-hook .comment-list .avatar { 1294 1307 float: left; 1295 1308 width: 2.5em; … … 1299 1312 border: 1px solid #eee; 1300 1313 } 1301 .devhub-wrap .comment-author-attribution {1314 .devhub-wrap.single-wp-parser-function .comment-author-attribution, .devhub-wrap.single-wp-parser-method .comment-author-attribution, .devhub-wrap.single-wp-parser-hook .comment-author-attribution { 1302 1315 font-weight: bold; 1303 1316 } 1304 .devhub-wrap .comment-meta {1317 .devhub-wrap.single-wp-parser-function .comment-meta, .devhub-wrap.single-wp-parser-method .comment-meta, .devhub-wrap.single-wp-parser-hook .comment-meta { 1305 1318 margin: 0 0 1.5em 0; 1306 1319 font-size: 0.75em; 1307 1320 } 1308 .devhub-wrap .comment-content {1321 .devhub-wrap.single-wp-parser-function .comment-content, .devhub-wrap.single-wp-parser-method .comment-content, .devhub-wrap.single-wp-parser-hook .comment-content { 1309 1322 margin-left: 60px; 1310 1323 margin-left: 3.75rem; … … 1312 1325 clear: both; 1313 1326 } 1314 .devhub-wrap .comment-content ol {1327 .devhub-wrap.single-wp-parser-function .comment-content ol, .devhub-wrap.single-wp-parser-method .comment-content ol, .devhub-wrap.single-wp-parser-hook .comment-content ol { 1315 1328 list-style: decimal inside; 1316 1329 margin: 0 0 1.5em 0; … … 1319 1332 padding: 0; 1320 1333 } 1321 .devhub-wrap .comment-content ul {1334 .devhub-wrap.single-wp-parser-function .comment-content ul, .devhub-wrap.single-wp-parser-method .comment-content ul, .devhub-wrap.single-wp-parser-hook .comment-content ul { 1322 1335 list-style: square inside; 1323 1336 margin: 0 0 1.5em 0; … … 1326 1339 padding: 0; 1327 1340 } 1328 .devhub-wrap .comment-content li {1341 .devhub-wrap.single-wp-parser-function .comment-content li, .devhub-wrap.single-wp-parser-method .comment-content li, .devhub-wrap.single-wp-parser-hook .comment-content li { 1329 1342 border: none; 1330 1343 padding: 0; 1331 1344 } 1332 .devhub-wrap #respond {1345 .devhub-wrap.single-wp-parser-function #respond, .devhub-wrap.single-wp-parser-method #respond, .devhub-wrap.single-wp-parser-hook #respond { 1333 1346 overflow: hidden; 1334 1347 } 1335 .devhub-wrap .comment-list #respond { 1336 margin: 1.5em 0 0; 1337 } 1338 .devhub-wrap #respond .log-in-out a { 1348 .devhub-wrap.single-wp-parser-function #respond .log-in-out a, .devhub-wrap.single-wp-parser-method #respond .log-in-out a, .devhub-wrap.single-wp-parser-hook #respond .log-in-out a { 1339 1349 font-style: italic; 1340 1350 } 1341 .devhub-wrap #reply-title small a {1351 .devhub-wrap.single-wp-parser-function #reply-title small a, .devhub-wrap.single-wp-parser-method #reply-title small a, .devhub-wrap.single-wp-parser-hook #reply-title small a { 1342 1352 font-style: italic; 1343 1353 } 1344 .devhub-wrap #respond #submit {1354 .devhub-wrap.single-wp-parser-function #respond #submit, .devhub-wrap.single-wp-parser-method #respond #submit, .devhub-wrap.single-wp-parser-hook #respond #submit { 1345 1355 float: left; 1346 1356 margin: 0 0 1.5em; 1357 } 1358 .devhub-wrap.single-wp-parser-function .comment-author, .devhub-wrap.single-wp-parser-method .comment-author, .devhub-wrap.single-wp-parser-hook .comment-author { 1359 float: left; 1360 } 1361 .devhub-wrap.single-post .comment-list, 1362 .devhub-wrap.single-post .comment-list ol { 1363 list-style: none; 1364 margin: 1.5em 0; 1365 padding: 0; 1366 } 1367 .devhub-wrap.single-post .comment-list li { 1368 margin: 1.5em 0; 1369 padding: 1em 0 0 0; 1370 border-top: 1px solid #ddd; 1371 } 1372 .devhub-wrap.single-post .comment-list p { 1373 margin: 0 0 0 42px; 1374 } 1375 .devhub-wrap.single-post .comment-list .alt { 1376 background: inherit; 1377 } 1378 .devhub-wrap.single-post .comment-meta { 1379 font-size: 0.65em; 1380 color: #888; 1381 float: right; 1382 margin-top: -15px; 1383 } 1384 .devhub-wrap.single-post .comment-author img { 1385 float: left; 1386 margin: 0 10px 0 0; 1387 } 1388 .devhub-wrap.single-post .comments-area { 1389 margin: 1.5em 0 0 0; 1347 1390 } 1348 1391 .devhub-wrap #content-area.has-sidebar { … … 1425 1468 color: #555 !important; 1426 1469 } 1427 .devhub-wrap .comment-author {1428 float: left;1429 }1430 1470 .devhub-wrap .user-note-voting { 1431 1471 font-size: 1.5em; … … 1457 1497 max-width: 100% !important; 1458 1498 width: inherit !important; 1499 } 1500 .devhub-wrap.archive .hentry, .devhub-wrap.blog .hentry { 1501 padding: 0 0 1.5em 0; 1502 border-bottom: 1px solid #ddd; 1459 1503 } 1460 1504
Note: See TracChangeset
for help on using the changeset viewer.