UPDATED: Changed inner div content
Please, understand than I'm new to wordpress and php.
I added a media button to my media buttons in the admin by adding the following code to functions.php file:
function add_custom_media_button() {
echo '<a href="#TB_inline?inlineId=custommedia_container" id="insert-my-media" class="button thickbox">Add custom media</a>';
}
add_action('media_buttons', 'add_custom_media_button', 15);
add_action( 'admin_footer', 'add_inline_popup_content' );
function add_inline_popup_content() {
$cu = wp_get_current_user();
$cusername = $cu->user_login;
echo '<div id="custommedia_container" style="display:none;">';
echo '<iframe class="mediaselectoriframe" title="Archivado" width="100%" height="99%" title="cosas" src="http://nephila.cloudapp.net/GAdEWeb/wpsearch.aspx?wpuser=' . $cusername . '&wplang=' . $clocale . '" frameborder="0"></iframe>';
echo '</div>';
}
Now, this is working on Create Post page, but is not anywhere else.
I can see my button in Edit post, Create page and Edit page, but there's nothing inside the thickbox.
UPDATE: Still haven't been able to fix this problem. I've tried changing everything and nothing has improved. I'd really appreciate if someone could give me a hint, I don't seem to find any info about this, but I can't believe I'm the only one that has ever had this problem