forked from pelmered/woocommerce-embed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwc-embed.php
74 lines (60 loc) · 2.39 KB
/
wc-embed.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/**
* The WordPress Plugin Boilerplate.
*
* A foundation off of which to build well-documented WordPress plugins that
* also follow WordPress Coding Standards and PHP best practices.
*
* @package WC_Embed
* @author Peter Elmered <[email protected]>, Hans Järvman, Christoffer Rydberg
* @license GPL-2.0+
* @link http://wordpress.org/plugins/woocommerce-embed/
* @copyright 2014 Peter Elmered, Hans Järvman, Christoffer Rydberg
*
* Plugin Name: WooCommerce Embed
* Plugin URI: http://wordpress.org/plugins/woocommerce-embed/
* Description: Embed WooCommerce products
* Version: 1.0.0
* Author: pekz0r, studiogulo, eukaryoter
* Text Domain: wc-embed
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Domain Path: /languages
* GitHub Plugin URI: https://github.com/pelmered/woocommerce-embed
*/
// If this file is called directly, abort.
if (!defined('WPINC'))
{
die;
}
define('WP_EMBED_PLUGIN_PATH', plugin_dir_path(__FILE__));
define('WP_EMBED_PLUGIN_URL', plugins_url('', __FILE__) . '/');
define('WP_EMBED_PLUGIN_NAME', untrailingslashit(plugin_basename(__FILE__)));
if (!class_exists('WC_Embed'))
{
require_once( WP_EMBED_PLUGIN_PATH . 'includes/class-wc-embed.php' );
}
global $wc_embed;
$wc_embed = WC_Embed::get_instance();
/*
* Register hooks that are fired when the plugin is activated or deactivated.
* When the plugin is deleted, the uninstall.php file is loaded.
*/
register_activation_hook(__FILE__, array($wc_embed, 'activate'));
register_deactivation_hook(__FILE__, array($wc_embed, 'deactivate'));
//Loads plugin class (singleton)
add_action('plugins_loaded', array($wc_embed, 'get_instance'));
//Adds action links in the plugins list in WP-Admin
add_filter('plugin_action_links_' . plugin_basename(__FILE__), array($wc_embed, 'action_links'));
/*----------------------------------------------------------------------------*
* Dashboard and Administrative Functionality
*----------------------------------------------------------------------------*/
/*
* The code below is intended to to give the lightest footprint possible.
*/
/*
if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
//require_once( plugin_dir_path( __FILE__ ) . 'admin/class-wc-embed-admin.php' );
//add_action( 'plugins_loaded', array( 'WC_Embed_Admin', 'get_instance' ) );
}
*/