Plugin activation issue, improvement on publish.php

September 16, 2007

I have posted issue 408 about plugin activation/deactivation problem.    One other user has indicated experience of similar behavior on some plugins.

I did a quick mod to admin/publish.php such that I could easily get back to the entry I just edited, here it is


if ( isset( $result ) ) {
switch( $result ) {
case 'success':
echo '[p class="update"]' . _t('Your post has been saved.') . '[br /]';
if ( isset( $slug ) ) {
$post= Post::get( array( 'slug' => $slug, 'status' => Post::status( 'any' ) ) );
echo [a href="'.site::get_url('habari').'/'.$post->slug.'">Return to post[/a][/p]';
}
break;

Skippy confirmed that this isn’t a bad idea but at present user/classes only overrides files in system/classes but not those in admin/.

It would be ideal for user to have, after the entry is saved successfully, to have links going back to the entry or the page when it was first directed from.   Perhaps something like a hidden field.


[input type='hidden' name='redirect_to' value='$_SERVER['REQUEST_URI']' /]

Haven’t tried this out but this may work.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: