css
4 years ago
images
12 years ago
img
13 years ago
js
4 years ago
archiveorg-book.php
5 years ago
archiveorg.php
5 years ago
archives.php
5 years ago
bandcamp.php
5 years ago
brightcove.php
5 years ago
cartodb.php
5 years ago
class.filter-embedded-html-objects.php
3 years ago
codepen.php
5 years ago
crowdsignal.php
3 years ago
dailymotion.php
3 years ago
descript.php
4 years ago
facebook.php
3 years ago
flatio.php
5 years ago
flickr.php
5 years ago
getty.php
3 years ago
gist.php
5 years ago
googleapps.php
3 years ago
googlemaps.php
5 years ago
googleplus.php
5 years ago
gravatar.php
3 years ago
houzz.php
5 years ago
inline-pdfs.php
4 years ago
instagram.php
3 years ago
kickstarter.php
3 years ago
mailchimp.php
3 years ago
medium.php
3 years ago
mixcloud.php
3 years ago
others.php
3 years ago
pinterest.php
5 years ago
presentations.php
3 years ago
quiz.php
4 years ago
recipe.php
3 years ago
scribd.php
5 years ago
sitemap.php
5 years ago
slideshare.php
5 years ago
slideshow.php
3 years ago
smartframe.php
4 years ago
soundcloud.php
3 years ago
spotify.php
4 years ago
ted.php
5 years ago
tweet.php
5 years ago
twitchtv.php
5 years ago
twitter-timeline.php
5 years ago
unavailable.php
3 years ago
untappd-menu.php
3 years ago
upcoming-events.php
3 years ago
ustream.php
5 years ago
videopress.php
4 years ago
vimeo.php
3 years ago
vine.php
5 years ago
vr.php
3 years ago
wordads.php
5 years ago
wufoo.php
3 years ago
youtube.php
3 years ago
sitemap.php
31 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Sitemap shortcode. |
| 4 | * |
| 5 | * Usage: [sitemap] |
| 6 | * |
| 7 | * @package automattic/jetpack |
| 8 | */ |
| 9 | |
| 10 | add_shortcode( 'sitemap', 'jetpack_sitemap_shortcode' ); |
| 11 | |
| 12 | /** |
| 13 | * Renders a tree of pages. |
| 14 | * |
| 15 | * @since 4.5.0 |
| 16 | * |
| 17 | * @return string |
| 18 | */ |
| 19 | function jetpack_sitemap_shortcode() { |
| 20 | $tree = wp_list_pages( |
| 21 | array( |
| 22 | 'title_li' => '<b><a href="/">' . esc_html( get_bloginfo( 'name' ) ) . '</a></b>', |
| 23 | 'exclude' => get_option( 'page_on_front' ), |
| 24 | 'echo' => false, |
| 25 | ) |
| 26 | ); |
| 27 | return empty( $tree ) |
| 28 | ? '' |
| 29 | : '<ul class="jetpack-sitemap-shortcode">' . $tree . '</ul>'; |
| 30 | } |
| 31 |