Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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