wp-nested-pages
Last commit date
app
1 year ago
assets
1 year ago
languages
6 years ago
vendor
7 years ago
composer.json
5 years ago
nestedpages.php
1 year ago
readme.txt
1 year ago
nestedpages.php
58 lines
| 1 | <?php |
| 2 | /* |
| 3 | Plugin Name: Nested Pages |
| 4 | Plugin URI: http://nestedpages.com |
| 5 | Description: Provides an intuitive drag and drop interface for managing pages in the Wordpress admin, while enhancing quick edit. Includes an auto-generated menu to match the nested interface, support for all post types and more. |
| 6 | Version: 3.2.12 |
| 7 | Tested up to: 6.7 |
| 8 | Author: Kyle Phillips |
| 9 | Author URI: https://github.com/kylephillips |
| 10 | Text Domain: wp-nested-pages |
| 11 | Domain Path: /languages/ |
| 12 | License: GPLv2 or later. |
| 13 | Copyright: Kyle Phillips |
| 14 | */ |
| 15 | |
| 16 | /* Copyright 2025 Kyle Phillips (email : support@nestedpages.com) |
| 17 | |
| 18 | This program is free software; you can redistribute it and/or modify |
| 19 | it under the terms of the GNU General Public License, version 2, as |
| 20 | published by the Free Software Foundation. |
| 21 | |
| 22 | This program is distributed in the hope that it will be useful, |
| 23 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 24 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 25 | GNU General Public License for more details. |
| 26 | |
| 27 | You should have received a copy of the GNU General Public License |
| 28 | along with this program; if not, write to the Free Software |
| 29 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 30 | */ |
| 31 | |
| 32 | /** |
| 33 | * Check Wordpress and PHP versions before instantiating plugin |
| 34 | */ |
| 35 | register_activation_hook( __FILE__, 'nestedpages_check_versions' ); |
| 36 | function nestedpages_check_versions( $wp = '3.9', $php = '5.4.0' ) { |
| 37 | global $wp_version; |
| 38 | if ( version_compare( PHP_VERSION, $php, '<' ) ) $flag = 'PHP'; |
| 39 | elseif ( version_compare( $wp_version, $wp, '<' ) ) $flag = 'WordPress'; |
| 40 | else return; |
| 41 | $version = 'PHP' == $flag ? $php : $wp; |
| 42 | |
| 43 | if (function_exists('deactivate_plugins')){ |
| 44 | deactivate_plugins( basename( __FILE__ ) ); |
| 45 | } |
| 46 | |
| 47 | wp_die('<p>The <strong>Nested Pages</strong> plugin requires'.$flag.' version '.$version.' or greater.</p>','Plugin Activation Error', array( 'response'=>200, 'back_link'=>TRUE ) ); |
| 48 | } |
| 49 | |
| 50 | if( !class_exists('Bootstrap') ) : |
| 51 | define('NESTEDPAGES_DIR', __DIR__); |
| 52 | define('NESTEDPAGES_URI', __FILE__); |
| 53 | |
| 54 | nestedpages_check_versions(); |
| 55 | require_once(NESTEDPAGES_DIR . '/vendor/autoload.php'); |
| 56 | require_once(NESTEDPAGES_DIR . '/app/NestedPages.php'); |
| 57 | NestedPages::init(); |
| 58 | endif; |