Advertisement
Guest User

One from Two

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