Version Description
- Cart66 support added to compatibility gizmo
- Shopp plugin compatibility fix
- Fixed parseQueryString method on override widgets that wasn't allowing the "+" caracther in text
- Google Web Fonts should now use proper protocol when SSL detected
- Filter in Title gizmo should now have all required parameters
- Changed the way how Gantry outputs header and footer which can solve potential issues with scripts and regular expressions
- Gantry Menu cache should now respect the get_locale();
- Other minor improvements
Download this release
Release Info
Developer | gantry |
Plugin | Gantry 4 Framework |
Version | 4.0.6 |
Comparing to | |
See all releases |
Code changes from version 4.0.5 to 4.0.6
- CHANGELOG.php +11 -1
- admin/forms/fields/html.php +4 -1
- admin/forms/fields/imagepicker.php +1 -1
- admin/forms/fields/updater.php +1 -1
- admin/widgets/colorchooser/css/mooRainbow-2.0.css +1 -1
- admin/widgets/gantry-widgets.js +4 -2
- core/gantry.class.php +9 -12
- core/gantrybodylayout.class.php +78 -1
- core/gantrylayout.class.php +2 -2
- core/utilities/gantrycache.class.php +2 -2
- functions.php +1 -1
- gantry.php +1 -1
- gizmos/compatibility.php +9 -1
- gizmos/font.php +2 -1
- gizmos/title.php +5 -5
- languages/gantry-en_US.mo +0 -0
- languages/gantry-en_US.po +10 -1
- languages/gantry.pot +10 -1
- readme.txt +14 -1
- widgets/breadcrumbs.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuNode.php +39 -1
- widgets/gantrymenu/libs/providers/GantryMenuProviderWordpress.php +16 -2
- widgets/loginbutton.php +1 -1
- widgets/loginform.php +1 -1
CHANGELOG.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Gantry For Wordpress
|
4 |
*
|
5 |
-
* @version $Id: CHANGELOG.php
|
6 |
* @author RocketTheme http://www.rockettheme.com
|
7 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
8 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
@@ -27,6 +27,16 @@ Legend:
|
|
27 |
- -> Removed
|
28 |
! -> Note
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
------- 4.0.5 Release [] ------
|
31 |
# Fixed Google WebFonts and breaking fonts caused by s: and g: added to font body class
|
32 |
+ You can now keep your Gantry Framework translation files (.mo) in the WordPress languages directory ie. wp-content/languages/gantry/
|
2 |
/**
|
3 |
* Gantry For Wordpress
|
4 |
*
|
5 |
+
* @version $Id: CHANGELOG.php 59701 2013-05-17 21:43:33Z jakub $
|
6 |
* @author RocketTheme http://www.rockettheme.com
|
7 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
8 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
27 |
- -> Removed
|
28 |
! -> Note
|
29 |
|
30 |
+
------- 4.0.6 Release [] ------
|
31 |
+
+ Cart66 support added to compatibility gizmo
|
32 |
+
# Shopp plugin compatibility fix
|
33 |
+
# Fixed parseQueryString method on override widgets that wasn't allowing the "+" caracther in text
|
34 |
+
# Google Web Fonts should now use proper protocol when SSL detected
|
35 |
+
# Filter in Title gizmo should now have all required parameters
|
36 |
+
# Changed the way how Gantry outputs header and footer which can solve potential issues with scripts and regular expressions
|
37 |
+
^ Gantry Menu cache should now respect the get_locale();
|
38 |
+
^ Other minor improvements
|
39 |
+
|
40 |
------- 4.0.5 Release [] ------
|
41 |
# Fixed Google WebFonts and breaking fonts caused by s: and g: added to font body class
|
42 |
+ You can now keep your Gantry Framework translation files (.mo) in the WordPress languages directory ie. wp-content/languages/gantry/
|
admin/forms/fields/html.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version $Id: html.php
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
@@ -35,6 +35,9 @@ class GantryFormFieldHTML extends GantryFormField
|
|
35 |
// preview
|
36 |
$html = str_replace("{template_preview}", $gantry->templateUrl . '/screenshot.png', $html);
|
37 |
|
|
|
|
|
|
|
38 |
return "<div class='html'>" . $html . "</div>";
|
39 |
}
|
40 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version $Id: html.php 59671 2013-05-06 13:14:15Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
35 |
// preview
|
36 |
$html = str_replace("{template_preview}", $gantry->templateUrl . '/screenshot.png', $html);
|
37 |
|
38 |
+
// preview big
|
39 |
+
$html = str_replace("{template_preview_big}", $gantry->templateUrl . '/template-thumb-big.png', $html);
|
40 |
+
|
41 |
return "<div class='html'>" . $html . "</div>";
|
42 |
}
|
43 |
|
admin/forms/fields/imagepicker.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version 4.0.
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version 4.0.6 May 17, 2013
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
admin/forms/fields/updater.php
CHANGED
@@ -27,7 +27,7 @@ class GantryFormFieldUpdater extends GantryFormField
|
|
27 |
|
28 |
$currentVersion = GANTRY_VERSION;
|
29 |
|
30 |
-
if ($currentVersion == "\4.0.
|
31 |
|
32 |
// curl check
|
33 |
if (!function_exists('curl_version')) {
|
27 |
|
28 |
$currentVersion = GANTRY_VERSION;
|
29 |
|
30 |
+
if ($currentVersion == "\4.0.6") $currentVersion = "[DEV]";
|
31 |
|
32 |
// curl check
|
33 |
if (!function_exists('curl_version')) {
|
admin/widgets/colorchooser/css/mooRainbow-2.0.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* @version 4.0.
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
1 |
/**
|
2 |
+
* @version 4.0.6 May 17, 2013
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
admin/widgets/gantry-widgets.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/**
|
2 |
-
* @version $Id: gantry-widgets.js
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
@@ -476,8 +476,10 @@ String.implement({
|
|
476 |
if (vars.length) vars.each(function(val){
|
477 |
var index = val.indexOf('='),
|
478 |
keys = index < 0 ? [''] : val.substr(0, index).match(/[^\]\[]+/g),
|
479 |
-
value =
|
480 |
obj = res;
|
|
|
|
|
481 |
keys.each(function(key, i){
|
482 |
key = decodeURIComponent(key);
|
483 |
var current = obj[key];
|
1 |
/**
|
2 |
+
* @version $Id: gantry-widgets.js 59698 2013-05-17 18:08:39Z djamil $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
476 |
if (vars.length) vars.each(function(val){
|
477 |
var index = val.indexOf('='),
|
478 |
keys = index < 0 ? [''] : val.substr(0, index).match(/[^\]\[]+/g),
|
479 |
+
value = val.substr(index + 1).replace(/\+/g, " "),
|
480 |
obj = res;
|
481 |
+
|
482 |
+
value = decodeURIComponent(value);
|
483 |
keys.each(function(key, i){
|
484 |
key = decodeURIComponent(key);
|
485 |
var current = obj[key];
|
core/gantry.class.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version $Id: gantry.class.php
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
@@ -1045,7 +1045,7 @@ class Gantry
|
|
1045 |
$path = '/' . preg_replace('#^' . quotemeta($this->baseUrl) . '#', "", $path);
|
1046 |
}
|
1047 |
$filename = strtolower(basename($path, '.css')) . rand(0, 1000);
|
1048 |
-
wp_enqueue_style($filename, $path, array(), '4.0.
|
1049 |
$deps[] = $path;
|
1050 |
}
|
1051 |
}
|
@@ -1058,11 +1058,11 @@ class Gantry
|
|
1058 |
if ($this->baseUrl != "/") {
|
1059 |
$path = '/' . preg_replace('#^' . quotemeta($this->baseUrl) . '#', "", $path);
|
1060 |
}
|
1061 |
-
wp_enqueue_script($path, $path, $deps, '4.0.
|
1062 |
$deps[] = $path;
|
1063 |
}
|
1064 |
foreach ($this->_full_scripts as $strSrc) {
|
1065 |
-
wp_enqueue_script($strSrc, $strSrc, $deps, '4.0.
|
1066 |
$deps[] = $strSrc;
|
1067 |
}
|
1068 |
|
@@ -1087,7 +1087,7 @@ class Gantry
|
|
1087 |
$strHtml .= $this->_renderScriptsHead();
|
1088 |
}
|
1089 |
|
1090 |
-
$output =
|
1091 |
}
|
1092 |
|
1093 |
/**
|
@@ -1098,7 +1098,7 @@ class Gantry
|
|
1098 |
ob_start();
|
1099 |
if (!$this->isAdmin()) wp_footer();
|
1100 |
$strHtml = ob_get_clean();
|
1101 |
-
$output =
|
1102 |
}
|
1103 |
|
1104 |
/**
|
@@ -1630,7 +1630,7 @@ class Gantry
|
|
1630 |
if (!defined('GANTRY_FINALIZED')) {
|
1631 |
$this->_styles[$priority][] = $link;
|
1632 |
} else {
|
1633 |
-
wp_enqueue_style($link->getUrl(), $link->getUrl(), array(), '4.0.
|
1634 |
}
|
1635 |
}
|
1636 |
}
|
@@ -1734,7 +1734,7 @@ class Gantry
|
|
1734 |
if (!defined('GANTRY_FINALIZED')) {
|
1735 |
$this->_scripts[$full_path] = $check_url_path . $query_string;
|
1736 |
} else {
|
1737 |
-
wp_enqueue_script($check_url_path, $check_url_path, array(), '4.0.
|
1738 |
}
|
1739 |
break;
|
1740 |
}
|
@@ -1768,7 +1768,7 @@ class Gantry
|
|
1768 |
if (!defined('GANTRY_FINALIZED')) {
|
1769 |
$this->_scripts[$check_path] = $check_url_path . $query_string;
|
1770 |
} else {
|
1771 |
-
wp_enqueue_script($check_url_path, $check_url_path, array(), '4.0.
|
1772 |
}
|
1773 |
break(2);
|
1774 |
}
|
@@ -2594,7 +2594,4 @@ class Gantry
|
|
2594 |
return $this->getLayout($layout_name);
|
2595 |
}
|
2596 |
|
2597 |
-
|
2598 |
}
|
2599 |
-
|
2600 |
-
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version $Id: gantry.class.php 59689 2013-05-16 18:00:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
1045 |
$path = '/' . preg_replace('#^' . quotemeta($this->baseUrl) . '#', "", $path);
|
1046 |
}
|
1047 |
$filename = strtolower(basename($path, '.css')) . rand(0, 1000);
|
1048 |
+
wp_enqueue_style($filename, $path, array(), '4.0.6');
|
1049 |
$deps[] = $path;
|
1050 |
}
|
1051 |
}
|
1058 |
if ($this->baseUrl != "/") {
|
1059 |
$path = '/' . preg_replace('#^' . quotemeta($this->baseUrl) . '#', "", $path);
|
1060 |
}
|
1061 |
+
wp_enqueue_script($path, $path, $deps, '4.0.6');
|
1062 |
$deps[] = $path;
|
1063 |
}
|
1064 |
foreach ($this->_full_scripts as $strSrc) {
|
1065 |
+
wp_enqueue_script($strSrc, $strSrc, $deps, '4.0.6');
|
1066 |
$deps[] = $strSrc;
|
1067 |
}
|
1068 |
|
1087 |
$strHtml .= $this->_renderScriptsHead();
|
1088 |
}
|
1089 |
|
1090 |
+
$output = str_replace('<gantry:header/>', $strHtml, $output);
|
1091 |
}
|
1092 |
|
1093 |
/**
|
1098 |
ob_start();
|
1099 |
if (!$this->isAdmin()) wp_footer();
|
1100 |
$strHtml = ob_get_clean();
|
1101 |
+
$output = str_replace('<gantry:footer/>', $strHtml, $output);
|
1102 |
}
|
1103 |
|
1104 |
/**
|
1630 |
if (!defined('GANTRY_FINALIZED')) {
|
1631 |
$this->_styles[$priority][] = $link;
|
1632 |
} else {
|
1633 |
+
wp_enqueue_style($link->getUrl(), $link->getUrl(), array(), '4.0.6');
|
1634 |
}
|
1635 |
}
|
1636 |
}
|
1734 |
if (!defined('GANTRY_FINALIZED')) {
|
1735 |
$this->_scripts[$full_path] = $check_url_path . $query_string;
|
1736 |
} else {
|
1737 |
+
wp_enqueue_script($check_url_path, $check_url_path, array(), '4.0.6');
|
1738 |
}
|
1739 |
break;
|
1740 |
}
|
1768 |
if (!defined('GANTRY_FINALIZED')) {
|
1769 |
$this->_scripts[$check_path] = $check_url_path . $query_string;
|
1770 |
} else {
|
1771 |
+
wp_enqueue_script($check_url_path, $check_url_path, array(), '4.0.6');
|
1772 |
}
|
1773 |
break(2);
|
1774 |
}
|
2594 |
return $this->getLayout($layout_name);
|
2595 |
}
|
2596 |
|
|
|
2597 |
}
|
|
|
|
core/gantrybodylayout.class.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version $Id: gantrybodylayout.class.php
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
@@ -503,6 +503,35 @@ class GantryBodyLayout extends GantryLayout
|
|
503 |
return apply_filters('comments_popup_type', $template);
|
504 |
}
|
505 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
506 |
/**
|
507 |
* Retrieve the name of the highest priority template file that exists.
|
508 |
*
|
@@ -596,4 +625,52 @@ class GantryBodyLayout extends GantryLayout
|
|
596 |
$this->locate_type($templates, true, false);
|
597 |
}
|
598 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
599 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version $Id: gantrybodylayout.class.php 59696 2013-05-17 16:35:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
503 |
return apply_filters('comments_popup_type', $template);
|
504 |
}
|
505 |
|
506 |
+
/**
|
507 |
+
* get the current page context
|
508 |
+
* @return string
|
509 |
+
*/
|
510 |
+
function getContext() {
|
511 |
+
if( isset( $this->context ) )
|
512 |
+
return $this->context;
|
513 |
+
|
514 |
+
if( is_home() ) {
|
515 |
+
$this->context = 'blog';
|
516 |
+
} elseif( is_single() ) {
|
517 |
+
$this->context = 'single';
|
518 |
+
} elseif( is_page() ) {
|
519 |
+
$this->context = 'page';
|
520 |
+
} elseif( is_category() ) {
|
521 |
+
$this->context = 'category';
|
522 |
+
} elseif( is_tag() ) {
|
523 |
+
$this->context = 'tag';
|
524 |
+
} elseif( is_archive() ) {
|
525 |
+
$this->context = 'archive';
|
526 |
+
} elseif( is_search() ) {
|
527 |
+
$this->context = 'search';
|
528 |
+
} elseif( is_404() ) {
|
529 |
+
$this->context = '404';
|
530 |
+
}
|
531 |
+
|
532 |
+
return $this->context;
|
533 |
+
}
|
534 |
+
|
535 |
/**
|
536 |
* Retrieve the name of the highest priority template file that exists.
|
537 |
*
|
625 |
$this->locate_type($templates, true, false);
|
626 |
}
|
627 |
|
628 |
+
/**
|
629 |
+
* Load a template part into a template
|
630 |
+
*
|
631 |
+
* Includes the named template part for a theme or if a name is specified then a
|
632 |
+
* specialised part will be included. If the theme contains no {slug}.php file
|
633 |
+
* then no template will be included.
|
634 |
+
*
|
635 |
+
* The template is included using require, not require_once, so you may include the
|
636 |
+
* same template part multiple times.
|
637 |
+
*
|
638 |
+
* For the $name parameter, if the file is called "{slug}-special.php" then specify
|
639 |
+
* "special".
|
640 |
+
*
|
641 |
+
* Function supports third parameter which let's you allow the check for the post
|
642 |
+
* formats and post types.
|
643 |
+
*
|
644 |
+
* @param string $slug The slug name for the generic template.
|
645 |
+
* @param string $name The name of the specialised template.
|
646 |
+
* @param boolean $post_types_formats Enables the check for the post formats and post types
|
647 |
+
*/
|
648 |
+
function get_content_template( $slug, $name = null, $post_types_formats = true ) {
|
649 |
+
|
650 |
+
/** for Custom Post Types, allow different template files in different contexts */
|
651 |
+
$context = $this->getContext();
|
652 |
+
|
653 |
+
$templates = array();
|
654 |
+
|
655 |
+
if( $post_types_formats ) {
|
656 |
+
$post_supports = post_type_supports( get_post_type(), 'post-formats' ) ? get_post_format() : get_post_type();
|
657 |
+
|
658 |
+
if( $post_supports !== false && isset( $context ) )
|
659 |
+
$templates[] = "{$slug}-{$context}-{$post_supports}.php";
|
660 |
+
|
661 |
+
if( $post_supports !== false)
|
662 |
+
$templates[] = "{$slug}-{$post_supports}.php";
|
663 |
+
}
|
664 |
+
|
665 |
+
if( isset( $name ) && $name !== false )
|
666 |
+
$templates[] = "{$slug}-{$name}.php";
|
667 |
+
|
668 |
+
if( $name !== $context )
|
669 |
+
$templates[] = "{$slug}-{$context}.php";
|
670 |
+
|
671 |
+
$templates[] = "{$slug}.php";
|
672 |
+
|
673 |
+
$this->locate_type($templates, true, false);
|
674 |
+
}
|
675 |
+
|
676 |
}
|
core/gantrylayout.class.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version $Id: gantrylayout.class.php
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
@@ -44,7 +44,7 @@ class GantryLayout
|
|
44 |
$instance_params = $instances[$widget_info['params'][0]['number']];
|
45 |
}
|
46 |
} else {
|
47 |
-
$instance_params = $wp_registered_widgets[$
|
48 |
}
|
49 |
if (empty($instance_params)) $instance_params = array();
|
50 |
return $instance_params;
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version $Id: gantrylayout.class.php 59702 2013-05-17 21:54:07Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
44 |
$instance_params = $instances[$widget_info['params'][0]['number']];
|
45 |
}
|
46 |
} else {
|
47 |
+
$instance_params = $wp_registered_widgets[$widget_id]['params'];
|
48 |
}
|
49 |
if (empty($instance_params)) $instance_params = array();
|
50 |
return $instance_params;
|
core/utilities/gantrycache.class.php
CHANGED
@@ -26,7 +26,7 @@ class GantryCache
|
|
26 |
/**
|
27 |
*
|
28 |
*/
|
29 |
-
const ADMIN_GROUP_NAME = 'GantryAdmin-4.0.
|
30 |
|
31 |
const ADMIN_LIFETIME = 86400;
|
32 |
|
@@ -122,7 +122,7 @@ class GantryCache
|
|
122 |
$this->cache->addDriver('frontend', new WpTransientCacheDriver($this->group, $this->lifetime));
|
123 |
} elseif (is_admin()) {
|
124 |
// TODO get lifetime for backend cache
|
125 |
-
$this->group = self::ADMIN_GROUP_NAME . '-4.0.
|
126 |
$this->cache->addDriver('admin', new WpTransientCacheDriver($this->group, self::ADMIN_LIFETIME));
|
127 |
}
|
128 |
}
|
26 |
/**
|
27 |
*
|
28 |
*/
|
29 |
+
const ADMIN_GROUP_NAME = 'GantryAdmin-4.0.6';
|
30 |
|
31 |
const ADMIN_LIFETIME = 86400;
|
32 |
|
122 |
$this->cache->addDriver('frontend', new WpTransientCacheDriver($this->group, $this->lifetime));
|
123 |
} elseif (is_admin()) {
|
124 |
// TODO get lifetime for backend cache
|
125 |
+
$this->group = self::ADMIN_GROUP_NAME . '-4.0.6';
|
126 |
$this->cache->addDriver('admin', new WpTransientCacheDriver($this->group, self::ADMIN_LIFETIME));
|
127 |
}
|
128 |
}
|
functions.php
CHANGED
@@ -168,7 +168,7 @@ function gantry_construct()
|
|
168 |
/**
|
169 |
* @name GANTRY_VERSION
|
170 |
*/
|
171 |
-
define('GANTRY_VERSION', '4.0.
|
172 |
|
173 |
|
174 |
if (!defined('DS')) {
|
168 |
/**
|
169 |
* @name GANTRY_VERSION
|
170 |
*/
|
171 |
+
define('GANTRY_VERSION', '4.0.6');
|
172 |
|
173 |
|
174 |
if (!defined('DS')) {
|
gantry.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
Plugin Name: Gantry Template Framework
|
11 |
Plugin URI: http://www.gantry-framework.org/
|
12 |
Description: This is a Framework to support easily modifiable themes that are very extensible.
|
13 |
-
Version: 4.0.
|
14 |
Author: RocketTheme
|
15 |
Author URI: http://www.rockettheme.com/wordpress
|
16 |
License: http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
10 |
Plugin Name: Gantry Template Framework
|
11 |
Plugin URI: http://www.gantry-framework.org/
|
12 |
Description: This is a Framework to support easily modifiable themes that are very extensible.
|
13 |
+
Version: 4.0.6
|
14 |
Author: RocketTheme
|
15 |
Author URI: http://www.rockettheme.com/wordpress
|
16 |
License: http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
gizmos/compatibility.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version $Id: compatibility.php
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
@@ -87,6 +87,14 @@ class GantryGizmoCompatibility extends GantryGizmo
|
|
87 |
add_action( 'init', array( &$this, 'wp_seo_fix_force_rewrite_titles' ) );
|
88 |
}
|
89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
|
92 |
function query_parsed_init()
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version $Id: compatibility.php 59677 2013-05-11 15:25:53Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
87 |
add_action( 'init', array( &$this, 'wp_seo_fix_force_rewrite_titles' ) );
|
88 |
}
|
89 |
|
90 |
+
/**
|
91 |
+
* Cart66 Compatibility
|
92 |
+
*/
|
93 |
+
|
94 |
+
if( class_exists( 'Cart66' ) ) {
|
95 |
+
add_action( 'template_redirect', array( 'Cart66', 'enqueueScripts' ) );
|
96 |
+
}
|
97 |
+
|
98 |
}
|
99 |
|
100 |
function query_parsed_init()
|
gizmos/font.php
CHANGED
@@ -95,7 +95,8 @@ class GantryGizmoFont extends GantryGizmo
|
|
95 |
|
96 |
$variant = $variant ? $variant : '';
|
97 |
|
98 |
-
$
|
|
|
99 |
$gantry->addInlineStyle("h1, h2 { font-family: '" . $name . "', 'Helvetica', arial, serif; }");
|
100 |
}
|
101 |
|
95 |
|
96 |
$variant = $variant ? $variant : '';
|
97 |
|
98 |
+
$protocol = is_ssl() ? 'https' : 'http';
|
99 |
+
$gantry->addStyle("{$protocol}://fonts.googleapis.com/css?family=" . str_replace(" ", "+", $name) . $variant);
|
100 |
$gantry->addInlineStyle("h1, h2 { font-family: '" . $name . "', 'Helvetica', arial, serif; }");
|
101 |
}
|
102 |
|
gizmos/title.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version $Id: title.php
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
@@ -37,13 +37,13 @@ class GantryGizmoTitle extends GantryGizmo
|
|
37 |
if ($aioseo_options != false && $aioseo_options['aiosp_home_title'] != '' && (is_home() || is_front_page())) {
|
38 |
|
39 |
$title = $aioseo_options['aiosp_home_title'];
|
40 |
-
$title = apply_filters('wp_title', $title);
|
41 |
$gantry->pageTitle = trim($title);
|
42 |
|
43 |
} elseif (is_singular() && !empty($aioseo_title) && $aioseo_title != '') {
|
44 |
|
45 |
$title = $aioseo_title;
|
46 |
-
$title = apply_filters('wp_title', $title);
|
47 |
$gantry->pageTitle = trim($title);
|
48 |
|
49 |
} elseif ($title != '') {
|
@@ -220,7 +220,7 @@ class GantryGizmoTitle extends GantryGizmo
|
|
220 |
|
221 |
}
|
222 |
|
223 |
-
$title = apply_filters('wp_title', $title);
|
224 |
$gantry->pageTitle = trim($title);
|
225 |
|
226 |
|
@@ -254,7 +254,7 @@ class GantryGizmoTitle extends GantryGizmo
|
|
254 |
$title = wp_title('', false) . ' | ' . get_bloginfo('name');
|
255 |
}
|
256 |
|
257 |
-
$title = apply_filters('wp_title', $title);
|
258 |
$gantry->pageTitle = apply_filters('gantry_title_gizmo', $title);
|
259 |
|
260 |
}
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version $Id: title.php 59687 2013-05-16 13:25:33Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
37 |
if ($aioseo_options != false && $aioseo_options['aiosp_home_title'] != '' && (is_home() || is_front_page())) {
|
38 |
|
39 |
$title = $aioseo_options['aiosp_home_title'];
|
40 |
+
$title = apply_filters('wp_title', $title, '»', '');
|
41 |
$gantry->pageTitle = trim($title);
|
42 |
|
43 |
} elseif (is_singular() && !empty($aioseo_title) && $aioseo_title != '') {
|
44 |
|
45 |
$title = $aioseo_title;
|
46 |
+
$title = apply_filters('wp_title', $title, '»', '');
|
47 |
$gantry->pageTitle = trim($title);
|
48 |
|
49 |
} elseif ($title != '') {
|
220 |
|
221 |
}
|
222 |
|
223 |
+
$title = apply_filters('wp_title', $title, '»', '');
|
224 |
$gantry->pageTitle = trim($title);
|
225 |
|
226 |
|
254 |
$title = wp_title('', false) . ' | ' . get_bloginfo('name');
|
255 |
}
|
256 |
|
257 |
+
$title = apply_filters('wp_title', $title, '»', '');
|
258 |
$gantry->pageTitle = apply_filters('gantry_title_gizmo', $title);
|
259 |
|
260 |
}
|
languages/gantry-en_US.mo
CHANGED
Binary file
|
languages/gantry-en_US.po
CHANGED
@@ -16,6 +16,9 @@ msgstr ""
|
|
16 |
"Dashboard → Appearance → Widgets</strong> and re-save all of your "
|
17 |
"<strong>Gantry Menu</strong> widget instances."
|
18 |
|
|
|
|
|
|
|
19 |
msgid "SETTINGS"
|
20 |
msgstr "Settings"
|
21 |
|
@@ -193,6 +196,9 @@ msgstr "Displays pagination between the content type pages."
|
|
193 |
msgid "PAGINATION_SHOW_RESULTS"
|
194 |
msgstr "Show Results"
|
195 |
|
|
|
|
|
|
|
196 |
msgid "PAGINATION_SHOW_RESULTS_DESC"
|
197 |
msgstr "Displays the number of current and all available pages."
|
198 |
|
@@ -422,6 +428,9 @@ msgstr "Full Width Positions"
|
|
422 |
msgid "TOP_POS"
|
423 |
msgstr "Top Positions"
|
424 |
|
|
|
|
|
|
|
425 |
msgid "HEADER_POS"
|
426 |
msgstr "Header Positions"
|
427 |
|
@@ -518,7 +527,7 @@ msgid "COMPONENT_ENABLED_DESC"
|
|
518 |
msgstr "Enable or disable the content output."
|
519 |
|
520 |
msgid "MAINBODY_ENABLED"
|
521 |
-
msgstr "Mainbody
|
522 |
|
523 |
msgid "MAINBODY_ENABLED_DESC"
|
524 |
msgstr ""
|
16 |
"Dashboard → Appearance → Widgets</strong> and re-save all of your "
|
17 |
"<strong>Gantry Menu</strong> widget instances."
|
18 |
|
19 |
+
msgid "JNONE"
|
20 |
+
msgstr "None"
|
21 |
+
|
22 |
msgid "SETTINGS"
|
23 |
msgstr "Settings"
|
24 |
|
196 |
msgid "PAGINATION_SHOW_RESULTS"
|
197 |
msgstr "Show Results"
|
198 |
|
199 |
+
msgid "PAGINATION_SHOW_COUNT"
|
200 |
+
msgstr "Show Count"
|
201 |
+
|
202 |
msgid "PAGINATION_SHOW_RESULTS_DESC"
|
203 |
msgstr "Displays the number of current and all available pages."
|
204 |
|
428 |
msgid "TOP_POS"
|
429 |
msgstr "Top Positions"
|
430 |
|
431 |
+
msgid "NAV_POS"
|
432 |
+
msgstr "Navigation Positions"
|
433 |
+
|
434 |
msgid "HEADER_POS"
|
435 |
msgstr "Header Positions"
|
436 |
|
527 |
msgstr "Enable or disable the content output."
|
528 |
|
529 |
msgid "MAINBODY_ENABLED"
|
530 |
+
msgstr "Display Mainbody"
|
531 |
|
532 |
msgid "MAINBODY_ENABLED_DESC"
|
533 |
msgstr ""
|
languages/gantry.pot
CHANGED
@@ -13,6 +13,9 @@ msgstr ""
|
|
13 |
msgid "MISSING_MENU_THEME_MESSAGE"
|
14 |
msgstr "In order to get your theme working properly, please go to the <strong>Admin Dashboard → Appearance → Widgets</strong> and re-save all of your <strong>Gantry Menu</strong> widget instances."
|
15 |
|
|
|
|
|
|
|
16 |
msgid "SETTINGS"
|
17 |
msgstr "Settings"
|
18 |
|
@@ -190,6 +193,9 @@ msgstr "Displays pagination between the content type pages."
|
|
190 |
msgid "PAGINATION_SHOW_RESULTS"
|
191 |
msgstr "Show Results"
|
192 |
|
|
|
|
|
|
|
193 |
msgid "PAGINATION_SHOW_RESULTS_DESC"
|
194 |
msgstr "Displays the number of current and all available pages."
|
195 |
|
@@ -419,6 +425,9 @@ msgstr "Full Width Positions"
|
|
419 |
msgid "TOP_POS"
|
420 |
msgstr "Top Positions"
|
421 |
|
|
|
|
|
|
|
422 |
msgid "HEADER_POS"
|
423 |
msgstr "Header Positions"
|
424 |
|
@@ -515,7 +524,7 @@ msgid "COMPONENT_ENABLED_DESC"
|
|
515 |
msgstr "Enable or disable the content output."
|
516 |
|
517 |
msgid "MAINBODY_ENABLED"
|
518 |
-
msgstr "Mainbody
|
519 |
|
520 |
msgid "MAINBODY_ENABLED_DESC"
|
521 |
msgstr ""
|
13 |
msgid "MISSING_MENU_THEME_MESSAGE"
|
14 |
msgstr "In order to get your theme working properly, please go to the <strong>Admin Dashboard → Appearance → Widgets</strong> and re-save all of your <strong>Gantry Menu</strong> widget instances."
|
15 |
|
16 |
+
msgid "JNONE"
|
17 |
+
msgstr "None"
|
18 |
+
|
19 |
msgid "SETTINGS"
|
20 |
msgstr "Settings"
|
21 |
|
193 |
msgid "PAGINATION_SHOW_RESULTS"
|
194 |
msgstr "Show Results"
|
195 |
|
196 |
+
msgid "PAGINATION_SHOW_COUNT"
|
197 |
+
msgstr "Show Count"
|
198 |
+
|
199 |
msgid "PAGINATION_SHOW_RESULTS_DESC"
|
200 |
msgstr "Displays the number of current and all available pages."
|
201 |
|
425 |
msgid "TOP_POS"
|
426 |
msgstr "Top Positions"
|
427 |
|
428 |
+
msgid "NAV_POS"
|
429 |
+
msgstr "Navigation Positions"
|
430 |
+
|
431 |
msgid "HEADER_POS"
|
432 |
msgstr "Header Positions"
|
433 |
|
524 |
msgstr "Enable or disable the content output."
|
525 |
|
526 |
msgid "MAINBODY_ENABLED"
|
527 |
+
msgstr "Display Mainbody"
|
528 |
|
529 |
msgid "MAINBODY_ENABLED_DESC"
|
530 |
msgstr ""
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Author URI: http://gantry-framework.org
|
|
4 |
Tags: gantry, framework, template, theme, widgets, flexible, extensible, configurable, 960px, grid, columns, powerful
|
5 |
Requires at least: 3.2
|
6 |
Tested up to: 3.5.1
|
7 |
-
Stable tag: 4.0.
|
8 |
|
9 |
Gantry is a comprehensive set of building blocks to enable the rapid development and realization of a design into a flexible and powerful web platform
|
10 |
|
@@ -84,6 +84,16 @@ Once you downloaded and installed Gantry Framework plugin, please download also
|
|
84 |
|
85 |
== Changelog ==
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
= 4.0.5 =
|
88 |
* Fixed Google WebFonts and breaking fonts caused by s: and g: added to font body class
|
89 |
* You can now keep your Gantry Framework translation files (.mo) in the WordPress languages directory ie. wp-content/languages/gantry/
|
@@ -320,6 +330,9 @@ Once you downloaded and installed Gantry Framework plugin, please download also
|
|
320 |
|
321 |
== Upgrade Notice ==
|
322 |
|
|
|
|
|
|
|
323 |
= 4.0.5 =
|
324 |
Please remember to create a full site backup (files + database) before performing update.
|
325 |
|
4 |
Tags: gantry, framework, template, theme, widgets, flexible, extensible, configurable, 960px, grid, columns, powerful
|
5 |
Requires at least: 3.2
|
6 |
Tested up to: 3.5.1
|
7 |
+
Stable tag: 4.0.6
|
8 |
|
9 |
Gantry is a comprehensive set of building blocks to enable the rapid development and realization of a design into a flexible and powerful web platform
|
10 |
|
84 |
|
85 |
== Changelog ==
|
86 |
|
87 |
+
= 4.0.6 =
|
88 |
+
* Cart66 support added to compatibility gizmo
|
89 |
+
* Shopp plugin compatibility fix
|
90 |
+
* Fixed parseQueryString method on override widgets that wasn't allowing the "+" caracther in text
|
91 |
+
* Google Web Fonts should now use proper protocol when SSL detected
|
92 |
+
* Filter in Title gizmo should now have all required parameters
|
93 |
+
* Changed the way how Gantry outputs header and footer which can solve potential issues with scripts and regular expressions
|
94 |
+
* Gantry Menu cache should now respect the get_locale();
|
95 |
+
* Other minor improvements
|
96 |
+
|
97 |
= 4.0.5 =
|
98 |
* Fixed Google WebFonts and breaking fonts caused by s: and g: added to font body class
|
99 |
* You can now keep your Gantry Framework translation files (.mo) in the WordPress languages directory ie. wp-content/languages/gantry/
|
330 |
|
331 |
== Upgrade Notice ==
|
332 |
|
333 |
+
= 4.0.6 =
|
334 |
+
Please remember to create a full site backup (files + database) before performing update.
|
335 |
+
|
336 |
= 4.0.5 =
|
337 |
Please remember to create a full site backup (files + database) before performing update.
|
338 |
|
widgets/breadcrumbs.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version 4.0.
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version 4.0.6 May 17, 2013
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
widgets/gantrymenu/libs/librokmenu/RokMenuNode.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version $Id: RokMenuNode.php
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
@@ -32,6 +32,44 @@ if (!class_exists('RokMenuNode')) {
|
|
32 |
protected $_a_classes = array();
|
33 |
protected $_span_classes = array();
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
/**
|
36 |
* Gets the title
|
37 |
* @access public
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version $Id: RokMenuNode.php 59703 2013-05-17 23:08:37Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
32 |
protected $_a_classes = array();
|
33 |
protected $_span_classes = array();
|
34 |
|
35 |
+
protected $item_id;
|
36 |
+
protected $item_type;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* @param mixed $item_id
|
40 |
+
*/
|
41 |
+
public function setItemId($item_id)
|
42 |
+
{
|
43 |
+
$this->item_id = $item_id;
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* @return mixed
|
48 |
+
*/
|
49 |
+
public function getItemId()
|
50 |
+
{
|
51 |
+
return $this->item_id;
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* @param mixed $item_type
|
56 |
+
*/
|
57 |
+
public function setItemType($item_type)
|
58 |
+
{
|
59 |
+
$this->item_type = $item_type;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* @return mixed
|
64 |
+
*/
|
65 |
+
public function getItemType()
|
66 |
+
{
|
67 |
+
return $this->item_type;
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
+
|
72 |
+
|
73 |
/**
|
74 |
* Gets the title
|
75 |
* @access public
|
widgets/gantrymenu/libs/providers/GantryMenuProviderWordpress.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version $Id: GantryMenuProviderWordpress.php
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
@@ -53,6 +53,8 @@ if (!class_exists('GantryMenuProviderWordpress')) {
|
|
53 |
$node->setTitle($menu_item->title);
|
54 |
$node->setLink($menu_item->url);
|
55 |
$node->setTarget($menu_item->target);
|
|
|
|
|
56 |
if (!empty($menu_item->description)) $node->addAttribute('description', $menu_item->description);
|
57 |
if (!empty($menu_item->xfn)) $node->addLinkAttrib('rel', $menu_item->xfn);
|
58 |
if (!empty($menu_item->attr_title)) $node->addLinkAttrib('title', $menu_item->attr_title);
|
@@ -77,9 +79,10 @@ if (!class_exists('GantryMenuProviderWordpress')) {
|
|
77 |
|
78 |
public function getMenuTree()
|
79 |
{
|
|
|
80 |
gantry_import('core.utilities.gantrycache');
|
81 |
$cache_handler = GantryCache::getCache('gantry-menu', 0, true);
|
82 |
-
$menu_id = 'menu-' . md5(implode('-', $this->args));
|
83 |
$menu = $cache_handler->get($menu_id);
|
84 |
if ($menu == false) {
|
85 |
$menu = $this->getRealMenuTree();
|
@@ -91,6 +94,16 @@ if (!class_exists('GantryMenuProviderWordpress')) {
|
|
91 |
$nodeIterator = new RecursiveIteratorIterator($menu, RecursiveIteratorIterator::SELF_FIRST);
|
92 |
/** @var $node RokMenuNode */
|
93 |
foreach ($nodeIterator as $node) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
if ($node->getLink() == $this->current_url && $this->current_node == 0) {
|
95 |
$this->current_node = $node->getId();
|
96 |
break;
|
@@ -117,6 +130,7 @@ if (!class_exists('GantryMenuProviderWordpress')) {
|
|
117 |
|
118 |
protected function createMenuTree(&$nodes, $maxdepth)
|
119 |
{
|
|
|
120 |
$menu = new RokMenuNodeTree(self::ROOT_ID);
|
121 |
// TODO: move maxdepth to higher processing level?
|
122 |
if (!empty($nodes)) {
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version $Id: GantryMenuProviderWordpress.php 59703 2013-05-17 23:08:37Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
53 |
$node->setTitle($menu_item->title);
|
54 |
$node->setLink($menu_item->url);
|
55 |
$node->setTarget($menu_item->target);
|
56 |
+
$node->setItemId($menu_item->object_id);
|
57 |
+
$node->setItemType($menu_item->object);
|
58 |
if (!empty($menu_item->description)) $node->addAttribute('description', $menu_item->description);
|
59 |
if (!empty($menu_item->xfn)) $node->addLinkAttrib('rel', $menu_item->xfn);
|
60 |
if (!empty($menu_item->attr_title)) $node->addLinkAttrib('title', $menu_item->attr_title);
|
79 |
|
80 |
public function getMenuTree()
|
81 |
{
|
82 |
+
global $wp_query;
|
83 |
gantry_import('core.utilities.gantrycache');
|
84 |
$cache_handler = GantryCache::getCache('gantry-menu', 0, true);
|
85 |
+
$menu_id = 'menu-' . md5(implode('-', $this->args) . get_locale());
|
86 |
$menu = $cache_handler->get($menu_id);
|
87 |
if ($menu == false) {
|
88 |
$menu = $this->getRealMenuTree();
|
94 |
$nodeIterator = new RecursiveIteratorIterator($menu, RecursiveIteratorIterator::SELF_FIRST);
|
95 |
/** @var $node RokMenuNode */
|
96 |
foreach ($nodeIterator as $node) {
|
97 |
+
|
98 |
+
if ((int)$node->getItemId() == (int)$wp_query->queried_object_id) {
|
99 |
+
if (post_type_exists($node->getItemType()) && isset($wp_query->queried_object->post_type) && $wp_query->queried_object->post_type == $node->getItemType()) {
|
100 |
+
$this->current_node = $node->getId();
|
101 |
+
break;
|
102 |
+
} else if (taxonomy_exists($node->getItemType()) && isset($wp_query->queried_object->taxonomy) && $wp_query->queried_object->taxonomy == $node->getItemType()) {
|
103 |
+
$this->current_node = $node->getId();
|
104 |
+
break;
|
105 |
+
}
|
106 |
+
}
|
107 |
if ($node->getLink() == $this->current_url && $this->current_node == 0) {
|
108 |
$this->current_node = $node->getId();
|
109 |
break;
|
130 |
|
131 |
protected function createMenuTree(&$nodes, $maxdepth)
|
132 |
{
|
133 |
+
|
134 |
$menu = new RokMenuNodeTree(self::ROOT_ID);
|
135 |
// TODO: move maxdepth to higher processing level?
|
136 |
if (!empty($nodes)) {
|
widgets/loginbutton.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version 4.0.
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version 4.0.6 May 17, 2013
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
widgets/loginform.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version 4.0.
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version 4.0.6 May 17, 2013
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
* @copyright Copyright (C) 2007 - 2013 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|