• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Genesis Theme Framework a2z

Genesis Theme Framework a2z

WordPress Dynamic API Reference

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / genesis_structural_wrap() – Echo a structural wrap div.

You appear to be a bot. Output may be restricted

Description

Echo a structural wrap div.

A check is made to see if the $context is in the genesis-structural-wraps theme support data. If so, then the $output may be echoed or returned.

Usage

$null|string = genesis_structural_wrap( $context, $output, $deprecated );

Parameters

$context
( string ) optional – The location ID.
$output
( string ) optional default: open – Optional. The markup to include. Can also be 'open' (default) or 'close' to use pre-determined markup for consistency.
$deprecated
( bool ) optional – Deprecated.

Returns

null|string Wrap HTML, or null if genesis-structural-wraps support is falsy.

Source

File name: genesis/lib/functions/layout.php
Lines:

1 to 25 of 25
function genesis_structural_wrap( $context = '', $output = 'open', $deprecated = null ) {

  if ( null !== $deprecated ) {
    $message = __( 'The default is true, so remove the third argument.', 'genesis' );

    if ( false === (bool) $deprecated ) {
      $message = __( 'Use `genesis_get_structural_wrap()` instead.', 'genesis' );
    }

    _deprecated_argument( __FUNCTION__, '2.7.0', esc_html( $message ) );
  }

  $output = genesis_get_structural_wrap( $context, $output );

  // Apply original default value.
  $deprecated = null === $deprecated ? true : $deprecated;

  if ( false === (bool) $deprecated ) { // Kept for backwards compatibility.
    return $output;
  }

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

}
 

Published: 25th November 2019 | Last updated: 25th November 2019

Primary Sidebar

Information

Function name: genesis_structural_wrap
Plugin ref: Genesis Framework
Version: 3.3.5
Sourcefile: lib/functions/layout.php
File ref: lib/functions/layout.php
Deprecated?: No
API Letters: G,S,W

Footer

Genesis a2z
Genesis Theme Framework a2z
WordPress Dynamic API Reference
WordPress 5.9.3
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:  genesis.wp-a2z.org
© Copyright Genesis a2z 2014-2022. All rights reserved.


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

  • Home
  • Blog
  • Sitemap
  • Sites