Exemple #1
0
 /**
  * Returns the plugin's object instance.
  *
  * @return self The plugin object instance.
  */
 public static function get_instance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Exemple #2
0
 /**
  * Return the plugin instance.
  *
  * @return WP_API_oEmbed_Plugin
  */
 function plugin()
 {
     return WP_API_oEmbed_Plugin::get_instance();
 }
/**
 * Init our plugin.
 */
function oembed_api_init()
{
    $oembed_api = WP_API_oEmbed_Plugin::get_instance();
    $oembed_api->add_hooks();
}