
If you are looking for an all purpose PHP toolkit to add to your WordPress development workflow EDEN -PHP could easily end your search, created by Openovate Labs it comes packed with a set of classes / libraries required for most of your day to day PHP task yet it is very simple to use, two qualities that are hard to find in most libraries.
Eden is a PHP Library maintained by Openovate Labs and is simply a set of reusable components, that works with any PHP framework and CMS. Eden makes code logical and readable with dead simple syntax. We use Eden as a foundation for all of our internal product development, which in turn keeps her code base updated, evolving and constantly expanding. Eden makes functionality available rather than make rules for how a website is created. This makes learning Eden easier because you only need to learn the classes you plan to use.
To add Eden-PHP to wordpress via Al.Manager simply download and drop it into you vendor directory (wp-content/vendor) and add the code below to your plugin code or theme functions file. If you prefer to go the way of plugins, download and install the WP-Eden quick start plugin from github.
Here is the plugin code, like I said simple, makes use of the eden.php single file download a 755.kb file, grab it from the download page.
/**
*
Plugin Name: WP-Eden
Plugin URI: http://autoloadmanager.shawnsandy.com.com
Description: A Simple WordPress pluhin of Eden - Eden simply a set of reusable components, that works with any PHP framework and CMS. Eden makes code logical and readable with dead simple syntax.
Author URI: http://shawnsandy.com
Version: 1.1.2
*
*
*/
/**
* include the eden
*/
include_once trailingslashit( plugin_dir_path( __FILE__ ) ).'/eden.php';
function init_wp_eden(){
}
add_action('init', 'init_wp_eden');
To run a quick test to see how it works
- Create a file (eden-test.php) in your WordPress root directory
- Copy and Paste the code below into that file
- Point your browser to your WP install (eg. http://yourwordpresinstall/eden-test.php)
- You should see the output Hello World and the twitter request info.
Test Code:
require('./wp-load.php');
$eden = new Eden(); //comment out to use with plugin
eden('debug')->output('Hello World'); //--> Hello World
$auth = $auth = eden('twitter')->auth('[TWITTER_KEY]', '[TWITTER_SECRET]');;
$token = $auth->getRequestToken();
var_dump($token);
Leave comments or suggestions below, I would love to hear from you.
-Shawn Sandy
Pingback: EDEN-PHP in your WordPress workflow | SHAWN SANDY - FREELANCE GRAPHIC-WEB DESIGNERSHAWN SANDY – FREELANCE GRAPHIC-WEB DESIGNER