How to use PHPmailer in a function in WordPress

I have a function in the WordPress functions.php file that searches for a condition in user meta and sends an email to a user based on what it finds. I currently use wp_mail() to send the email, and that works. However, I want to use the included PHPMailer class to do this so that I can send the messages via SMTP. I thought I had a solution here: https://codex.wordpress.org/Plugin_API/Action_Reference/phpmailer_init, however, this seems to only apply to system generated messages, not for custom messages. At this point I’m just guessing, but…

Web Design Weekly #362

Headlines Design tools are holding us back Tom Johnson feels that our tools are still using methods, workflows, and features from graphic and visual design. Which is pretty true. A solid rant. (uxdesign.cc) The Modern Front-End Design System Stack (jxnblk.com) Sponsor Web Design Weekly and reach over 30,042 passionate designers and developers Articles Designing And Building A PWA Without A Framework The first of a three part series that looks at designing and building a simple Progressive Web Application called ‘In/Out’, built without a framework. (smashingmagazine.com) The Simplest Way to…

How to add an HTML <rel=preload> tag to the Header?

Since the google speed insights report suggests adding a < link rel= »preload » href= »/lity.css » as= »style » /> to speed up the loading of the following resources https://www.myoutlet.lt/wp-content/plugins/gdpr-cookie-compliance/dist/styles/lity.css on the website https://www.myoutlet.lt The website is based on the Avada theme. I am wondering how could I possibly achieve that! More concretely, I’ve thrown a glance to the header.php file of both the main and the child theme, but since they are coded in PHP I can’t really figure out on my own how to add any HTML to it. There should be for…

How to create multiple Rewrite-Rule for various site in single htaccess?

I am using a single database for two different sites. One is sitejury.com and the other is cdn1.sitejury.com. I’m trying to serve my files using the subdomain. Previously I used simple https Rewrite for my domain. but now with my increasing need, it has become complex for me to set up. I need to redirect both www.domain.com or domain.com to https://domain.com Redirect all version of cdn.domain.com to SSL-https//:domain.com version except (option- 3) Subfolder « wp-content » and « wp-includes » stay on both the domain domain.com and CDN domain with https. I only need…

Web Design Weekly #361

Headlines The Future of Websites: Headless CMSs In order to really grasp the elegance of headless CMS – and its possibilities – you have to cut through the clutter and understand how they work fundamentally. Dan Fries explains. (scotch.io) Get Your Free .design Domain Name Thinking of building your portfolio? .design is like .com & .net, but it’s more relevant to what you do as a designer. Claim yours today. (porkbun.com) Articles Building a design system — where to start? In this post, Shane Williams gives some great advice on…

How to Protect a private folder inside uploads folder, if User is not Logged In?

I am learning php but i am still quite a noob so please excuse my limitations. I have a html file that is linked to many PDF files inside a folder called « Clients » I have placed this folder inside « wp-content/uploads/ » The html page opens as inside the wordpress page. When a user logs in, it opens the wordpress page that has the html page displaying the links. Clicking on the links opens the PDF file in the same window without going to another page. This is a multisite wordpress installation…

Web Design Weekly #360

Headlines Chaos Design Adam Morse’s epic write up from a recent talk he gave. Grab a beer or a coffee and enjoy this wonderful thoughtful piece. (mrmrs.cc) The World-Wide Work (vimeo.com) Sponsor Web Design Weekly and reach over 30,142 passionate designers and developers Articles Why Did I Have Difficulty Learning React? Even though Jonathan Snook talks about React and the other technologies that are generally used with it, this is a very applicable story that we can all gain some inspiration from. (snook.ca) How Google Pagespeed works It’s no secret…

Web Design Weekly #359

Headlines What I Learned Co-Founding Dribbble Dan Cederholm reflects on what he has learned from building a community for designers, running a business and navigating some tough life years. Super inspiring stuff. (medium.com) Why I (Still) Love Tech (wired.com) Sponsor Web Design Weekly and reach over 30,162 passionate designers and developers Articles Optimizing Google Fonts Performance Google Fonts are easy to implement, but they can have a big impact on your page load times. Danny Cooper explores how we can load them in the most optimal way. (smashingmagazine.com) The 10…