WordPress.org

Make WordPress Core

Ticket #7094: edit_form_msg_filter.patch

File edit_form_msg_filter.patch, 835 bytes (added by simonwheatley, 10 years ago)

Patch adding filter to manipulate user message edit_form_advanced.php

  • /www/sites/jackspeak/site/wp-admin/edit-form-advanced.php

    old new  
    77$messages[2] = __('Custom field updated.');
    88$messages[3] = __('Custom field deleted.');
    99$messages[4] = __('Post updated.');
     10
     11$display_message = $messages[$_GET['message']];
     12$display_message = apply_filters( 'edit_form_advanced_message', $display_message );
    1013?>
    11 <?php if (isset($_GET['message'])) : ?>
    12 <div id="message" class="updated fade"><p><?php echo $messages[$_GET['message']]; ?></p></div>
     14<?php if ( ! empty( $display_message ) ) : ?>
     15<div id="message" class="updated fade"><p><?php echo $display_message; ?></p></div>
    1316<?php endif; ?>
    1417
    1518<form name="post" action="post.php" method="post" id="post">