WordPress.org

Ready to get started?Download WordPress

Plugin Directory

AL-Manager (WP.Autoload)

WP.Autoload (formerly PHP Autoload Manager) was created to allow me to easily extend the power of WordPress by using PHP’s autoload function to quic

It’s a… Beta! It may not have taken nine months but I’m just as happy that it’s here; WP.Autoload V2.0 beta is now available on Github. Version 2.0 main focus was :

Improve auto loading functionality, speed and efficiency. Offer multiple options for autoloading classes. Encourage a WordPress (PHP 5.2) compliant naming standards Based on the Pear / Zend Framework conventions when / wherever possible. Develop and create apps / tools that demonstrate and encourage developers to use and embrace object oriented php in WordPress. The WP.Autoload class was added to help improve and provide additional options for effectively loading classes into projects. It uses the Zend Framework naming conventions for PHP classes to encourage the use PSR-0 compliant standards for classes.

I have also added several Modules and Components :

  • Query : The Post_Query class is a part of the Post component kit, it allows you to quickly access and use WordPress WP_Query function to create custom WordPress queries.
Post_Query::factory()->set_template_slug('tpl/views/cover')->query(array('posts_per_page' => 3, 'category_name' => 'al-manager,vendor,plugins,general'));
  • CustomType : The CustomType post-component significantly reduces the time spent creating and coding custom post types it is simple and easy to use, yet flexible enough to allow you customize your CPT(s) if you chose all without the downside of a plugin.
Post_CustomTypes::factory('indie_shop')->register_post_type("My Shop");
  • Pointers : As like our other components Admin_Pointers makes it easy to use pointers in your themes and plugins, please use sparingly pointers are meant to guide not decorate.
/** Updated method */
Admin_Pointers::factory('test_01','#menu-plugins')
         ->add_pointer(__('Test Pointer','textdomain),__('Hello I am a pointer this is easy to do!','textdomian'));
  • AdminBar : Adminbar_PostMenus creates links to post, pages and custom post_types for easy content navigation and editing.
/**
 * Customize your Adminbar Post Menus
 *
 */
function apm_menus() {

    //create an post_type array(post_type, menu_title);
    $post_types  =  array('post' => 'Posts', 'page' => 'Pages','cwp_article' => 'Articles','cwp_faq' => "FAQ(s)");

    Adminbar_PostMenus::factory()->set_post_types($post_types)->create_nodes();

}
// run the function on init;

add_action('init', 'apm_menus');
  • More to come...

These provide working examples of some of the benefits of using object oriented programming in WordPress projects.

All the major bases have been covered as regards to the goals of V2.0, the beta has been switched to a new Github repository https://github.com/shawnsandy/wp.autoload and the website has been given a makeover for good measure.

Tags: ,

Requires: 3.0 or higher
Compatible up to: 3.5.2
Last Updated: 2013-2-22
Downloads: 328

Ratings

0 stars
0 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.