public
Created

Gallery Metabox - change intro text

  • Download Gist
gistfile1.aw
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
<?php
 
add_filter( 'be_gallery_metabox_intro', 'sample_change_gallery_metabox_intro' );
/**
* Change Gallery Metabox Intro
* @author Bill Erickson
* @link http://www.billerickson.net/code/gallery-metabox-change-intro-text
*
* @param string $intro
* @return string
*/
function sample_change_gallery_metabox_intro( $intro ) {
$intro = '<p><a href="media-upload.php?post_id=' . $post->ID .'&amp;type=image&amp;TB_iframe=1&amp;width=640&amp;height=715" id="add_image" class="thickbox" title="Add Image">Upload Images</a> | <a href="media-upload.php?post_id=' . $post->ID .'&amp;type=image&amp;tab=gallery&amp;TB_iframe=1&amp;width=640&amp;height=715" id="manage_gallery" class="thickbox" title="Manage Gallery">Manage Gallery</a></p>';
echo $intro;
}

$post->ID was not working for me. Had to add global $post to get the post_id set.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.