Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.58 KB | None | 0 0
  1. <?php
  2. /**
  3. * Calcium WordPress Theme
  4. *
  5. * Laborator.co
  6. * www.laborator.co
  7. */
  8.  
  9.  
  10. # Constants
  11. define('THEMEDIR', get_template_directory() . '/');
  12. define('THEMEURL', get_template_directory_uri() . '/');
  13. define('THEMEASSETS', THEMEURL . 'assets/');
  14. define('WPURL', site_url('/'));
  15. define('URL', home_url('/'));
  16. define('TD', 'calcium');
  17. define('DEV_MODE', 0);
  18.  
  19.  
  20. # Theme Content Width
  21. $content_width = ! isset($content_width) ? 960 : $content_width;
  22.  
  23.  
  24. # Theme Textdomain
  25. load_theme_textdomain(TD, get_template_directory() . '/languages');
  26.  
  27.  
  28. # Register Menus
  29. register_nav_menus(
  30. array(
  31. 'main-menu' => 'Main Menu'
  32. )
  33. );
  34.  
  35.  
  36. # Theme Support
  37. add_theme_support('menus');
  38. add_theme_support('widgets');
  39. add_theme_support('automatic-feed-links');
  40. add_theme_support('post-thumbnails');
  41. add_theme_support('featured-image');
  42. add_theme_support('post-formats', array('video', 'quote', 'image', 'link', 'gallery', 'audio'));
  43.  
  44.  
  45. # Load Files
  46. include(THEMEDIR . 'inc/lib/smof/smof.php');
  47.  
  48. # Laborator - WP Related
  49. include(THEMEDIR . 'inc/laborator_functions.php');
  50. include(THEMEDIR . 'inc/laborator_init.php');
  51. include(THEMEDIR . 'inc/laborator_actions.php');
  52. include(THEMEDIR . 'inc/laborator_filters.php');
  53. include(THEMEDIR . 'inc/laborator_classes.php');
  54. include(THEMEDIR . 'inc/laborator_shortcodes.php');
  55.  
  56.  
  57. if(class_exists('acf'))
  58. {
  59. # Make it LITE
  60. if(! get_data('acf_lite_disable'))
  61. define('ACF_LITE', true);
  62. }
  63. else
  64. if( ! is_admin())
  65. {
  66. # Load get_field function
  67. include(THEMEDIR . 'inc/lib/acf-functions.php' );
  68. }
  69.  
  70.  
  71. include(THEMEDIR . 'inc/acf-fields.php' );
  72.  
  73. include(THEMEDIR . 'inc/lib/zebra.php');
  74. include(THEMEDIR . 'inc/lib/class-tgm-plugin-activation.php');
  75. include(THEMEDIR . 'inc/lib/laborator/laborator_image_resizer.php');
  76. include(THEMEDIR . 'inc/lib/laborator/laborator_dataopt.php');
  77. include(THEMEDIR . 'inc/lib/laborator/laborator_tgs.php');
  78. include(THEMEDIR . 'inc/lib/laborator/laborator_gallerybox.php');
  79.  
  80. if(get_data('portfolio_likes'))
  81. include(THEMEDIR . 'inc/lib/laborator/laborator_likes.php');
  82.  
  83. include(THEMEDIR . 'inc/laborator_data_blocks.php');
  84.  
  85. include(THEMEDIR . 'inc/lib/widgets/laborator_twitter.php');
  86. include(THEMEDIR . 'inc/lib/widgets/laborator_instagram.php');
  87. include(THEMEDIR . 'inc/lib/widgets/laborator_subscribe.php');
  88.  
  89. # Laborator SEO
  90. if( ! defined("WPSEO_PATH"))
  91. include('inc/lib/laborator/laborator_seo.php');
  92.  
  93.  
  94. # Thumbnail Sizes
  95. $blog_thumbnail_height = ($bth = get_data('blog_thumbnail_height')) && is_numeric($bth) && $bth > 100 ? $bth : 220;
  96.  
  97. laborator_img_add_size('blog-thumb-1', 790, $blog_thumbnail_height, 4);
  98. laborator_img_add_size('blog-thumb-2', 790, 0, 3);
  99.  
  100. laborator_img_add_size('search-thumb', 70, 70, 1);
  101.  
  102. laborator_img_add_size('gallery-thumb-1', 80, 80, 1);
  103.  
  104. laborator_img_add_size('portfolio-thumb-2', 500, 0, 0);
  105. laborator_img_add_size('portfolio-thumb-3', 940, 0, 0);
  106.  
  107. laborator_img_add_size('portfolio-thumb-1', 550, 387, 4);
  108. laborator_img_add_size('portfolio-thumb-2-cols', 712, 501, 4);
  109. laborator_img_add_size('portfolio-thumb-3-cols', 760, 534, 4);
  110.  
  111.  
  112.  
  113. # Gallery Boxes
  114. new GalleryBox('portfolio_images', array('title' => 'Item Images', 'post_types' => array('portfolio')));
  115.  
  116. # Like Support
  117. if(function_exists('laborator_add_like_support'))
  118. laborator_add_like_support('portfolio');
  119.  
  120.  
  121. # Main Sidebar Widget
  122. $main_sidebar = array(
  123. 'id' => 'main_sidebar',
  124. 'name' => 'Main Sidebar',
  125.  
  126. 'before_widget' => '<div class="menu-widget %2$s %1$s">',
  127. 'after_widget' => '</div>',
  128.  
  129. 'before_title' => '<h2>',
  130. 'after_title' => '</h2>'
  131. );
  132.  
  133. register_sidebar($main_sidebar);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement