Fork a small plugin to showcase new security page

From the main plugin file:

$menu_slug = dirname(plugin_basename(__FILE__));

I’ll update the docs later.

1 Like

@Simone

Thanks for doing this. John Overall has picked up on this thread and mentioned it in his weekly podcast at WordPress Plugins A to Z, which is now running on ClassicPress.

He is a strong supporter of ClassicPress and I think he likes the idea of the Security page. I will do a write up about it at ClassicPress.club over the weekend and add screenshots, as he mentions the site every week.

The initial idea was to have an example plugin that shows developers how their plugin would appear to users. You have achieved that. So thanks for taking the time out to do it.

4 Likes

I don’t suppose there’s a transcript anywhere? I’ve had a quick look and came up empty. Failing that, a time offset?

1 Like

I think he does release transcripts after a while, but you can watch this week’s episode at New Day Rising for Plugins - YouTube

Yes, can confirm this is working for me too now.

2 Likes

That’s great! Thank you!
For me was an occasion to play with git and OOP.
For those who haven’t played with git yet I discovered that if you do something wrong nothing will explode (that was my fear) :rofl:

5 Likes

Nothing except @james perhaps :rofl:

5 Likes

I have made a post about the new CP release and included screenshots of the admin panel for both the old and new plugins. You can find it here.

6 Likes

Just make sure you get your changes successfully committed first, then it’s pretty difficult to lose them. There are definitely commands that can wipe things out before that point!

4 Likes

@omukiguy made a great tutorial on using the new security page: Add your security plugin settings to the new ClassicPress security page - YouTube

8 Likes

I am loving the cleaner dashboard. I thought it would be a mess with a huge plugin like Sucuri but it worked out well.

6 Likes

@Simone

I had a problem with this new plugin on one of my servers.

It added an extra <FilesMatch> line to .htaccess that was left unclosed. This caused a 500 error, locking me out of my site.

I removed that line via cPanel and it worked okay after that. Any ideas?

1 Like

It seems to be a 4-years-old bug… please try if it works correctly now.
Thank you!

1 Like

Ouch, didn’t like that:

PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function Htaccess::setFilesMatch(), 0 passed in /home/xxxxx/public_html/wp-content/plugins/CP-Brute-Force-Login-Protection/brute-force-login-protection.php on line 166 and at least 1 expected in /home/xxxxxx/public_html/wp-content/plugins/CP-Brute-Force-Login-Protection/includes/Htaccess.php:91

The actual line is

<FilesMatch ">

Not sure if it had a “.” in there though.

It’s added right after:

ErrorDocument 403 "You are not allowed to access this website. Contact the admin."

It’s only added after you save the configuration settings, almost as if it’s part of the custom message.

2 Likes

Sorry :man_facepalming:, now it should work!
On my test site it was just a warning that I haven’t see.

1 Like

Yep, that fixed it. Thanks. All a mystery to me.

1 Like