mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Introducing Site Icon, favicon management for WordPress.
This v1 marries Jetpack's Site Icon module with the Media Modal, reusing code from the Custom Header admin. For now, the core-provided icons will be limited to a favicon, an iOS app icon, and a Windows tile icon, leaving `.ico` support and additional icons to plugins to add. Props obenland, tyxla, flixos90, jancbeck, markjaquith, scruffian. See #16434. git-svn-id: https://develop.svn.wordpress.org/trunk@32994 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -587,6 +587,42 @@ function prep_atom_text_construct($data) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Site Icon in atom feeds.
|
||||
*
|
||||
* @since 4.3.0
|
||||
*/
|
||||
function atom_site_icon() {
|
||||
$url = get_site_icon_url( null, 32 );
|
||||
if ( $url ) {
|
||||
echo "<icon>$url</icon>\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Site Icon in RSS2.
|
||||
*
|
||||
* @since 4.3.0
|
||||
*/
|
||||
function rss2_site_icon() {
|
||||
$rss_title = get_wp_title_rss();
|
||||
if ( empty( $rss_title ) ) {
|
||||
$rss_title = get_bloginfo_rss( 'name' );
|
||||
}
|
||||
|
||||
$url = get_site_icon_url( null, 32 );
|
||||
if ( $url ) {
|
||||
echo '
|
||||
<image>
|
||||
<url>' . convert_chars( $url ) . '</url>
|
||||
<title>' . $rss_title . '</title>
|
||||
<link>' . get_bloginfo_rss( 'url' ) . '</link>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
</image> ' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the link for the currently displayed feed in a XSS safe way.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user