Changeset 10410 for sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/lib/class-github.php
- Timestamp:
- 10/27/2020 02:41:36 AM (5 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/lib/class-github.php
r10409 r10410 1 1 <?php 2 namespace WordPressdotorg\ Plugin_Directory\Clients;2 namespace WordPressdotorg\Theme_Directory\Lib; 3 3 use Ahc\Jwt\JWT; 4 4 5 5 /** 6 * Simple GitHub client.6 * Simple GitHub API client. 7 7 * 8 * @package WordPressdotorg\ Plugin_Directory\Clients8 * @package WordPressdotorg\Theme_Directory 9 9 */ 10 10 class GitHub { … … 12 12 public static function api( $url, $args = null, $headers = [], $method = null ) { 13 13 // Verify the configuration variables are available. 14 // This re-uses the Plugin Directory constants deliberately. 14 15 if ( ! defined( 'PLUGIN_GITHUB_APP_ID' ) || ! defined( 'PLUGIN_GITHUB_APP_PRIV_KEY' ) ) { 15 16 return false; … … 20 21 $url = 'https://api.github.com' . $url; 21 22 } 22 23 23 24 $request = wp_remote_request( 24 25 $url, … … 105 106 // This should be replaced with an Autoloader. 106 107 if ( ! class_exists( 'Ahc\Jwt\JWT' ) ) { 107 require_once dirname( __DIR__ ) . '/libs/adhocore-php-jwt/JWTException.php';108 require_once dirname( __DIR__ ) . '/libs/adhocore-php-jwt/ValidatesJWT.php';109 require_once dirname( __DIR__ ) . '/libs/adhocore-php-jwt/JWT.php';108 require_once __DIR__ . '/adhocore-php-jwt/JWTException.php'; 109 require_once __DIR__ . '/adhocore-php-jwt/ValidatesJWT.php'; 110 require_once __DIR__ . '/adhocore-php-jwt/JWT.php'; 110 111 } 111 112
Note: See TracChangeset
for help on using the changeset viewer.