I would like to change the text in the wp media uploader. I managed to find the function at the media.php and i tried to using the filter to change the text like this:
function uploader_text() {
remove_action('post-html-upload-ui', 'media_upload_html_bypass' );
?>
<p class="upload-html-bypass hide-if-no-js">
<?php _e('mytext here'); ?>
</p>
<?php
}
add_filter('post-html-upload-ui', 'uploader_text');
But I failed to do so. What I done wrong?
Update: This is how I tried
The related function in wp is like this:
<div id="html-upload-ui" class="hide-if-js">
<?php do_action('pre-html-upload-ui'); ?>
<p id="async-upload-wrap">
<label class="screen-reader-text" for="async-upload"><?php _e('Upload'); ?></label>
<input type="file" name="async-upload" id="async-upload" />
<?php submit_button( __( 'Upload' ), 'button', 'html-upload', false ); ?>
<a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e('Cancel'); ?></a>
</p>
<div class="clear"></div>
<?php do_action('post-html-upload-ui'); ?>
</div>
function media_upload_html_bypass() {
?>
<p class="upload-html-bypass hide-if-no-js">
<?php _e('You are using the browser’s built-in file uploader. The new WordPress uploader includes multiple file selection and drag and drop capability. <a href="#">Switch to the new uploader</a>.'); ?>
</p>
<?php
}
add_action('post-html-upload-ui', 'media_upload_html_bypass');
The text that i need to change is in media_upload_html_bypass() :
<?php _e('You are using the browser’s built-in file uploader. The new WordPress uploader includes multiple file selection and drag and drop capability. <a href="#">Switch to the new uploader</a>.'); ?>
So I tried :
function uploader_text() {
?>
<p class="upload-html-bypass hide-if-no-js">
<?php _e('here is what i want to change the text</a>.'); ?>
</p>
<?php
}
add_filter('media_upload_html_bypass', 'uploader_text');
Still not working.