• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
WordPress a2z

WordPress a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Themes
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / twentytwenty_site_description() – Displays the site description.

You appear to be a bot. Output may be restricted

Description

Displays the site description.

Usage

$string = twentytwenty_site_description( $echo );

Parameters

$echo
( bool ) optional default: 1 – Echo or return the html.

Returns

string The HTML to display.

Source

File name: twentytwenty/inc/template-tags.php
Lines:

1 to 28 of 28
function twentytwenty_site_description( $echo = true ) {
  $description = get_bloginfo( 'description' );

  if ( ! $description ) {
    return;
  }

  $wrapper = '<div class="site-description">%s</div><!-- .site-description -->';

  $html = sprintf( $wrapper, esc_html( $description ) );

  
/**
 * Filters the HTML for the site description.
 *
 * @since Twenty Twenty 1.0
 *
 * @param string $html         The HTML to display.
 * @param string $description  Site description via `bloginfo()`.
 * @param string $wrapper      The format used in case you want to reuse it in a `sprintf()`.
 */
  $html = apply_filters( 'twentytwenty_site_description', $html, $description, $wrapper );

  if ( ! $echo ) {
    return $html;
  }

  echo $html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
 

 View on GitHub View on Trac

Published: 25th November 2019 | Last updated: 21st August 2020

Primary Sidebar

Information

Function name: twentytwenty_site_description
Plugin ref: Twenty Twenty
Version: 1.6
Sourcefile: inc/template-tags.php
File ref: inc/template-tags.php
Deprecated?: No
API Letters: D,S,T

Footer

WordPress a2z
WordPress a2z
WordPress Dynamic API Reference
WordPress 5.6. PHP: 7.3.26
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  wp-a2z.org
© Copyright WordPress a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites