Guest User

Untitled

a guest
Jan 20th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. <?php
  2. /**
  3. * MyFirstTheme's functions and definitions
  4. *
  5. * @package MyFirstTheme
  6. * @since MyFirstTheme 1.0
  7. */
  8.  
  9. /**
  10. * First, let's set the maximum content width based on the theme's design and stylesheet.
  11. * This will limit the width of all uploaded images and embeds.
  12. */
  13. if ( ! isset( $content_width ) )
  14. $content_width = 800; /* pixels */
  15.  
  16. if ( ! function_exists( 'activebox_setup' ) ) :
  17. /**
  18. * Sets up theme defaults and registers support for various WordPress features.
  19. *
  20. * Note that this function is hooked into the after_setup_theme hook, which runs
  21. * before the init hook. The init hook is too late for some features, such as indicating
  22. * support post thumbnails.
  23. */
  24. function activebox_setup() {
  25.  
  26. /**
  27. * Make theme available for translation.
  28. * Translations can be placed in the /languages/ directory.
  29. */
  30. load_theme_textdomain( 'activebox', get_template_directory() . '/languages' );
  31.  
  32. /**
  33. * Add default posts and comments RSS feed links to <head>.
  34. */
  35. add_theme_support( 'automatic-feed-links' );
  36.  
  37. /**
  38. * Enable support for post thumbnails and featured images.
  39. */
  40. add_theme_support( 'post-thumbnails' );
  41.  
  42. /**
  43. * Add support for two custom navigation menus.
  44. */
  45.  
  46. register_nav_menus( array(
  47. 'header-menu' => __( 'Header Menu', 'activebox' ),
  48. 'blog-menu' => __( 'Blog-menu', 'activebox' )
  49. ) );
  50.  
  51. /**
  52. * Enable support for the following post formats:
  53. * aside, gallery, quote, image, and video
  54. */
  55. add_theme_support( 'post-formats', array ( 'aside', 'gallery', 'quote', 'image', 'video' ) );
  56. }
  57. endif; // activebox_setup
  58. add_action( 'after_setup_theme', 'activebox_setup' );
  59.  
  60. function add_scripts_and_styles() {
  61. if ( ! is_admin() ) {
  62. // For styles
  63. wp_enqueue_style( 'foundation', get_template_directory_uri() . '/foundation.css', null, null );
  64. wp_enqueue_style( 'style', get_template_directory_uri() . '/style.css', null, null );
  65.  
  66. // For scripts (js)
  67. // wp_enqueue_script( 'global', get_template_directory_uri() . '/js/global.js', null, null, true );
  68. }
  69. }
  70. add_action( 'wp_enqueue_scripts', 'add_scripts_and_styles' );
Add Comment
Please, Sign In to add comment