PHP Classes

PHP 8 Enums to CSS Colors, WordPress Editor, Bot Protection, SVG to PNG Conversion - 6 minutes - Lately in PHP 98

Recommend this page to a friend!
  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog PHP 8 Enums to CSS Co...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  


Updated on: 2023-10-05

Posted on: 2023-10-05

Categories: PHP Tutorials, Lately in PHP Podcast

On the Lately in PHP 98 podcast, you will learn in 6 minutes about a WordPress plugin that implements a visual editor for posts with blocks, a package to convert SVG graphics into PNG images and remove the image transparency using the ImageMagick extension, a WordPress plugin to blocks abusive bots, using PHP 8 enum types to assign names to colors defined by CSS frameworks like Bootstrap and Tailwind.

Read this article, watch a 6-minute video, or listen to episode 98 audio of the Lately in PHP podcast to learn about the best articles published on the PHP Classes site in the week of September 23 through September 30

Loaded Article


Listen or download the podcast, RSS feed and subscribe in iTunes

Click on the Play button to listen now.

Download Size: 2MB Listeners: 576

Introduction music obtained with permission from:

View Podcast in iTunes

Listen on Spotify
Listen on Spotify

Sound effects obtained with permission from:

In iTunes, use the Subscribe to Podcast... item of the Advanced menu, and then enter the URL above to subscribe to this podcast.

Watch the podcast video

See the Lately in PHP podcast play list on YouTube and Subscribe to this channel there.

Episode 98 Video

What was said in the podcast

Hello. Welcome to the Lately in PHP podcast. This is episode 98. And we are going to continue to use this format to cover in a few minutes the latest content that was published in the PHP classes site blog about packages that may be of the interest of PHP developers like yourself that is watching this podcast.

1. How to use a WordPress Frontend Post Editor Plugin to Compose Articles with Blocks Visually

So we are going to start precisely by a package on an article that covers this package that is basically a WordPress plugin that allows front-end developers to compose visually pages that are made the blocks.

And this plugin provides a visual editor that allows front-end developers to configure several aspects using a nice user interface that you can see here on the right, using properties that are very simple to configure.

So quickly developers that are composing pages or front-end developers that may be helping publishers to compose nice articles made of blocks that can be defined very quickly, there is this visual editor that may be very interesting.

And it is implemented by this plugin developed by our colleague Maniruzzaman Akash from Bangladesh. Congratulations. This is a very nice package. It's not trivial work, I'm sure it will be appreciated by at least part of you to use WordPress.

2. How to Use a PHP ImageMagick Extension to Convert SVG to PNG Removing Transparency

So continuing with the next article, this is a simpler package that this article covers. Basically it converts images between the SVG format into PNG. 

Actually, it removes the transparency using a color that is defined in the programming.

So this package is very simple. It's basically an example. It's not even a real object-oriented class. It's more of an example for you to learn how to do this with the ImageMagick extension.

And you can find it in this page where you can see that it was developed by our colleague Ahmed Abdullah from Bahrain.

3. How to Implement WordPress Bot Protection by Blocking Abusive Crawlers

Now, continuing with the next article. Again, this is with a WordPress bot protection plugin that allows you to block abusive crawlers.

Basically, there are many crawlers these days. They flood servers that serve sites with an excessive number of accesses.

Sometimes, they make the sites be slower to serve. And this causes harm to the sites that probably are aiming to rank higher and search engines like Google.

So this plugin is a very good idea. And you can try it by installing this plugin. And you can see here just a sample of a screenshot of the administration page on which you can configure several details of the kind of bots that are blocked, and also others that are not blocked.

This package was developed by our colleague Mr Shaggy from Turkey. It's a very nice plugin. So check it out if you are interested in this topic of protecting sites from abusive crawling.

4. How to Use a PHP Color Name to Hex Conversion Package that Provides Enum Values for Standard Colors Used by Browsers, Tailwind, and Bootstrap CSS Frameworks

Finally, there is one last article that covers one package that there's something simple takes advantage of PHP 8 enumerated values.

Basically, it defines enumerated values for colors. So you can refer to colors by name rather than hexadecimal values. You can see here in this illustration.

One of the enumerations defined in this package specifically for the Bootstrap CSS framework. Probably many of you use Bootstrap.It is very popular and it makes your code is more readable.

So every time that you want to refer to a specific color you can use these enumerated values, and you can read in the code that is probably a primary color and not 00 7B FF, which problem means nothing for you because it's just a number in hexadecimal format.

So this is a very nice to improve the readability of your code, and at that same time, takes advantage of a feature of PHP 8. So this is a modern package.

This package was developed by our colleague Angel Campos from Spain. Congratulations to him. This is a  very nice package.


And with this, we end this edition of the Lately in PHP podcast. If you are watching this for instance in YouTube, you can subscribe to this channel, so you can be notified next week when the next podcast episode will be published, so you can learn more about these packages, tools, articles, news, conferences everything that we publish in the PHP Classes site.

So on my behalf that is all for now. Thank you for watching. See you next week. Bye.

Show notes

You need to be a registered user or login to post a comment

1,615,240 PHP developers registered to the PHP Classes site.
Be One of Us!

Login Immediately with your account on:


No comments were submitted yet.

  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog PHP 8 Enums to CSS Co...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)