Latest VestaCP comes with PHP5.6 by default. In this article, we will see how to upgrade PHP to it’s latest version, i.e PHP7.0 First, we need to add the correct REMI repository and enable remi update, remi release and remi-php70 repository. Here’s how Now stop apache2 and remove the existing php package that comes with … Continue reading Upgrading PHP to PHP7.0 in a CentOS server with Vesta CP
It might be required sometime to prevent a user or all users with a specific role from accessing the WordPress admin panel. It’s not tough. Let’s think that we want that all users with author role will not be able to access the admin panel. All you have to do is just add the following … Continue reading How to prevent someone or some role from accessing the WordPress admin panel
* Photo by Michael Fertig Authors in WordPress have a homepage url like http://domain.com/author/authorname where all their posts are shown. And many of us who think it doesn’t look attractive want to change that url format. The middle part of that url, which says author, is called an author_base and it is possible to change … Continue reading Changing Author Homepage URL Properly in WordPress
Slack is awesome. Slack is the de-facto of modern team communication and I am pretty sure that this is not the first time you’re hearing something like this about slack. But if you’re really never used slack, oh boy, I feel pity for you 🙂
Anyway, in this article we’re going to make a slack bot that will monitor the sales in our envato account and notify from time to time as soon as someone purchased an item. Pretty useful, eh?
Considering you have a slack account, log into it and open a new channel, for example “#sales”. Now go to http://your_slack_url.slack.com/services/new or just click on “Configure Integrations” from your slack app.
When you’re shipping your theme for sell, it’s often required to bundle the required plugins. Some people just keep these plugins like general vendor libraries inside their theme and load them using php’s
require_once. However, if you’re following this style, your themes will fail to pass the theme check because these plugin files will be considered as a part of your theme, and it will prompt you that CPT functions and shortcodes should be a part of the plugin. Moreover, if someone deactivate your theme, those shortcodes and CPTs will be unavailable immediately.
This is why, along with many other developers, we use TGM Plugin Activation library. This tiny little lib can force or suggest installing the plugins which are required (or good to have) for making your WordPress theme work flawlessly.
TGM can work with plugins which are hosted in WordPress plugin repository, or in a github public repository. It can also work with plugins which are shipped with the theme as a separate zip file. In this article we’ll see all these three cases of plugin installation and activation process using TGM library.
Download the TGM library from http://tgmpluginactivation.com/download/. After unzipping, keep the class-tgm-plugin-activation.php file inside
vendors/tgm/ inside your theme. Then add the following code in your
functions.php Continue reading “Packaging thirdparty plugins with your WordPress theme using TGM Plugin Activation library”
** I’ve added an update. Click here to read it ** JetBrains has sent me an email today, mentioning about the upcoming change in their licensing model. Right now all users can renew their license at $49 which is a 50% discount rate of the original rate. From this November 2nd, you will be able … Continue reading [update] PHPStorm’s upcoming subscription based licensing model and why you’re fucked up
A recent update of Chrome browser broke the WordPress admin panel. It happened because of a setting related to slimming paint. Of course you can fix it by going to chrome options and then by disabling it. However, your client may not be able to do it because it’s a pretty confusing setting. To stay … Continue reading Chrome broke WordPress Admin Panel – here’s how to fix that