Handling My PHP Scripts & Wordpress Plugins

This is big and this post is a sticky. It will remind you the right way you need to handle code and plugins you get from this site. Simple handling and storing instructions.

Handling PHP Code

Make sure all functions starting with el_* stay togethers. Create a new file (elib.php) and get all el_* functions I shared and paste them there. Make sure you use the following format.

if(!function_exists('el_function')){ function el_function(...){...} }

I usually paste them in this format but I might have missed some and shared without function_exists! In my plugins I might use these functions and I won't actually declare them again. I will assume you have included them before. I hate code redundancy and before any plugin I will release the functions it uses, you paste them and wait for the plugin.

Actually: Make sure you place all functions I share here in the elib.php file. Even the Wordpress Helpers not starting with el_* like this one.

Handling Wordpress Plugins

Create a new folder in your wp-content/plugins and call it 5ubliminal. Create new files (plugin-name.php) with descriptive names and place all the plugins I share there and make sure they have this line before all code and right after header comments:

if(file_exists(dirname(__FILE__).'/elib.php')) require_once(dirname(__FILE__).'/elib.php'); // Include the eLIB with my functions

The line above will include the elib.php in each plugin I share where it's needed. Make sure they all stay in same folder.

In Case Something's Missing

I'm a bit lightheaded every now and then and, if you notice el_* functions are missing, notify me in the comments of that post. Say something like ...

Hey 5ub, (cough) el_* is missing (cough).

And I'll come through.

Stay Updated

Stay up to date with latest news by subscribing the INFOBITS FEED. This is my way of notifying all updates for all plugins and functions. Everynow and then, when I fix some code or add new features, I will announce it there. If you are to subscribe to this site you should subscribe to both RSS FEED (for posts) and INFOBITS (for updates).

Category: PHP, Wordpress Plugins
Tagged:

Leave a Reply

Comment Links are DoFollow only for registered subscribers … if comments pass moderation. Links in your comments may be slaughtered, hijacked or removed.