Copy variables from one scope to another
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
add_action( 'genesis_header', 'my_test_callback' );
function my_test_callback() {
$array = array(
'one',
'two',
'three'
);
add_action( 'genesis_footer', function () use ( $array ) {
var_dump( $array );
} );
}