-
-
Save KnowTheCodePro/d3f25106ac3073a6eb388c8a5f959188 to your computer and use it in GitHub Desktop.
Genesis genesis_structural_wrap - Swapping old contexts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* 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