Set Default Editor Mode (TinyMCE / HTML) in WordPress

WordPress TinyMCE Editor

I recently built a plugin where I needed WordPress to by default always set its editor to Text (HTML) mode and not tinyMCE.This is achievable using the undocumented filer wp_default_editor.To make TinyMCE always display by default, use the code below.[php] function set_default_editor() { $r = 'tinymce'; return $r; } add_filter( 'wp_default_editor', 'set_default_editor' ); [/php]To make the text / HTML mode the default … [Continue reading]

Vagrant Fix: `parse': (<unknown>): found a tab character that violate intendation while scanning a plain scalar

Laravel homestead vagrant error

In case you haven't heard, I have move my PHP development from XAMPP to Vagrant, Laravel homestead box to be precise. A post on getting started with vagrant coming soon.As always whilst starting a new project, i added the site to Homestead.yaml, did Vagrant up and got the following error messages.c:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/psych.rb:205:in `parse': (<unknown>): found a tab character that violate intendation while … [Continue reading]

How to Upgrade XAMPP to a Newer Version

XAMPP server

XAMPP is a popular PHP development environment for creating a local LAMP stack.In this succinct tutorial, I will show us how to upgrade XAMPP for Windows to a newer version in few steps.Firstly, download and install the latest version of XAMPP in a new installation folder.Say your older version is in C:\xampp and the newer version was installed in D:\xampp; Delete the htdocs and MySQL folder in D:\xampp and replace them with the … [Continue reading]

Remove Sensitive Data and Commits from Git History with BFG Repo-Cleaner

Git

Earlier today, I accidentally committed a sensitive data of a project I was working on to a public Github repository.To remove every trace of that data on Github, I had to remove all history of the file that contained the said data.In this succinct article, I will show us how to remove or delete all Git history of a file on Github using BFG Repo-CleanerNote: BFG Repo-Cleaner do not clean-up the latest commit and assume it is the good … [Continue reading]

HybridAuth Fix: Authentication failed! Facebook returned an invalid user id

Facebook app - status and review

In a project I was working on this past weeks, I was tasked to integrate social network login functionality to the site.To reduce time required to implement the social login of each social networks, I opted to use HybridAuth - a PHP library that enable developers to easily build social applications to engage websites visitors and customers on a social level by implementing social sign in, social sharing, users profiles, friends list, … [Continue reading]

Introduction to WordPress Theme Customization API

WordPress Theme Customization API

As a WordPress user, you'd already be familiar with the impressive features that the CMS brings along. Theme Customization API is one such feature that has taken the WordPress theme customization world by a wave.In this tutorial, you'll get to know about the utilization of WordPress Theme Customization API that has been introduced in WordPress 3.4 and since then has been serving as one of the finest tools for tweaking the WordPress themes. … [Continue reading]

Setting Up Xdebug in XAMPP with PhpStorm

PhpStorm Xdebug installation

Xdebug is a PHP extension which provides debugging, profiling, code coverage, stack traces and many other capabilities.In this succinct tutorial, I will show us how to set up Xdebug that ships with XAMPP in PhpStorm. See the steps below.Open up php.ini (located at C:\path-to-xampp\php) for editing. Search for [XDebug] and un-comment all its entries. [php] zend_extension = "C:\xampp\php\ext\php_xdebug.dll" xdebug.profiler_append = … [Continue reading]

Review of Codelobster PHP IDE

Codelobster PHP IDE

Codelobster primarily is a free, portable integrated development environment (IDE) for PHP. It also has support for HTML, CSS and JavaScript.Some of the awesome features that make Codelobster tick includes:All code highlights depends on the code type, mixed code are also supported, thus the area of HTML will be highlighted as HTML, PHP as PHP, and JavaScript as JavaScript in a the same file. There is possibility of choice from … [Continue reading]