OpenLampTech No. 135
WP hooks, actions, filters | Render JSON safely in Blade templates | Import Excel into MySQL | MySQL Window Functions | Check out Backpack for Laravel
Thank you for reading the OpenLampTech newsletter!
If someone awesome shared this newsletter with you and you are not yet subscribed, please use the Subscribe button below and join:
And now, here is a message from this week’s sponsor. Thank you, Backpack for sponsoring the OpenLampTech newsletter!
Need an admin panel for your Laravel app? Backpack for Laravel is celebrating 8 years in the business with a HUGE discount campaign. Hurry up - there are limited spots with the 40% discount! If you haven't tried it yet, it's a great moment to do so. Use the coupon codes here while they're still active.
All commentary and opinions are mine unless otherwise quoted.
Add HTML Tag And Class To WooCommerce Category/Archive Page Title
I’m tooting my own horn here with this share.
One of the things I like most about WooCommerce is the (seemingly) endless customizations you can add to your site with some PHP.
This is what I call “Discovery Writing” where I am learning new things and documenting them for you, (future) me, and anyone else.
[Medium]
A Guide to WordPress Hooks, Actions, and Filters
Hooks, actions, and filters are the “meat and potatoes” of WordPress customizations. These important pieces of code allow you to extend, customize, and modify WordPress (in what I like to think of as the “WordPress Way”).
Using these filters is the way to customize WordPress without touching the core files.
Excellent write-up here.
Matter of fact, one of the better articles I've read on WordPress filters.
[Bright Plugins]
Security Tip: Safely Rendering JSON in Blade
Laravel security expert Stephen Rees-Carter has information on safely using JSON in Blade files.
As is, JSON could be exploitable if using the standard json_encode()
function inside a Blade file.
A better option is to leverage built-in Laravel methods such as Js::from()
or Js::encode()
.
[Securing Laravel]
Database Management In WordPress: 9 Tips For Efficient Data Handling
I think that the WordPress database is the unsung hero of the entire CMS. With technologies and features like PHP, Gutenberg, and Full Site Editing being in the limelight, the MySQL database sits in the background, silently working (hopefully), providing the data.
This article shares some tips for WordPress database management best practices.
[InVezza]
OpenLampTech has sponsorship opportunities for your brand, product, or service in the weekly newsletter. As an independent publication, collaboration is very affordable.
How to Import Excel to MySQL [4-Step Tutorial]
Many analysts and other data professionals use Excel as their defacto spreadsheet software. I know in my day job, I use Excel (and Google Sheets) quite a bit.
Sometimes, you may want your Excel spreadsheet data in a MySQL database for any number of reasons. I like using Window functions for different analyses.
Here is a step-by-step guide on importing Excel into MySQL using the Five IDE/database tool/application builder.
[dev.to]
MySQL Window Functions Are So Useful!
Agreed.
And, they can clean up a great deal of messy queries. Not only are the actual group of Window Functions themselves useful, but you can also use some of the Aggregate functions with the OVER()
clause to perform those types of operations on data.
SUM()
and AVG()
are popular choices so give those a try as well.
[Medium]
I've not personally used the MySQL Heatwave product as it doesn't necessarily fit into my current need or workflow. Based on my understanding, Heatwave is a premium analytical platform running on the MySQL database.
A prominent voice in the open-source database ecosystem has some very interesting - and valid - opinions on Oracle's stewardship of MySQL that are covered in this article's content.
[The Register]
[#Affiliates and Classifieds] - Your support keeps the OpenLampTech newsletter free for readers
Take your Laravel applications to the next level with Battle Ready Laravel by Ash Allen. (affiliate)
Ultimate Laravel Boilerplate to help other indie hackers deliver their SaaS in hours. Get started with LaraFast today! (affiliate)
Popups, newsletters, and abandoned carts. Use Omnisend with integrated email and SMS campaigns. (affiliate)
Thank you for reading. I hope you have a great rest of your week.
Take care.
Josh Otwell
Some links may be affiliate links from which I earn a small commission at no additional cost to you.