Skip to content

Instantly share code, notes, and snippets.

@KnowTheCodePro
Created April 12, 2016 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KnowTheCodePro/d3f25106ac3073a6eb388c8a5f959188 to your computer and use it in GitHub Desktop.
Save KnowTheCodePro/d3f25106ac3073a6eb388c8a5f959188 to your computer and use it in GitHub Desktop.
Genesis genesis_structural_wrap - Swapping old contexts
//* Map of old $contexts to new $contexts
$map = array(
'nav' => 'menu-primary',
'subnav' => 'menu-secondary',
'inner' => 'site-inner',
);
//* Make the swap, if necessary
if ( $swap = array_search( $context, $map ) ) {
if ( in_array( $swap, $wraps[0] ) )
$wraps[0] = str_replace( $swap, $map[ $swap ], $wraps[0] );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment