twentyfifteen.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Jetpack Compatibility File
  4. * See: http://jetpack.com/
  5. */
  6. function twentyfifteen_jetpack_setup() {
  7. /**
  8. * Add theme support for Responsive Videos.
  9. */
  10. add_theme_support( 'jetpack-responsive-videos' );
  11. /**
  12. * Add theme support for geo-location.
  13. */
  14. add_theme_support( 'jetpack-geo-location' );
  15. }
  16. add_action( 'after_setup_theme', 'twentyfifteen_jetpack_setup' );
  17. function twentyfifteen_init_jetpack() {
  18. /**
  19. * Add our compat CSS file for custom widget stylings and such.
  20. * Set the version equal to filemtime for development builds, and the JETPACK__VERSION for production
  21. * or skip it entirely for wpcom.
  22. */
  23. if ( ! is_admin() ) {
  24. $version = false;
  25. if ( method_exists( 'Jetpack', 'is_development_version' ) ) {
  26. $version = Jetpack::is_development_version() ? filemtime( plugin_dir_path( __FILE__ ) . 'twentyfifteen.css' ) : JETPACK__VERSION;
  27. }
  28. wp_enqueue_style( 'twentyfifteen-jetpack', plugins_url( 'twentyfifteen.css', __FILE__ ), array(), $version );
  29. wp_style_add_data( 'twentyfifteen-jetpack', 'rtl', 'replace' );
  30. }
  31. }
  32. add_action( 'init', 'twentyfifteen_init_jetpack' );