PluginProbe
PixTypes / 1.4.5
PixTypes v1.4.5
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.5, at pixtypes.php

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