0
votes
1answer
106 views

Avoid too long words in a post title, post content or comment but only if its not a url

I want to prevent users from posting things like "aaaadfgdfgsdfgdaaaadsfgsdfgaaasdfgdfaaadfgsdfgaaaaaaaajahkjhkahkkjkjhaa..." which would not only be annoying but would certainly break the content div ...
0
votes
1answer
168 views

How to properly print a 404 error without redirecton? (i.e. keeping the current URL)

There are some pages on my BuddyPress install that I would like to hide by printing a 404 error. With the help of the following question: Redirect Restricted Page to 404 I came up with this code: ...
2
votes
3answers
1k views

User redirect to destination URL after login

Scenario: if user not login, user redirect to customize login page and redirect again to destination page after login. I don't use a function or plugin. This code to restriction page: if ...