forked from krogsgard/wporg-developer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-page.php
63 lines (51 loc) · 2.1 KB
/
front-page.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php get_header(); ?>
<div class="pagebody">
<div class="wrapper">
<div class="reference-landing">
<div class="search-guide section clear">
<h3><?php _e( 'Find what you need:', 'wporg' ); ?></h3>
<?php get_search_form(); ?>
</div><!-- /search-guide -->
<div class="topic-guide section">
<h4><?php _e( 'Or browse through topics:', 'wporg' ); ?></h4>
<ul class="unordered-list horizontal-list no-bullets">
<li><a href="<?php echo get_post_type_archive_link( 'wpapi-function' ) ?>"><?php _e( 'Functions', 'wporg' ); ?></a></li>
<li><a href="<?php echo get_post_type_archive_link( 'wpapi-hook' ) ?>"><?php _e( 'Hooks', 'wporg' ); ?></a></li>
<li><a href="<?php echo get_post_type_archive_link( 'wpapi-class' ) ?>"><?php _e( 'Classes', 'wporg' ); ?></a></li>
</ul>
</div><!-- /topic-guide -->
<div class="new-in-guide section clear">
<div class="widget box box-left">
<h3 class="widget-title"><?php $version = DevHub\get_current_version(); printf( __( 'New in %s:', 'wporg' ), $version->name ); ?></h3>
<ul class="unordered-list no-bullets">
<?php
$list = new WP_Query( array(
'posts_per_page' => 10,
'post_type' => array( 'wpapi-function', 'wpapi-hook', 'wpapi-class' ),
'orderby' => 'title',
'order' => 'ASC',
'tax_query' => array( array(
'taxonomy' => 'wpapi-since',
'field' => 'ids',
'terms' => $version->term_id,
) ),
) );
while ( $list->have_posts() ) : $list->the_post();
echo '<li><a href="' . get_permalink() . '">' . get_the_title() . '</a></li>';
endwhile;
?>
</ul>
</div>
<div class="widget box box-right">
<h3 class="widget-title"><?php _e( 'APIs', 'wporg' ); ?></h3>
<ul class="unordered-list no-bullets">
<li><a href="#">Some API</a></li>
<li><a href="#">Some other API</a></li>
<li><a href="#">Another new API</a></li>
</ul>
</div>
</div><!-- /new-in-guide -->
</div><!-- /reference-landing -->
</div><!-- /wrapper -->
</div><!-- /pagebody -->
<?php get_footer(); ?>