Stefan
Forum Replies Created
-
Forum: Plugins
In reply to: [Rename wp-login.php] is_admin() and OOPok.
create a php file “class.php”, insert something like (
class fun {}
)in your functions.php, add:
if( !is_admin() ) { include('class.php'); }
open your 404.php, add:
$fun = new fun();
now, try your 404 while type https://www.example.com/xxxx (not existing page), into your browser: your 404 will show up correctly.
now log off and type https://www.example.com/wp-admin/ into your browser:
404 shows up, but with an error like “cannot find class “fun”. because /wp-admin actually is “is_admin();
its a stupid example, but i hope u’ll see what i mean. ??
———-
second thought on the 404 problem. If you have a multisite installed, user can be added via the backend in several ways. they will retrieve some confirmation mails – with the wrong url in it (/wp-admin).
because we can’t change the admin_url, i’ve added into your rwl_404() function:
if ( isset( $_SERVER['HTTP_REFERER'] ) && ( strpos( $_SERVER['HTTP_REFERER'], 'newbloguser' ) !== FALSE || strpos( $_SERVER['HTTP_REFERER'], 'wp-activate.php' ) !== FALSE ) ) { wp_redirect( rwl_login_url() ); exit; }
i know, this is not save, but at the moment, the best solution. so user wont land on a 404 page, if they click the login link.
Forum: Plugins
In reply to: [Plugin: Yet Another Related Posts Plugin] “related_posts_exist” won′t workhey mitcho!
thx for your advance..
but it also won′t work with your dev build version….
i know the workarround in the option page, but its almost not so gentle because i don′t want to show the whole headline “related posts:”, if there are no related posts -> this is not possible to conf in the option page.
It′s a pity. ??
but thx again for your fast and great help!