Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created May 6, 2013 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/5528267 to your computer and use it in GitHub Desktop.
Save billerickson/5528267 to your computer and use it in GitHub Desktop.
<?php
/**
* Customize Gallery Metabox Image Output
*
* @param string $output
* @param string $image_url
* @param object $image, post object
* @return string $output
*/
function be_new_image_markup( $output, $image_url, $image ) {
$output = '<img src="' . $image_url . '" alt="' . esc_attr( $image->post_title ) . '" rel="' . esc_attr( $image->ID ) . '" title="' . esc_attr( $image->post_content ) . '" /> ';
return $output;
}
add_filter( 'be_gallery_metabox_output', 'be_new_image_markup', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment