PageRenderTime 45ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/nonus/functions.php

https://github.com/alniko009/magic
PHP | 52 lines | 31 code | 15 blank | 6 comment | 1 complexity | 5ca42af5221afc600fdda4940ef8038a MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1
  1. <?php
  2. require_once get_template_directory() . '/framework/createit/ctThemeLoader.php';
  3. $c = new ctThemeLoader();
  4. $c->init('nonus');
  5. function roots_setup() {
  6. if (function_exists('wpcf7_ajax_loader')) {
  7. add_filter('wpcf7_ajax_loader', 'wap8_wpcf7_ajax_loader');
  8. function wap8_wpcf7_ajax_loader() {
  9. $url = get_template_directory_uri() . '/assets/img/loading.gif';
  10. return $url;
  11. }
  12. }
  13. // Make theme available for translation
  14. load_theme_textdomain('ct_theme', get_template_directory() . '/lang');
  15. // Add default posts and comments RSS feed links to <head>.
  16. add_theme_support('automatic-feed-links');
  17. // Add post thumbnails (http://codex.wordpress.org/Post_Thumbnails)
  18. add_theme_support('post-thumbnails');
  19. add_theme_support('post-formats', array('aside', 'gallery', 'link', 'image', 'quote', 'video', 'audio'));
  20. add_theme_support('custom-header');
  21. //add size for portfolio items
  22. add_image_size('thumb_4_cols', 220, 161, true);
  23. add_image_size('thumb_3_cols', 300, 220, true);
  24. add_image_size('thumb_2_cols', 460, 337, true);
  25. add_image_size('thumb_work_slide', 300, 220, true);
  26. //add size for post items
  27. add_image_size('thumb_square', 240, 210, true);
  28. //gallery
  29. add_image_size('gallery_thumb_2', 570, 350, true);
  30. add_image_size('gallery_thumb_3', 370, 227, true);
  31. add_image_size('gallery_thumb_4', 270, 166, true);
  32. add_image_size('gallery_thumb_6', 170, 104, true);
  33. require_once CT_THEME_SETTINGS_MAIN_DIR . '/options/ctCustomizeManagerHandler.class.php';
  34. new ctCustomizeManagerHandler();
  35. }
  36. add_action('after_setup_theme', 'roots_setup');
  37. require_once 'theme/theme_functions.php';