1

I'm wondering if there's a way to show a specific message when user uploads a file using the wp-admin/media-new.php script.

So far I have this:

function my_uploads_notice(){
    global $pagenow;
    if ( $pagenow == 'media-new.php' ) {
         echo '<div class="error">
             <p><h4>MY NOTICE</h4></p>
         </div>';
    }
}
add_action('admin_notices', 'my_uploads_notice');
6
  • 3
    Please show us your efforts - it's a prerequisite to asking questions. Thanks.
    – kaiser
    Commented May 9, 2013 at 15:27
  • 1
    Yes, there's a way, research within this results. If not a solution, you'll find a starting poing.
    – brasofilo
    Commented May 9, 2013 at 16:03
  • I've added the code I'm currently using. Thanks to @brasofilo I've limited the notice to only show on the media-new.php
    – pangi
    Commented May 9, 2013 at 17:29
  • @pangi, is that a solution? If so, please add your own Answer in the box bellow.
    – brasofilo
    Commented May 9, 2013 at 21:21
  • @brasofilo, it's not, but it's the closest I've managed to get
    – pangi
    Commented May 10, 2013 at 4:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.