public
Created

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
<?php
global $k_option;
load_theme_textdomain( 'newscast' );
//####################################################################
// Define Thumbnail sizes
//####################################################################
$k_option[ 'custom' ][ 'imgSize' ][ 'base' ] = array(
'width' => 267,
'height' => 180
); // backend preview size, if changed does not affect the frontend
$k_option[ 'custom' ][ 'imgSize' ][ 'S' ] = array(
'width' => 60,
'height' => 60
); // small preview pics for half sized posts and sidebar news
$k_option[ 'custom' ][ 'imgSize' ][ 'M' ] = array(
'width' => 180,
'height' => 180
); // big preview pic for full sized posts
$k_option[ 'custom' ][ 'imgSize' ][ 'L' ] = array(
'width' => 700,
'height' => 320
); // image for accordion and featured news slider
$k_option[ 'custom' ][ 'imgSize' ][ 'XL' ] = array(
'width' => 960,
'height' => 320
); // big images for fullsize pages and fade slider
//#################################################################
// Get Theme informations and save them to PHP Constants
//#################################################################
$the_theme = get_theme_data( TEMPLATEPATH . '/style.css' );
$the_version = trim( $the_theme[ 'Version' ] );
if ( !$the_version )
$the_version = "1";
//set theme constants
define( 'THEMENAME', $the_theme[ 'Title' ] );
define( 'THEMEVERSION', $the_version );
// set Path constants
define( 'KFW', TEMPLATEPATH . '/framework/' ); // 'K'riesi 'F'rame 'W'ork;
define( 'KFWOPTIONS', TEMPLATEPATH . '/theme_options/' );
define( 'KFWHELPER', KFW . 'helper_functions/' );
define( 'KFWCLASSES', KFW . 'classes/' );
define( 'KFWPLUGINS', KFW . 'theme_plugins/' );
define( 'KFWWIDGETS', KFW . 'theme_widgets/' );
define( 'KFWINC', KFW . 'includes/' );
define( 'KFWSC', KFW . 'shortcodes/' );
// set URI constants
define( 'KFW_URI', get_bloginfo( 'template_url' ) . '/framework/' ); // 'K'riesi 'F'rame 'W'ork;
define( 'KFWOPTIONS_URI', get_bloginfo( 'template_url' ) . '/theme_options/' );
define( 'KFWHELPER_URI', KFW_URI . 'helper_functions/' );
define( 'KFWCLASSES_URI', KFW_URI . 'classes/' );
define( 'KFWPLUGINS_URI', KFW_URI . 'theme_plugins/' );
define( 'KFWWIDGET_URI', KFW_URI . 'theme_widgets/' );
define( 'KFWINC_URI', KFW_URI . 'includes/' );
define( 'KFWINC_SC', KFW_URI . 'shortcodes/' );
//#################################################################
// this include calls a file that automatically includes all
// the files within the folder framework and therefore makes
// all functions and classes available for later use
//#################################################################
$autoload[ 'helper' ] = array(
'breadcrumb', // breadcrumb navigation
'header_includes', // javascript and css includes for header.php
'lots_of_small_helpers', // helper functions that make my developer-life easier =)
'pagination', // pagination function
'twitter',
'nav_menu',
'kriesi_post_thumb' // display a resized image
);
$autoload[ 'classes' ] = array(
'kclass_display_box',
'description_walker'
);
$autoload[ 'plugins' ] = array(
'kriesi_option_pages/kriesi_option_pages',
/*
'kriesi_menu_manager/kriesi_menu_manager',
'kriesi_menu_manager/kriesi_menu_display',
*/
'kriesi_meta_box/kriesi_meta_box'
);
$autoload[ 'widgets' ] = array(
'advertising_widget',
'sidebar_news'
);
$autoload[ 'option_pages' ] = array(
'options',
'mainpage',
'contact',
'sidebar_footer',
/*
'menu_manager_pages',
'menu_manager_cats',
*/
'meta_box'
);
$autoload[ 'templatefiles' ] = array(
'wp_list_comments',
'widgets'
);
$autoload[ 'shortcodes' ] = array(
'pullquotes'
);
//#########################################################################################
// CONFIG
//#########################################################################################
define( 'FRAMEWORK_VERSION', '2.1' );
//#########################################################################################
// AUTOLOADER
//#########################################################################################
foreach ( $autoload as $path => $includes ) {
if ( $includes ) {
foreach ( $includes as $include ) {
switch ( $path ) {
case 'classes':
include_once( KFWCLASSES . $include . '.php' );
break;
case 'helper':
include_once( KFWHELPER . $include . '.php' );
break;
case 'plugins':
include_once( KFWPLUGINS . $include . '.php' );
break;
case 'widgets':
include_once( KFWWIDGETS . $include . '.php' );
break;
case 'option_pages':
include_once( KFWOPTIONS . $include . '.php' );
break;
case 'shortcodes':
include_once( KFWSC . $include . '.php' );
break;
case 'templatefiles':
include_once( TEMPLATEPATH . '/' . $include . '.php' );
break;
} //$path
} //$includes as $include
} //$includes
} //$autoload as $path => $includes

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.