[ create a new paste ] login | about

Link: http://codepad.org/XV5KIeWJ    [ raw code | fork ]

PHP, pasted on Jan 23:
<?php
/*
Plugin Name: Twenty Fourteen Portfolio
Version: 1.0
Description: Adds a portfolio to the Twenty Fourteen theme
Author: Gabriele Romanato
Author URI: http://gabrieleromanato.com
*/
 
$dir = plugin_dir_path(  __FILE__  );
require_once( $dir . 'framework/TFPortfolio.php' );
 
if( class_exists( 'TFPortfolio' ) ) {
    $tfPortfolio = new TFPortfolio();
}

class TFPortfolio {
    public function __construct() {
        add_action( 'init', array( &$this, 'createCustomPostType' ) );
        add_action( 'wp_enqueue_scripts', array( &$this, 'insertScripts' ) );
        add_shortcode( 'tf-portfolio', array( &$this, 'portfolioShortcode' ) );
    }
    //...
}

?>


Create a new paste based on this one


Comments: