PluginProbe
PixTypes / 1.4.14
PixTypes v1.4.14
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.14, at pixtypes.php

64 lines 1.8 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.14
7 * Author: Pixelgrade
8 * Author URI: https://pixelgrade.com
9 * Author Email: contact@pixelgrade.com
10 * Requires at least: 4.9.9
11 * Tested up to: 5.7.0
12 * Text Domain: pixtypes
13 * License: GPL-2.0 or later.
14 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
15 * Domain Path: /lang
16 */
17
18 // If this file is called directly, abort.
19 if ( ! defined( 'WPINC' ) ) {
20 die;
21 }
22
23 // ensure EXT is defined
24 if ( ! defined( 'EXT' ) ) {
25 define( 'EXT', '.php' );
26 }
27
28 require 'core/bootstrap' . EXT;
29
30 $config = include 'plugin-config' . EXT;
31 // set textdomain
32 pixtypes::settextdomain( $config['textdomain'] );
33
34 // Ensure Test Data
35 // ----------------
36
37 $defaults = include 'plugin-defaults' . EXT;
38
39 $current_data = get_option( $config['settings-key'] );
40
41 if ( $current_data === false ) {
42 add_option( $config['settings-key'], $defaults );
43 } else if ( count( array_diff_key( $defaults, $current_data ) ) != 0 ) {
44 $plugindata = array_merge( $defaults, $current_data );
45 update_option( $config['settings-key'], $plugindata );
46 }
47 # else: data is available; do nothing
48
49 // Load Callbacks
50 // --------------
51
52 $basepath = trailingslashit( dirname( __FILE__ ) );
53 $callbackpath = trailingslashit( $basepath . 'callbacks' );
54 pixtypes::require_all( $callbackpath );
55
56 require_once( plugin_dir_path( __FILE__ ) . 'class-pixtypes.php' );
57
58 // Register hooks that are fired when the plugin is activated, deactivated, and uninstalled, respectively.
59 register_activation_hook( __FILE__, array( 'PixTypesPlugin', 'activate' ) );
60 //register_deactivation_hook( __FILE__, array( 'PixTypesPlugin', 'deactivate' ) );
61
62 global $pixtypes_plugin;
63 $pixtypes_plugin = PixTypesPlugin::get_instance( '1.4.14' );
64