lctv_badges_init.php 973 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Initialize Livecoding.tv Badges.
  4. *
  5. * @package LCTVBadges\Initialize
  6. * @since 0.0.3
  7. */
  8. /** Check if script is accessed directly. */
  9. if ( basename( __FILE__ ) == basename( $_SERVER['SCRIPT_FILENAME'] ) ) {
  10. exit();
  11. }
  12. /** Set client id. */
  13. define( 'LCTV_CLIENT_ID', getenv( 'LCTV_CLIENT_ID' ) );
  14. /** Set client secret. */
  15. define( 'LCTV_CLIENT_SECRET', getenv( 'LCTV_CLIENT_SECRET' ) );
  16. /** Set API redirect url. */
  17. define( 'LCTV_REDIRECT_URL', 'http://example.com/authorize.php' );
  18. /** Set master account name to access public api information. */
  19. define( 'LCTV_MASTER_USER', 'username' );
  20. /**
  21. * Set path for flat file data storage.
  22. * Default set in LCTVAPI.php: __DIR__
  23. */
  24. //define( 'LCTVAPI_DATA_PATH', __DIR__ . '/data/' );
  25. /**
  26. * Set cache expire time.
  27. * Default set in LCTVAPI.php: 300
  28. */
  29. //define( 'LCTVAPI_CACHE_EXPIRES_IN', 300 );
  30. /** LCTV API */
  31. require_once( 'LCTVAPI.php' );
  32. /** Badge svg creator. */
  33. require_once( 'lctv_badges_svg.php' );