• 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( $display );

Parameters

$display
( bool ) optional default: 1 – Display or return the HTML.

Returns

string The HTML to display.

Source

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


Lines:

1 to 30 of 30
function twentytwenty_site_description( $display = 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 ( ! $display ) {
    return $html;
  }

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

 View on GitHub View on Trac

Published: 25th November 2019 | Last updated: 9th June 2022

Primary Sidebar

Information

Function name: twentytwenty_site_description
Plugin ref: Twenty Twenty
Version: 2.1
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 6.1.1. PHP: 8.0.28
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-2023. All rights reserved.


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

  • Home
  • Blog
  • Sitemap
  • Sites