codepress-admin-columns
Last commit date
assets
5 years ago
classes
5 years ago
config
5 years ago
languages
5 years ago
templates
5 years ago
api.php
5 years ago
codepress-admin-columns.php
5 years ago
readme.txt
5 years ago
codepress-admin-columns.php
73 lines
| 1 | <?php |
| 2 | /* |
| 3 | Plugin Name: Admin Columns |
| 4 | Version: 4.3.2 |
| 5 | Description: Customize columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface. |
| 6 | Author: AdminColumns.com |
| 7 | Author URI: https://www.admincolumns.com |
| 8 | Plugin URI: https://www.admincolumns.com |
| 9 | Requires PHP: 5.6.20 |
| 10 | Text Domain: codepress-admin-columns |
| 11 | Domain Path: /languages |
| 12 | License: GPL v3 |
| 13 | |
| 14 | Admin Columns Plugin |
| 15 | Copyright (C) 2011-2021, Admin Columns - info@admincolumns.com |
| 16 | This program is free software: you can redistribute it and/or modify |
| 17 | it under the terms of the GNU General Public License as published by |
| 18 | the Free Software Foundation, either version 3 of the License, or |
| 19 | (at your option) any later version. |
| 20 | |
| 21 | This program is distributed in the hope that it will be useful, |
| 22 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 24 | GNU General Public License for more details. |
| 25 | |
| 26 | You should have received a copy of the GNU General Public License |
| 27 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 28 | */ |
| 29 | |
| 30 | if ( ! defined( 'ABSPATH' ) ) { |
| 31 | exit; |
| 32 | } |
| 33 | |
| 34 | if ( ! is_admin() ) { |
| 35 | return; |
| 36 | } |
| 37 | |
| 38 | define( 'AC_FILE', __FILE__ ); |
| 39 | define( 'AC_VERSION', '4.3.2' ); |
| 40 | |
| 41 | require_once __DIR__ . '/classes/Dependencies.php'; |
| 42 | |
| 43 | add_action( 'after_setup_theme', function () { |
| 44 | $dependencies = new AC\Dependencies( plugin_basename( AC_FILE ), AC_VERSION ); |
| 45 | $dependencies->requires_php( '5.6.20' ); |
| 46 | |
| 47 | if ( $dependencies->has_missing() ) { |
| 48 | return; |
| 49 | } |
| 50 | |
| 51 | require_once __DIR__ . '/api.php'; |
| 52 | require_once __DIR__ . '/classes/Autoloader.php'; |
| 53 | |
| 54 | $class_map = __DIR__ . '/config/autoload-classmap.php'; |
| 55 | |
| 56 | if ( is_readable( $class_map ) ) { |
| 57 | AC\Autoloader::instance()->register_class_map( require $class_map ); |
| 58 | } else { |
| 59 | AC\Autoloader::instance()->register_prefix( 'AC', __DIR__ . '/classes' ); |
| 60 | } |
| 61 | |
| 62 | AC\Autoloader\Underscore::instance() |
| 63 | ->add_alias( 'AC\ListScreen', 'AC_ListScreen' ) |
| 64 | ->add_alias( 'AC\Settings\FormatValue', 'AC_Settings_FormatValueInterface' ) |
| 65 | ->add_alias( 'AC\Column\Media\MediaParent', 'AC_Column_Media_Parent' ) |
| 66 | ->add_alias( 'AC\Column\Post\PostParent', 'AC_Column_Post_Parent' ); |
| 67 | |
| 68 | /** |
| 69 | * For loading external resources, e.g. column settings. |
| 70 | * Can be called from plugins and themes. |
| 71 | */ |
| 72 | do_action( 'ac/ready', AC() ); |
| 73 | }, 1 ); |