WP updates

This commit is contained in:
Matias Griese
2015-04-21 12:51:27 +03:00
parent 661a1250ce
commit e2a8d4289b
6 changed files with 18 additions and 51 deletions
+8 -18
View File
@@ -58,32 +58,22 @@ if [ -f $GIT_TARGET/configuration.php ]; then
elif [ -f $GIT_TARGET/wp-config.php ]; then
PLATFORM=WordPress
sources=(
'platforms/wordpress/gantryadmin'
# Admin
'platforms/wordpress/gantry5'
'platforms/common'
'src'
'vendor'
# Themes
'themes/hydrogen/wordpress'
'themes/hydrogen/common'
'themes/hydrogen-demo/wordpress'
'themes/hydrogen-demo/common'
'themes/gantry/wordpress'
'themes/gantry/common'
'src'
'vendor'
)
targets=(
'wp-content/plugins/gantryadmin'
'wp-content/plugins/gantryadmin/common'
'wp-content/plugins/gantryadmin/src'
'wp-content/plugins/gantryadmin/vendor'
# Admin
'wp-content/plugins/gantry5'
'wp-content/plugins/gantry5/common'
'wp-content/plugins/gantry5/src'
# Themes
'wp-content/themes/hydrogen'
'wp-content/themes/hydrogen/common'
'wp-content/themes/hydrogen/src'
'wp-content/themes/hydrogen/vendor'
'wp-content/themes/hydrogen-demo'
'wp-content/themes/hydrogen-demo/common'
'wp-content/themes/hydrogen-demo/src'
'wp-content/themes/hydrogen-demo/vendor'
)
elif [ -f $GIT_TARGET/system/config/system.yaml ]; then
PLATFORM=Grav
@@ -1,8 +1,8 @@
<?php
/**
* Plugin Name: Gantry 5 Admin
* Plugin Name: Gantry 5 Framework
* Plugin URI: //http://gantry-framework.org/
* Description: Administrate Gantry 5 based templates.
* Description: Framework for Gantry 5 based templates.
* Version: 5.0
* Author: RocketTheme
* Author URI: http://www.rockettheme.com/
@@ -10,10 +10,13 @@
*/
defined( 'ABSPATH' ) or die;
require_once __DIR__ . '/src/Loader.php';
if ( !is_admin() ) {
return;
}
if (!defined('GANTRYADMIN_PATH')) {
define('GANTRYADMIN_PATH', rtrim(WP_PLUGIN_DIR, '/\\') . '/gantryadmin');
// Works also with symlinks.
define('GANTRYADMIN_PATH', rtrim(WP_PLUGIN_DIR, '/\\') . '/gantry5');
}
@@ -1,14 +0,0 @@
schemes:
gantry-admin:
type: ReadOnlyStream
prefixes:
'':
- wp-content/plugins/gantryadmin
- wp-content/plugins/gantryadmin/common
- templates/gantry
'assets':
- wp-content/plugins/gantryadmin
- wp-content/plugins/gantryadmin/common
- templates/gantry
- templates/gantry/common
+4 -16
View File
@@ -5,24 +5,12 @@ use Gantry\Framework\Gantry;
try {
// Attempt to locate Gantry Framework if it hasn't already been loaded.
if ( !class_exists( 'Gantry' ) ) {
$paths = array(
__DIR__ . '/../src/bootstrap.php', // Look if Gantry has been included to the template.
WP_CONTENT_DIR . '/themes/gantry/src/bootstrap.php' // Finally look from the default gantry template.
);
foreach ( $paths as $path ) {
if ( $path && is_file( $path ) ) {
$bootstrap = $path;
}
}
if ( !$bootstrap ) {
throw new LogicException( 'Gantry Framework not found!' );
}
require_once $bootstrap;
if ( !class_exists( 'Gantry5\\Loader' ) ) {
throw new LogicException( 'Gantry Framework not found!' );
}
Gantry5\Loader::setup();
// Get Gantry instance.
$gantry = Gantry::instance();