Browse Source

CS Fixes

widget
Lee Willis 10 years ago
parent
commit
5a2c4bfeb9
  1. 16
      github-embed.php

16
github-embed.php

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

Loading…
Cancel
Save