Skip to content

Instantly share code, notes, and snippets.

@imjjss
Created May 21, 2012 11:07
Show Gist options
  • Save imjjss/2761835 to your computer and use it in GitHub Desktop.
Save imjjss/2761835 to your computer and use it in GitHub Desktop.
modified file_gallery_content for find_post_div, may not use it
<?php
function media_gallery_content() {
global $post;
echo '<div id="fg_container">
<noscript>
<div class="error" style="margin: 0;">
<p>' . __ ( 'File Gallery requires Javascript to function. Please enable it in your browser.', 'file-gallery' ) . '</p>
</div>
</noscript>
</div>
<div id="file_gallery_image_dialog">
</div>
<div id="file_gallery_delete_dialog" title="' . __ ( 'Delete attachment dialog', 'file-gallery' ) . '">
<p><strong>' . __ ( "Warning: one of the attachments you've chosen to delete has copies.", 'file-gallery' ) . '</strong></p>
<p>' . __ ( 'How do you wish to proceed?', 'file-gallery' ) . '</p>
<p><a href="' . FILE_GALLERY_URL . '/help/index.html#deleting_originals" target="_blank">' . __ ( 'Click here if you have no idea what this dialog means', 'file-gallery' ) . '</a> ' . __ ( '(opens File Gallery help in new browser window)', 'file-gallery' ) . '</p>
</div>';
?>
<a onclick="findPosts.open('action','find_posts');return false;"
href="#">
<?php esc_attr_e('Example Post Search'); ?>
</a>
<!--<div id="file_gallery_copy_all_dialog" title="' . __('Copy all attachments from another post', 'file-gallery') . '">
<div id="file_gallery_copy_all_wrap">
-->
<?php
find_posts_div ();
?>
<!--
</div>
</div>
-->
<?php
/* <div id="file_gallery_copy_all_dialog" title="' . __('Copy all attachments from another post', 'file-gallery') . '">
<div id="file_gallery_copy_all_wrap">
<label for="file_gallery_copy_all_from">' . __('Post ID:', 'file-gallery') . '</label>
<input type="text" id="file_gallery_copy_all_from" value="" />
</div>
</div>; */
}
?>
@imjjss
Copy link
Author

imjjss commented May 21, 2012

it's troublesome to track all the javascripts and ajax functions to suit find_posts function. it might be more convinient to use the find_post in library thickbox.

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