PluginProbe
Dashboard Columns / trunk
Dashboard Columns vtrunk
trunk 1.3.0 1.3.1
dashboard-columns / dashboard-columns.php

dashboard-columns.php in Dashboard Columns trunk, at dashboard-columns.php

104 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin Name: Dashboard Columns
4 * Plugin URI: https://wordpress.org/plugins/dashboard-columns
5 * Author: Polygon Themes
6 * Author URI: https://polygonthemes.com
7 * Description: Easily change the number of dashboard columns from Screen Options.
8 * Version: 1.3.1
9 * Requires PHP: 7.4
10 * Requires at least: 5.8
11 *
12 * Text Domain: dashboard-columns
13 * Domain Path: /languages/
14 *
15 * License: GPLv3 or later
16 * License URI: https://choosealicense.com/licenses/gpl-3.0
17 *
18 * This program is free software.
19 * You can redistribute it and/or modify it under the terms of GNU General Public License,
20 * as published by the Free Software Foundation, either version 3 of the License, or any later version.
21 *
22 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
23 * Without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 * For more details, see the GNU General Public License.
25 *
26 * @since 1.0.0
27 * @package Dashboard_Columns
28 */
29
30 defined( 'ABSPATH' ) || exit;
31
32
33
34
35
36 define( 'DASHBOARD_COLUMNS_VERSION', '1.3.1' );
37 define( 'DASHBOARD_COLUMNS_SLUG', 'dashboard-columns' );
38
39 define( 'DASHBOARD_COLUMNS_FILE', __FILE__ );
40 define( 'DASHBOARD_COLUMNS_DIR_URL', plugin_dir_url( __FILE__ ) );
41 define( 'DASHBOARD_COLUMNS_DIR_PATH', plugin_dir_path( __FILE__ ) );
42
43 define( 'DASHBOARD_COLUMNS_MIN_PHP_VERSION', '7.4' );
44 define( 'DASHBOARD_COLUMNS_REC_PHP_VERSION', '8.4' );
45
46
47
48
49
50 /**
51 * Code that runs during the plugin activation.
52 *
53 * @since 1.0.0
54 * @param bool $network_wide Boolean value with the network-wide activation status.
55 */
56 function activate_dashboard_columns( $network_wide ) {
57 require_once DASHBOARD_COLUMNS_DIR_PATH . 'includes/class-dashboard-columns-activator.php';
58 Dashboard_Columns_Activator::activate( $network_wide );
59 }
60 register_activation_hook( DASHBOARD_COLUMNS_FILE, 'activate_dashboard_columns' );
61
62
63
64
65
66 /**
67 * Code that runs during the plugin deactivation.
68 *
69 * @since 1.0.0
70 * @param bool $network_wide Boolean value with the network-wide activation status.
71 */
72 function deactivate_dashboard_columns( $network_wide ) {
73 require_once DASHBOARD_COLUMNS_DIR_PATH . 'includes/class-dashboard-columns-deactivator.php';
74 Dashboard_Columns_Deactivator::deactivate( $network_wide );
75 }
76 register_deactivation_hook( DASHBOARD_COLUMNS_FILE, 'deactivate_dashboard_columns' );
77
78
79
80
81
82 /**
83 * Load and execute if all requirements are met.
84 *
85 * @since 1.0.0
86 */
87 function run_dashboard_columns() {
88 require_once DASHBOARD_COLUMNS_DIR_PATH . 'includes/class-dashboard-columns.php';
89 require_once DASHBOARD_COLUMNS_DIR_PATH . 'includes/class-dashboard-columns-textdomain.php';
90 require_once DASHBOARD_COLUMNS_DIR_PATH . 'includes/class-dashboard-columns-requirements.php';
91
92 $textdomain = new Dashboard_Columns_Textdomain();
93 $textdomain->init();
94
95 $requirements = new Dashboard_Columns_Requirements();
96 $requirements->init();
97
98 if ( $requirements->check() ) {
99 $plugin = new Dashboard_Columns();
100 $plugin->run();
101 }
102 }
103 add_action( 'plugins_loaded', 'run_dashboard_columns' );
104