Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
<?php
|
|
|
|
/**
|
2023-07-01 19:04:24 +02:00
|
|
|
* Custom template tags for this theme.
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
*
|
|
|
|
* Eventually, some of the functionality here could be replaced by core features.
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Twenty_Seventeen
|
2019-12-07 14:56:06 +01:00
|
|
|
* @since Twenty Seventeen 1.0
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
if ( ! function_exists( 'twentyseventeen_posted_on' ) ) :
|
2017-12-01 00:11:00 +01:00
|
|
|
/**
|
|
|
|
* Prints HTML with meta information for the current post-date/time and author.
|
|
|
|
*/
|
|
|
|
function twentyseventeen_posted_on() {
|
|
|
|
|
|
|
|
// Get the author name; wrap it in a link.
|
|
|
|
$byline = sprintf(
|
2019-09-03 02:41:05 +02:00
|
|
|
/* translators: %s: Post author. */
|
2017-12-01 00:11:00 +01:00
|
|
|
__( 'by %s', 'twentyseventeen' ),
|
|
|
|
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . get_the_author() . '</a></span>'
|
|
|
|
);
|
|
|
|
|
|
|
|
// Finally, let's write all of this to the page.
|
|
|
|
echo '<span class="posted-on">' . twentyseventeen_time_link() . '</span><span class="byline"> ' . $byline . '</span>';
|
|
|
|
}
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
endif;
|
|
|
|
|
|
|
|
|
|
|
|
if ( ! function_exists( 'twentyseventeen_time_link' ) ) :
|
2017-12-01 00:11:00 +01:00
|
|
|
/**
|
|
|
|
* Gets a nicely formatted string for the published date.
|
|
|
|
*/
|
|
|
|
function twentyseventeen_time_link() {
|
|
|
|
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
|
|
|
|
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
|
|
|
|
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
|
|
|
|
}
|
|
|
|
|
|
|
|
$time_string = sprintf(
|
|
|
|
$time_string,
|
|
|
|
get_the_date( DATE_W3C ),
|
|
|
|
get_the_date(),
|
|
|
|
get_the_modified_date( DATE_W3C ),
|
|
|
|
get_the_modified_date()
|
|
|
|
);
|
|
|
|
|
|
|
|
// Wrap the time string in a link, and preface it with 'Posted on'.
|
|
|
|
return sprintf(
|
2019-09-03 02:41:05 +02:00
|
|
|
/* translators: %s: Post date. */
|
2017-12-01 00:11:00 +01:00
|
|
|
__( '<span class="screen-reader-text">Posted on</span> %s', 'twentyseventeen' ),
|
|
|
|
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
|
|
|
|
);
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
}
|
|
|
|
endif;
|
|
|
|
|
|
|
|
|
|
|
|
if ( ! function_exists( 'twentyseventeen_entry_footer' ) ) :
|
2017-12-01 00:11:00 +01:00
|
|
|
/**
|
|
|
|
* Prints HTML with meta information for the categories, tags and comments.
|
|
|
|
*/
|
|
|
|
function twentyseventeen_entry_footer() {
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
|
2022-03-13 21:03:01 +01:00
|
|
|
$separate_meta = wp_get_list_item_separator();
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
|
2017-12-01 00:11:00 +01:00
|
|
|
// Get Categories for posts.
|
|
|
|
$categories_list = get_the_category_list( $separate_meta );
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
|
2017-12-01 00:11:00 +01:00
|
|
|
// Get Tags for posts.
|
|
|
|
$tags_list = get_the_tag_list( '', $separate_meta );
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
|
2023-07-01 19:04:24 +02:00
|
|
|
// We don't want to output .entry-footer if it will be empty, so make sure it is not.
|
2017-12-01 00:11:00 +01:00
|
|
|
if ( ( ( twentyseventeen_categorized_blog() && $categories_list ) || $tags_list ) || get_edit_post_link() ) {
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
|
2017-12-01 00:11:00 +01:00
|
|
|
echo '<footer class="entry-footer">';
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
|
|
|
|
if ( 'post' === get_post_type() ) {
|
|
|
|
if ( ( $categories_list && twentyseventeen_categorized_blog() ) || $tags_list ) {
|
|
|
|
echo '<span class="cat-tags-links">';
|
|
|
|
|
2020-01-29 01:45:18 +01:00
|
|
|
// Make sure there's more than one category before displaying.
|
2017-12-01 00:11:00 +01:00
|
|
|
if ( $categories_list && twentyseventeen_categorized_blog() ) {
|
I18N: Mark screen reader strings as such with translator comments.
This aims to provide better context for translators and make it easier to determine that some strings contain hidden accessibility text and are not displayed in the UI.
Props kebbet, mercime, pavelevap, ocean90, swissspidy, Chouby, jipmoors, afercia, desrosj, costdev, audrasjb, SergeyBiryukov.
Fixes #29748.
Built from https://develop.svn.wordpress.org/trunk@55276
git-svn-id: http://core.svn.wordpress.org/trunk@54809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 18:10:21 +01:00
|
|
|
echo '<span class="cat-links">' . twentyseventeen_get_svg( array( 'icon' => 'folder-open' ) ) .
|
|
|
|
/* translators: Hidden accessibility text. */
|
|
|
|
'<span class="screen-reader-text">' . __( 'Categories', 'twentyseventeen' ) . '</span>' .
|
|
|
|
$categories_list .
|
|
|
|
'</span>';
|
2017-12-01 00:11:00 +01:00
|
|
|
}
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
|
2017-12-01 00:11:00 +01:00
|
|
|
if ( $tags_list && ! is_wp_error( $tags_list ) ) {
|
I18N: Mark screen reader strings as such with translator comments.
This aims to provide better context for translators and make it easier to determine that some strings contain hidden accessibility text and are not displayed in the UI.
Props kebbet, mercime, pavelevap, ocean90, swissspidy, Chouby, jipmoors, afercia, desrosj, costdev, audrasjb, SergeyBiryukov.
Fixes #29748.
Built from https://develop.svn.wordpress.org/trunk@55276
git-svn-id: http://core.svn.wordpress.org/trunk@54809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2023-02-07 18:10:21 +01:00
|
|
|
echo '<span class="tags-links">' . twentyseventeen_get_svg( array( 'icon' => 'hashtag' ) ) .
|
|
|
|
/* translators: Hidden accessibility text. */
|
|
|
|
'<span class="screen-reader-text">' . __( 'Tags', 'twentyseventeen' ) . '</span>' .
|
|
|
|
$tags_list .
|
|
|
|
'</span>';
|
2017-12-01 00:11:00 +01:00
|
|
|
}
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
|
|
|
|
echo '</span>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
twentyseventeen_edit_link();
|
|
|
|
|
2017-12-01 00:11:00 +01:00
|
|
|
echo '</footer> <!-- .entry-footer -->';
|
|
|
|
}
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
}
|
|
|
|
endif;
|
|
|
|
|
|
|
|
|
|
|
|
if ( ! function_exists( 'twentyseventeen_edit_link' ) ) :
|
2017-12-01 00:11:00 +01:00
|
|
|
/**
|
|
|
|
* Returns an accessibility-friendly link to edit a post or page.
|
|
|
|
*
|
2023-07-01 19:04:24 +02:00
|
|
|
* This also gives a little context about what exactly we're editing
|
2017-12-01 00:11:00 +01:00
|
|
|
* (post or page?) so that users understand a bit more where they are in terms
|
|
|
|
* of the template hierarchy and their content. Helpful when/if the single-page
|
|
|
|
* layout with multiple posts/pages shown gets confusing.
|
|
|
|
*/
|
|
|
|
function twentyseventeen_edit_link() {
|
|
|
|
edit_post_link(
|
|
|
|
sprintf(
|
2022-04-29 07:03:11 +02:00
|
|
|
/* translators: %s: Post title. Only visible to screen readers. */
|
2017-12-01 00:11:00 +01:00
|
|
|
__( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
|
|
|
|
get_the_title()
|
|
|
|
),
|
|
|
|
'<span class="edit-link">',
|
|
|
|
'</span>'
|
|
|
|
);
|
|
|
|
}
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
endif;
|
|
|
|
|
2016-10-28 00:09:40 +02:00
|
|
|
/**
|
2023-07-01 19:04:24 +02:00
|
|
|
* Displays a front page section.
|
2016-10-28 00:09:40 +02:00
|
|
|
*
|
2022-12-18 14:02:14 +01:00
|
|
|
* @global int|string $twentyseventeencounter Front page section counter.
|
|
|
|
* @global WP_Post $post Global post object.
|
2022-12-18 09:47:13 +01:00
|
|
|
*
|
2016-12-16 23:08:47 +01:00
|
|
|
* @param WP_Customize_Partial $partial Partial associated with a selective refresh request.
|
2023-07-01 19:04:24 +02:00
|
|
|
* @param int $id Front page section to display.
|
2016-10-28 00:09:40 +02:00
|
|
|
*/
|
|
|
|
function twentyseventeen_front_page_section( $partial = null, $id = 0 ) {
|
|
|
|
if ( is_a( $partial, 'WP_Customize_Partial' ) ) {
|
2020-06-20 14:02:12 +02:00
|
|
|
// Find out the ID and set it up during a selective refresh.
|
2016-10-28 00:09:40 +02:00
|
|
|
global $twentyseventeencounter;
|
2020-01-29 01:45:18 +01:00
|
|
|
|
|
|
|
$id = str_replace( 'panel_', '', $partial->id );
|
|
|
|
|
2016-10-28 00:09:40 +02:00
|
|
|
$twentyseventeencounter = $id;
|
|
|
|
}
|
|
|
|
|
|
|
|
global $post; // Modify the global post object before setting up post data.
|
|
|
|
if ( get_theme_mod( 'panel_' . $id ) ) {
|
|
|
|
$post = get_post( get_theme_mod( 'panel_' . $id ) );
|
|
|
|
setup_postdata( $post );
|
|
|
|
set_query_var( 'panel', $id );
|
|
|
|
|
|
|
|
get_template_part( 'template-parts/page/content', 'front-page-panels' );
|
|
|
|
|
|
|
|
wp_reset_postdata();
|
2016-10-28 23:01:34 +02:00
|
|
|
} elseif ( is_customize_preview() ) {
|
2016-10-28 00:09:40 +02:00
|
|
|
// The output placeholder anchor.
|
2020-01-29 01:45:18 +01:00
|
|
|
printf(
|
|
|
|
'<article class="panel-placeholder panel twentyseventeen-panel twentyseventeen-panel%1$s" id="panel%1$s">' .
|
|
|
|
'<span class="twentyseventeen-panel-title">%2$s</span></article>',
|
|
|
|
$id,
|
|
|
|
/* translators: %s: The section ID. */
|
|
|
|
sprintf( __( 'Front Page Section %s Placeholder', 'twentyseventeen' ), $id )
|
|
|
|
);
|
2016-10-28 00:09:40 +02:00
|
|
|
}
|
|
|
|
}
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if a blog has more than 1 category.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
function twentyseventeen_categorized_blog() {
|
|
|
|
$category_count = get_transient( 'twentyseventeen_categories' );
|
|
|
|
|
|
|
|
if ( false === $category_count ) {
|
|
|
|
// Create an array of all the categories that are attached to posts.
|
2017-12-01 00:11:00 +01:00
|
|
|
$categories = get_categories(
|
|
|
|
array(
|
|
|
|
'fields' => 'ids',
|
|
|
|
'hide_empty' => 1,
|
|
|
|
// We only need to know if there is more than one category.
|
|
|
|
'number' => 2,
|
|
|
|
)
|
|
|
|
);
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
|
|
|
|
// Count the number of categories that are attached to the posts.
|
|
|
|
$category_count = count( $categories );
|
|
|
|
|
|
|
|
set_transient( 'twentyseventeen_categories', $category_count );
|
|
|
|
}
|
|
|
|
|
2017-01-27 23:09:42 +01:00
|
|
|
// Allow viewing case of 0 or 1 categories in post preview.
|
|
|
|
if ( is_preview() ) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
return $category_count > 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2023-07-01 19:04:24 +02:00
|
|
|
* Flushes out the transients used in twentyseventeen_categorized_blog.
|
Importing Twenty Seventeen, our new default theme for 2017, set for 4.7.
With a focus on business sites, it will let you get down to business in style. Initial development occurred on GitHub. See: https://github.com/WordPress/twentyseventeen
Props melchoyce, laurelfulford, davidakennedy, grapplerulrich, manishsongirkar36, joefusco, smyoon315, b-07, rabmalin, mrahmadawais, hardeepasrani, implenton, acmethemes, claudiosanches, valeriutihai, pressionate, sgr33n, doughamlin, zodiac1978, tsl143, nikschavan, joshcummingsdesign, enodekciw, jordesign, patilvikasj, ryelle, mahesh901122, williampatton, juanfra, imnok, littlebigthing, mor10, samikeijonen, celloexpressions, akshayvinchurkar, davidmosterd, hiddenpearls, netweb, pratikchaskar, taggon, nukaga, ranh, yoavf, karmatosed, sandesh055, adammacias, noplanman, yogasukma, binarymoon, swapnilld, swissspidy, joyously, allancole, rianrietveld, sixhours, alex27, themeshaper, mapk, leobaiano.
See #38372.
Built from https://develop.svn.wordpress.org/trunk@38833
git-svn-id: http://core.svn.wordpress.org/trunk@38776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-20 06:12:31 +02:00
|
|
|
*/
|
|
|
|
function twentyseventeen_category_transient_flusher() {
|
|
|
|
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// Like, beat it. Dig?
|
|
|
|
delete_transient( 'twentyseventeen_categories' );
|
|
|
|
}
|
|
|
|
add_action( 'edit_category', 'twentyseventeen_category_transient_flusher' );
|
2017-12-01 00:11:00 +01:00
|
|
|
add_action( 'save_post', 'twentyseventeen_category_transient_flusher' );
|
2019-04-23 15:04:56 +02:00
|
|
|
|
|
|
|
if ( ! function_exists( 'wp_body_open' ) ) :
|
|
|
|
/**
|
2023-07-01 19:04:24 +02:00
|
|
|
* Fires the wp_body_open action.
|
2019-04-23 15:04:56 +02:00
|
|
|
*
|
2020-01-29 01:45:18 +01:00
|
|
|
* Added for backward compatibility to support pre-5.2.0 WordPress versions.
|
2019-04-23 15:04:56 +02:00
|
|
|
*
|
|
|
|
* @since Twenty Seventeen 2.2
|
|
|
|
*/
|
|
|
|
function wp_body_open() {
|
|
|
|
/**
|
2023-07-01 19:04:24 +02:00
|
|
|
* Fires after the opening <body> tag.
|
2019-04-23 15:04:56 +02:00
|
|
|
*
|
|
|
|
* @since Twenty Seventeen 2.2
|
|
|
|
*/
|
|
|
|
do_action( 'wp_body_open' );
|
|
|
|
}
|
|
|
|
endif;
|