Skip to content

Instantly share code, notes, and snippets.

@themefoundation
Created November 1, 2012 23:18
Show Gist options
  • Save themefoundation/3997424 to your computer and use it in GitHub Desktop.
Save themefoundation/3997424 to your computer and use it in GitHub Desktop.
Funtion for passing an array from a WP theme to the Theme Toolkit
/**
* Gets the metaboxes array from the theme
*
* Provides a filter that is used by the theme to pass the metabox details
* array to the Theme Toolkit for processing.
*
* @since 1.0
* @param array $thtk_metaboxes Array of metaboxes (empty by default).
* @return array Metaboxes array, usually defined in the theme's functions.php file.
*/
function thtk_get_metaboxes_array( $thtk_metaboxes = array() ) {
// Provides filter for obtaining options array.
$thtk_metaboxes = apply_filters( 'thtk_metaboxes_filter', $thtk_metaboxes );
// Returns the options array.
return $thtk_metaboxes;
} // End thtk_get_metaboxes_array()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment