Skip to content

Instantly share code, notes, and snippets.

@bryanwillis
Forked from brycejacobson/functions.php
Last active August 29, 2015 14:08
Show Gist options
  • Select an option

  • Save bryanwillis/d27ccb6fadc0f53e027a to your computer and use it in GitHub Desktop.

Select an option

Save bryanwillis/d27ccb6fadc0f53e027a to your computer and use it in GitHub Desktop.
<?php
add_filter( 'genesis_attr_movie', 'custom_add_movie_attr' );
/**
* Callback for dynamic Genesis 'genesis_attr_$context' filter.
*
* Add custom attributes for the custom filter.
*
* @param array $attributes The element attributes
* @return array $attributes The element attributes
*/
function custom_add_movie_attr( $attributes ){
// add itemscope
$attributes['itemscope'] = '';
// add the Movie itemtype schema
$attributes['itemtype'] = 'http://schema.org/Movie';
// return the attributes
return $attributes;
}
<?php
genesis_markup( array(
'html5' => '<div %s>',
'xhtml' => '<div>',
'context' => 'movie'
) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment