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