-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwppf.php
52 lines (43 loc) · 1.71 KB
/
wppf.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
<?php
/*
Plugin Name: WordPress Plugin Framework
Plugin URI: http://github.com/StrangeWind/wppf
Description: A Starting Point for WordPress Plugins
Version: 1.0
Author: Strange Wind Studio
Author URI: http://github.com/StrangeWind
License: GPL2
*/
//define base name. should equal 'wppf', but this accounts for user changing plugin folder name.
$wppf_root = dirname( plugin_basename( __FILE__ ) );
//load textdomain for translations
load_plugin_textdomain( 'wppf', false, $wppf_root . '/lib/languages/' );
//define paths
define( 'WPPF_ROOT', WP_PLUGIN_DIR . '/' . $wppf_root );
define( 'WPPF_LIB', WPPF_ROOT . '/lib' );
define( 'WPPF_ADMIN', WPPF_LIB . '/admin' );
define( 'WPPF_CSS', WPPF_LIB . '/css' );
define( 'WPPF_IMAGES', WPPF_LIB . '/images' );
define( 'WPPF_FUNCTIONS', WPPF_LIB . '/functions' );
define( 'WPPF_JS', WPPF_LIB . '/js' );
//define urls
define( 'WPPF_ROOT_URL', plugins_url( $wppf_root ) );
define( 'WPPF_CSS_URL', WPPF_ROOT_URL . '/lib/css' );
define( 'WPPF_IMAGES_URL', WPPF_ROOT_URL . '/lib/images' );
define( 'WPPF_JS_URL', WPPF_ROOT_URL . '/lib/js' );
//define wppf version
define( 'WPPF_VERSION', '1.0' );
//define license, if needed for auto-updates
// define( 'WPPF_LICENSE', 'single-site' );
// define( 'WPPF_LICENSE', 'unlimited' );
//require files
require_once( WPPF_ADMIN . '/menu.php' );
require_once( WPPF_ADMIN . '/settings.php' );
require_once( WPPF_FUNCTIONS . '/magic.php' );
require_once( WPPF_FUNCTIONS . '/activate.php' );
//REFER TO /lib/functions/update.php BEFORE UNCOMMENTING!
//require_once( WPPF_FUNCTIONS . '/update.php' );
//handle activation & deactivation
register_activation_hook( __FILE__, 'wppf_activate' );
register_deactivation_hook( __FILE__, 'wppf_deactivate' );
//end wppf.php