PluginProbe
PixTypes / 1.4.9
PixTypes v1.4.9
2.0.2 trunk 1.3.5 1.4.10 1.4.11 1.4.12 1.4.13 1.4.14 1.4.15 1.4.16 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 2.0.0 2.0.1
pixtypes / pixtypes.php

pixtypes.php in PixTypes 1.4.9, at pixtypes.php

60 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Plugin Name: PixTypes
4 * Plugin URI: https://wordpress.org/plugins/pixtypes/
5 * Description: Custom post types and meta-boxes needed by your themes.
6 * Version: 1.4.9
7 * Author URI: https://pixelgrade.com
8 * Author Email: hello@pixelgrade.com
9 * License: GPL2+
10 * Text Domain: pixtypes
11 * Domain Path: /lang/
12 */
13
14 // If this file is called directly, abort.
15 if ( ! defined( 'WPINC' ) ) {
16 die;
17 }
18
19 // ensure EXT is defined
20 if ( ! defined( 'EXT' ) ) {
21 define( 'EXT', '.php' );
22 }
23
24 require 'core/bootstrap' . EXT;
25
26 $config = include 'plugin-config' . EXT;
27 // set textdomain
28 pixtypes::settextdomain( $config['textdomain'] );
29
30 // Ensure Test Data
31 // ----------------
32
33 $defaults = include 'plugin-defaults' . EXT;
34
35 $current_data = get_option( $config['settings-key'] );
36
37 if ( $current_data === false ) {
38 add_option( $config['settings-key'], $defaults );
39 } else if ( count( array_diff_key( $defaults, $current_data ) ) != 0 ) {
40 $plugindata = array_merge( $defaults, $current_data );
41 update_option( $config['settings-key'], $plugindata );
42 }
43 # else: data is available; do nothing
44
45 // Load Callbacks
46 // --------------
47
48 $basepath = trailingslashit( dirname( __FILE__ ) );
49 $callbackpath = trailingslashit( $basepath . 'callbacks' );
50 pixtypes::require_all( $callbackpath );
51
52 require_once( plugin_dir_path( __FILE__ ) . 'class-pixtypes.php' );
53
54 // Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
55 register_activation_hook( __FILE__, array( 'PixTypesPlugin', 'activate' ) );
56 //register_deactivation_hook( __FILE__, array( 'PixTypesPlugin', 'deactivate' ) );
57
58 global $pixtypes_plugin;
59 $pixtypes_plugin = PixTypesPlugin::get_instance( '1.4.9' );
60