Find and grep commands for searching

Examples: Find files named core in or below the current directory find . -name core Find files starting with core […]

December 22nd, 2011

Posted In: linux

PHP enable more room for file upload

The first things to check is PHP.ini file. The values of upload_max_filesize, memory_limit and post_max_size in the php.ini configuration file […]

June 1st, 2015

Posted In: php

Detect all links from all your posts

Here is the script for reading all posts and then creating the links list. In there you can check out […]

May 26th, 2015

Posted In: php

Object is not a function message

Received the error like this: Uncaught TypeError: object is not a function jquery.min.js:3 f.event.trigger jquery.min.js:3 (anonymous function) jquery.min.js:3 e.extend.each jquery.min.js:2 […]

February 24th, 2015

Posted In: js

Tags:

Column text replace

Here I used wp_postmeta table and meta_value column in WordPress (MySQL database) This could be used for any other table […]

February 16th, 2015

Posted In: database

Adding Rewrite Rules in WordPress

IN total two actions and one filter need to be triggered until we have the rule added:

January 31st, 2015

Posted In: wordpress

nO way for nO admin

The script that disables all non admin users to enter the web site: function admin_maintenace_mode() { global $current_user; get_currentuserinfo(); if($current_user->user_login […]

December 11th, 2014

Posted In: wordpress

PHP code sniffer

phpcs tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards. It is an […]

November 21st, 2014

Posted In: php

Custom permalink that contains post meta information

Here is the example how to improve custom post type permalink by adding additional information from the post meta in […]

October 28th, 2014

Posted In: wordpress

Simple logging for WordPress

Here is the example of simple function to log variables. Very basic. I like to copy paste this function: function […]

October 28th, 2014

Posted In: php, wordpress

Install Xdebug in Ubuntu

Should be very easy: 1. apt-get install php5-dev php-pear 2. pecl install xdebug 3. updatedb; locate xdebug.so 4. add to /etc/php5/apache2/php.ini this line […]

October 26th, 2014

Posted In: Debug, ubuntu

Next Page »