Skip to content

Instantly share code, notes, and snippets.

@natejacobson
Created November 19, 2013 17:13
Show Gist options
  • Save natejacobson/7548847 to your computer and use it in GitHub Desktop.
Save natejacobson/7548847 to your computer and use it in GitHub Desktop.
Is there a way to do this with one command? Can I echo the specified array item without fetching the array first? These are coming from new customization options setup with $wp_customize. It is working, I'd just like to shorten.
<?php $spine_color = get_option( 'spine_theme_options' ); echo $spine_color['grid_style']; ?>
@jeremyfelt
Copy link

It likely won't cause any issues, though it is best practice to continue checking. Data pulled from the database cannot be trusted in similar ways that data inputted by a user cannot be trusted. Operating under the assumption that it somehow disappeared would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment