-
Notifications
You must be signed in to change notification settings - Fork 3
/
woo-framework-shortcodes.php
executable file
·40 lines (29 loc) · 1.12 KB
/
woo-framework-shortcodes.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
<?php
if ( ! defined('ABSPATH') ) exit;
/**
* Plugin Name: Woo Framework Shortcodes
* Plugin URI: https://github.com/anandamd/woo-framework-shortcodes
* Description: Easily switch to a non WooThemes theme but retain the framework shortcodes. Use shortcodes from WooFramework in another theme.
* Author: Anand Shah
* License: GPLv2
* Version: 1.0.0
* */
if ( ! class_exists( 'WF_Shortcodes' ) ) {
class WF_Shortcodes {
protected $functions_path;
public function __construct() {
add_action( 'wp_head', array( $this, 'wfs_wp_head' ), 10 );
$this->functions_path = plugin_dir_path( __FILE__ ) . 'functions/';
require_once ( $this->functions_path . 'admin-shortcodes.php' ); // Woo Shortcodes
// Load certain files only in the WordPress admin.
if ( is_admin() ) {
require_once( $this->functions_path . 'admin-shortcode-generator.php' ); // Framework Shortcode generator // 2011-01-21.
}
}
public function wfs_wp_head() {
if ( function_exists( 'woo_shortcode_stylesheet' ) )
woo_shortcode_stylesheet();
} // End wfs_wp_head()
} //end class
new WF_Shortcodes();
}