|
|
|
@ -53,11 +53,11 @@ class github_embed {
|
|
|
|
|
|
|
|
|
|
$this->api = $api; |
|
|
|
|
|
|
|
|
|
add_action ( 'init', array ( $this, 'register_oembed_handler' ) ); |
|
|
|
|
add_action ( 'init', array ( $this, 'maybe_handle_oembed' ) ); |
|
|
|
|
add_action ( 'wp_enqueue_scripts', array ( $this, 'enqueue_styles' ) ); |
|
|
|
|
add_action ( 'admin_init', array ( $this, 'schedule_expiry' ) ); |
|
|
|
|
add_action ( 'github_embed_cron', array ( $this, 'cron' ) ); |
|
|
|
|
add_action( 'init', array ( $this, 'register_oembed_handler' ) ); |
|
|
|
|
add_action( 'init', array( $this, 'maybe_handle_oembed' ) ); |
|
|
|
|
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) ); |
|
|
|
|
add_action( 'admin_init', array( $this, 'schedule_expiry' ) ); |
|
|
|
|
add_action( 'github_embed_cron', array( $this, 'cron' ) ); |
|
|
|
|
|
|
|
|
|
// @TODO i18n |
|
|
|
|
|
|
|
|
@ -121,10 +121,10 @@ class github_embed {
|
|
|
|
|
*/ |
|
|
|
|
public function register_oembed_handler() { |
|
|
|
|
|
|
|
|
|
$oembed_url = home_url (); |
|
|
|
|
$oembed_url = home_url(); |
|
|
|
|
$key = $this->get_key(); |
|
|
|
|
$oembed_url = add_query_arg ( array ( 'github_oembed' => $key ), $oembed_url); |
|
|
|
|
wp_oembed_add_provider ( '#https?://github.com/.*#i', $oembed_url, true ); |
|
|
|
|
$oembed_url = add_query_arg( array( 'github_oembed' => $key ), $oembed_url ); |
|
|
|
|
wp_oembed_add_provider( '#https?://github.com/.*#i', $oembed_url, true ); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|