[wp-hackers] register_settings and admin_notices

Glenn Ansley glenn at glennansley.com
Fri Oct 23 12:32:19 UTC 2009


I haven't looked at the code to see if there's an API for that but
rather than using javascript you could hook in before that chunk of
code and unset $_GET['updated']. Then you could use the admin_notices
to construct your own message. (Check to make sure it's your plugin's
page before unsetting it though).

Glenn Ansley
http://fullthrottledevelopment.com
http://twitter.com/full_throttle
http://twitter.com/glennansley

On Fri, Oct 23, 2009 at 8:27 AM, Mohammad Jangda <batmoo at gmail.com> wrote:
> Here's the code that displays the "updated" message (in options-head.php):
>
> <?php if (isset($_GET['updated'])) : ?>
>> <div id="message" class="updated fade"><p><strong><?php _e('Settings
>> saved.') ?></strong></p></div>
>> <?php endif; ?>
>>
>
> I don't see an easy way to change that.
>
> You could use admin_notices to display the custom message and use javascript
> to hide the default "Settings Saved" message (obviously a subpar solution).
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list