Version Description
- Various PHP 7.2 fixes
- Other minor fixes and improvements
Download this release
Release Info
Developer | gantry |
Plugin | Gantry 4 Framework |
Version | 4.1.15 |
Comparing to | |
See all releases |
Code changes from version 4.1.14 to 4.1.15
- CHANGELOG.php +1 -1
- CREDITS.php +1 -1
- MD5SUMS +596 -590
- admin/admin_assignments.php +1 -1
- admin/admin_functions.php +1 -1
- admin/admin_presets.php +1 -1
- admin/ajax-models/cache.php +1 -1
- admin/ajax-models/lesscompiler.php +1 -1
- admin/ajax-models/overrides.php +1 -1
- admin/ajax-models/presets-saver.php +1 -1
- admin/ajax-models/widgets.php +1 -1
- admin/assignment_functions.php +1 -1
- admin/forms/fields/ajaxbutton.php +1 -1
- admin/forms/fields/alias.php +1 -1
- admin/forms/fields/animation.php +1 -1
- admin/forms/fields/categories.php +1 -1
- admin/forms/fields/checkbox.php +1 -1
- admin/forms/fields/colorchooser.php +1 -1
- admin/forms/fields/dateformats.php +1 -1
- admin/forms/fields/diagnostic.php +1 -1
- admin/forms/fields/file.php +1 -1
- admin/forms/fields/filelist.php +1 -1
- admin/forms/fields/fonts.php +1 -1
- admin/forms/fields/gantry.php +1 -1
- admin/forms/fields/gradient.php +1 -1
- admin/forms/fields/groupedlist.php +1 -1
- admin/forms/fields/hidden.php +1 -1
- admin/forms/fields/html.php +1 -1
- admin/forms/fields/imagelist.php +1 -1
- admin/forms/fields/imagepicker.php +2 -2
- admin/forms/fields/integer.php +1 -1
- admin/forms/fields/linkcategories.php +1 -1
- admin/forms/fields/list.php +1 -1
- admin/forms/fields/navmenulist.php +1 -1
- admin/forms/fields/overlays.php +1 -1
- admin/forms/fields/password.php +1 -1
- admin/forms/fields/position.php +1 -1
- admin/forms/fields/positions.php +1 -1
- admin/forms/fields/positionslist.php +1 -1
- admin/forms/fields/preset.php +1 -1
- admin/forms/fields/radio.php +1 -1
- admin/forms/fields/selectbox.php +1 -1
- admin/forms/fields/showmax.php +1 -1
- admin/forms/fields/slider.php +1 -1
- admin/forms/fields/spacer.php +1 -1
- admin/forms/fields/text.php +1 -1
- admin/forms/fields/textarea.php +1 -1
- admin/forms/fields/textplus.php +1 -1
- admin/forms/fields/tips.php +1 -1
- admin/forms/fields/toggle.php +1 -1
- admin/forms/fields/updater.php +2 -2
- admin/forms/groups/chain.php +1 -1
- admin/forms/groups/columns.php +1 -1
- admin/forms/groups/enabledgroup.php +1 -1
- admin/forms/groups/grouped.php +1 -1
- admin/forms/groups/position.php +1 -1
- admin/forms/groups/selectedset.php +1 -1
- admin/forms/groups/set.php +1 -1
- admin/index.php +1 -1
- admin/index_orig.php +1 -1
- admin/meta-links/cache.php +1 -1
- admin/meta-links/presets.php +1 -1
- admin/override.php +1 -1
- admin/override_orig.php +1 -1
- admin/widgets/assignments/js/assignments.js +1 -1
- admin/widgets/colorchooser/css/mooRainbow-2.0.css +2 -2
- admin/widgets/gantry-ie.css +1 -1
- admin/widgets/gantry-ie7.css +1 -1
- admin/widgets/gantry-opera.css +1 -1
- admin/widgets/gantry-widgets.css +1 -1
- admin/widgets/gantry-widgets.js +1 -1
- admin/widgets/gantry.css +1 -1
- admin_functions.php +2 -2
- ajax-models/example.php +1 -1
- autoload.php +1 -1
- bugfixes.php +31 -27
- classes/Gantry/CssFileResolver.php +1 -1
- classes/Gantry/FileResolver.php +1 -1
- classes/Gantry/Loader.php +1 -1
- classes/Gantry/Uri.php +3 -3
- classes/Gantry/Uri/Builder.php +1 -1
- classes/Gantry/Uri/Components.php +1 -1
- classes/Gantry/Uri/Util.php +1 -1
- core/config/gantryelement.class.php +1 -1
- core/config/gantryform.class.php +1 -1
- core/config/gantryformfield.class.php +1 -1
- core/config/gantryformfieldhelper.class.php +1 -1
- core/config/gantryformgroup.class.php +1 -1
- core/config/gantryformhelper.class.php +1 -1
- core/config/gantryformitem.class.php +2 -2
- core/config/gantryformnaminghelper.class.php +1 -1
- core/config/gantryhtmlselect.class.php +1 -1
- core/config/gantryparameters.class.php +1 -1
- core/config/gantryselect.class.php +1 -1
- core/gantry.class.php +13 -13
- core/gantrybodylayout.class.php +1 -1
- core/gantrybrowser.class.php +1 -1
- core/gantrycommentstempllayout.class.php +1 -1
- core/gantrydiagnostic.class.php +1 -1
- core/gantryflatfile.class.php +1 -1
- core/gantrygizmo.class.php +1 -1
- core/gantrygzipper.class.php +6 -7
- core/gantryini.class.php +1 -1
- core/gantryjson.class.php +3 -3
- core/gantrylayout.class.php +1 -1
- core/gantryloader.class.php +1 -1
- core/gantryparams.class.php +1 -1
- core/gantryplatform.class.php +1 -1
- core/gantrypositions.class.php +1 -1
- core/gantrystylelink.class.php +1 -1
- core/gantrytemplate.class.php +1 -1
- core/gantrywidget.class.php +1 -1
- core/params/gantryparamoverride.class.php +1 -1
- core/params/gantryparamprocessor.class.php +1 -1
- core/params/overrides/gantrycookieparamoverride.class.php +1 -1
- core/params/overrides/gantryoverrideparamoverride.class.php +1 -1
- core/params/overrides/gantrysessionparamoverride.class.php +15 -4
- core/params/overrides/gantryurlparamoverride.class.php +1 -1
- core/params/processors/alias.php +1 -1
- core/renderers/gantrycommentsrenderer.class.php +1 -1
- core/renderers/gantrydebugmainbodyrenderer.class.php +1 -1
- core/renderers/gantrymainbodyrenderer.class.php +1 -1
- core/renderers/gantryorderedmainbodyrenderer.class.php +1 -1
- core/renderers/gantrywidgetsrenderer.class.php +1 -1
- core/rules/facttypes/archive.class.php +1 -1
- core/rules/facttypes/post_type.class.php +1 -1
- core/rules/facttypes/taxonomy.class.php +1 -1
- core/rules/facttypes/templatepage.class.php +1 -1
- core/rules/facttypes/wpmllang.class.php +1 -1
- core/rules/gantryoverridefact.class.php +1 -1
- core/rules/gantryoverrides.class.php +1 -1
- core/rules/gantryoverridesengine.class.php +7 -4
- core/rules/gantrypagecallfact.class.php +1 -1
- core/utilities/cache/cache.class.php +1 -1
- core/utilities/cache/cacheDriver.interface.php +1 -1
- core/utilities/cache/fileCacheDriver.class.php +1 -1
- core/utilities/cache/wpTransientCacheDriver.class.php +1 -1
- core/utilities/gantryarrayhelper.class.php +1 -1
- core/utilities/gantrycache.class.php +3 -3
- core/utilities/gantrydate.class.php +1 -1
- core/utilities/gantryfile.class.php +1 -1
- core/utilities/gantryfilterinput.class.php +1 -1
- core/utilities/gantryfolder.class.php +1 -1
- core/utilities/gantrylesscompiler.class.php +1 -1
- core/utilities/gantrymobiledetect.class.php +1 -1
- core/utilities/gantrypath.class.php +1 -1
- core/utilities/gantryregistry.class.php +1 -1
- core/utilities/gantrysimplexmlelement.class.php +1 -1
- core/utilities/gantrytemplateinfo.class.php +1 -1
- core/utilities/gantryurl.class.php +1 -1
- core/utilities/gantryxml.class.php +1 -1
- core/utilities/registry/format/ini.php +1 -1
- core/utilities/registry/format/json.php +1 -1
- core/utilities/registry/format/php.php +1 -1
- core/utilities/registry/format/xml.php +1 -1
- core/utilities/registry/gantryregistryformat.class.php +1 -1
- css/gantry-ie6.css +1 -1
- css/gantry.css +1 -1
- css/gantrydivider.css +1 -1
- css/grid-12.css +1 -1
- css/grid-16.css +1 -1
- css/grid-responsive.css +1 -1
- css/iphone-gantry.css +1 -1
- css/wordpress-ie6.css +1 -1
- css/wordpress-ie7.css +1 -1
- css/wordpress.css +1 -1
- functions.php +3 -3
- gantry.config.php +1 -1
- gantry.php +2 -2
- gizmos/analytics.php +1 -1
- gizmos/autoparagraphs.php +1 -1
- gizmos/bbpress.php +1 -1
- gizmos/belatedpng.php +1 -1
- gizmos/buddypress.php +1 -1
- gizmos/childcss.php +1 -1
- gizmos/commentreply.php +1 -1
- gizmos/compatibility.php +1 -1
- gizmos/feedlinks.php +1 -1
- gizmos/font.php +1 -1
- gizmos/fontawesomepaths.php +1 -1
- gizmos/ie6.php +1 -1
- gizmos/ie6warn.php +1 -1
- gizmos/iphonegradients.php +1 -1
- gizmos/iphoneimages.php +1 -1
- gizmos/jstools.php +1 -1
- gizmos/loadposition.php +1 -1
- gizmos/maintenancemode.php +1 -1
- gizmos/mshelper.php +1 -1
- gizmos/pagesuffix.php +1 -1
- gizmos/rokstyle.php +1 -1
- gizmos/rtl.php +1 -1
- gizmos/searchhighlight.php +1 -1
- gizmos/smartload.php +1 -1
- gizmos/styledeclaration.php +1 -1
- gizmos/texturize.php +1 -1
- gizmos/thumbnails.php +1 -1
- gizmos/title.php +1 -1
- gizmos/webfonts.php +1 -1
- gizmos/widgetshortcodes.php +1 -1
- gizmos/woocommerce.php +2 -2
- gizmos/wpmenucart.php +1 -1
- gizmos/wpml.php +1 -1
- gizmos/yoast.php +1 -1
- html/layouts/body_debugmainbody.php +1 -1
- html/layouts/body_iphonemainbody.php +1 -1
- html/layouts/body_mainbody.php +1 -1
- html/layouts/chrome_basic.php +1 -1
- html/layouts/chrome_standard.php +1 -1
- html/layouts/comment_basic.php +1 -1
- html/layouts/commentstempl_basic.php +1 -1
- html/layouts/doc_body.php +1 -1
- html/layouts/doc_tag.php +1 -1
- html/layouts/orderedbody_mainbody.php +1 -1
- html/layouts/widget_basic.php +1 -1
- html/layouts/widget_sidebar.php +1 -1
- html/layouts/widget_standard.php +1 -1
- js/fusion.js +1 -1
- js/gantry-ie6menu.js +1 -1
- js/gantry-ie6warn.js +1 -1
- js/gantry-inputs.js +1 -1
- js/gantry-search-highlight.js +1 -1
- js/gantry-smartload.js +1 -1
- js/gantry-totop.js +1 -1
- js/gantrydivider.js +1 -1
- js/imenu.js +1 -1
- js/sfhover.js +1 -1
- libs/phpQuery.php +1239 -5594
- libs/phpQuery/Callback.php +152 -0
- libs/phpQuery/DOMDocumentWrapper.php +679 -0
- libs/phpQuery/DOMEvent.php +107 -0
- libs/phpQuery/compat/mbstring.php +88 -0
- libs/phpQuery/phpQueryEvents.php +158 -0
- libs/phpQuery/phpQueryObject.php +3220 -0
- plugin-updater/.gitkeep +0 -0
- readme.txt +9 -2
- tmpl/index-iphone.php +1 -1
- widgets/archives.php +1 -1
- widgets/breadcrumbs.php +2 -2
- widgets/categories.php +1 -1
- widgets/copyright.php +1 -1
- widgets/date.php +1 -1
- widgets/divider.php +1 -1
- widgets/fontsizer.php +1 -1
- widgets/gantrymenu/admin/RokMenuWalkerNavMenuEdit.php +1 -1
- widgets/gantrymenu/admin/fields/themelist.php +1 -1
- widgets/gantrymenu/css/widget_admin.css +1 -1
- widgets/gantrymenu/libs/GantryMenu.php +1 -1
- widgets/gantrymenu/libs/common/RokBrowserCheck.php +1 -1
- widgets/gantrymenu/libs/common/includes.php +1 -1
- widgets/gantrymenu/libs/includes.php +1 -1
- widgets/gantrymenu/libs/librokmenu/AbstractRokMenuFormatter.php +1 -1
- widgets/gantrymenu/libs/librokmenu/AbstractRokMenuLayout.php +1 -1
- widgets/gantrymenu/libs/librokmenu/AbstractRokMenuProvider.php +1 -1
- widgets/gantrymenu/libs/librokmenu/AbstractRokMenuTheme.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenu.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuDefaultRenderer.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuFormatter.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuGreaterThenLevelFilter.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuHeader.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuIdFilter.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuIterator.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuLayout.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuNode.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuNodeBase.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuNodeTree.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuNotOnActiveTreeFilter.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuProvider.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuRenderer.php +1 -1
- widgets/gantrymenu/libs/librokmenu/RokMenuTheme.php +1 -1
- widgets/gantrymenu/libs/librokmenu/includes.php +1 -1
- widgets/gantrymenu/libs/providers/GantryMenuProviderWordpress.php +1 -1
- widgets/gantrymenu/libs/renderers/GantryMenuRendererWordpress.php +1 -1
- widgets/gantrymenu/themes/default/js/responsive-selectbox.js +1 -1
- widgets/gantrymenu/themes/default/js/responsive.js +1 -1
- widgets/gantrymenu/themes/default/js/rokmediaqueries.js +1 -1
- widgets/gantrymenu/themes/default/js/sidemenu.js +1 -1
- widgets/iphonemenu.php +1 -1
- widgets/links.php +1 -1
- widgets/loginbutton.php +2 -2
- widgets/loginform.php +2 -2
- widgets/logo.php +1 -1
- widgets/menu.php +1 -1
- widgets/meta.php +1 -1
- widgets/overridesmap.php +1 -1
- widgets/pages.php +1 -1
- widgets/recentcomments.php +1 -1
- widgets/recentposts.php +1 -1
- widgets/resetsettings.php +1 -1
- widgets/totop.php +1 -1
- widgets/viewswitcher.php +1 -1
CHANGELOG.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
*
|
5 |
* @version $Id: CHANGELOG.php 61634 2016-01-07 08:10:04Z jakub $
|
6 |
* @author RocketTheme http://www.rockettheme.com
|
7 |
-
* @copyright Copyright (C) 2007 -
|
8 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
9 |
*/
|
10 |
die();
|
4 |
*
|
5 |
* @version $Id: CHANGELOG.php 61634 2016-01-07 08:10:04Z jakub $
|
6 |
* @author RocketTheme http://www.rockettheme.com
|
7 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
8 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
9 |
*/
|
10 |
die();
|
CREDITS.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package gantry
|
6 |
* @version $Id: CREDITS.php 58623 2012-12-15 22:01:32Z btowles $
|
7 |
* @author RocketTheme http://www.rockettheme.com
|
8 |
-
* @copyright Copyright (C) 2007 -
|
9 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
10 |
*
|
11 |
*/
|
5 |
* @package gantry
|
6 |
* @version $Id: CREDITS.php 58623 2012-12-15 22:01:32Z btowles $
|
7 |
* @author RocketTheme http://www.rockettheme.com
|
8 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
9 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
10 |
*
|
11 |
*/
|
MD5SUMS
CHANGED
@@ -1,674 +1,680 @@
|
|
1 |
languages/gantry-en_US.mo 7c70a446f9c7b028775e138b5191b024
|
|
|
2 |
languages/gantry.pot 9c628deb8945c8e83f1922c8e20c420f
|
3 |
languages/gantry-en_US.po 1d5b640a45e0cc90c689bad8c1c9cf1e
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
admin/ajax-models/index.html d41d8cd98f00b204e9800998ecf8427e
|
10 |
-
admin/ajax-models/
|
11 |
-
admin/ajax-models/
|
12 |
-
admin/ajax-models/
|
13 |
-
admin/
|
14 |
-
admin/
|
15 |
-
admin/
|
16 |
-
admin/
|
17 |
-
admin/
|
18 |
-
admin/
|
19 |
-
admin/
|
20 |
-
admin/forms/
|
21 |
-
admin/forms/
|
22 |
-
admin/forms/
|
23 |
-
admin/forms/
|
24 |
-
admin/forms/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
admin/forms/groups/innertabs.php 1105f67378892b36e6bc2e44bb577961
|
26 |
-
admin/forms/groups/position.php
|
|
|
27 |
admin/forms/groups/index.html d41d8cd98f00b204e9800998ecf8427e
|
28 |
-
admin/forms/groups/
|
29 |
-
admin/forms/
|
30 |
-
admin/forms/fields/colorchooser.php fa23e8cc342f54876581e0e0ee61abe4
|
31 |
-
admin/forms/fields/tips.php 78b4623641485f29918a2f302d3a09b5
|
32 |
-
admin/forms/fields/ajaxbutton.php 424216d45459379f7290978cc6a860cb
|
33 |
-
admin/forms/fields/overlays.php b6dafd51867e32e7ad4293a03657ed0c
|
34 |
-
admin/forms/fields/list.php 5897d4aea8b9458c9a6f72e609fc9258
|
35 |
-
admin/forms/fields/radio.php fc75d589a1c8dbaaba1b16b1c176d47e
|
36 |
-
admin/forms/fields/imagepicker.php d6063bb74fa487e5a9cc8014336e4305
|
37 |
-
admin/forms/fields/diagnostic.php c62bbbb9367694327db630b283004f99
|
38 |
-
admin/forms/fields/selectbox.php b171e3b831aa9dc5654ea8e8716cc96f
|
39 |
-
admin/forms/fields/slider.php 817b84ba04595320e764c722415a86f1
|
40 |
-
admin/forms/fields/showmax.php 376d461787ae52de33f5f3ceb198c677
|
41 |
-
admin/forms/fields/preset.php c309588457906f0a74e27e329b05af7c
|
42 |
-
admin/forms/fields/gradient.php e4eae90839617d7687cabf53695769bd
|
43 |
-
admin/forms/fields/updater.php 27f67e9abd234be3f32476497f8fd7f4
|
44 |
-
admin/forms/fields/html.php d71542f12c964fb0323a74343f38fc5e
|
45 |
-
admin/forms/fields/imagelist.php 52e1d8ae003c498c0d15021d9f68d840
|
46 |
-
admin/forms/fields/alias.php 2aacc555a0e309439e7b9ea467ecfafc
|
47 |
-
admin/forms/fields/password.php 1ec7a40ead7d2514b272e4e34caba0b4
|
48 |
-
admin/forms/fields/spacer.php e42d6de15d7f539d4fb835535448b3e1
|
49 |
-
admin/forms/fields/integer.php aa3caba08c98654cfc54a10908b4214a
|
50 |
-
admin/forms/fields/position.php 48966e0a374a23ab17d4227fcf8f26d2
|
51 |
-
admin/forms/fields/groupedlist.php 0317193b333409487996cc30aba9af29
|
52 |
-
admin/forms/fields/index.html d41d8cd98f00b204e9800998ecf8427e
|
53 |
-
admin/forms/fields/gantry.php 0cd2ac15bc27da4253b5da2db4ae8579
|
54 |
-
admin/forms/fields/textarea.php 1e9df6f4d37b97b9c76587354b6154be
|
55 |
-
admin/forms/fields/file.php 1d2588bf3e6579a6c2a9c2ba1b967054
|
56 |
-
admin/forms/fields/positionslist.php a2650ff48d3bb489f86cf6edfb5d89ed
|
57 |
-
admin/forms/fields/fonts.php cecfbc8056528cbdabce8f2cc27efbfa
|
58 |
-
admin/forms/fields/filelist.php 3eecb12fb57159c564083f64b34fbe80
|
59 |
-
admin/forms/fields/linkcategories.php 1b95461bf5861a104b630e5795f5a62a
|
60 |
-
admin/forms/fields/toggle.php 5b693500b6d8cd97d44539e6314e60fc
|
61 |
-
admin/forms/fields/categories.php 5ce05f556742e96687acbe907f4e5d59
|
62 |
-
admin/forms/fields/hidden.php c323342b4ce2203d54882d896cea3af9
|
63 |
-
admin/forms/fields/checkbox.php 5a190538f1eb6b9ac227c2dd9fddb05a
|
64 |
-
admin/forms/fields/animation.php 90bce94fa6e6ee3b8fbaa1dc3f20a957
|
65 |
-
admin/forms/fields/textplus.php 2a12df57e89b827781e914a29528e581
|
66 |
-
admin/forms/fields/dateformats.php 5cb2d29b9f6ed0bc0fa86c52a49dc9a2
|
67 |
-
admin/forms/fields/navmenulist.php cb418f57a8c27d51edb00af76b4a417c
|
68 |
-
admin/forms/fields/positions.php af4a936f9dd5a5c5046eb110810a5613
|
69 |
admin/forms/index.html d41d8cd98f00b204e9800998ecf8427e
|
70 |
-
admin/index_orig.php
|
71 |
-
admin/
|
72 |
-
admin/
|
73 |
-
admin/
|
74 |
-
admin/widgets/
|
75 |
-
admin/widgets/
|
76 |
-
admin/widgets/
|
77 |
-
admin/widgets/
|
78 |
-
admin/widgets/
|
79 |
-
admin/widgets/
|
80 |
-
admin/widgets/
|
81 |
-
admin/widgets/
|
82 |
-
admin/widgets/
|
83 |
-
admin/widgets/
|
84 |
-
admin/widgets/
|
85 |
-
admin/widgets/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
admin/widgets/colorchooser/images/moor_woverlay.png aaec307feabb7482df3abfc27878d554
|
|
|
|
|
|
|
87 |
admin/widgets/colorchooser/images/moor_boverlay.png 0c64ea1bc23c08a04ca9cecccc7e58f8
|
|
|
|
|
|
|
88 |
admin/widgets/colorchooser/images/moor_slider.png 7c5699a1ede46cd191c719d4b4f1b45f
|
|
|
89 |
admin/widgets/colorchooser/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
90 |
-
admin/widgets/colorchooser/images/moor_arrows.png 4edbf4fedcedde96754d74921e39d693
|
91 |
-
admin/widgets/colorchooser/images/chooser-back.png f243df6677d7ea2a9cc8268b530f1ff9
|
92 |
-
admin/widgets/colorchooser/images/moor_cursor.gif 031ecf9ba2ddbbf8b18f06a4aa15f79e
|
93 |
-
admin/widgets/colorchooser/index.html d41d8cd98f00b204e9800998ecf8427e
|
94 |
-
admin/widgets/colorchooser/css/mooRainbow-2.0.css 4f0a85efcc1451e22bf8bc4fe236c6e9
|
95 |
-
admin/widgets/colorchooser/css/index.html d41d8cd98f00b204e9800998ecf8427e
|
96 |
admin/widgets/colorchooser/css/mooRainbow.css 6fa2f91acbb0dc6bddc651efd1987a62
|
|
|
97 |
admin/widgets/colorchooser/css/mooRainbow-2.0.less 73a8fa09c524c091892d5bcc0bf25597
|
98 |
-
admin/widgets/colorchooser/
|
99 |
-
admin/widgets/
|
100 |
-
admin/widgets/colorchooser/js/mooRainbow.js 8a9ad792ea2f505af071ab603337c2df
|
101 |
-
admin/widgets/colorchooser/js/mooRainbow-2.0.js a4d1107750bebd2a17fe61f29952d02c
|
102 |
-
admin/widgets/gantry-ie.css 18423534653d8e79b0d86ae815b79b16
|
103 |
-
admin/widgets/bootstrap-multiselect.js 6324643f4bd8e361dec140abb9590bf8
|
104 |
-
admin/widgets/gantry-widgets.js 8e9eb9dbd0c7533614e9ac07041b6ae0
|
105 |
-
admin/widgets/fonts/index.html d41d8cd98f00b204e9800998ecf8427e
|
106 |
admin/widgets/fonts/js/google-fonts.json 2abeeee4d672d48be682c3adad8987f7
|
107 |
-
admin/widgets/fonts/js/fonts.js e45d46ced56d491d593611aa40bc0f6a
|
108 |
admin/widgets/fonts/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
|
|
|
|
109 |
admin/widgets/moofx.js 24a9cdd27667218ae42c55d430c8a5c7
|
110 |
-
admin/widgets/
|
111 |
-
admin/widgets/
|
112 |
-
admin/widgets/
|
113 |
-
admin/widgets/
|
114 |
-
admin/widgets/
|
115 |
-
admin/widgets/preset/images/
|
116 |
-
admin/widgets/preset/images/scrollbar-right.png 7f27bff77697973e3e76eaca21dc90fd
|
117 |
admin/widgets/preset/images/preset-bg.png dd99d8f06e53cfbead7672403edf928c
|
118 |
-
admin/widgets/preset/images/delete.png 79ec729737c02e5b58a5a6aaf949e4c8
|
119 |
admin/widgets/preset/images/title-bg.png 99c06fb27f66c40cc7012d69e7796f0f
|
|
|
120 |
admin/widgets/preset/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
121 |
-
admin/widgets/preset/images/scrollbar-
|
122 |
-
admin/widgets/preset/images/
|
123 |
-
admin/widgets/
|
124 |
-
admin/widgets/
|
125 |
-
admin/widgets/
|
126 |
-
admin/widgets/
|
127 |
-
admin/widgets/images/
|
128 |
-
admin/widgets/images/lowhigh-legend.png 200b76b2d8e7dba5ea5b19d5fb871573
|
129 |
admin/widgets/images/graphic-level.png 18a0c94081bcc710b3f01293731a0e9b
|
130 |
-
admin/widgets/images/
|
131 |
admin/widgets/images/overrides-default.png fba189e52340aa958c383467028686aa
|
|
|
|
|
|
|
132 |
admin/widgets/images/overrides-toolbar.png 490fe6670c5e88acc6d49dd34ed54ac4
|
133 |
-
admin/widgets/images/master-notice.png bff88e688f72d1fade3378fa41615d9a
|
134 |
-
admin/widgets/images/overrides-arrow.gif c6b4cb163011e316835b02d5b277ee8a
|
135 |
-
admin/widgets/images/tooltip.png 32fd16b09e8dbbb751762210d2cbc899
|
136 |
admin/widgets/images/gantry-small.png 7ea6015d31baa0e9603be827bdf7a16a
|
137 |
-
admin/widgets/images/integrity-
|
|
|
|
|
|
|
138 |
admin/widgets/images/g4-logo-small.png 93dc0e355271c69d0d0652609b42b116
|
139 |
-
admin/widgets/images/slider.png 56a834e712d3d07e896b29d2553c32bb
|
140 |
-
admin/widgets/images/textinput.png b6a526aa9616464510caff6d3eaa9c8e
|
141 |
admin/widgets/images/divider-bar-old.png 98be4adb6f9acea6bda201ce1618a1c0
|
142 |
-
admin/widgets/images/integrity-arrows2.png bc53a40d2326b16670e8ac1f8a95a5d8
|
143 |
-
admin/widgets/images/delete.png 0026f6f98224c95c53d83c55c75febbd
|
144 |
-
admin/widgets/images/gantry-master.png ba74dda779026ae4676ab7526d2339bd
|
145 |
-
admin/widgets/images/master-bar.png 3436e0162cf41afb2a6321847ac43c2b
|
146 |
-
admin/widgets/images/h3-bg.png c4c044c246ffa71c3a991bef2a091e5b
|
147 |
admin/widgets/images/success.png 32239e1181e7daf43566d1f3160d0823
|
|
|
|
|
148 |
admin/widgets/images/badges.png 8826415e8018a9c9299a9ee9ccf209dc
|
|
|
|
|
|
|
|
|
|
|
149 |
admin/widgets/images/delete-buttons.png 7b998132f49220a09018fc8612dc1f8e
|
150 |
-
admin/widgets/images/version-update.png 617ff2120aa22f866940cdeeb7263d9a
|
151 |
-
admin/widgets/images/integrity-header.png 1d953c9e64424c151d4ac41ab166995c
|
152 |
-
admin/widgets/images/overrides-buttons-r.png 02a6863322aa0657254d797d1f463dcd
|
153 |
-
admin/widgets/images/overrides-buttons-l.png 67d26eae6ff37a871e832a6180fcc96a
|
154 |
-
admin/widgets/images/integrity-good.png 78efcf07ed9385748e67ef0874ba5df6
|
155 |
-
admin/widgets/images/gantry-gears.jpg 22cb7f9710090ce3eedcdc663b7fdf05
|
156 |
admin/widgets/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
157 |
-
admin/widgets/images/
|
158 |
-
admin/widgets/images/
|
159 |
-
admin/widgets/images/
|
160 |
-
admin/widgets/images/updater-good.png f3ed83ab2aac3c43a0dd28ccc5cdb3ce
|
161 |
-
admin/widgets/images/h3-arrows.png 347f7bc4e01f076af1cb8a964dcf315f
|
162 |
admin/widgets/images/spinner.gif faa74e8c61fc64d5edb11613c7eead2c
|
163 |
-
admin/widgets/images/
|
|
|
|
|
|
|
164 |
admin/widgets/images/version-bg.png 4044ed80d6e2c6e83b8681ce58341180
|
|
|
|
|
165 |
admin/widgets/images/divider-bar.png 5a8b820524b76212dc13cc35b92d68b3
|
166 |
admin/widgets/images/divider-grab.png 0957b76fb05bdc256044b271b53e1e1a
|
167 |
-
admin/widgets/images/
|
168 |
-
admin/widgets/images/google_favicon.png 561f5e9c5198b37b7739fa77a25c997c
|
169 |
admin/widgets/images/preset-saver.png 6237f4421ffba29e5408739ac918ad11
|
170 |
-
admin/widgets/
|
171 |
-
admin/widgets/
|
172 |
-
admin/widgets/
|
173 |
-
admin/widgets/
|
174 |
-
admin/widgets/
|
175 |
-
admin/widgets/
|
176 |
-
admin/widgets/
|
177 |
-
admin/widgets/
|
178 |
-
admin/widgets/
|
179 |
-
admin/widgets/
|
180 |
-
admin/widgets/
|
181 |
-
admin/widgets/
|
182 |
-
admin/widgets/
|
183 |
-
admin/widgets/
|
184 |
-
admin/widgets/gantry-administrator.css 0590b6011f391387257728a387bf7fd6
|
185 |
-
admin/widgets/gantry.popupbuttons.js c69c6557e0725000ab1e72b0c771bd82
|
186 |
-
admin/widgets/assignments/index.html d41d8cd98f00b204e9800998ecf8427e
|
187 |
-
admin/widgets/assignments/js/assignments.js 3afe5006972fb170241312171b6a065f
|
188 |
-
admin/widgets/assignments/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
189 |
-
admin/widgets/gantry-widgets.css 8847c94c9a62e9bb07131c8d5d66a98f
|
190 |
-
admin/widgets/gantry.css 70854c45a38f2354c0e93e0353b4d3c8
|
191 |
-
admin/widgets/toggle/images/toggle-disabled.png fafd32c33b0fba155fbc3a4c6293b9f4
|
192 |
-
admin/widgets/toggle/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
193 |
-
admin/widgets/toggle/images/toggle.png d37ed69e34fa3f0f08ee4a86df94701d
|
194 |
-
admin/widgets/toggle/js/touch.js 9b50493d5598356e483f33abd9dd9661
|
195 |
-
admin/widgets/toggle/js/toggle.js a9adaa0f51947bbbb2ca048c1647b0a4
|
196 |
-
admin/widgets/toggle/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
197 |
-
admin/widgets/positions/index.html d41d8cd98f00b204e9800998ecf8427e
|
198 |
admin/widgets/positions/js/positions-utils.js a1fcbf725ac202872824521b4418606d
|
199 |
admin/widgets/positions/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
admin/widgets/selectbox/images/dropdown-right.png 6903ccefb5b245b90740e79da18838f7
|
201 |
-
admin/widgets/selectbox/images/
|
202 |
-
admin/widgets/selectbox/images/dropdown-left.png 45418fe9c9c60bc4e594a744a2e4cc7f
|
203 |
admin/widgets/selectbox/images/select2-left.png b9b783b18bec3af74c6a4f127f11e581
|
204 |
admin/widgets/selectbox/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
205 |
-
admin/widgets/selectbox/images/
|
206 |
admin/widgets/selectbox/images/select-left.png 185c5ba6f10bce3f77f3281cbad6e45f
|
207 |
-
admin/widgets/selectbox/images/
|
208 |
-
admin/widgets/selectbox/
|
209 |
-
admin/
|
210 |
-
admin/
|
211 |
-
admin/
|
212 |
-
admin/widgets/slider/images/slider-tip.png 84e346c5f36fac48c71d7fc55b92d3c6
|
213 |
-
admin/widgets/slider/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
214 |
-
admin/widgets/slider/index.html d41d8cd98f00b204e9800998ecf8427e
|
215 |
-
admin/widgets/slider/js/slider.js a958aa0ae6eb44e75eecded733d03911
|
216 |
-
admin/widgets/slider/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
217 |
-
admin/widgets/slider/js/unserialize.js 3a193431a6be09d8a9e7eba84abf1529
|
218 |
-
admin/widgets/slider/js/slider-utils.js 4cf34c78db862ae5208c8a427e7cf01a
|
219 |
-
admin/widgets/checkbox/images/checkbox-small.png 51c41abf8a74c11031a33f0ec0e87dac
|
220 |
-
admin/widgets/checkbox/images/checkbox-large.png 9de3e22a6cb64be6fe5f7ea07f82fe81
|
221 |
-
admin/widgets/checkbox/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
222 |
-
admin/widgets/checkbox/index.html d41d8cd98f00b204e9800998ecf8427e
|
223 |
-
admin/widgets/bootstrap-multiselect.css f9d97852b22a7f1afeca10434862eb25
|
224 |
-
admin/widgets/imagepicker/images/button.png efcbbbb748b2702bfa7c5996149cc480
|
225 |
-
admin/widgets/imagepicker/images/no-image.png a0fdd581cff9f7cefee2027d37a557e9
|
226 |
-
admin/widgets/imagepicker/css/imagepicker.css 64054dbcf55a9e517d51cea66fabe87c
|
227 |
-
admin/admin_presets.php 7d38e74e5dffe8dd16a6eca43c430888
|
228 |
-
admin/cache/9.cache.txt b0a09f577af05fb451c33c50c223b802
|
229 |
-
admin/cache/index.html d41d8cd98f00b204e9800998ecf8427e
|
230 |
admin/cache/16.cache.txt 2c913df369f84d867cbda579c531c298
|
|
|
231 |
admin/cache/12.cache.txt 50d8fcf9b2d9b65ad68d5643ca2ca819
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
assets/jui/less/variables.less f55679b711defcf6aec4b0795132df6f
|
260 |
-
assets/jui/less/
|
261 |
-
assets/jui/less/font-awesome.less a5350d64481f6b562f3a6c7a6ec65e56
|
262 |
-
assets/jui/less/responsive-768px-979px.less 30249de0ab74c60a4e1e0730a63c0c1c
|
263 |
assets/jui/less/grid.less 2d2437fc0a66629c5d69d2eb59931483
|
264 |
assets/jui/less/tables.less f63ec5ff43b9aa32e9270ad75dee4591
|
|
|
|
|
|
|
|
|
|
|
265 |
assets/jui/less/type.less f01554bff6df1f7b17715a2272930c1e
|
266 |
-
assets/jui/less/layouts.less 90413797569e34a2b5e10b53d6e61087
|
267 |
-
assets/jui/less/bootstrap-rtl.less 568589c1d305c1b441ed721231f96b7a
|
268 |
-
assets/jui/less/responsive-1200px-min.less 0cec9870b3de459002ae746379011a6e
|
269 |
-
assets/jui/less/hero-unit.less d40d5b66d6a3c1f62596996f1abe9a81
|
270 |
-
assets/jui/less/scaffolding.less f2050a8d6672d2fe7cb39a7b6109d93b
|
271 |
-
assets/jui/less/accordion.less 317f3dcbff577d991f069df7976efa4f
|
272 |
-
assets/jui/less/modals.less 7694c0ec0cce4849f1f1d10b7483888f
|
273 |
-
assets/jui/less/font-awesome4/stacked.less 518e2b2d263982d2caa1e6514b4b4eac
|
274 |
-
assets/jui/less/font-awesome4/variables.less 9fee729b2f37cf1e234632ed66fa9212
|
275 |
-
assets/jui/less/font-awesome4/font-awesome.less 468f606d3d79e0de653ad010c0e24c0d
|
276 |
-
assets/jui/less/font-awesome4/icons.less e307cef3a4e7ea676babf6150d0265a7
|
277 |
-
assets/jui/less/font-awesome4/path.less 3ae443e0386cc3a69ff47d641aefb74b
|
278 |
-
assets/jui/less/font-awesome4/animated.less 08baef05e05301cabc91599a54921081
|
279 |
-
assets/jui/less/font-awesome4/larger.less 8cb65280c0f889daf72626c21a7c8628
|
280 |
-
assets/jui/less/font-awesome4/fixed-width.less 5e07ec001f8d21bd279c12ee542813f7
|
281 |
-
assets/jui/less/font-awesome4/core.less fb4efe4ae63737706875bbbfc7b7e9af
|
282 |
-
assets/jui/less/font-awesome4/rotated-flipped.less a8476cdc50c264abd11ff59d6a9dd025
|
283 |
-
assets/jui/less/font-awesome4/mixins.less 63afa4054431cd255dd522314d42fe01
|
284 |
-
assets/jui/less/font-awesome4/bordered-pulled.less 898f90e40876883214bbd121b0c20e9f
|
285 |
-
assets/jui/less/font-awesome4/list.less 975571323cf880a4a30601998236b027
|
286 |
-
assets/jui/less/component-animations.less 187f9da4ce323b12c0a84ffa2d736f6c
|
287 |
assets/jui/less/carousel.less 7eaaa93377aa50d0d5c6761c1c7c8300
|
288 |
-
assets/jui/less/
|
|
|
289 |
assets/jui/less/font-awesome/variables.less 9a54f737a4aa1a4d295f32c5231560a2
|
|
|
|
|
290 |
assets/jui/less/font-awesome/font-awesome.less 65268b3a59ae3407bf8c4c2301a6bddb
|
291 |
assets/jui/less/font-awesome/icons.less ea55ef71be079e170d2e35ff90dc6e18
|
|
|
292 |
assets/jui/less/font-awesome/path.less 7a24dc675c3839fb770087ccd51b672e
|
293 |
assets/jui/less/font-awesome/core.less 5238629100d376f16093646cedd6b131
|
294 |
-
assets/jui/less/
|
295 |
-
assets/jui/less/
|
296 |
-
assets/jui/less/
|
297 |
-
assets/jui/less/
|
|
|
298 |
assets/jui/less/icomoon.less b868f8f4ce45fcad254f7be690b2039f
|
299 |
-
assets/jui/less/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
assets/jui/less/index.html 8a3edb0428f11a404535d9134c90063f
|
301 |
-
assets/jui/less/tooltip.less 4a3ae2fcd816d8139bfe1332eb7f6202
|
302 |
-
assets/jui/less/navbar.less 5e446619ef5efff44c028c8fc8faff8c
|
303 |
-
assets/jui/less/bootstrap.less e94f17de05db3c3dc16434193c62ffda
|
304 |
-
assets/jui/less/utilities.less c7a238b720e8ba267c6903a72743e1e4
|
305 |
assets/jui/less/popovers.less b8224c536a1f353ede9d2d6f6ed0ebac
|
306 |
-
assets/jui/less/
|
307 |
-
assets/jui/less/code.less 8b12e84f9081c066da8ae26bba58a3b7
|
308 |
assets/jui/less/forms.less f7a18c315b7e416faf95b11429ceab70
|
309 |
-
assets/jui/less/
|
|
|
|
|
|
|
310 |
assets/jui/less/responsive-767px-max.less 39173ba455b0d3f8dddeb4e7edf26f8d
|
311 |
-
assets/jui/less/
|
312 |
-
assets/jui/less/
|
313 |
-
assets/jui/less/
|
314 |
-
assets/jui/less/
|
315 |
-
assets/jui/less/
|
316 |
-
assets/jui/less/progress-bars.less 1e45e136314d5c3b99f73b9b7866a74d
|
317 |
assets/jui/less/responsive.less 02ee9155ddbbc5fd2e3b2568b13ba380
|
318 |
-
assets/jui/
|
319 |
-
assets/jui/
|
320 |
-
assets/jui/
|
321 |
-
assets/jui/
|
322 |
-
assets/jui/
|
323 |
-
assets/jui/
|
324 |
-
assets/jui/
|
325 |
-
assets/jui/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
assets/jui/js/bootstrap.min.js 450c9472f4afb0a2d33acb52b378c820
|
|
|
327 |
assets/jui/js/chosen.jquery.js 4bf32091e3e36e6a9bf58fe18f0e5851
|
328 |
assets/jui/js/sortablelist.js 27d36762f19a58f8200cc14b090bae9c
|
329 |
-
assets/jui/js/
|
330 |
-
assets/jui/js/jquery-noconflict.js e2060c4e5e5955c824723b13a212d3ec
|
331 |
-
assets/jui/js/jquery.js 41ca0b5d474117281973aeb249b944c8
|
332 |
assets/jui/js/chosen.jquery.min.js c7e1d3cd9d4466e5f24252f8c6d40ded
|
333 |
assets/jui/js/jquery.ui.sortable.js 97ab77008384cfe74f23461929fb783f
|
|
|
334 |
assets/jui/js/jquery.ui.sortable.min.js 43c85e35d4e1a5823f9fa4514bdd32cd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
assets/jui/js/html5.js 69431f1ec831bacf31013dff2872cba0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
images/bg-3-6-3.png ab95c77bee438263e6848daaeb6216d9
|
|
|
|
|
337 |
images/blank.gif f58783577b00e764e743e1ebd1b1d68c
|
338 |
-
images/
|
339 |
-
images/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
images/iphone/buttons.png 0f4eb557557fd8c46a16efdae8bef856
|
341 |
-
images/iphone/forward.png 1bf1b8a7047eac3bd5d63f7d733ed3a3
|
342 |
images/iphone/index.html d41d8cd98f00b204e9800998ecf8427e
|
343 |
-
images/iphone/menu-bg.png 52085ede5a4d4e96c35ac0e9a7477337
|
344 |
images/iphone/forward.gif 38aee8b0ca60da174b570c6eb1e4de0f
|
345 |
images/iphone/back.png 570282bb42d986fea2a12a5339b49cc9
|
346 |
-
images/iphone/
|
347 |
-
images/iphone/
|
348 |
images/iphone/switcher.png 58476fd8accd91223d753cf6b775a896
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
images/spinner.gif 117a2ea3fe0fa5ffcb104eca058111c7
|
357 |
-
images/close.png bc78dfad86cb326991c3dcc37f849be9
|
358 |
-
images/close_hover.png 830b06cf015bf4f9505e1dde9db0cf87
|
359 |
-
images/rocket.png 5069154cc0e54fd066bda96cd3285f8b
|
360 |
-
images/speach-bubble.png 3c80cb07d9d6a57d87e751da41efa59e
|
361 |
-
gizmos/fontawesomepaths.php 295cc83773124565cd97d25aae081897
|
362 |
-
gizmos/searchhighlight.php 953a1c1116e2cf014abde174c80d7c75
|
363 |
-
gizmos/commentreply.php aa8c2d7adb9e859e699be5ed0651a060
|
364 |
-
gizmos/iphonegradients.php b79fe44dcfaabdc9c4133f5cb85a6c79
|
365 |
-
gizmos/webfonts.php 7f128a74248ec28b289df6f81727b2b9
|
366 |
-
gizmos/mshelper.php c65cf0711232713ab16581163e2ad0cc
|
367 |
-
gizmos/iphoneimages.php c5397881ebd02b8de925460106b8255e
|
368 |
-
gizmos/title.php 35cff7aa0183b4b7f8e3e108dcba9451
|
369 |
-
gizmos/maintenancemode.php 03d076449624e57c3ea5a60a546e9116
|
370 |
-
gizmos/wpml.php d8d01d2932cae829071bcce58c83dd34
|
371 |
-
gizmos/compatibility.php 52db2f33be0f062bda5e7685452383db
|
372 |
-
gizmos/rtl.php 42ee13ead196d03b8841437af68e5b07
|
373 |
-
gizmos/yoast.php 42187749a058b0c7d6c39d03a977664c
|
374 |
-
gizmos/childcss.php f944c21de556ede001b1edf2b976c033
|
375 |
-
gizmos/rokstyle.php 4053a939c0ce7a7f5afc38227fc3a6c9
|
376 |
-
gizmos/feedlinks.php f20848b5f5630806bfc9bdf9522af91b
|
377 |
-
gizmos/ie6.php 8d7f6996bca4fc34fc54f9bba5112068
|
378 |
-
gizmos/ie6warn.php 2342ecbc7f0a58fe876d4263265fdb3e
|
379 |
-
gizmos/woocommerce.php 33bc85d6fe3c4bc9a5c44d5a792253c0
|
380 |
-
gizmos/pagesuffix.php da4da6b6ed41b72d96770260a6e36ebf
|
381 |
-
gizmos/texturize.php 7bbd7f4b8f329ddd9cdc0f9e0347d0ce
|
382 |
-
gizmos/index.html d41d8cd98f00b204e9800998ecf8427e
|
383 |
-
gizmos/styledeclaration.php 92b3a8a51fc84eb612100e36936ae95a
|
384 |
-
gizmos/buddypress.php 094a567bbb0073f3ec3c0e4b7bb509e7
|
385 |
-
gizmos/autoparagraphs.php b935bd1810cc95387b611974a562fa32
|
386 |
-
gizmos/widgetshortcodes.php baa5165c685c9f40583f0d79f7efc440
|
387 |
-
gizmos/belatedpng.php 70bfc775c5a6e784a60fbc235bb60359
|
388 |
-
gizmos/bbpress.php eabd76fbb39dc6a9d82f9be429115da8
|
389 |
-
gizmos/smartload.php 5ab96ebaef8566511d64aeb5896b00ec
|
390 |
-
gizmos/loadposition.php 8b8fafb97df551eabea1f58906c89a63
|
391 |
-
gizmos/analytics.php b4bf1f9b2cef0556cb83b3c191187079
|
392 |
-
gizmos/font.php f811b5e765f980ff8360dceed12bb7ef
|
393 |
-
gizmos/wpmenucart.php 7a47814ea693ea53222d446e7ab316fb
|
394 |
-
gizmos/thumbnails.php 63e3062bbdbb04abf732edaf2ad776ed
|
395 |
-
gizmos/jstools.php 489383e038715313641aa98dd174e0b8
|
396 |
-
classes/Gantry/FileResolver.php 0d12b9b3cbd4303c5a69dde3d06846d5
|
397 |
-
classes/Gantry/Uri.php aca97f24a811bee2770f3b4dce62d247
|
398 |
-
classes/Gantry/Uri/Components.php 6a333b51adcf5a5d9fa97e9c89733af2
|
399 |
-
classes/Gantry/Uri/Util.php 6bcc9e84820e682e27baf4061d7fcf39
|
400 |
-
classes/Gantry/Uri/Builder.php b6a4e38f63ca8dc83ee30ad2568b3aa3
|
401 |
-
classes/Gantry/Loader.php ab98babcabb4a0ce86878949fea054c8
|
402 |
-
classes/Gantry/CssFileResolver.php 85f535b654c4898dc40cd15130bb0fc1
|
403 |
-
core/gantryflatfile.class.php 44dc590a714c6b21fe4dd3e1a16bb158
|
404 |
-
core/config/gantryformgroup.class.php 78b78150ed8636a23e0b9fcfcf614809
|
405 |
-
core/config/gantryformfield.class.php 1002033a82de68344344c5325531a9e6
|
406 |
-
core/config/gantryformhelper.class.php 8ef4594ce6c8358fb4a09e34656dc1ae
|
407 |
-
core/config/gantryselect.class.php f5f5876b99a9fe2092da0271319061c7
|
408 |
-
core/config/gantryelement.class.php 47fa06b06dafb2ae2106238fd86c54ef
|
409 |
-
core/config/gantryhtmlselect.class.php 270d02b3f4080de8c3107fee2f54d0f0
|
410 |
-
core/config/gantryform.class.php c8211f94ebbd11f19da3a2921b38761a
|
411 |
-
core/config/index.html d41d8cd98f00b204e9800998ecf8427e
|
412 |
-
core/config/gantryformnaminghelper.class.php aec3667aefb4424eee8b93ac86285b9a
|
413 |
-
core/config/gantryformfieldhelper.class.php fe96f17ae445bb87386ed0fd1351e802
|
414 |
-
core/config/gantryparameters.class.php f2ea3eb4607193810b81e74d629f6ef1
|
415 |
-
core/config/gantryformitem.class.php d82179063c2e26a3991a4360fd499241
|
416 |
-
core/gantrybodylayout.class.php 42636cbecd49811943840120bf0130e7
|
417 |
-
core/gantry.class.php e6c7c791f770e65c4c8acabbea083833
|
418 |
-
core/gantrycommentstempllayout.class.php af10a703f2ccde84403dba0fa0646a52
|
419 |
-
core/gantrygizmo.class.php 8875b68927d9b9ab2257114949531ecd
|
420 |
-
core/gantrygzipper.class.php 32cd05d1198786f5c7b74c722a46b772
|
421 |
-
core/utilities/gantryxml.class.php 7b75e07708b907a37be839cb135cd34d
|
422 |
-
core/utilities/gantrycache.class.php 51bf3c1a86697cdb196c6968b26425cd
|
423 |
-
core/utilities/gantrylesscompiler.class.php 82d9009ff946c9276cf072fdc76acc9c
|
424 |
-
core/utilities/gantryregistry.class.php 5b8dc9df5b07d1039085c0b75684222b
|
425 |
-
core/utilities/registry/index.html d41d8cd98f00b204e9800998ecf8427e
|
426 |
-
core/utilities/registry/format/php.php 7de51a528756788cb76906f92bcd9dc3
|
427 |
-
core/utilities/registry/format/index.html e33782263166ab59da260384f21fd4fb
|
428 |
-
core/utilities/registry/format/xml.php 0e4418361f580dfaffe1098241332826
|
429 |
-
core/utilities/registry/format/ini.php d81ec9b797b1e06fef9e2f39c43523c0
|
430 |
-
core/utilities/registry/format/json.php c68eec90308a803b36f13ff01d3fa115
|
431 |
-
core/utilities/registry/gantryregistryformat.class.php a678537bcf6e42be55995bbcce8c4c10
|
432 |
-
core/utilities/gantryurl.class.php 132f6cdb97ac1a3ac8c301f2ea865b4a
|
433 |
-
core/utilities/gantryarrayhelper.class.php d86f3308d2fc9ded15792dcb5b3bd807
|
434 |
-
core/utilities/gantryfilterinput.class.php e9e1e262ed482b4bbaca16ae59dd734b
|
435 |
-
core/utilities/gantryfolder.class.php ea8b083244885bda951e2a4a0e618620
|
436 |
-
core/utilities/index.html d41d8cd98f00b204e9800998ecf8427e
|
437 |
-
core/utilities/gantryfile.class.php 573fde9e466cf8430f39943345deddbc
|
438 |
-
core/utilities/gantrydate.class.php d0f285d602923f3761faba13f7e9f42f
|
439 |
-
core/utilities/gantrysimplexmlelement.class.php cee451dc9c59e55cacd6274f01a2d437
|
440 |
-
core/utilities/gantrypath.class.php aa31da95e467954cce3af8e099373736
|
441 |
-
core/utilities/gantrymobiledetect.class.php 34425384fa8e98d6b2e8b6def12e203e
|
442 |
-
core/utilities/gantrytemplateinfo.class.php b0ddba3a91d204cf849793ec03538137
|
443 |
-
core/utilities/cache/index.html d41d8cd98f00b204e9800998ecf8427e
|
444 |
-
core/utilities/cache/wpTransientCacheDriver.class.php 0bedb2c9a1cd7f3fc602d02a5cd2d253
|
445 |
-
core/utilities/cache/cache.class.php 1d15552ca7278a02737c94ef10a93009
|
446 |
-
core/utilities/cache/cacheDriver.interface.php f85269b1435867c94c01cec73442c4da
|
447 |
-
core/utilities/cache/fileCacheDriver.class.php 2449d36968ed9c4236db0712948f50c5
|
448 |
-
core/gantryparams.class.php 4465944287490b7a16b1d6e66c895ebc
|
449 |
-
core/gantrytemplate.class.php 303cf991aba454a696461cd281ac4593
|
450 |
-
core/gantryjson.class.php 98938258b3e3c36c60a255feb48e2f97
|
451 |
-
core/gantryini.class.php 2b3abc6e72ce8fb6d448bf94a6a2364b
|
452 |
-
core/params/gantryparamprocessor.class.php 61609a69bf9b5b0e59a8229bda1e0312
|
453 |
-
core/params/overrides/gantryurlparamoverride.class.php 6c91077f8d6984f9d1e7007fab8869b1
|
454 |
-
core/params/overrides/gantryoverrideparamoverride.class.php 6968de732b67983244dc0c3cf505368a
|
455 |
-
core/params/overrides/gantrysessionparamoverride.class.php 419f912d377ad4bbfd9fabe9b43afd17
|
456 |
-
core/params/overrides/gantrycookieparamoverride.class.php 6d4cdd1b41dcb4eb8fc0bfa242a212e9
|
457 |
-
core/params/processors/alias.php ef424cc1ff9bd0f318f7cbf35c1a65e3
|
458 |
-
core/params/index.html d41d8cd98f00b204e9800998ecf8427e
|
459 |
-
core/params/gantryparamoverride.class.php 2880ef5aeafafa29911b6752ef398292
|
460 |
-
core/index.html d41d8cd98f00b204e9800998ecf8427e
|
461 |
-
core/gantrypositions.class.php 9a60743b377c124a0354acd2090079e2
|
462 |
-
core/gantrybrowser.class.php 68b7ec078220e538e34379744822d7aa
|
463 |
-
core/gantryloader.class.php 8840a96ad0f2cb4ef78d6d7d18dcf6f8
|
464 |
-
core/rules/gantrypagecallfact.class.php b63876daf3e9135a33c11239ec5dff60
|
465 |
-
core/rules/stylerules.srl 9bfa3989975fe44c67249aa506ce8b83
|
466 |
-
core/rules/phprules/RuleSession.class.php 48d93214db002f19f9f6109e63147d8d
|
467 |
-
core/rules/phprules/Rule.class.php dd0100265b0d53b807878a545fae24ec
|
468 |
-
core/rules/phprules/RuleBase.class.php ca3482368607b4f337971f00723f171a
|
469 |
-
core/rules/phprules/index.html d41d8cd98f00b204e9800998ecf8427e
|
470 |
-
core/rules/phprules/Fact.class.php 2e7a0b9374d658cf1b4d278242f8c230
|
471 |
-
core/rules/phprules/RuleReader.class.php e7f2e70d7c29c5380713c5f326441749
|
472 |
-
core/rules/phprules/ActionFassade.class.php dcb07f28333d45bcf868a890d78aaf4f
|
473 |
-
core/rules/phprules/WorkingMemory.class.php 57273a3fe11ef694739e7d3d0f733deb
|
474 |
-
core/rules/phprules/phprules.php d8db7525a5bdb29701dace8a035b55a6
|
475 |
-
core/rules/index.html d41d8cd98f00b204e9800998ecf8427e
|
476 |
-
core/rules/gantryoverridefact.class.php 0256ec9df7e1d3115c7794ea7c03436d
|
477 |
-
core/rules/gantryoverridesengine.class.php aabe42e5c63dda7c08a96df4808a6cac
|
478 |
-
core/rules/facttypes/post_type.class.php 0259263ad2d51556db63b12946299441
|
479 |
-
core/rules/facttypes/menu.class.php d9258c70b3f1926683c47ed9de53d183
|
480 |
-
core/rules/facttypes/taxonomy.class.php 68548e30cca37bdd66c14b2b5dbfd87c
|
481 |
-
core/rules/facttypes/templatepage.class.php 86943c34dc8816cfad95697399f0500f
|
482 |
-
core/rules/facttypes/index.html d41d8cd98f00b204e9800998ecf8427e
|
483 |
-
core/rules/facttypes/wpmllang.class.php 128e6f03a924a29763a50da54c6e55d3
|
484 |
-
core/rules/facttypes/archive.class.php e0da185b8adfab07a427177ee0d65ca5
|
485 |
-
core/rules/gantryoverrides.class.php b5fdda9d4ab63e0febe3e081d79c3250
|
486 |
-
core/renderers/gantrymainbodyrenderer.class.php 2d22b562abc09148a4834dd708dad152
|
487 |
-
core/renderers/index.html d41d8cd98f00b204e9800998ecf8427e
|
488 |
-
core/renderers/gantryorderedmainbodyrenderer.class.php 9dde3a14d51e03ea45258ef8b03505c3
|
489 |
-
core/renderers/gantrycommentsrenderer.class.php 07b456dda4b32587c811ecdfab9fac98
|
490 |
-
core/renderers/gantrywidgetsrenderer.class.php e6d16a8159940be515aee5a6e43fde7f
|
491 |
-
core/renderers/gantrydebugmainbodyrenderer.class.php b5158892c9bfdce72617f026a39581de
|
492 |
-
core/gantrywidget.class.php efc08a520072ede87fc222d87b60a9e5
|
493 |
-
core/gantrylayout.class.php b5611f845f2db4bd619bdf12fd9fb168
|
494 |
-
core/gantryplatform.class.php d5347a7ac8707ebbcab5f709c5c66c23
|
495 |
-
core/gantrystylelink.class.php 3c705b5675100f210f3431b9b45af38c
|
496 |
-
core/gantrydiagnostic.class.php 19597b1873dae2a2cb653a1d635510d6
|
497 |
-
ajax-models/example.php 7630ab7d092bc8d4f2fc3bd9383279a9
|
498 |
-
ajax-models/index.html d41d8cd98f00b204e9800998ecf8427e
|
499 |
-
autoload.php b4c32fa1208fbbcdcbc76c0f1f10c3d1
|
500 |
-
admin_functions.php 68d09c1e20d1ac74edae20f9cb85cb2c
|
501 |
-
gantry.config.php fd835728fba7169a0c5e41d000ac1c47
|
502 |
libs/google-code-prettify/lang-scala.js d3bd091d7b84099d91e889bc7c0770cb
|
503 |
-
libs/google-code-prettify/lang-tcl.js 15d00fba815d6e06576336fb98776c52
|
504 |
-
libs/google-code-prettify/lang-hs.js 0a3b4b0987ff5cb251566c7c4f5d1c37
|
505 |
libs/google-code-prettify/lang-matlab.js 26ee1ce25520c428895329a05c4ed5e5
|
506 |
-
libs/google-code-prettify/lang-go.js 82374ff8b73f3e2d8b983954c1e1ca00
|
507 |
-
libs/google-code-prettify/lang-n.js 4abe536b16c3646d8c7286e5cfab6121
|
508 |
libs/google-code-prettify/lang-sql.js 85dc53f8ee26511df07bf70ed75a7b04
|
509 |
-
libs/google-code-prettify/lang-r.js f44ab13942e4e056e4d436dd6658f14d
|
510 |
-
libs/google-code-prettify/lang-proto.js 873efd03c9897ad38d134f95c6eaaabd
|
511 |
libs/google-code-prettify/lang-dart.js 319014d37860266041aa2a5a8dbe398e
|
512 |
-
libs/google-code-prettify/lang-
|
513 |
-
libs/google-code-prettify/lang-lua.js ae5f4fd51262d4d087f63f4df75e1c7a
|
514 |
-
libs/google-code-prettify/lang-tex.js f50e8714d52f12131d79aaa3d8d198c0
|
515 |
-
libs/google-code-prettify/prettify.css ecd4a5d6c0cbee10b168f6aa000c64ea
|
516 |
-
libs/google-code-prettify/lang-llvm.js e6d841b31a9c7f87f3e547c85db1153f
|
517 |
-
libs/google-code-prettify/lang-wiki.js b467f277d32f0728501b439698bc0ecc
|
518 |
libs/google-code-prettify/lang-yaml.js e0367f932b3ea37ef511ecb4d1d236e1
|
519 |
-
libs/google-code-prettify/
|
|
|
520 |
libs/google-code-prettify/lang-vb.js ec53a1ac8e62fa2bb25ef2ad32900bd4
|
521 |
-
libs/google-code-prettify/lang-ml.js be01c39a03de86862f5fe65f687b11c6
|
522 |
libs/google-code-prettify/lang-basic.js cc31708f1c51c30f23f7a6eb710bc797
|
|
|
|
|
|
|
|
|
523 |
libs/google-code-prettify/lang-pascal.js 5a31d03e01bbb8b7683197e9fb6a7c58
|
524 |
libs/google-code-prettify/lang-clj.js 3d748a47ed0eed1c0f554d30ff6efa44
|
525 |
-
libs/google-code-prettify/
|
526 |
-
libs/google-code-prettify/lang-mumps.js 031899e4c4ab891473f8327b96d860e9
|
527 |
-
libs/google-code-prettify/lang-xq.js ebc66642254c40bdd21f56c80e477918
|
528 |
-
libs/google-code-prettify/run_prettify.js c9076487b9f637bd858e3d565f3504f4
|
529 |
libs/google-code-prettify/lang-vhdl.js 1a5853df113e37f58cc5e2f2806c6b5b
|
|
|
|
|
|
|
|
|
530 |
libs/google-code-prettify/lang-lisp.js 71ac79ad50ec3fed97fa82ea945f3551
|
531 |
-
libs/google-code-prettify/lang-
|
532 |
-
libs/google-code-prettify/lang-
|
533 |
-
libs/
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
html/layouts/chrome_standard.php 785b6f2032cf267d68bc6887a712a42b
|
541 |
-
html/layouts/doc_body.php 99fa2491b76d6f2a3ddffc4fd12c623d
|
542 |
-
html/layouts/body_debugmainbody.php f70c9618ea6d8086e73b7db6a66c864c
|
543 |
-
html/layouts/body_iphonemainbody.php a7dd91894571251097544119f9f4c9a0
|
544 |
-
html/layouts/doc_tag.php 57989c003bdf57a640c08e5286c8740d
|
545 |
-
html/layouts/index.html d41d8cd98f00b204e9800998ecf8427e
|
546 |
-
html/layouts/orderedbody_mainbody.php 3e8631515920d9644698dbe20a3527f0
|
547 |
-
html/layouts/commentstempl_basic.php 548ad673920ac12b7292ce1a261a08ae
|
548 |
-
html/layouts/widget_basic.php 2e2826ad923cf73802834eec89c42c30
|
549 |
-
html/layouts/comment_basic.php 2a004f80ef40aca04705229acb0d22e0
|
550 |
-
html/layouts/chrome_basic.php 65885d28ccef565c90676dea7787a576
|
551 |
-
html/layouts/widget_sidebar.php f52cc71091b9fc8ad8936021fe7cc5ad
|
552 |
-
html/layouts/body_mainbody.php 15db8ac28554bf9ed6fc5afcd11611bb
|
553 |
-
html/layouts/widget_standard.php e91bd2395c1beaa991129bb7e9be66f6
|
554 |
-
html/index.html d41d8cd98f00b204e9800998ecf8427e
|
555 |
-
css/iphone-gantry.css 477c868f22b7c93ff841f6106644b3e9
|
556 |
-
css/grid-responsive.css 281eb38735c66cf717a28615d754ddf4
|
557 |
-
css/grid-16.css 1899450f711d056937c2dafada66d5c2
|
558 |
-
css/wordpress.css 5b4197d9b49d4bd3884ffc469d13bb4d
|
559 |
-
css/wordpress-ie7.css c1395842c54cd55d7120403164922dc5
|
560 |
-
css/index.html d41d8cd98f00b204e9800998ecf8427e
|
561 |
-
css/gantry-ie6.css 682b16452071c60246218d551590cfd0
|
562 |
-
css/gantry.css d982b240db17e3169aca44143d665c4f
|
563 |
-
css/grid-12.css 797aa48ddbb2299952d4b07e70b0ae69
|
564 |
-
css/gantrydivider.css 360b36fcb921a82ea83c38b7baabf67f
|
565 |
-
css/wordpress-ie6.css 87828a0f968b0f2b15984038a2b6e9e6
|
566 |
-
CREDITS.php 1192c8e13d58a9f6df2f681f210f5c1d
|
567 |
-
widgets/overridesmap.php bf675750ab09f6f4fa5053113532c404
|
568 |
-
widgets/totop.php d44a8913c7c0a471c21d7a828f86fc55
|
569 |
-
widgets/archives.xml 1afd18b493fda6d623614d2701bd0c50
|
570 |
-
widgets/archives.php 467944a8527cdd309e1b07a3e48431c7
|
571 |
-
widgets/pages.xml 864297ab944f6f6d1683bb0aed4f4ac4
|
572 |
-
widgets/recentposts.xml d60f230153a08bba049068ffba7ca15c
|
573 |
-
widgets/loginform.xml 26fa1e26d597161f1f33668207926411
|
574 |
-
widgets/overridesmap.xml d062edbe62fc8cd15c269d164da74dfc
|
575 |
-
widgets/viewswitcher.xml d9158524afde20931b4e3b54417840f7
|
576 |
-
widgets/loginform.php 3f03838a4c7e093200820c6f2acbad3d
|
577 |
-
widgets/copyright.php 5da4bf1f8067937fbbbb254d9077cd50
|
578 |
-
widgets/resetsettings.php adae93737b215cf9836550fc44503e18
|
579 |
-
widgets/meta.xml f77c2a19fa5fe6b95576704774959eec
|
580 |
-
widgets/fontsizer.xml 77afbf9a3700b10ad9a83d262796cf7b
|
581 |
-
widgets/breadcrumbs.php 6de230807d9b131590f6dc299a04b1cd
|
582 |
-
widgets/categories.xml 125aeda3d4d31f8d7cb4af4c914570c8
|
583 |
-
widgets/logo.php cb76749e0fd1950337e0b7764bb8c81a
|
584 |
-
widgets/totop.xml ce222afe1834fb12e6340143ede72bb2
|
585 |
-
widgets/date.php 5753ef220912518bb3df4e11766b0748
|
586 |
-
widgets/recentcomments.xml 9560a0123f311b0ea6fb281ca638af44
|
587 |
-
widgets/loginbutton.php c9420c2c64738d73bfb2247b1ee5a86d
|
588 |
-
widgets/pages.php 778c3427151550b227cff03686601123
|
589 |
-
widgets/resetsettings.xml 300de5950affc376a9fb46d242478ee6
|
590 |
-
widgets/date.xml 47cc13a501097b9d3a002c0929c6b71d
|
591 |
-
widgets/logo.xml e522f0b433d5db38004272526143d3ee
|
592 |
-
widgets/index.html d41d8cd98f00b204e9800998ecf8427e
|
593 |
-
widgets/menu.xml d2504c9219892ff32caea0f2140e3d3d
|
594 |
-
widgets/viewswitcher.php 40d1f5f32016a20de857c788d1f676e5
|
595 |
-
widgets/meta.php a12082649ea62085aa7532e09ab93455
|
596 |
-
widgets/iphonemenu.xml 3efd5c36610ff90d601081683365bc22
|
597 |
-
widgets/recentposts.php b83d59af439339e7c2baaa7f049822fd
|
598 |
-
widgets/iphonemenu.php 90f95227f1c27d67b28e34b80251233f
|
599 |
-
widgets/recentcomments.php afcdd6a1c0e5ccd6008dd7fb00044eae
|
600 |
-
widgets/gantrymenu/admin/fields/index.html d41d8cd98f00b204e9800998ecf8427e
|
601 |
-
widgets/gantrymenu/admin/fields/themelist.php ff5f17891f0ec3b17b3827e560602781
|
602 |
-
widgets/gantrymenu/admin/index.html d41d8cd98f00b204e9800998ecf8427e
|
603 |
-
widgets/gantrymenu/admin/RokMenuWalkerNavMenuEdit.php 66abb5c94480b05af88dfbb100847df4
|
604 |
-
widgets/gantrymenu/libs/common/RokBrowserCheck.php 8e6f0549edca0b6118a961b8d31a79a8
|
605 |
-
widgets/gantrymenu/libs/common/includes.php d0306a10880cc9c64878f206d075f634
|
606 |
-
widgets/gantrymenu/libs/common/index.html d41d8cd98f00b204e9800998ecf8427e
|
607 |
-
widgets/gantrymenu/libs/includes.php 7f42289c1cfe6f58994bc4de5d5e9263
|
608 |
-
widgets/gantrymenu/libs/GantryMenu.php 20b0c272558cf20e774b0507a32c92b0
|
609 |
-
widgets/gantrymenu/libs/index.html d41d8cd98f00b204e9800998ecf8427e
|
610 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuIterator.php c620a9e59ad7d2967723771ce30e9ebf
|
611 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuLayout.php 3f387e0a7eab8cc009f553c28021165a
|
612 |
-
widgets/gantrymenu/libs/librokmenu/AbstractRokMenuProvider.php 5fdbcd546bd8d4f1130f00251e245204
|
613 |
-
widgets/gantrymenu/libs/librokmenu/AbstractRokMenuFormatter.php d5cfbbe6be08c1ba995e58e3d3926396
|
614 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuNodeBase.php 54df2896679a3609c69fcb0f223ee6bd
|
615 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuDefaultRenderer.php 1b9bfa0269e7875737c6d64f59149cea
|
616 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuNode.php 6a6113c6462f758b9e0fe650d3a95af3
|
617 |
-
widgets/gantrymenu/libs/librokmenu/includes.php 2fc85864ff4647b64801c8b4322495dc
|
618 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuNotOnActiveTreeFilter.php c4689e5ca36c4629255763da31dbf53c
|
619 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuHeader.php 3b3c62848f1484e9554e655bcbfd8b5b
|
620 |
-
widgets/gantrymenu/libs/librokmenu/AbstractRokMenuTheme.php 838464c60fb900d111b56c89c1b8a2e4
|
621 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuGreaterThenLevelFilter.php e7fa0968ce809ee1d6d66b363df715b3
|
622 |
-
widgets/gantrymenu/libs/librokmenu/RokMenu.php d27551d23755ccd3778c1e529a468738
|
623 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuRenderer.php 86b42adcb7c8cff2e33a67b4dc280028
|
624 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuIdFilter.php 08162b12781f7ac0e8780bd64da066bd
|
625 |
-
widgets/gantrymenu/libs/librokmenu/index.html 010c2899cae19aa8ee502f624c039485
|
626 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuNodeTree.php fb9f69b5a5dd10a08467c528a5862c94
|
627 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuTheme.php e4e963977c2a56d93bbbf212fb740d71
|
628 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuProvider.php 2db082454433e323a646b84c15bb9f54
|
629 |
-
widgets/gantrymenu/libs/librokmenu/AbstractRokMenuLayout.php 0e0d5b2ccdfd6e95a0b7966af8d6974d
|
630 |
-
widgets/gantrymenu/libs/librokmenu/RokMenuFormatter.php 7646747181065e462630c628a09dbbae
|
631 |
-
widgets/gantrymenu/libs/providers/index.html d41d8cd98f00b204e9800998ecf8427e
|
632 |
-
widgets/gantrymenu/libs/providers/GantryMenuProviderWordpress.php d4e7d9c8e8ddbc944c1bd612e722b7c7
|
633 |
-
widgets/gantrymenu/libs/renderers/GantryMenuRendererWordpress.php 4fdbc63b119c913790340d9bcf5e514c
|
634 |
-
widgets/gantrymenu/libs/renderers/index.html d41d8cd98f00b204e9800998ecf8427e
|
635 |
-
widgets/gantrymenu/index.html d41d8cd98f00b204e9800998ecf8427e
|
636 |
-
widgets/gantrymenu/css/widget_admin.css eb5284aae6aa91846e669a6f46ebf2b1
|
637 |
-
widgets/gantrymenu/css/index.html d41d8cd98f00b204e9800998ecf8427e
|
638 |
-
widgets/gantrymenu/themes/default/js/responsive-selectbox.js 4c4ce5d2c4e8b7636285adeed9243306
|
639 |
-
widgets/gantrymenu/themes/default/js/responsive.js 2409f9e949b0244beffc8a9fc344fda6
|
640 |
-
widgets/gantrymenu/themes/default/js/sidemenu.js 85370d055b85cc8d8a1d64e498b37009
|
641 |
-
widgets/gantrymenu/themes/default/js/index.html 8a3edb0428f11a404535d9134c90063f
|
642 |
-
widgets/gantrymenu/themes/default/js/rokmediaqueries.js ea27eceb4345bfa9691f33ff1f86ed24
|
643 |
-
widgets/gantrymenu/js/mootools.js b8dc790de19c7b95e92315aae057a497
|
644 |
-
widgets/gantrymenu/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
645 |
-
widgets/categories.php 39a425b5488529e872189e08feec94c2
|
646 |
-
widgets/fontsizer.php 19dd3560e54784c153e2d0d3e1994581
|
647 |
-
widgets/links.php 0d2bb1fdfc426fd6ca89c281b6a23eac
|
648 |
-
widgets/copyright.xml 7520cb5052b11948ccd4607d60cdea98
|
649 |
-
widgets/links.xml 983ec8c136c84f9dcdccf2494b5f6298
|
650 |
-
widgets/menu.php 3fbb9e719137e904b73fdde9f34cc6e9
|
651 |
-
widgets/breadcrumbs.xml 25a46c0a7b1c1c129c91d34cc44be439
|
652 |
-
widgets/divider.php 56fcd2b4bb795c235f4ae5b6ad424e64
|
653 |
-
widgets/loginbutton.xml 6747ca3b33dc84874e5cfb560753e554
|
654 |
readme.txt 6b98cfcddc356180f2cf09f4058203c5
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
js/fusion.js 27ec023f2c953bb69cc78cc1487c05df
|
668 |
-
js/gantry-inputs.js 51f7eefd94f273c8dab14299f1260312
|
669 |
-
js/index.html d41d8cd98f00b204e9800998ecf8427e
|
670 |
-
js/gantry-totop.js c4e19605e02b0ce5770545e3e05ec721
|
671 |
-
js/belated-png.js 00a0e6adf93f2cde824a24d30696afb0
|
672 |
-
js/gantry-search-highlight.js 747e7df140150c16d657b9ed88a935d8
|
673 |
-
js/gantry-buildspans.js e6a4e1385ee457aff2ca9b6629bd367b
|
674 |
-
js/browser-engines.js de5d2c047074141f55c5ee4bfc10f232
|
1 |
languages/gantry-en_US.mo 7c70a446f9c7b028775e138b5191b024
|
2 |
+
languages/index.html d41d8cd98f00b204e9800998ecf8427e
|
3 |
languages/gantry.pot 9c628deb8945c8e83f1922c8e20c420f
|
4 |
languages/gantry-en_US.po 1d5b640a45e0cc90c689bad8c1c9cf1e
|
5 |
+
gizmos/maintenancemode.php 8c057a49222865db320434339a545791
|
6 |
+
gizmos/feedlinks.php 6089153298b22194fae9d43518c813b1
|
7 |
+
gizmos/ie6warn.php 0f1fe2582ce3f0935a1fe742dd3f6cd4
|
8 |
+
gizmos/commentreply.php bad2d175bac8f754e160163f4bc0f955
|
9 |
+
gizmos/jstools.php d41935b2446259d3675f5117b8015694
|
10 |
+
gizmos/mshelper.php aaebd4c46327703a31a5c42563d44170
|
11 |
+
gizmos/searchhighlight.php 74ae5e517520a241c39c1c2bf38216e5
|
12 |
+
gizmos/wpmenucart.php 7fefa94b3b0aea7b66b4d3368c574062
|
13 |
+
gizmos/iphoneimages.php 77813707bbea0c45b2101a52767c64e9
|
14 |
+
gizmos/rtl.php f6c6db15a235a8402188ac659fd214b8
|
15 |
+
gizmos/wpml.php 6ff0a19a2d43a1ae239ed5dc025f6055
|
16 |
+
gizmos/woocommerce.php 3df10d062744ee803cef574a24fc4a80
|
17 |
+
gizmos/childcss.php 85aa8013f1a0ecc6ecbd2d2e8f268774
|
18 |
+
gizmos/autoparagraphs.php 113c19b640d8c4e08a141994b446c885
|
19 |
+
gizmos/font.php 63035e2375e2a29be20f03e4e88c4895
|
20 |
+
gizmos/analytics.php af469ed899ba5155b3469b49d7852ed3
|
21 |
+
gizmos/belatedpng.php 74e1f745ce50c96e3492a11da3af154d
|
22 |
+
gizmos/webfonts.php 761b703f17f96448479ec521a18a8218
|
23 |
+
gizmos/smartload.php f8f27afebffbb4c4b135fb7a543935f6
|
24 |
+
gizmos/ie6.php 7089f9b4caa6c1e5f4477e793d678345
|
25 |
+
gizmos/texturize.php f8c8761750c1f9b69cb3c20947f670dd
|
26 |
+
gizmos/yoast.php 2cfe7984ecadc716c50662299ceb32e0
|
27 |
+
gizmos/iphonegradients.php a983edec6be4dbce94e6b4d53981aa57
|
28 |
+
gizmos/loadposition.php 039577815758c0e5144542f66a19fd8c
|
29 |
+
gizmos/title.php c8e2b9bb1cac3c48f2b06742f4441f9c
|
30 |
+
gizmos/styledeclaration.php 37e56b5cda095ebf7350f037a81eb262
|
31 |
+
gizmos/compatibility.php f56d8fae24819f7ae4330e162cd9f218
|
32 |
+
gizmos/index.html d41d8cd98f00b204e9800998ecf8427e
|
33 |
+
gizmos/fontawesomepaths.php 87f0fb21d61fa74d6107b80a9e25f521
|
34 |
+
gizmos/pagesuffix.php 6e35e609c1fa459c5ede42b155e36953
|
35 |
+
gizmos/rokstyle.php a9b7512658dfe19fbd26ed91bd1883a0
|
36 |
+
gizmos/buddypress.php fb86bc14a90ba1b97a53030f892400db
|
37 |
+
gizmos/thumbnails.php 4d43849a1b943819b6992e8dd7cfca88
|
38 |
+
gizmos/bbpress.php 2283fc8b2d7323980c2ad8ee0c939445
|
39 |
+
gizmos/widgetshortcodes.php 699fa6dcd5a038639840ab42b02f6bbe
|
40 |
+
ajax-models/index.html d41d8cd98f00b204e9800998ecf8427e
|
41 |
+
ajax-models/example.php 7434095408b34fc8428a84440c60774e
|
42 |
+
gantry.config.php 70464ca252eef35ef7d8d1e69508efe7
|
43 |
+
widgets/links.xml 983ec8c136c84f9dcdccf2494b5f6298
|
44 |
+
widgets/loginform.xml 26fa1e26d597161f1f33668207926411
|
45 |
+
widgets/menu.php 0fe527fa6fa005a9b3f944fabe0143fa
|
46 |
+
widgets/pages.php 3c48738638a8ceada4b4e63b4508b2a5
|
47 |
+
widgets/recentposts.xml d60f230153a08bba049068ffba7ca15c
|
48 |
+
widgets/viewswitcher.php eb53096ba88f98e0cb51177091f50260
|
49 |
+
widgets/logo.xml e522f0b433d5db38004272526143d3ee
|
50 |
+
widgets/pages.xml 864297ab944f6f6d1683bb0aed4f4ac4
|
51 |
+
widgets/archives.php dde876605388d473a3fe66bbbbf9df6f
|
52 |
+
widgets/loginbutton.xml 6747ca3b33dc84874e5cfb560753e554
|
53 |
+
widgets/overridesmap.xml d062edbe62fc8cd15c269d164da74dfc
|
54 |
+
widgets/loginbutton.php 1b6a78cc6b8c461ca2a8fa8aaecbbfbf
|
55 |
+
widgets/iphonemenu.php 24bd6cde616274f7d016fbce2a88bb37
|
56 |
+
widgets/categories.php 69b0073efec685c1592aaf2b097e0d6b
|
57 |
+
widgets/recentcomments.xml 9560a0123f311b0ea6fb281ca638af44
|
58 |
+
widgets/loginform.php 560cd7240ba914c9cf1cb060ceac3b85
|
59 |
+
widgets/date.xml 47cc13a501097b9d3a002c0929c6b71d
|
60 |
+
widgets/meta.xml f77c2a19fa5fe6b95576704774959eec
|
61 |
+
widgets/viewswitcher.xml d9158524afde20931b4e3b54417840f7
|
62 |
+
widgets/recentposts.php 8860a448e8e17c6e632e84e72df4ff01
|
63 |
+
widgets/meta.php 51dede64f67398d502e7ddf19142d581
|
64 |
+
widgets/links.php f30de656e2e4d1d00d5f6cb513bdf522
|
65 |
+
widgets/recentcomments.php b608430fadaa956fae6d0817897ed905
|
66 |
+
widgets/index.html d41d8cd98f00b204e9800998ecf8427e
|
67 |
+
widgets/archives.xml 1afd18b493fda6d623614d2701bd0c50
|
68 |
+
widgets/breadcrumbs.xml 25a46c0a7b1c1c129c91d34cc44be439
|
69 |
+
widgets/date.php aa9abc7db08246e7fd93f828cf51bbe6
|
70 |
+
widgets/categories.xml 125aeda3d4d31f8d7cb4af4c914570c8
|
71 |
+
widgets/menu.xml d2504c9219892ff32caea0f2140e3d3d
|
72 |
+
widgets/overridesmap.php f2ff8fc9c16cf8c3ad855022a31fdcc5
|
73 |
+
widgets/logo.php 354aadb45dff17458d52a6454eaf5788
|
74 |
+
widgets/copyright.xml 7520cb5052b11948ccd4607d60cdea98
|
75 |
+
widgets/resetsettings.php 2b44f6f1c67e6a8647f04e12c01d9475
|
76 |
+
widgets/fontsizer.xml 77afbf9a3700b10ad9a83d262796cf7b
|
77 |
+
widgets/totop.xml ce222afe1834fb12e6340143ede72bb2
|
78 |
+
widgets/totop.php 439dc7c1f5e3f708c4acade632456408
|
79 |
+
widgets/resetsettings.xml 300de5950affc376a9fb46d242478ee6
|
80 |
+
widgets/fontsizer.php c1b09eb18af0b787234848f3c7076e74
|
81 |
+
widgets/iphonemenu.xml 3efd5c36610ff90d601081683365bc22
|
82 |
+
widgets/gantrymenu/themes/default/js/responsive.js 1ca2df26dab9d577a2875fd956f0fdd7
|
83 |
+
widgets/gantrymenu/themes/default/js/responsive-selectbox.js 3006ee38322d825d5a03f20fb7010304
|
84 |
+
widgets/gantrymenu/themes/default/js/index.html 8a3edb0428f11a404535d9134c90063f
|
85 |
+
widgets/gantrymenu/themes/default/js/sidemenu.js c4c8eb29f221498615447aa6acdb9190
|
86 |
+
widgets/gantrymenu/themes/default/js/rokmediaqueries.js 040ffb117da8b1da98b8a1e30b9f2563
|
87 |
+
widgets/gantrymenu/admin/RokMenuWalkerNavMenuEdit.php 9a71ae3cab31338662fff86304bd04f5
|
88 |
+
widgets/gantrymenu/admin/fields/themelist.php d3d92e1d1bbf2e1b3aac792fb569b0fd
|
89 |
+
widgets/gantrymenu/admin/fields/index.html d41d8cd98f00b204e9800998ecf8427e
|
90 |
+
widgets/gantrymenu/admin/index.html d41d8cd98f00b204e9800998ecf8427e
|
91 |
+
widgets/gantrymenu/js/mootools.js b8dc790de19c7b95e92315aae057a497
|
92 |
+
widgets/gantrymenu/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
93 |
+
widgets/gantrymenu/index.html d41d8cd98f00b204e9800998ecf8427e
|
94 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuGreaterThenLevelFilter.php ea88f235e23b2cca68a8961bb58936ae
|
95 |
+
widgets/gantrymenu/libs/librokmenu/AbstractRokMenuLayout.php fbc57035923693f7c0186e4d2ad696a1
|
96 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuDefaultRenderer.php 3ce3a82291ca01d9dedeb6c088886563
|
97 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuNodeTree.php 8f55f3f0aa32c8bf06af953806b8284d
|
98 |
+
widgets/gantrymenu/libs/librokmenu/includes.php 667dc0ff6949d05bbe0fbe7aa77195d1
|
99 |
+
widgets/gantrymenu/libs/librokmenu/RokMenu.php 34e923af6eaab85e29d711baa5ee0a87
|
100 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuNode.php b3fccd8babc7e16a4524b31b760eceb8
|
101 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuFormatter.php 39865f5a19d92ede9bb15bbd4f8fbac5
|
102 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuNodeBase.php 5e171c4d58a6d17b7aaf87c41cc3f36a
|
103 |
+
widgets/gantrymenu/libs/librokmenu/AbstractRokMenuTheme.php 688572b6064d04ebd969c41b6d3e8d89
|
104 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuTheme.php 51e4c522996f726b84fbc3ae96ca7a8b
|
105 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuNotOnActiveTreeFilter.php 0b1f9f4afcaa16e3fc68097536e0b5ab
|
106 |
+
widgets/gantrymenu/libs/librokmenu/AbstractRokMenuProvider.php 6092dba99fca45c40adea6a3b0ad8613
|
107 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuProvider.php 6e0103caba1fb0c3cd1620cf605ff597
|
108 |
+
widgets/gantrymenu/libs/librokmenu/index.html 010c2899cae19aa8ee502f624c039485
|
109 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuHeader.php ae8be1747b38bb03097a815a238882ef
|
110 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuRenderer.php b1495192c81bf591d1db950906dfa765
|
111 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuIdFilter.php 2215f31031f9de3878f0d6d2e1eb07f6
|
112 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuIterator.php 1d83ded91f8894499a37c0f3401127fd
|
113 |
+
widgets/gantrymenu/libs/librokmenu/AbstractRokMenuFormatter.php a12b358eb9b9d03e753b8217ed0f4524
|
114 |
+
widgets/gantrymenu/libs/librokmenu/RokMenuLayout.php 406267366f12aeaa4fd74ebe8fbcf659
|
115 |
+
widgets/gantrymenu/libs/providers/index.html d41d8cd98f00b204e9800998ecf8427e
|
116 |
+
widgets/gantrymenu/libs/providers/GantryMenuProviderWordpress.php 72c81130e6bd115d0c17275781ccd981
|
117 |
+
widgets/gantrymenu/libs/renderers/index.html d41d8cd98f00b204e9800998ecf8427e
|
118 |
+
widgets/gantrymenu/libs/renderers/GantryMenuRendererWordpress.php f839ade67a4650f2dc18efdab12377a2
|
119 |
+
widgets/gantrymenu/libs/GantryMenu.php 4f7e6773e433b82658c261dfd759aac3
|
120 |
+
widgets/gantrymenu/libs/includes.php ced3b5c5e9057922125605796303a594
|
121 |
+
widgets/gantrymenu/libs/index.html d41d8cd98f00b204e9800998ecf8427e
|
122 |
+
widgets/gantrymenu/libs/common/RokBrowserCheck.php 6a1d1a7c1cd04e079e444d6455ccec66
|
123 |
+
widgets/gantrymenu/libs/common/includes.php 8183e22ff259965df91a99e15bf69403
|
124 |
+
widgets/gantrymenu/libs/common/index.html d41d8cd98f00b204e9800998ecf8427e
|
125 |
+
widgets/gantrymenu/css/widget_admin.css 81447db1acc4e3aa27376662cd8ec50c
|
126 |
+
widgets/gantrymenu/css/index.html d41d8cd98f00b204e9800998ecf8427e
|
127 |
+
widgets/divider.php bdf3209f023fa61bb08d15069d9af177
|
128 |
+
widgets/breadcrumbs.php 7bd59cf64a9ff571975447f78bdbed1e
|
129 |
+
widgets/copyright.php 15318e4ac2c26851295d037abbc18798
|
130 |
+
MD5SUMS d41d8cd98f00b204e9800998ecf8427e
|
131 |
+
plugin-updater/.gitkeep d41d8cd98f00b204e9800998ecf8427e
|
132 |
+
admin/assignment_functions.php e13bfa141f5852e748433a7cb0055655
|
133 |
+
admin/ajax-models/presets-saver.php 6b00a3540a01a951b51d8b005e9fe56d
|
134 |
+
admin/ajax-models/cache.php a4da7ce16b126a7db2569578341c849d
|
135 |
admin/ajax-models/index.html d41d8cd98f00b204e9800998ecf8427e
|
136 |
+
admin/ajax-models/widgets.php 8579daaf9377b7ac4e639301f3db9c6e
|
137 |
+
admin/ajax-models/overrides.php 02718e5e7ba10f5378b3d0194d07b7bb
|
138 |
+
admin/ajax-models/lesscompiler.php b462aa180fb82edc32218fb4553bcac3
|
139 |
+
admin/override.php fabb50e43e6250aa8b72e47b4a321db9
|
140 |
+
admin/override_orig.php fcfa62a9ec8e6720527603f7fc6737af
|
141 |
+
admin/index.php 26dbb06288cfbae68e329f3512c7fcce
|
142 |
+
admin/forms/fields/html.php d4da04432b4a59d1e10dd0536b72ed34
|
143 |
+
admin/forms/fields/ajaxbutton.php ba2d8dbe1faed2720d3eba1ea1994448
|
144 |
+
admin/forms/fields/toggle.php b07d9059cbb2c78694ef97870218ae94
|
145 |
+
admin/forms/fields/password.php c97421bcff39730da96df2d404becc0d
|
146 |
+
admin/forms/fields/dateformats.php 26d82d7dec54eeb3147aa23330634739
|
147 |
+
admin/forms/fields/list.php 1caf5a2829d89a042c07e89a6c68ec3a
|
148 |
+
admin/forms/fields/checkbox.php 3572609dd29b2d626bd213483b243ead
|
149 |
+
admin/forms/fields/hidden.php 3a851269d70cea8db2a93d916633a9fc
|
150 |
+
admin/forms/fields/diagnostic.php 3fe49189748317c6faa09b36183c1f7b
|
151 |
+
admin/forms/fields/tips.php 27545fa5a57c693cdb4eb10aab059b5f
|
152 |
+
admin/forms/fields/selectbox.php f5ae3742f5b4aba11bba91a5a6eaf474
|
153 |
+
admin/forms/fields/colorchooser.php 89687687978494204fadf271ec6604d6
|
154 |
+
admin/forms/fields/radio.php 2ebebcb91517d2ad8be05e67bc7e371c
|
155 |
+
admin/forms/fields/showmax.php c8079a03edbeae2e24efe538dd19d6b2
|
156 |
+
admin/forms/fields/preset.php 059d2f67a1497909a4dd21c349f232b5
|
157 |
+
admin/forms/fields/categories.php d5025baff38b901944b16b6e8698c34c
|
158 |
+
admin/forms/fields/linkcategories.php 6763aee3589141aea795151b38d3001d
|
159 |
+
admin/forms/fields/textplus.php 2585837f0cfa22986ba7a0922e4c8bf7
|
160 |
+
admin/forms/fields/groupedlist.php a203acee410d2c22a3afe8618a191460
|
161 |
+
admin/forms/fields/position.php d5bdb91d54cd7d1b0e67d2bd55783979
|
162 |
+
admin/forms/fields/slider.php 7029c2534e09bd190ae3aef73edff85a
|
163 |
+
admin/forms/fields/imagelist.php 093b64c3374972b855e28f9ece33129f
|
164 |
+
admin/forms/fields/gantry.php 4fd09145e8b46ba3468e8f6de7115272
|
165 |
+
admin/forms/fields/alias.php a2495957c7084fcd99776c808a541310
|
166 |
+
admin/forms/fields/spacer.php ab5893c2086b2c151e59c9ce16d82e9b
|
167 |
+
admin/forms/fields/positionslist.php 2d1f815da0d5b643e1e91a8e773e8e42
|
168 |
+
admin/forms/fields/file.php 1f9b1fab4a0037a8e6ab6e1837d8db8b
|
169 |
+
admin/forms/fields/navmenulist.php a4c198ff23153f622c185889808692c0
|
170 |
+
admin/forms/fields/animation.php ed33eb178c35dc7b24f779e97b2dc109
|
171 |
+
admin/forms/fields/integer.php ab458a30fb9e247d0917eebbd015a57a
|
172 |
+
admin/forms/fields/index.html d41d8cd98f00b204e9800998ecf8427e
|
173 |
+
admin/forms/fields/imagepicker.php ceb581f58a4c4226074e4ad51287de60
|
174 |
+
admin/forms/fields/filelist.php 22bf7c6d646978b90fcc098400db3d53
|
175 |
+
admin/forms/fields/fonts.php aeea0067c058c5b51f3a991f2e224e9b
|
176 |
+
admin/forms/fields/text.php ab3cd500c7258bf4935df8441c3b71f3
|
177 |
+
admin/forms/fields/overlays.php f91a9f6e9151a953b96ae7a38df2fdbb
|
178 |
+
admin/forms/fields/positions.php 4f341e0b608102103784033ec8d43cc5
|
179 |
+
admin/forms/fields/gradient.php b111d3ff86fda14cb88b1ab268a90434
|
180 |
+
admin/forms/fields/updater.php 55ec455908b84d47a54180c027950d8e
|
181 |
+
admin/forms/fields/textarea.php 660fd10c4c1b7471c65945c7083d85f9
|
182 |
+
admin/forms/groups/set.php f399c16f19ce5f13b99d6d42b43927d3
|
183 |
+
admin/forms/groups/enabledgroup.php ddddd1dd35fa8f8cde88bc6fffbe2a3d
|
184 |
+
admin/forms/groups/grouped.php 259ade0c96cafb1060ae3eb5b653ffe5
|
185 |
admin/forms/groups/innertabs.php 1105f67378892b36e6bc2e44bb577961
|
186 |
+
admin/forms/groups/position.php bf32e78304d8ab6140e5f334f70acf43
|
187 |
+
admin/forms/groups/chain.php 1a6c0fe26d8a65c9a1e64240ce1021d6
|
188 |
admin/forms/groups/index.html d41d8cd98f00b204e9800998ecf8427e
|
189 |
+
admin/forms/groups/selectedset.php 3a14d408f51eb3e7d9c6c5b102925e2f
|
190 |
+
admin/forms/groups/columns.php 18586376b8280bb5c8173e71a5e58a02
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
admin/forms/index.html d41d8cd98f00b204e9800998ecf8427e
|
192 |
+
admin/index_orig.php 21e01962c82c32f9e844147cf5f153b8
|
193 |
+
admin/admin_presets.php 9ff07ae38f005bf3d2d70fc5ad32b4df
|
194 |
+
admin/widgets/tips/js/tips.js 7127b38dc1f0b9fd8a5540cc8b7bf299
|
195 |
+
admin/widgets/tips/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
196 |
+
admin/widgets/tips/index.html d41d8cd98f00b204e9800998ecf8427e
|
197 |
+
admin/widgets/ajaxbutton/js/ajaxbutton.js 984a6c693f73285fb53849609281b07b
|
198 |
+
admin/widgets/Twipsy.js 8a4615a27f6e04431209c89db45a8743
|
199 |
+
admin/widgets/growl.js 1026322a7d174c43067c7ad420e63c88
|
200 |
+
admin/widgets/gantry.popupbuttons.js c69c6557e0725000ab1e72b0c771bd82
|
201 |
+
admin/widgets/gantry.css cfb32069b3cdbd446525a7c030cf29e9
|
202 |
+
admin/widgets/assignments/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
203 |
+
admin/widgets/assignments/js/assignments.js 6f567257222b70938877e944860d472b
|
204 |
+
admin/widgets/assignments/index.html d41d8cd98f00b204e9800998ecf8427e
|
205 |
+
admin/widgets/gantry-widgets.css 769ba91d883c8ef3cb3408093e61b260
|
206 |
+
admin/widgets/gantry-widgets.js 059c83aabe0e9f58e9d37be9c53c3d64
|
207 |
+
admin/widgets/toggle/js/toggle.js a9adaa0f51947bbbb2ca048c1647b0a4
|
208 |
+
admin/widgets/toggle/js/touch.js 9b50493d5598356e483f33abd9dd9661
|
209 |
+
admin/widgets/toggle/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
210 |
+
admin/widgets/toggle/images/toggle-disabled.png fafd32c33b0fba155fbc3a4c6293b9f4
|
211 |
+
admin/widgets/toggle/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
212 |
+
admin/widgets/toggle/images/toggle.png d37ed69e34fa3f0f08ee4a86df94701d
|
213 |
+
admin/widgets/bootstrap-multiselect.css f9d97852b22a7f1afeca10434862eb25
|
214 |
+
admin/widgets/gantry-ie7.css 62c7de36c43f9ada828f71a8e7de2408
|
215 |
+
admin/widgets/gradient/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
216 |
+
admin/widgets/gradient/js/gradient.js d88107278026c5036225e512cca30492
|
217 |
+
admin/widgets/gradient/index.html d41d8cd98f00b204e9800998ecf8427e
|
218 |
+
admin/widgets/slider/js/unserialize.js 3a193431a6be09d8a9e7eba84abf1529
|
219 |
+
admin/widgets/slider/js/slider.js a958aa0ae6eb44e75eecded733d03911
|
220 |
+
admin/widgets/slider/js/slider-utils.js 4cf34c78db862ae5208c8a427e7cf01a
|
221 |
+
admin/widgets/slider/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
222 |
+
admin/widgets/slider/index.html d41d8cd98f00b204e9800998ecf8427e
|
223 |
+
admin/widgets/slider/images/slider.png 4193eedbae6279942578f503e0ec49fc
|
224 |
+
admin/widgets/slider/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
225 |
+
admin/widgets/slider/images/slider-tip.png 84e346c5f36fac48c71d7fc55b92d3c6
|
226 |
+
admin/widgets/colorchooser/js/colorchooser.js b9c46488a86141adb93a62c514bd3314
|
227 |
+
admin/widgets/colorchooser/js/mooRainbow.js 8a9ad792ea2f505af071ab603337c2df
|
228 |
+
admin/widgets/colorchooser/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
229 |
+
admin/widgets/colorchooser/js/mooRainbow-2.0.js a4d1107750bebd2a17fe61f29952d02c
|
230 |
+
admin/widgets/colorchooser/index.html d41d8cd98f00b204e9800998ecf8427e
|
231 |
admin/widgets/colorchooser/images/moor_woverlay.png aaec307feabb7482df3abfc27878d554
|
232 |
+
admin/widgets/colorchooser/images/moor_cursor.gif 031ecf9ba2ddbbf8b18f06a4aa15f79e
|
233 |
+
admin/widgets/colorchooser/images/trans-underlay.png c250f271f0eba30ee4133f446c6733b2
|
234 |
+
admin/widgets/colorchooser/images/trans.png 4a82e33f92f0f8c318f2c4ea0be60f01
|
235 |
admin/widgets/colorchooser/images/moor_boverlay.png 0c64ea1bc23c08a04ca9cecccc7e58f8
|
236 |
+
admin/widgets/colorchooser/images/chooser-back.png f243df6677d7ea2a9cc8268b530f1ff9
|
237 |
+
admin/widgets/colorchooser/images/moor_arrows.png 4edbf4fedcedde96754d74921e39d693
|
238 |
+
admin/widgets/colorchooser/images/picker.png 232725da2945ddd63ea7242de1a5a975
|
239 |
admin/widgets/colorchooser/images/moor_slider.png 7c5699a1ede46cd191c719d4b4f1b45f
|
240 |
+
admin/widgets/colorchooser/images/blank.gif 1b9f97537b7ae7a6baa2d3ce47a4a198
|
241 |
admin/widgets/colorchooser/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
admin/widgets/colorchooser/css/mooRainbow.css 6fa2f91acbb0dc6bddc651efd1987a62
|
243 |
+
admin/widgets/colorchooser/css/index.html d41d8cd98f00b204e9800998ecf8427e
|
244 |
admin/widgets/colorchooser/css/mooRainbow-2.0.less 73a8fa09c524c091892d5bcc0bf25597
|
245 |
+
admin/widgets/colorchooser/css/mooRainbow-2.0.css 61daee154f69928c9ff71bcbcf8c111b
|
246 |
+
admin/widgets/gantry.js 07a2ce26e91cea4cfd1572bf4be09b75
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
admin/widgets/fonts/js/google-fonts.json 2abeeee4d672d48be682c3adad8987f7
|
|
|
248 |
admin/widgets/fonts/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
249 |
+
admin/widgets/fonts/js/fonts.js e45d46ced56d491d593611aa40bc0f6a
|
250 |
+
admin/widgets/fonts/index.html d41d8cd98f00b204e9800998ecf8427e
|
251 |
admin/widgets/moofx.js 24a9cdd27667218ae42c55d430c8a5c7
|
252 |
+
admin/widgets/preset/js/preset.js 84b1d909cc690114ace2215817a95aca
|
253 |
+
admin/widgets/preset/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
254 |
+
admin/widgets/preset/js/preset-saver.js 5e551cbfc46dd2ffcfbc307fc26d155a
|
255 |
+
admin/widgets/preset/index.html d41d8cd98f00b204e9800998ecf8427e
|
256 |
+
admin/widgets/preset/images/preset-right.png 5a2ff31fb53c65d0d59006c7f8d033e3
|
257 |
+
admin/widgets/preset/images/scrollbar-left.png f081db738a0692c0fb579be5647d955c
|
|
|
258 |
admin/widgets/preset/images/preset-bg.png dd99d8f06e53cfbead7672403edf928c
|
|
|
259 |
admin/widgets/preset/images/title-bg.png 99c06fb27f66c40cc7012d69e7796f0f
|
260 |
+
admin/widgets/preset/images/preset-left.png c90acc86ff18c4cdd8db939b985752b1
|
261 |
admin/widgets/preset/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
262 |
+
admin/widgets/preset/images/scrollbar-right.png 7f27bff77697973e3e76eaca21dc90fd
|
263 |
+
admin/widgets/preset/images/delete.png 79ec729737c02e5b58a5a6aaf949e4c8
|
264 |
+
admin/widgets/bootstrap-2.3.2.min.js bed31fb959612a0a77d8e87b9d0b3683
|
265 |
+
admin/widgets/gantry-administrator.css 0590b6011f391387257728a387bf7fd6
|
266 |
+
admin/widgets/index.html d41d8cd98f00b204e9800998ecf8427e
|
267 |
+
admin/widgets/images/overrides-arrow.gif c6b4cb163011e316835b02d5b277ee8a
|
268 |
+
admin/widgets/images/gantry-gears.jpg 22cb7f9710090ce3eedcdc663b7fdf05
|
|
|
269 |
admin/widgets/images/graphic-level.png 18a0c94081bcc710b3f01293731a0e9b
|
270 |
+
admin/widgets/images/h3-arrows.png 347f7bc4e01f076af1cb8a964dcf315f
|
271 |
admin/widgets/images/overrides-default.png fba189e52340aa958c383467028686aa
|
272 |
+
admin/widgets/images/tips-pin.png 18c927e09560bbc5a901fc3593c2776f
|
273 |
+
admin/widgets/images/lowhigh-legend.png 200b76b2d8e7dba5ea5b19d5fb871573
|
274 |
+
admin/widgets/images/master-bar.png 3436e0162cf41afb2a6321847ac43c2b
|
275 |
admin/widgets/images/overrides-toolbar.png 490fe6670c5e88acc6d49dd34ed54ac4
|
|
|
|
|
|
|
276 |
admin/widgets/images/gantry-small.png 7ea6015d31baa0e9603be827bdf7a16a
|
277 |
+
admin/widgets/images/integrity-good.png 78efcf07ed9385748e67ef0874ba5df6
|
278 |
+
admin/widgets/images/fail.png 8edd48b7dcc11576f54faaacf4d25e0f
|
279 |
+
admin/widgets/images/integrity-header.png 1d953c9e64424c151d4ac41ab166995c
|
280 |
+
admin/widgets/images/gantry-master.png ba74dda779026ae4676ab7526d2339bd
|
281 |
admin/widgets/images/g4-logo-small.png 93dc0e355271c69d0d0652609b42b116
|
|
|
|
|
282 |
admin/widgets/images/divider-bar-old.png 98be4adb6f9acea6bda201ce1618a1c0
|
|
|
|
|
|
|
|
|
|
|
283 |
admin/widgets/images/success.png 32239e1181e7daf43566d1f3160d0823
|
284 |
+
admin/widgets/images/slider.png 56a834e712d3d07e896b29d2553c32bb
|
285 |
+
admin/widgets/images/master-notice.png bff88e688f72d1fade3378fa41615d9a
|
286 |
admin/widgets/images/badges.png 8826415e8018a9c9299a9ee9ccf209dc
|
287 |
+
admin/widgets/images/tooltip.png 32fd16b09e8dbbb751762210d2cbc899
|
288 |
+
admin/widgets/images/integrity-bad.png 912002b5a33a9ec723e1bb123e72b540
|
289 |
+
admin/widgets/images/click-preview.png 22bf800644a2d4122ee3702add8e7e01
|
290 |
+
admin/widgets/images/textinput.png b6a526aa9616464510caff6d3eaa9c8e
|
291 |
+
admin/widgets/images/integrity-arrows2.png bc53a40d2326b16670e8ac1f8a95a5d8
|
292 |
admin/widgets/images/delete-buttons.png 7b998132f49220a09018fc8612dc1f8e
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
admin/widgets/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
294 |
+
admin/widgets/images/toggle.png 97a1933b37a00fe5cd09cf55739a521e
|
295 |
+
admin/widgets/images/h3-bg.png c4c044c246ffa71c3a991bef2a091e5b
|
296 |
+
admin/widgets/images/google_favicon.png 561f5e9c5198b37b7739fa77a25c997c
|
|
|
|
|
297 |
admin/widgets/images/spinner.gif faa74e8c61fc64d5edb11613c7eead2c
|
298 |
+
admin/widgets/images/overrides-buttons-l.png 67d26eae6ff37a871e832a6180fcc96a
|
299 |
+
admin/widgets/images/information.png 8c876562d9e0c1bfeddb5940630c57ee
|
300 |
+
admin/widgets/images/version-update.png 617ff2120aa22f866940cdeeb7263d9a
|
301 |
+
admin/widgets/images/overrides-buttons-r.png 02a6863322aa0657254d797d1f463dcd
|
302 |
admin/widgets/images/version-bg.png 4044ed80d6e2c6e83b8681ce58341180
|
303 |
+
admin/widgets/images/updater-good.png f3ed83ab2aac3c43a0dd28ccc5cdb3ce
|
304 |
+
admin/widgets/images/integrity-arrows.png 3562ae3646497a2d70f4bc477cf0955d
|
305 |
admin/widgets/images/divider-bar.png 5a8b820524b76212dc13cc35b92d68b3
|
306 |
admin/widgets/images/divider-grab.png 0957b76fb05bdc256044b271b53e1e1a
|
307 |
+
admin/widgets/images/delete.png 0026f6f98224c95c53d83c55c75febbd
|
|
|
308 |
admin/widgets/images/preset-saver.png 6237f4421ffba29e5408739ac918ad11
|
309 |
+
admin/widgets/images/gantry.png 26b36b3438f7ce6560aecff8d68891ff
|
310 |
+
admin/widgets/overlays/index.html d41d8cd98f00b204e9800998ecf8427e
|
311 |
+
admin/widgets/overlays/images/overlay-off.png e72dbb38bd7fcbd62884d15b8eeaaef2
|
312 |
+
admin/widgets/overlays/images/tt-horiz-right.png 957fe3fd987f9ebaab361e795d1486c0
|
313 |
+
admin/widgets/overlays/images/tt-horiz-left.png b2247633f95a57c2d987439632e7b05b
|
314 |
+
admin/widgets/overlays/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
315 |
+
admin/widgets/overlays/images/overlay-box.png aeaa5384b3eb8ea9fd4ec9df7182a5a0
|
316 |
+
admin/widgets/overlays/images/tt-horiz-mid.png 10c3923369add561d40c180d4b79fafb
|
317 |
+
admin/widgets/overlays/css/overlays.css 2f899a69b95b145477c79d6d89c7f8a6
|
318 |
+
admin/widgets/imagepicker/images/button.png efcbbbb748b2702bfa7c5996149cc480
|
319 |
+
admin/widgets/imagepicker/images/no-image.png a0fdd581cff9f7cefee2027d37a557e9
|
320 |
+
admin/widgets/imagepicker/css/imagepicker.css 64054dbcf55a9e517d51cea66fabe87c
|
321 |
+
admin/widgets/bootstrap-multiselect.js 6324643f4bd8e361dec140abb9590bf8
|
322 |
+
admin/widgets/gantry-ie.css 2bb4c71f6ffb447708b14cb5a4a842a6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
admin/widgets/positions/js/positions-utils.js a1fcbf725ac202872824521b4418606d
|
324 |
admin/widgets/positions/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
325 |
+
admin/widgets/positions/index.html d41d8cd98f00b204e9800998ecf8427e
|
326 |
+
admin/widgets/radios/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
327 |
+
admin/widgets/radios/js/radios.js d5fa0d20f275af65470c0a3f558a5dc4
|
328 |
+
admin/widgets/radios/index.html d41d8cd98f00b204e9800998ecf8427e
|
329 |
+
admin/widgets/radios/images/radio-states.png f9e8ddc4a6b2001a40a3514f81971e16
|
330 |
+
admin/widgets/radios/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
331 |
+
admin/widgets/checkbox/index.html d41d8cd98f00b204e9800998ecf8427e
|
332 |
+
admin/widgets/checkbox/images/checkbox-large.png 9de3e22a6cb64be6fe5f7ea07f82fe81
|
333 |
+
admin/widgets/checkbox/images/checkbox-small.png 51c41abf8a74c11031a33f0ec0e87dac
|
334 |
+
admin/widgets/checkbox/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
335 |
+
admin/widgets/gantry-opera.css 8eff005e2e14837d093dce5d568f46cb
|
336 |
+
admin/widgets/selectbox/js/selectbox.js 8606b3ba5865f0bfe4dd50f1b71a16e4
|
337 |
+
admin/widgets/selectbox/js/index.html d41d8cd98f00b204e9800998ecf8427e
|
338 |
+
admin/widgets/selectbox/index.html d41d8cd98f00b204e9800998ecf8427e
|
339 |
admin/widgets/selectbox/images/dropdown-right.png 6903ccefb5b245b90740e79da18838f7
|
340 |
+
admin/widgets/selectbox/images/select-right.png 81ed8606c7b77d4768ef8a6b295937b2
|
|
|
341 |
admin/widgets/selectbox/images/select2-left.png b9b783b18bec3af74c6a4f127f11e581
|
342 |
admin/widgets/selectbox/images/index.html d41d8cd98f00b204e9800998ecf8427e
|
343 |
+
admin/widgets/selectbox/images/select2-right.png 037712d90da7c877780c356bbef9e743
|
344 |
admin/widgets/selectbox/images/select-left.png 185c5ba6f10bce3f77f3281cbad6e45f
|
345 |
+
admin/widgets/selectbox/images/selection.png 5106d3449195fae5a8a478b1e88022f1
|
346 |
+
admin/widgets/selectbox/images/dropdown-left.png 45418fe9c9c60bc4e594a744a2e4cc7f
|
347 |
+
admin/admin_functions.php 0ea7327a64614942782df5e85ea391d3
|
348 |
+
admin/index.html 1c7b413c3fa39d0fed40556d2658ac73
|
349 |
+
admin/rt_fav.png 7f44f7d1f05143147d5e9fc8a10a305e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
admin/cache/16.cache.txt 2c913df369f84d867cbda579c531c298
|
351 |
+
admin/cache/index.html d41d8cd98f00b204e9800998ecf8427e
|
352 |
admin/cache/12.cache.txt 50d8fcf9b2d9b65ad68d5643ca2ca819
|
353 |
+
admin/cache/9.cache.txt b0a09f577af05fb451c33c50c223b802
|
354 |
+
admin/admin_assignments.php e65f46a09f396d229eba3b9514e2429f
|
355 |
+
admin/screen-meta-links.php d81b6f95182e39eafdc58d546676a0c0
|
356 |
+
admin/meta-links/cache.php 0976b1dd8db05b5ef09c0e46df64f64a
|
357 |
+
admin/meta-links/index.html d41d8cd98f00b204e9800998ecf8427e
|
358 |
+
admin/meta-links/presets.php 56e8d4825302e12df1889e7838d16740
|
359 |
+
gantry.php 4d486615e2e0032534d8f92774e6399a
|
360 |
+
bugfixes.php a50e86e366ff325fbdd11dc434509a27
|
361 |
+
tmpl/index-iphone.php 5c06523f38d7ddee15f25862494448ca
|
362 |
+
tmpl/index.html d41d8cd98f00b204e9800998ecf8427e
|
363 |
+
admin_functions.php 422f9f7da7f375ae4c30389f8371c754
|
364 |
+
CREDITS.php bc06b795f52fcc36fedd8b1413561358
|
365 |
+
core/gantryflatfile.class.php 7d5cda31a03bc32a87db222120365481
|
366 |
+
core/gantrygizmo.class.php 2fca25a1f59828c049d4cad1c6923f5f
|
367 |
+
core/gantrybrowser.class.php a0c104f0736050718d86b06449bc55af
|
368 |
+
core/renderers/gantrymainbodyrenderer.class.php e2013e4602b52e91113928f23fba92f6
|
369 |
+
core/renderers/gantrycommentsrenderer.class.php 75b87aa583cde6445f46d587f7d12764
|
370 |
+
core/renderers/gantrywidgetsrenderer.class.php 93e64d1bd398aec8ab20ddb57a06c308
|
371 |
+
core/renderers/index.html d41d8cd98f00b204e9800998ecf8427e
|
372 |
+
core/renderers/gantrydebugmainbodyrenderer.class.php ec4228b5d2867feaf26412a8ee7e0d3c
|
373 |
+
core/renderers/gantryorderedmainbodyrenderer.class.php be983fef50043a10404fa17e29634503
|
374 |
+
core/gantrybodylayout.class.php 8ebba0eaa36ef715630a40e5cf69a755
|
375 |
+
core/gantryplatform.class.php 681f10d66815752ab3c596ce78ec1548
|
376 |
+
core/gantrywidget.class.php b93d90f3e1188bb0b666193c86d03d99
|
377 |
+
core/config/gantryformfieldhelper.class.php 065d5089f96597c820e5974945ce37e9
|
378 |
+
core/config/gantryformfield.class.php 1385096580fc9b3efea8be481605196f
|
379 |
+
core/config/gantryformgroup.class.php a4deb37db846f3306560622484537e66
|
380 |
+
core/config/gantryformhelper.class.php 544869f5a235782edc8e73c5b4a5b2cb
|
381 |
+
core/config/gantryhtmlselect.class.php 5fb0b5c73f7b54e82a2418ca5857921a
|
382 |
+
core/config/gantryelement.class.php 20af1919944d11d669e26fa4ba395fe2
|
383 |
+
core/config/gantryformitem.class.php 6ac22a288866da5b46a3de886a309645
|
384 |
+
core/config/gantryform.class.php 60e84caccbcf3280a260a0e61344ba75
|
385 |
+
core/config/gantryselect.class.php dc8497737c2be7380df18c660c6d9e0c
|
386 |
+
core/config/gantryparameters.class.php 508d22265e9d71a8b091212a940d615b
|
387 |
+
core/config/index.html d41d8cd98f00b204e9800998ecf8427e
|
388 |
+
core/config/gantryformnaminghelper.class.php b1d3ef5f3c60520a9d77f3f20cd1f880
|
389 |
+
core/gantryparams.class.php d6d3c7d691e57fc033d1b671d9e22d98
|
390 |
+
core/gantryjson.class.php 4ea751e83fe64c75ba9f1e147c67ce54
|
391 |
+
core/gantrypositions.class.php de0d6caefce4aed77811eb139f4126b3
|
392 |
+
core/gantryloader.class.php 3d446f613d235ba71d8b18d636338297
|
393 |
+
core/gantrydiagnostic.class.php f99e98cebd7b60dc9404880677998130
|
394 |
+
core/params/gantryparamoverride.class.php 5cb12c030fb3523f96cfe502c714edc1
|
395 |
+
core/params/overrides/gantryurlparamoverride.class.php 7bfd741c255a43653e0c24eb39aad9e8
|
396 |
+
core/params/overrides/gantrycookieparamoverride.class.php 77f8db5873dd3d24e724cb510768e15e
|
397 |
+
core/params/overrides/gantrysessionparamoverride.class.php d312bbf98f4b043b221a8ae3a7960214
|
398 |
+
core/params/overrides/gantryoverrideparamoverride.class.php 4b6fdf6f314b8aad0a754632ded7fee5
|
399 |
+
core/params/gantryparamprocessor.class.php fb72bd10afe0d070e319f40b71451a4c
|
400 |
+
core/params/processors/alias.php 8413a0911db02aca79899eb4c4883826
|
401 |
+
core/params/index.html d41d8cd98f00b204e9800998ecf8427e
|
402 |
+
core/gantrytemplate.class.php f631eef3dcd004129479607b9797f339
|
403 |
+
core/gantry.class.php edb6497a97d3c2b4e3ac4e25a64e9a81
|
404 |
+
core/utilities/gantryfilterinput.class.php 817566df4e1f15f266d3b498a810a867
|
405 |
+
core/utilities/gantrytemplateinfo.class.php ca7b56ea40b93f86f2584fa003b0c966
|
406 |
+
core/utilities/gantryxml.class.php 3d8b95529ec46c83956dd2f64be0e470
|
407 |
+
core/utilities/gantryurl.class.php 3c7b9a0da599e33f1dcd039ebc38bf6d
|
408 |
+
core/utilities/registry/gantryregistryformat.class.php 1461480a53993642de6e3341d133df14
|
409 |
+
core/utilities/registry/format/ini.php 228e983d32cf39dabc222f18084e893b
|
410 |
+
core/utilities/registry/format/xml.php 3b8c3397fff2aef5b2d5f13d8aa4c4d5
|
411 |
+
core/utilities/registry/format/php.php da5bb1e1df2c02ba1869788d25bddfd2
|
412 |
+
core/utilities/registry/format/json.php 95112cec2fc232a77b695f80b57de989
|
413 |
+
core/utilities/registry/format/index.html e33782263166ab59da260384f21fd4fb
|
414 |
+
core/utilities/registry/index.html d41d8cd98f00b204e9800998ecf8427e
|
415 |
+
core/utilities/gantrylesscompiler.class.php a5b9b2beeaa39a9b96fb08738edebd43
|
416 |
+
core/utilities/gantryregistry.class.php aa97709884d48304420874c93c955c60
|
417 |
+
core/utilities/gantrydate.class.php d0b3cd532ce4b56797d9f9710f8f3796
|
418 |
+
core/utilities/gantrycache.class.php 099aac888326114f765139d0eeeb67e0
|
419 |
+
core/utilities/gantryfolder.class.php 6fa86e9d9846edb10a3150d999663a46
|
420 |
+
core/utilities/index.html d41d8cd98f00b204e9800998ecf8427e
|
421 |
+
core/utilities/gantrypath.class.php 264fa48c453928d438fcca5a13a6aa35
|
422 |
+
core/utilities/gantrymobiledetect.class.php b5b77520e5df7e95fca4354354424cd1
|
423 |
+
core/utilities/gantrysimplexmlelement.class.php 09a120979b5e3c6836f98b2c60cc4619
|
424 |
+
core/utilities/cache/cache.class.php 760416685b1f38201865983e7112e39f
|
425 |
+
core/utilities/cache/wpTransientCacheDriver.class.php 0e2d30bbfbec8147da62900df71ad09b
|
426 |
+
core/utilities/cache/fileCacheDriver.class.php 0e23cd00cf934656eb15861591feec8f
|
427 |
+
core/utilities/cache/index.html d41d8cd98f00b204e9800998ecf8427e
|
428 |
+
core/utilities/cache/cacheDriver.interface.php e75ea8d663ee9116cb99ba91f6c47ad2
|
429 |
+
core/utilities/gantryfile.class.php bd8c197a259b484a6802abc693a74cca
|
430 |
+
core/utilities/gantryarrayhelper.class.php ccdf2c3785d794374cdcdcb37073d661
|
431 |
+
core/index.html d41d8cd98f00b204e9800998ecf8427e
|
432 |
+
core/gantrycommentstempllayout.class.php f9b69e8583852cc9f307adb70c428544
|
433 |
+
core/gantrylayout.class.php 33eac840fba10a6c543febc892a16a10
|
434 |
+
core/gantrystylelink.class.php 06536fc20a18105af1cdc8debf30a004
|
435 |
+
core/rules/facttypes/archive.class.php 4ab3dde7c6b3f4a66462672fd1f734f8
|
436 |
+
core/rules/facttypes/menu.class.php d9258c70b3f1926683c47ed9de53d183
|
437 |
+
core/rules/facttypes/wpmllang.class.php 2c48f091d85765a12c6c3590452fa961
|
438 |
+
core/rules/facttypes/post_type.class.php 533273019ec9d8845d0271ec385a4f2e
|
439 |
+
core/rules/facttypes/index.html d41d8cd98f00b204e9800998ecf8427e
|
440 |
+
core/rules/facttypes/templatepage.class.php 3158a78c9a5a2df1f297b5b7e97fac28
|
441 |
+
core/rules/facttypes/taxonomy.class.php 755b3e07f47b3389599d01f102b6f66c
|
442 |
+
core/rules/gantryoverridesengine.class.php 1d951f3ccbbd950a3e44a6ab28d81976
|
443 |
+
core/rules/stylerules.srl 9bfa3989975fe44c67249aa506ce8b83
|
444 |
+
core/rules/gantrypagecallfact.class.php 62f21d135df10ff4e33dfe670e6012e9
|
445 |
+
core/rules/index.html d41d8cd98f00b204e9800998ecf8427e
|
446 |
+
core/rules/gantryoverrides.class.php c0fe6402163331f030b64d9d19aee0f5
|
447 |
+
core/rules/phprules/phprules.php d8db7525a5bdb29701dace8a035b55a6
|
448 |
+
core/rules/phprules/RuleBase.class.php ca3482368607b4f337971f00723f171a
|
449 |
+
core/rules/phprules/ActionFassade.class.php dcb07f28333d45bcf868a890d78aaf4f
|
450 |
+
core/rules/phprules/Fact.class.php 2e7a0b9374d658cf1b4d278242f8c230
|
451 |
+
core/rules/phprules/WorkingMemory.class.php 57273a3fe11ef694739e7d3d0f733deb
|
452 |
+
core/rules/phprules/RuleSession.class.php 48d93214db002f19f9f6109e63147d8d
|
453 |
+
core/rules/phprules/RuleReader.class.php e7f2e70d7c29c5380713c5f326441749
|
454 |
+
core/rules/phprules/index.html d41d8cd98f00b204e9800998ecf8427e
|
455 |
+
core/rules/phprules/Rule.class.php dd0100265b0d53b807878a545fae24ec
|
456 |
+
core/rules/gantryoverridefact.class.php b6324426dc9f47fb66021dddad2b9e07
|
457 |
+
core/gantryini.class.php 637464a1227f1038fc30631088dfa384
|
458 |
+
core/gantrygzipper.class.php 1e058fc488f9b2408a0e02c68a5c8715
|
459 |
+
js/iscroll.js f836c8e510f6d079f3a6f7f3c7df5f8d
|
460 |
+
js/fusion.js 8257a85bb5a7de27f1ef64b887f71b4a
|
461 |
+
js/gantry-inputs.js 24370687e6ec797304fa3948dccc85e0
|
462 |
+
js/gantry-ie6menu.js fe9d7c4c8e223f7196006b4c21bf3b30
|
463 |
+
js/mootools.js 956d496170193c81e2ce6feb62e2b9a1
|
464 |
+
js/gantry-ie6warn.js b5eb171c2c18b68cd05ae774898d2be6
|
465 |
+
js/gantry-smartload.js 805094fbf3be5ffdfe97810c17a8a383
|
466 |
+
js/gantry-buildspans.js e6a4e1385ee457aff2ca9b6629bd367b
|
467 |
+
js/belated-png.js 00a0e6adf93f2cde824a24d30696afb0
|
468 |
+
js/gantry-totop.js 2dc4fc094675c3d8c424f78a8332eaa3
|
469 |
+
js/browser-engines.js de5d2c047074141f55c5ee4bfc10f232
|
470 |
+
js/imenu.js d159afe22c079d054cee4ac32723c207
|
471 |
+
js/gantry-date.js 177dcf20d23a0a472f755752c3848182
|
472 |
+
js/index.html d41d8cd98f00b204e9800998ecf8427e
|
473 |
+
js/sfhover.js e67ee5c30bbfdb692466ada0396f4a3e
|
474 |
+
js/gantrydivider.js bee67fcb891eb3fa8f0bfb4de82d77d0
|
475 |
+
js/gantry-search-highlight.js ef8f26197b1d991c03188952ba367347
|
476 |
+
classes/Gantry/Uri.php bd848288b55b96e710a825bd96189ba2
|
477 |
+
classes/Gantry/FileResolver.php f2d589a27879c66f1af1a1352ca621e3
|
478 |
+
classes/Gantry/Loader.php c6090966bc846f9fedd1500e6a55f5cc
|
479 |
+
classes/Gantry/CssFileResolver.php efbd15543e66d1117c10f8541a721109
|
480 |
+
classes/Gantry/Uri/Util.php 3ac3e1be59e06f5a91ecd8a85c7be317
|
481 |
+
classes/Gantry/Uri/Components.php 77cd7ca07e47e4b279d5a6bfa8d3f6a9
|
482 |
+
classes/Gantry/Uri/Builder.php 1a87391d71b88160d42c448f600c6e64
|
483 |
assets/jui/less/variables.less f55679b711defcf6aec4b0795132df6f
|
484 |
+
assets/jui/less/responsive-utilities.less 6d8fb590b3ecef69c87777b2c87a4a4e
|
|
|
|
|
485 |
assets/jui/less/grid.less 2d2437fc0a66629c5d69d2eb59931483
|
486 |
assets/jui/less/tables.less f63ec5ff43b9aa32e9270ad75dee4591
|
487 |
+
assets/jui/less/bootstrap.less e94f17de05db3c3dc16434193c62ffda
|
488 |
+
assets/jui/less/dropdowns.less 862b57e068b39b7efdea6f24bc2ca542
|
489 |
+
assets/jui/less/button-groups.less 235d3b2429273a4c7250c683e7b02fce
|
490 |
+
assets/jui/less/mixins.less 34f9bcbfc8f75b6cc9d0b0935d8cf922
|
491 |
+
assets/jui/less/responsive-navbar.less 7d9b7a396a71dabfdf80a36d94b60e25
|
492 |
assets/jui/less/type.less f01554bff6df1f7b17715a2272930c1e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
493 |
assets/jui/less/carousel.less 7eaaa93377aa50d0d5c6761c1c7c8300
|
494 |
+
assets/jui/less/breadcrumbs.less acf20f273ce580c51d142f2029992a84
|
495 |
+
assets/jui/less/utilities.less c7a238b720e8ba267c6903a72743e1e4
|
496 |
assets/jui/less/font-awesome/variables.less 9a54f737a4aa1a4d295f32c5231560a2
|
497 |
+
assets/jui/less/font-awesome/bootstrap.less 4bb799ddf661de2fa5d27047c033f3cf
|
498 |
+
assets/jui/less/font-awesome/mixins.less 7d79b400c8c3802136bd4f128b83b60e
|
499 |
assets/jui/less/font-awesome/font-awesome.less 65268b3a59ae3407bf8c4c2301a6bddb
|
500 |
assets/jui/less/font-awesome/icons.less ea55ef71be079e170d2e35ff90dc6e18
|
501 |
+
assets/jui/less/font-awesome/extras.less 9b2371c3290b76986486e2701e1e73ac
|
502 |
assets/jui/less/font-awesome/path.less 7a24dc675c3839fb770087ccd51b672e
|
503 |
assets/jui/less/font-awesome/core.less 5238629100d376f16093646cedd6b131
|
504 |
+
assets/jui/less/code.less 8b12e84f9081c066da8ae26bba58a3b7
|
505 |
+
assets/jui/less/bootstrap-overrides.less f03490c11edbae4cd295468b3d8f8163
|
506 |
+
assets/jui/less/close.less 6608ed8ae3052306e0e7a3c97e4aa2fd
|
507 |
+
assets/jui/less/thumbnails.less 8d294c8bbf63d4863436e53a2bd933de
|
508 |
+
assets/jui/less/labels-badges.less 557d6319e4df1c62c975816fa4f1d94a
|
509 |
assets/jui/less/icomoon.less b868f8f4ce45fcad254f7be690b2039f
|
510 |
+
assets/jui/less/component-animations.less 187f9da4ce323b12c0a84ffa2d736f6c
|
511 |
+
assets/jui/less/wells.less 8931d9c0330575884c459e981bdcf329
|
512 |
+
assets/jui/less/accordion.less 317f3dcbff577d991f069df7976efa4f
|
513 |
+
assets/jui/less/scaffolding.less f2050a8d6672d2fe7cb39a7b6109d93b
|
514 |
+
assets/jui/less/responsive-1200px-min.less 0cec9870b3de459002ae746379011a6e
|
515 |
+
assets/jui/less/alerts.less 736308b94bc020b81475a7696ddc57a6
|
516 |
+
assets/jui/less/font-awesome4/variables.less 9fee729b2f37cf1e234632ed66fa9212
|
517 |
+
assets/jui/less/font-awesome4/stacked.less 518e2b2d263982d2caa1e6514b4b4eac
|
518 |
+
assets/jui/less/font-awesome4/mixins.less 63afa4054431cd255dd522314d42fe01
|
519 |
+
assets/jui/less/font-awesome4/larger.less 8cb65280c0f889daf72626c21a7c8628
|
520 |
+
assets/jui/less/font-awesome4/list.less 975571323cf880a4a30601998236b027
|
521 |
+
assets/jui/less/font-awesome4/bordered-pulled.less 898f90e40876883214bbd121b0c20e9f
|
522 |
+
assets/jui/less/font-awesome4/animated.less 08baef05e05301cabc91599a54921081
|
523 |
+
assets/jui/less/font-awesome4/font-awesome.less 468f606d3d79e0de653ad010c0e24c0d
|
524 |
+
assets/jui/less/font-awesome4/icons.less e307cef3a4e7ea676babf6150d0265a7
|
525 |
+
assets/jui/less/font-awesome4/path.less 3ae443e0386cc3a69ff47d641aefb74b
|
526 |
+
assets/jui/less/font-awesome4/fixed-width.less 5e07ec001f8d21bd279c12ee542813f7
|
527 |
+
assets/jui/less/font-awesome4/rotated-flipped.less a8476cdc50c264abd11ff59d6a9dd025
|
528 |
+
assets/jui/less/font-awesome4/core.less fb4efe4ae63737706875bbbfc7b7e9af
|
529 |
+
assets/jui/less/pagination.less f1098282022d3110d7391af8b13a4f48
|
530 |
assets/jui/less/index.html 8a3edb0428f11a404535d9134c90063f
|
|
|
|
|
|
|
|
|
531 |
assets/jui/less/popovers.less b8224c536a1f353ede9d2d6f6ed0ebac
|
532 |
+
assets/jui/less/reset.less cc3c68f5504306a94423df7395ebe121
|
|
|
533 |
assets/jui/less/forms.less f7a18c315b7e416faf95b11429ceab70
|
534 |
+
assets/jui/less/hero-unit.less d40d5b66d6a3c1f62596996f1abe9a81
|
535 |
+
assets/jui/less/buttons.less fe326b6ae56fba43c8c5726940e83dd4
|
536 |
+
assets/jui/less/font-awesome.less a5350d64481f6b562f3a6c7a6ec65e56
|
537 |
+
assets/jui/less/layouts.less 90413797569e34a2b5e10b53d6e61087
|
538 |
assets/jui/less/responsive-767px-max.less 39173ba455b0d3f8dddeb4e7edf26f8d
|
539 |
+
assets/jui/less/navbar.less 5e446619ef5efff44c028c8fc8faff8c
|
540 |
+
assets/jui/less/tooltip.less 4a3ae2fcd816d8139bfe1332eb7f6202
|
541 |
+
assets/jui/less/responsive-768px-979px.less 30249de0ab74c60a4e1e0730a63c0c1c
|
542 |
+
assets/jui/less/navs.less c5ea92ead7f8ae0670f81a465d2ea8f2
|
543 |
+
assets/jui/less/modals.less 7694c0ec0cce4849f1f1d10b7483888f
|
|
|
544 |
assets/jui/less/responsive.less 02ee9155ddbbc5fd2e3b2568b13ba380
|
545 |
+
assets/jui/less/progress-bars.less 1e45e136314d5c3b99f73b9b7866a74d
|
546 |
+
assets/jui/less/bootstrap-rtl.less 568589c1d305c1b441ed721231f96b7a
|
547 |
+
assets/jui/less/bootstrap-extended.less 1e13b27174d047bc4246e34aefcc2b69
|
548 |
+
assets/jui/less/pager.less 6894467becde50b42d587848ba08f77b
|
549 |
+
assets/jui/less/sprites.less dd92cfadfeeec04bbc83616cc603e18d
|
550 |
+
assets/jui/img/glyphicons-halflings.png 90233c9067e91fc860cacaa1e5e2b696
|
551 |
+
assets/jui/img/glyphicons-halflings-white.png 9bbc6e9602998a385c2ea13df56470fd
|
552 |
+
assets/jui/img/index.html 8a3edb0428f11a404535d9134c90063f
|
553 |
+
assets/jui/fonts/IcoMoon.svg 1568c7591fee07d1255c30f029c7498d
|
554 |
+
assets/jui/fonts/icomoon-license.txt f72f47241976883c19d65b5eb98309a5
|
555 |
+
assets/jui/fonts/fontawesome-webfont.eot 5ae23ad29b67289a1375d2043e289c52
|
556 |
+
assets/jui/fonts/IcoMoon.woff f118aa4b80d2a416b3b8e7af4ab7541b
|
557 |
+
assets/jui/fonts/fontawesome-webfont.svg f99a231ed57ee113b50b1c3e9f9fcdc3
|
558 |
+
assets/jui/fonts/fontawesome-webfont.woff b683029bafe0305ac2234038a03e1541
|
559 |
+
assets/jui/fonts/fontawesome-webfont.ttf 8cca2f02b0af2da365ff4d1755f29146
|
560 |
+
assets/jui/fonts/font-awesome4/fontawesome-webfont.eot 32400f4e08932a94d8bfd2422702c446
|
561 |
+
assets/jui/fonts/font-awesome4/fontawesome-webfont.svg f775f9cca88e21d45bebe185b27c0e5b
|
562 |
+
assets/jui/fonts/font-awesome4/FontAwesome.otf 87d8ca3ddc57e7d2da6226e480f90457
|
563 |
+
assets/jui/fonts/font-awesome4/fontawesome-webfont.woff a35720c2fed2c7f043bc7e4ffb45e073
|
564 |
+
assets/jui/fonts/font-awesome4/fontawesome-webfont.ttf a3de2170e4e9df77161ea5d3f31b2668
|
565 |
+
assets/jui/fonts/font-awesome4/fontawesome-webfont.woff2 db812d8a70a4e88e888744c1c9a27e89
|
566 |
+
assets/jui/fonts/index.html 8a3edb0428f11a404535d9134c90063f
|
567 |
+
assets/jui/fonts/IcoMoon.eot 26bae2d7fa9f1165f10eaf95087b7c1b
|
568 |
+
assets/jui/fonts/IcoMoon.ttf f4e1bac45450adad203345436ea0784a
|
569 |
assets/jui/js/bootstrap.min.js 450c9472f4afb0a2d33acb52b378c820
|
570 |
+
assets/jui/js/jquery.ui.core.js df0322eba55cabce1277472b3975b87a
|
571 |
assets/jui/js/chosen.jquery.js 4bf32091e3e36e6a9bf58fe18f0e5851
|
572 |
assets/jui/js/sortablelist.js 27d36762f19a58f8200cc14b090bae9c
|
573 |
+
assets/jui/js/cms.js 77f3f34b18c237e80f18b31ad6a8bd05
|
|
|
|
|
574 |
assets/jui/js/chosen.jquery.min.js c7e1d3cd9d4466e5f24252f8c6d40ded
|
575 |
assets/jui/js/jquery.ui.sortable.js 97ab77008384cfe74f23461929fb783f
|
576 |
+
assets/jui/js/jquery.ui.core.min.js 133fb19b0eeab67f872d759eb106db82
|
577 |
assets/jui/js/jquery.ui.sortable.min.js 43c85e35d4e1a5823f9fa4514bdd32cd
|
578 |
+
assets/jui/js/icomoon-lte-ie7.js 6795cf92dbde5174f9ea732db454f642
|
579 |
+
assets/jui/js/treeselectmenu.jquery.min.js e1892dab9a7de69871973804572c0ba3
|
580 |
+
assets/jui/js/jquery-noconflict.js e2060c4e5e5955c824723b13a212d3ec
|
581 |
+
assets/jui/js/treeselectmenu.jquery.js 2896fd9a6cde90afdf55609c8bd653da
|
582 |
+
assets/jui/js/index.html 8a3edb0428f11a404535d9134c90063f
|
583 |
+
assets/jui/js/jquery.js 41ca0b5d474117281973aeb249b944c8
|
584 |
+
assets/jui/js/bootstrap.js a97f010010c4f186b6fdd507b64dd7c0
|
585 |
+
assets/jui/js/jquery.min.js c20812cc1b958ac1222f87d791bb3613
|
586 |
assets/jui/js/html5.js 69431f1ec831bacf31013dff2872cba0
|
587 |
+
html/layouts/body_mainbody.php 18525f8f51b27b511b822a0a313dcad6
|
588 |
+
html/layouts/widget_basic.php 42d4796dffe3d08ded57b941620b14d1
|
589 |
+
html/layouts/widget_standard.php 496f71720f9bf9ee1bb1585f7082cde3
|
590 |
+
html/layouts/body_iphonemainbody.php b8e386889c38e0aae8b7e770356e7823
|
591 |
+
html/layouts/widget_sidebar.php ed58b5518482382fd88a1f440236dff6
|
592 |
+
html/layouts/commentstempl_basic.php dff2346cf3f26adbe01897942bfdd312
|
593 |
+
html/layouts/doc_tag.php 4049d1c4563cfc5c0adf70e3e2798821
|
594 |
+
html/layouts/chrome_standard.php 8f9435e2753bfe2b64d32871e4c35ead
|
595 |
+
html/layouts/orderedbody_mainbody.php bdb6c0e6058297545b2aa3f7fba75154
|
596 |
+
html/layouts/body_debugmainbody.php ded1daac4162099df787b71683bf1d06
|
597 |
+
html/layouts/index.html d41d8cd98f00b204e9800998ecf8427e
|
598 |
+
html/layouts/chrome_basic.php e8ab9a1df84c886fabd19a26e97fa1ed
|
599 |
+
html/layouts/comment_basic.php 7de635b9911d5776009e072f5af0db9a
|
600 |
+
html/layouts/doc_body.php 04081db27d2e051b6ec03e61f5869e36
|
601 |
+
html/index.html d41d8cd98f00b204e9800998ecf8427e
|
602 |
+
html/comments.php 7a9d141db65e95bfbfbf9178b15b42e1
|
603 |
+
functions.php 1f30b86b432f763a174173de402ac2db
|
604 |
+
images/typography.png 7e4dbff2b6fc9a0a07856e79eb2e4cf0
|
605 |
+
images/home.png 71749742d113a2f4ffeceb874c2dfbe4
|
606 |
+
images/rocket.png 5069154cc0e54fd066bda96cd3285f8b
|
607 |
+
images/close_hover.png 830b06cf015bf4f9505e1dde9db0cf87
|
608 |
+
images/close.png bc78dfad86cb326991c3dcc37f849be9
|
609 |
images/bg-3-6-3.png ab95c77bee438263e6848daaeb6216d9
|
610 |
+
images/blank.png 05e8d1ff9dc55aad50ad54c57e99d188
|
611 |
+
images/error.png 498184d2519e96f3f2b7067491fe2cbf
|
612 |
images/blank.gif f58783577b00e764e743e1ebd1b1d68c
|
613 |
+
images/index.html d41d8cd98f00b204e9800998ecf8427e
|
614 |
+
images/header-assets.png 0af41557bbcb5a2fec3dfc4c292e1405
|
615 |
+
images/spinner.gif 117a2ea3fe0fa5ffcb104eca058111c7
|
616 |
+
images/speach-bubble.png 3c80cb07d9d6a57d87e751da41efa59e
|
617 |
+
images/list-arrow.png f29dbbbeeae13356b202dffc5eab5059
|
618 |
+
images/iphone/menu-bg.png 52085ede5a4d4e96c35ac0e9a7477337
|
619 |
+
images/iphone/menu-scroller.png 9b5293aac0e936fe814e01ee43bda012
|
620 |
+
images/iphone/header-assets-iphone.png 464eeaa87bad23be42151071b187949b
|
621 |
+
images/iphone/scrollbar.png ff566cfadad1bcbf91bc833213950cc2
|
622 |
images/iphone/buttons.png 0f4eb557557fd8c46a16efdae8bef856
|
|
|
623 |
images/iphone/index.html d41d8cd98f00b204e9800998ecf8427e
|
|
|
624 |
images/iphone/forward.gif 38aee8b0ca60da174b570c6eb1e4de0f
|
625 |
images/iphone/back.png 570282bb42d986fea2a12a5339b49cc9
|
626 |
+
images/iphone/forward.png 1bf1b8a7047eac3bd5d63f7d733ed3a3
|
627 |
+
images/iphone/branding.png 9d21509b2b950bee367ae0606b91b174
|
628 |
images/iphone/switcher.png 58476fd8accd91223d753cf6b775a896
|
629 |
+
CHANGELOG.php da71c644939ca1ea5d9dba769ed399a1
|
630 |
+
libs/phpQuery.php 5f2079826defbcf5c88f3bec28d19b06
|
631 |
+
libs/google-code-prettify/lang-apollo.js 5812a1d4a952a2a0076148bb4d6fa834
|
632 |
+
libs/google-code-prettify/lang-wiki.js b467f277d32f0728501b439698bc0ecc
|
633 |
+
libs/google-code-prettify/lang-proto.js 873efd03c9897ad38d134f95c6eaaabd
|
634 |
+
libs/google-code-prettify/lang-css.js 96ce256446c4669341f32da15f4787e4
|
635 |
+
libs/google-code-prettify/lang-xq.js ebc66642254c40bdd21f56c80e477918
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
636 |
libs/google-code-prettify/lang-scala.js d3bd091d7b84099d91e889bc7c0770cb
|
|
|
|
|
637 |
libs/google-code-prettify/lang-matlab.js 26ee1ce25520c428895329a05c4ed5e5
|
|
|
|
|
638 |
libs/google-code-prettify/lang-sql.js 85dc53f8ee26511df07bf70ed75a7b04
|
|
|
|
|
639 |
libs/google-code-prettify/lang-dart.js 319014d37860266041aa2a5a8dbe398e
|
640 |
+
libs/google-code-prettify/lang-go.js 82374ff8b73f3e2d8b983954c1e1ca00
|
|
|
|
|
|
|
|
|
|
|
641 |
libs/google-code-prettify/lang-yaml.js e0367f932b3ea37ef511ecb4d1d236e1
|
642 |
+
libs/google-code-prettify/prettify.js db158ccd3edb0871ea134eec56a01d13
|
643 |
+
libs/google-code-prettify/lang-tcl.js 15d00fba815d6e06576336fb98776c52
|
644 |
libs/google-code-prettify/lang-vb.js ec53a1ac8e62fa2bb25ef2ad32900bd4
|
|
|
645 |
libs/google-code-prettify/lang-basic.js cc31708f1c51c30f23f7a6eb710bc797
|
646 |
+
libs/google-code-prettify/lang-mumps.js 031899e4c4ab891473f8327b96d860e9
|
647 |
+
libs/google-code-prettify/prettify.css ecd4a5d6c0cbee10b168f6aa000c64ea
|
648 |
+
libs/google-code-prettify/lang-erlang.js 9e367311ee53e21158a8ae7522b35d18
|
649 |
+
libs/google-code-prettify/lang-lua.js ae5f4fd51262d4d087f63f4df75e1c7a
|
650 |
libs/google-code-prettify/lang-pascal.js 5a31d03e01bbb8b7683197e9fb6a7c58
|
651 |
libs/google-code-prettify/lang-clj.js 3d748a47ed0eed1c0f554d30ff6efa44
|
652 |
+
libs/google-code-prettify/lang-rd.js ba133221a755660a85a047e7d1ecd3ca
|
|
|
|
|
|
|
653 |
libs/google-code-prettify/lang-vhdl.js 1a5853df113e37f58cc5e2f2806c6b5b
|
654 |
+
libs/google-code-prettify/lang-n.js 4abe536b16c3646d8c7286e5cfab6121
|
655 |
+
libs/google-code-prettify/lang-hs.js 0a3b4b0987ff5cb251566c7c4f5d1c37
|
656 |
+
libs/google-code-prettify/run_prettify.js c9076487b9f637bd858e3d565f3504f4
|
657 |
+
libs/google-code-prettify/lang-llvm.js e6d841b31a9c7f87f3e547c85db1153f
|
658 |
libs/google-code-prettify/lang-lisp.js 71ac79ad50ec3fed97fa82ea945f3551
|
659 |
+
libs/google-code-prettify/lang-ml.js be01c39a03de86862f5fe65f687b11c6
|
660 |
+
libs/google-code-prettify/lang-r.js f44ab13942e4e056e4d436dd6658f14d
|
661 |
+
libs/google-code-prettify/lang-tex.js f50e8714d52f12131d79aaa3d8d198c0
|
662 |
+
libs/phpQuery/DOMEvent.php 4cfb949b69cc2a4d4d5a67ece0d6c2ee
|
663 |
+
libs/phpQuery/compat/mbstring.php 8d8f395cadd9331bce5bafef839d6fc8
|
664 |
+
libs/phpQuery/Callback.php b28868641684b5afffe4866a553f448d
|
665 |
+
libs/phpQuery/phpQueryEvents.php 39d077aff19070f6d690a1b11f633e18
|
666 |
+
libs/phpQuery/DOMDocumentWrapper.php e14e671b5f90c40ffdc3c29d178bf07a
|
667 |
+
libs/phpQuery/phpQueryObject.php a31214a62b94a645e57511a7148c09c6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
668 |
readme.txt 6b98cfcddc356180f2cf09f4058203c5
|
669 |
+
css/grid-12.css 97e542e4363fa524229aba1f0790126d
|
670 |
+
css/wordpress.css 3e074e8c7a663df3292b52001f7ca77c
|
671 |
+
css/gantry.css 822cad77af408a3d0a64ff4361fc9371
|
672 |
+
css/grid-16.css 6b2ed9351604ca57614ebb27a76b483e
|
673 |
+
css/wordpress-ie7.css 09b5f1ee4908d2cb4fd1e8d3018cbb96
|
674 |
+
css/gantry-ie6.css 1291dc7f4f22fe76a854306e93017ca3
|
675 |
+
css/grid-responsive.css 636d24b7c46dcc5208a1c37ef25fc879
|
676 |
+
css/wordpress-ie6.css 186700b9c35b51a969ac3da34d588610
|
677 |
+
css/iphone-gantry.css 511ac3abe3c901dcdcbb88a829e854f4
|
678 |
+
css/index.html d41d8cd98f00b204e9800998ecf8427e
|
679 |
+
css/gantrydivider.css 859986635d73ad5f6b632055159090e8
|
680 |
+
autoload.php 4eecfd66b91fbf4ba7934f162b7d4e72
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/admin_assignments.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: admin_assignments.php 59954 2013-10-02 17:54:24Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
?>
|
2 |
/**
|
3 |
* @version $Id: admin_assignments.php 59954 2013-10-02 17:54:24Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
?>
|
admin/admin_functions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: admin_functions.php 60288 2013-12-10 13:10:52Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: admin_functions.php 60288 2013-12-10 13:10:52Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/admin_presets.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: admin_presets.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
?>
|
2 |
/**
|
3 |
* @version $Id: admin_presets.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
?>
|
admin/ajax-models/cache.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: cache.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: cache.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/ajax-models/lesscompiler.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: lesscompiler.php 61270 2015-01-06 12:14:52Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
2 |
/**
|
3 |
* @version $Id: lesscompiler.php 61270 2015-01-06 12:14:52Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
admin/ajax-models/overrides.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: overrides.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: overrides.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/ajax-models/presets-saver.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: presets-saver.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: presets-saver.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/ajax-models/widgets.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: widgets.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: widgets.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/assignment_functions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: assignment_functions.php 60344 2014-01-03 22:06:04Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: assignment_functions.php 60344 2014-01-03 22:06:04Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/ajaxbutton.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: ajaxbutton.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
2 |
/**
|
3 |
* @version $Id: ajaxbutton.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
admin/forms/fields/alias.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: alias.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: alias.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/animation.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: animation.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
2 |
/**
|
3 |
* @version $Id: animation.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
admin/forms/fields/categories.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: categories.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: categories.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/checkbox.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: checkbox.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: checkbox.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/colorchooser.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: colorchooser.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: colorchooser.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/dateformats.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: dateformats.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: dateformats.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
admin/forms/fields/diagnostic.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: diagnostic.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: diagnostic.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
admin/forms/fields/file.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: file.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: file.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
admin/forms/fields/filelist.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: filelist.php 2325 2012-08-13 17:46:48Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: filelist.php 2325 2012-08-13 17:46:48Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/fonts.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: fonts.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
2 |
/**
|
3 |
* @version $Id: fonts.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
admin/forms/fields/gantry.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantry.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantry.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
admin/forms/fields/gradient.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gradient.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gradient.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
admin/forms/fields/groupedlist.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: groupedlist.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: groupedlist.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/hidden.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: hidden.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: hidden.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/html.php
CHANGED
@@ -2,7 +2,7 @@
|
|
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 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
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 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
admin/forms/fields/imagelist.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: imagelist.php 2325 2012-08-13 17:46:48Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: imagelist.php 2325 2012-08-13 17:46:48Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/imagepicker.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version 4.1.
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('ABSPATH') or die();
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version 4.1.15 June 14, 2018
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('ABSPATH') or die();
|
admin/forms/fields/integer.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: integer.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
2 |
/**
|
3 |
* @version $Id: integer.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
admin/forms/fields/linkcategories.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: linkcategories.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
2 |
/**
|
3 |
* @version $Id: linkcategories.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
admin/forms/fields/list.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: list.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: list.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/navmenulist.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: navmenulist.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: navmenulist.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/overlays.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: overlays.php 60350 2014-01-03 23:31:45Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: overlays.php 60350 2014-01-03 23:31:45Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/password.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: password.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: password.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/position.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: position.php 2381 2012-08-15 04:14:26Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
2 |
/**
|
3 |
* @version $Id: position.php 2381 2012-08-15 04:14:26Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
admin/forms/fields/positions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: positions.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: positions.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
admin/forms/fields/positionslist.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: positionslist.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: positionslist.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/preset.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: preset.php 60350 2014-01-03 23:31:45Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: preset.php 60350 2014-01-03 23:31:45Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
admin/forms/fields/radio.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: radio.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
2 |
/**
|
3 |
* @version $Id: radio.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
admin/forms/fields/selectbox.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: selectbox.php 60288 2013-12-10 13:10:52Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: selectbox.php 60288 2013-12-10 13:10:52Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
admin/forms/fields/showmax.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: showmax.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: showmax.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/slider.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: slider.php 60350 2014-01-03 23:31:45Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: slider.php 60350 2014-01-03 23:31:45Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
admin/forms/fields/spacer.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: spacer.php 60813 2014-05-08 11:41:06Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
2 |
/**
|
3 |
* @version $Id: spacer.php 60813 2014-05-08 11:41:06Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
admin/forms/fields/text.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: text.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: text.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/fields/textarea.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: textarea.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
2 |
/**
|
3 |
* @version $Id: textarea.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
admin/forms/fields/textplus.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: textplus.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
2 |
/**
|
3 |
* @version $Id: textplus.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
admin/forms/fields/tips.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: tips.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: tips.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
admin/forms/fields/toggle.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: toggle.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: toggle.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
admin/forms/fields/updater.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: updater.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
@@ -27,7 +27,7 @@ class GantryFormFieldUpdater extends GantryFormField
|
|
27 |
|
28 |
$currentVersion = GANTRY_VERSION;
|
29 |
|
30 |
-
if ($currentVersion == "\4.1.
|
31 |
|
32 |
// curl check
|
33 |
if (!function_exists('curl_version')) {
|
2 |
/**
|
3 |
* @version $Id: updater.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
27 |
|
28 |
$currentVersion = GANTRY_VERSION;
|
29 |
|
30 |
+
if ($currentVersion == "\4.1.15") $currentVersion = "[DEV]";
|
31 |
|
32 |
// curl check
|
33 |
if (!function_exists('curl_version')) {
|
admin/forms/groups/chain.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: chain.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: chain.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/groups/columns.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: columns.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
2 |
/**
|
3 |
* @version $Id: columns.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
admin/forms/groups/enabledgroup.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: enabledgroup.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: enabledgroup.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/groups/grouped.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: grouped.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: grouped.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/groups/position.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: position.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: position.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/groups/selectedset.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: selectedset.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: selectedset.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/forms/groups/set.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: set.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: set.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/index.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: index.php 61153 2014-11-20 20:09:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: index.php 61153 2014-11-20 20:09:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/index_orig.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: index_orig.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: index_orig.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/meta-links/cache.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: cache.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: cache.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/meta-links/presets.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: presets.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: presets.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/override.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: override.php 61153 2014-11-20 20:09:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: override.php 61153 2014-11-20 20:09:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/override_orig.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: override_orig.php 61153 2014-11-20 20:09:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: override_orig.php 61153 2014-11-20 20:09:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
admin/widgets/assignments/js/assignments.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: assignments.js 60355 2014-01-06 19:26:48Z djamil $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: assignments.js 60355 2014-01-06 19:26:48Z djamil $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
admin/widgets/colorchooser/css/mooRainbow-2.0.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
-
* @version 4.1.
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
+
* @version 4.1.15 June 14, 2018
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
admin/widgets/gantry-ie.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry-ie.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantry-ie.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
admin/widgets/gantry-ie7.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry-ie7.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantry-ie7.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
admin/widgets/gantry-opera.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry-opera.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantry-opera.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
admin/widgets/gantry-widgets.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry-widgets.css 61614 2015-12-09 11:12:41Z jakub $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
#screen-meta {z-index:5;}
|
1 |
/**
|
2 |
* @version $Id: gantry-widgets.css 61614 2015-12-09 11:12:41Z jakub $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
#screen-meta {z-index:5;}
|
admin/widgets/gantry-widgets.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry-widgets.js 61625 2016-01-05 21:23:07Z djamil $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantry-widgets.js 61625 2016-01-05 21:23:07Z djamil $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
admin/widgets/gantry.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry.css 60288 2013-12-10 13:10:52Z jakub $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantry.css 60288 2013-12-10 13:10:52Z jakub $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
admin_functions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: admin_functions.php 60853 2014-05-14 23:05:36Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
@@ -770,7 +770,7 @@ function gantry_widgets_admin_force_accessibility_off()
|
|
770 |
if (is_string($filter['function']) && ($filter['function'] == 'wp_widgets_access_body_class' || preg_match('/lambda_/u', $filter['function']))) {
|
771 |
remove_filter('admin_body_class', $filter['function']);
|
772 |
set_user_setting('widgets_access', 'off');
|
773 |
-
add_action('admin_notices',
|
774 |
break(2);
|
775 |
}
|
776 |
}
|
2 |
/**
|
3 |
* @version $Id: admin_functions.php 60853 2014-05-14 23:05:36Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
770 |
if (is_string($filter['function']) && ($filter['function'] == 'wp_widgets_access_body_class' || preg_match('/lambda_/u', $filter['function']))) {
|
771 |
remove_filter('admin_body_class', $filter['function']);
|
772 |
set_user_setting('widgets_access', 'off');
|
773 |
+
add_action('admin_notices', function() { echo '<div class="error"><p>' . _g('Gantry themes currently do not support Widget Accessability Mode') . '</p></div>'; });
|
774 |
break(2);
|
775 |
}
|
776 |
}
|
ajax-models/example.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: example.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: example.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
autoload.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: autoload.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: autoload.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
bugfixes.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: bugfixes.php 61624 2016-01-05 17:46:05Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
@@ -48,13 +48,15 @@ global $gantry;
|
|
48 |
$new_widget_name = $widget . '-' . $next_id;
|
49 |
$found_old_widget = false;
|
50 |
foreach ($base_sidebar_widgets as $sidebar_name => &$sidebar_contents) {
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
|
|
|
|
58 |
}
|
59 |
if (!$found_old_widget) {
|
60 |
$base_sidebar_widgets['wp_inactive_widgets'][] = $new_widget_name;
|
@@ -92,25 +94,27 @@ global $gantry;
|
|
92 |
$remaps = array();
|
93 |
// find widget_ids to renumber
|
94 |
$override_sidebar = get_option($override_sidebar_name);
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
|
|
114 |
update_option($override_sidebar_name, $override_sidebar);
|
115 |
|
116 |
|
2 |
/**
|
3 |
* @version $Id: bugfixes.php 61624 2016-01-05 17:46:05Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
48 |
$new_widget_name = $widget . '-' . $next_id;
|
49 |
$found_old_widget = false;
|
50 |
foreach ($base_sidebar_widgets as $sidebar_name => &$sidebar_contents) {
|
51 |
+
if (is_array($sidebar_contents)) {
|
52 |
+
foreach ($sidebar_contents as $sidebar_contents_id => &$sidebar_widget_instance) {
|
53 |
+
if ($sidebar_widget_instance == $old_widget_name) {
|
54 |
+
$sidebar_widget_instance = $new_widget_name;
|
55 |
+
$found_old_widget = true;
|
56 |
+
break(2);
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}
|
60 |
}
|
61 |
if (!$found_old_widget) {
|
62 |
$base_sidebar_widgets['wp_inactive_widgets'][] = $new_widget_name;
|
94 |
$remaps = array();
|
95 |
// find widget_ids to renumber
|
96 |
$override_sidebar = get_option($override_sidebar_name);
|
97 |
+
if (is_array($override_sidebar)) {
|
98 |
+
foreach ($override_sidebar as $position => &$sbw_instances) {
|
99 |
+
foreach ($sbw_instances as $position_id => &$widget_id) {
|
100 |
+
$side_bar_widget_type = substr($widget_id, 0, strrpos($widget_id, '-'));
|
101 |
+
$widget_type_option_name = 'widget_' . $side_bar_widget_type;
|
102 |
+
$id_number = substr($widget_id, strrpos($widget_id, '-') + 1);
|
103 |
+
if ($id_number < $override_id * 10000 || $id_number > ($override_id + 1) * 10000) {
|
104 |
+
$keys = array_keys($working_overrides[$widget_type_option_name]);
|
105 |
+
if (count($keys) == 0 && empty($remaps[$widget_type_option_name])) {
|
106 |
+
$keys[$override_id * 10000 + 2] = $override_id * 10000 + 2;
|
107 |
+
$new_id = max($keys) + 1;
|
108 |
+
} elseif (count($keys) == 0) {
|
109 |
+
$remapped_ids = array_values($remaps[$widget_type_option_name]);
|
110 |
+
$new_id = max($remapped_ids) + 1;
|
111 |
+
}
|
112 |
+
$widget_id = $side_bar_widget_type . '-' . $new_id;
|
113 |
+
$remaps[$widget_type_option_name][$id_number] = $new_id;
|
114 |
+
}
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
update_option($override_sidebar_name, $override_sidebar);
|
119 |
|
120 |
|
classes/Gantry/CssFileResolver.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: CssFileResolver.php 58836 2013-01-15 01:40:58Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: CssFileResolver.php 58836 2013-01-15 01:40:58Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
classes/Gantry/FileResolver.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: FileResolver.php 58836 2013-01-15 01:40:58Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
2 |
/**
|
3 |
* @version $Id: FileResolver.php 58836 2013-01-15 01:40:58Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die;
|
classes/Gantry/Loader.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: Loader.php 58836 2013-01-15 01:40:58Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
2 |
/**
|
3 |
* @version $Id: Loader.php 58836 2013-01-15 01:40:58Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
classes/Gantry/Uri.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: Uri.php 61282 2015-01-27 19:45:43Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
@@ -435,10 +435,10 @@ class Gantry_Uri
|
|
435 |
$vars[] = $key;
|
436 |
} else {
|
437 |
$value = array($value);
|
438 |
-
$vars[] = implode('&', array_map(
|
439 |
}
|
440 |
}
|
441 |
-
$query = implode('&', array_filter($vars,
|
442 |
return $query;
|
443 |
}
|
444 |
|
2 |
/**
|
3 |
* @version $Id: Uri.php 61282 2015-01-27 19:45:43Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
435 |
$vars[] = $key;
|
436 |
} else {
|
437 |
$value = array($value);
|
438 |
+
$vars[] = implode('&', array_map(function($value, $key) { return $key . '=' . urlencode($value); }, $value));
|
439 |
}
|
440 |
}
|
441 |
+
$query = implode('&', array_filter($vars, function($var) { return strlen($var); }));
|
442 |
return $query;
|
443 |
}
|
444 |
|
classes/Gantry/Uri/Builder.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: Builder.php 59417 2013-03-20 16:50:35Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: Builder.php 59417 2013-03-20 16:50:35Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
classes/Gantry/Uri/Components.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: Components.php 58836 2013-01-15 01:40:58Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: Components.php 58836 2013-01-15 01:40:58Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
classes/Gantry/Uri/Util.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: Util.php 60706 2014-04-07 16:57:27Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: Util.php 60706 2014-04-07 16:57:27Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/config/gantryelement.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryelement.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: gantryelement.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/config/gantryform.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryform.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: gantryform.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/config/gantryformfield.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryformfield.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: gantryformfield.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/config/gantryformfieldhelper.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryformfieldhelper.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: gantryformfieldhelper.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/config/gantryformgroup.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryformgroup.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* original copyright
|
2 |
/**
|
3 |
* @version $Id: gantryformgroup.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* original copyright
|
core/config/gantryformhelper.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryformhelper.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: gantryformhelper.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/config/gantryformitem.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryformitem.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
@@ -435,7 +435,7 @@ abstract class GantryFormItem
|
|
435 |
$gantry_name = $name;
|
436 |
} else {
|
437 |
$groups = explode('.', $group);
|
438 |
-
if (count($groups > 0)
|
439 |
array_shift($groups);
|
440 |
$groups[] = $name;
|
441 |
$gantry_name = implode('-', $groups);
|
2 |
/**
|
3 |
* @version $Id: gantryformitem.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
435 |
$gantry_name = $name;
|
436 |
} else {
|
437 |
$groups = explode('.', $group);
|
438 |
+
if (count($groups) > 0) {
|
439 |
array_shift($groups);
|
440 |
$groups[] = $name;
|
441 |
$gantry_name = implode('-', $groups);
|
core/config/gantryformnaminghelper.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryformnaminghelper.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: gantryformnaminghelper.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/config/gantryhtmlselect.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryhtmlselect.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: gantryhtmlselect.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/config/gantryparameters.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryparameters.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: gantryparameters.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/config/gantryselect.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryselect.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: gantryselect.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/gantry.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantry.class.php 61748 2017-04-28 10:39:53Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
@@ -1056,7 +1056,7 @@ class Gantry
|
|
1056 |
$path = '/' . preg_replace('#^' . quotemeta($this->baseUrl) . '#', "", $path);
|
1057 |
}
|
1058 |
$filename = strtolower(basename($path, '.css')) . rand(0, 1000);
|
1059 |
-
wp_enqueue_style($filename, $path, array(), '4.1.
|
1060 |
$deps[] = $path;
|
1061 |
}
|
1062 |
}
|
@@ -1069,11 +1069,11 @@ class Gantry
|
|
1069 |
if ($this->baseUrl != "/") {
|
1070 |
$path = '/' . preg_replace('#^' . quotemeta($this->baseUrl) . '#', "", $path);
|
1071 |
}
|
1072 |
-
wp_enqueue_script($path, $path, $deps, '4.1.
|
1073 |
$deps[] = $path;
|
1074 |
}
|
1075 |
foreach ($this->_header_full_scripts as $strSrc) {
|
1076 |
-
wp_enqueue_script($strSrc, $strSrc, $deps, '4.1.
|
1077 |
$deps[] = $strSrc;
|
1078 |
}
|
1079 |
|
@@ -1113,11 +1113,11 @@ class Gantry
|
|
1113 |
if ($this->baseUrl != "/") {
|
1114 |
$path = '/' . preg_replace('#^' . quotemeta($this->baseUrl) . '#', "", $path);
|
1115 |
}
|
1116 |
-
wp_enqueue_script($path, $path, $deps, '4.1.
|
1117 |
$deps[] = $path;
|
1118 |
}
|
1119 |
foreach ($this->_footer_full_scripts as $strSrc) {
|
1120 |
-
wp_enqueue_script($strSrc, $strSrc, $deps, '4.1.
|
1121 |
$deps[] = $strSrc;
|
1122 |
}
|
1123 |
|
@@ -1223,7 +1223,7 @@ class Gantry
|
|
1223 |
}
|
1224 |
|
1225 |
// Generate domready script
|
1226 |
-
if (isset($this->_domready_script) && !empty($this->_domready_script)
|
1227 |
$strHtml .= $tab . '<script type="text/javascript">//<![CDATA[' . $lnEnd;
|
1228 |
// This is for full XHTML support.
|
1229 |
$strHtml .= 'window.addEvent(\'domready\', function() {' . $this->_domready_script . $lnEnd . '});';
|
@@ -1231,7 +1231,7 @@ class Gantry
|
|
1231 |
}
|
1232 |
|
1233 |
// Generate load script
|
1234 |
-
if (isset($this->_loadevent_script) && !empty($this->_loadevent_script)
|
1235 |
$strHtml .= $tab . '<script type="text/javascript">//<![CDATA[' . $lnEnd;
|
1236 |
// This is for full XHTML support.
|
1237 |
$strHtml .= 'window.addEvent(\'load\', function() {' . $this->_loadevent_script . $lnEnd . '});';
|
@@ -1465,7 +1465,7 @@ class Gantry
|
|
1465 |
|
1466 |
// get an md5 sum of any passed in options
|
1467 |
$tmp_options = $options;
|
1468 |
-
array_walk($tmp_options,
|
1469 |
$options_string = implode($tmp_options, "\n");
|
1470 |
$options_md5 = md5($options_string . (string)$this->get('less-compression', true));
|
1471 |
|
@@ -1584,7 +1584,7 @@ class Gantry
|
|
1584 |
if (count($new_cache['files']) > 1) {
|
1585 |
$included_files = array_keys($new_cache['files']);
|
1586 |
unset($included_files[0]);
|
1587 |
-
array_walk($included_files,
|
1588 |
$header .= sprintf("\n * Included Files : \n%s", implode("\n", str_replace($this->baseUrl, '', $included_files)));
|
1589 |
}
|
1590 |
$header .= "\n */\n";
|
@@ -1765,7 +1765,7 @@ class Gantry
|
|
1765 |
if (!defined('GANTRY_FINALIZED')) {
|
1766 |
$this->_styles[$priority][] = $link;
|
1767 |
} else {
|
1768 |
-
wp_enqueue_style($link->getUrl(), $link->getUrl(), array(), '4.1.
|
1769 |
}
|
1770 |
}
|
1771 |
}
|
@@ -1879,7 +1879,7 @@ class Gantry
|
|
1879 |
$this->_footerscripts[$full_path] = $check_url_path . $query_string;
|
1880 |
}
|
1881 |
} else {
|
1882 |
-
wp_enqueue_script($check_url_path, $check_url_path, array(), '4.1.
|
1883 |
}
|
1884 |
break;
|
1885 |
}
|
@@ -1917,7 +1917,7 @@ class Gantry
|
|
1917 |
$this->_footerscripts[$check_path] = $check_url_path . $query_string;
|
1918 |
}
|
1919 |
} else {
|
1920 |
-
wp_enqueue_script($check_url_path, $check_url_path, array(), '4.1.
|
1921 |
}
|
1922 |
break(2);
|
1923 |
}
|
2 |
/**
|
3 |
* @version $Id: gantry.class.php 61748 2017-04-28 10:39:53Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
1056 |
$path = '/' . preg_replace('#^' . quotemeta($this->baseUrl) . '#', "", $path);
|
1057 |
}
|
1058 |
$filename = strtolower(basename($path, '.css')) . rand(0, 1000);
|
1059 |
+
wp_enqueue_style($filename, $path, array(), '4.1.15');
|
1060 |
$deps[] = $path;
|
1061 |
}
|
1062 |
}
|
1069 |
if ($this->baseUrl != "/") {
|
1070 |
$path = '/' . preg_replace('#^' . quotemeta($this->baseUrl) . '#', "", $path);
|
1071 |
}
|
1072 |
+
wp_enqueue_script($path, $path, $deps, '4.1.15');
|
1073 |
$deps[] = $path;
|
1074 |
}
|
1075 |
foreach ($this->_header_full_scripts as $strSrc) {
|
1076 |
+
wp_enqueue_script($strSrc, $strSrc, $deps, '4.1.15');
|
1077 |
$deps[] = $strSrc;
|
1078 |
}
|
1079 |
|
1113 |
if ($this->baseUrl != "/") {
|
1114 |
$path = '/' . preg_replace('#^' . quotemeta($this->baseUrl) . '#', "", $path);
|
1115 |
}
|
1116 |
+
wp_enqueue_script($path, $path, $deps, '4.1.15', true);
|
1117 |
$deps[] = $path;
|
1118 |
}
|
1119 |
foreach ($this->_footer_full_scripts as $strSrc) {
|
1120 |
+
wp_enqueue_script($strSrc, $strSrc, $deps, '4.1.15', true);
|
1121 |
$deps[] = $strSrc;
|
1122 |
}
|
1123 |
|
1223 |
}
|
1224 |
|
1225 |
// Generate domready script
|
1226 |
+
if (isset($this->_domready_script) && !empty($this->_domready_script)) {
|
1227 |
$strHtml .= $tab . '<script type="text/javascript">//<![CDATA[' . $lnEnd;
|
1228 |
// This is for full XHTML support.
|
1229 |
$strHtml .= 'window.addEvent(\'domready\', function() {' . $this->_domready_script . $lnEnd . '});';
|
1231 |
}
|
1232 |
|
1233 |
// Generate load script
|
1234 |
+
if (isset($this->_loadevent_script) && !empty($this->_loadevent_script)) {
|
1235 |
$strHtml .= $tab . '<script type="text/javascript">//<![CDATA[' . $lnEnd;
|
1236 |
// This is for full XHTML support.
|
1237 |
$strHtml .= 'window.addEvent(\'load\', function() {' . $this->_loadevent_script . $lnEnd . '});';
|
1465 |
|
1466 |
// get an md5 sum of any passed in options
|
1467 |
$tmp_options = $options;
|
1468 |
+
array_walk($tmp_options, function(&$val, $key) { $val = ' * @' . $key . ' = ' . $val; });
|
1469 |
$options_string = implode($tmp_options, "\n");
|
1470 |
$options_md5 = md5($options_string . (string)$this->get('less-compression', true));
|
1471 |
|
1584 |
if (count($new_cache['files']) > 1) {
|
1585 |
$included_files = array_keys($new_cache['files']);
|
1586 |
unset($included_files[0]);
|
1587 |
+
array_walk($included_files, function(&$v) { global $gantry; $v = ' * ' . $gantry->uriutil->getUrlForPath($v); });
|
1588 |
$header .= sprintf("\n * Included Files : \n%s", implode("\n", str_replace($this->baseUrl, '', $included_files)));
|
1589 |
}
|
1590 |
$header .= "\n */\n";
|
1765 |
if (!defined('GANTRY_FINALIZED')) {
|
1766 |
$this->_styles[$priority][] = $link;
|
1767 |
} else {
|
1768 |
+
wp_enqueue_style($link->getUrl(), $link->getUrl(), array(), '4.1.15');
|
1769 |
}
|
1770 |
}
|
1771 |
}
|
1879 |
$this->_footerscripts[$full_path] = $check_url_path . $query_string;
|
1880 |
}
|
1881 |
} else {
|
1882 |
+
wp_enqueue_script($check_url_path, $check_url_path, array(), '4.1.15', $in_footer);
|
1883 |
}
|
1884 |
break;
|
1885 |
}
|
1917 |
$this->_footerscripts[$check_path] = $check_url_path . $query_string;
|
1918 |
}
|
1919 |
} else {
|
1920 |
+
wp_enqueue_script($check_url_path, $check_url_path, array(), '4.1.15', $in_footer);
|
1921 |
}
|
1922 |
break(2);
|
1923 |
}
|
core/gantrybodylayout.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrybodylayout.class.php 60387 2014-01-13 12:21:14Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantrybodylayout.class.php 60387 2014-01-13 12:21:14Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/gantrybrowser.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrybrowser.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantrybrowser.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/gantrycommentstempllayout.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrycommentstempllayout.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
gantry_import('core.gantrylayout');
|
2 |
/**
|
3 |
* @version $Id: gantrycommentstempllayout.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
gantry_import('core.gantrylayout');
|
core/gantrydiagnostic.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrydiagnostic.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantrydiagnostic.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/gantryflatfile.class.php
CHANGED
@@ -3,7 +3,7 @@ defined('GANTRY_VERSION') or die();
|
|
3 |
/**
|
4 |
* @version $Id: gantryflatfile.class.php 60342 2014-01-03 17:12:22Z jakub $
|
5 |
* @author RocketTheme http://www.rockettheme.com
|
6 |
-
* @copyright Copyright (C) 2007 -
|
7 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
8 |
*/
|
9 |
/*
|
3 |
/**
|
4 |
* @version $Id: gantryflatfile.class.php 60342 2014-01-03 17:12:22Z jakub $
|
5 |
* @author RocketTheme http://www.rockettheme.com
|
6 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
7 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
8 |
*/
|
9 |
/*
|
core/gantrygizmo.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrygizmo.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantrygizmo.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/gantrygzipper.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrygzipper.class.php 60921 2014-06-01 09:47:27Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
@@ -147,13 +147,12 @@ class GantryGZipper
|
|
147 |
$md5sum .= md5( $filepath );
|
148 |
$ordered_files[] = array( dirname( $filepath ), basename( $filepath ), $file );
|
149 |
}
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
}
|
156 |
-
return;
|
157 |
}
|
158 |
|
159 |
if (count($ordered_files) > 0) {
|
2 |
/**
|
3 |
* @version $Id: gantrygzipper.class.php 60921 2014-06-01 09:47:27Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
147 |
$md5sum .= md5( $filepath );
|
148 |
$ordered_files[] = array( dirname( $filepath ), basename( $filepath ), $file );
|
149 |
}
|
150 |
+
if (!is_writable($cache_dir)) {
|
151 |
+
foreach ($script_tags as $file) {
|
152 |
+
$output[] = $file;
|
153 |
+
}
|
154 |
+
return;
|
155 |
}
|
|
|
156 |
}
|
157 |
|
158 |
if (count($ordered_files) > 0) {
|
core/gantryini.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryini.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantryini.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/gantryjson.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryjson.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* This is based on JXtendeds JXJSON GNU/GPL Copyright (C) 2007 Louis Landry. All rights reserved.
|
@@ -216,9 +216,9 @@ class GantryJSON
|
|
216 |
$result = 'null';
|
217 |
break;
|
218 |
case 'string' :
|
219 |
-
$i =
|
220 |
if (preg_match('/^[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/', $params)) {
|
221 |
-
$result = mktime($i
|
222 |
}
|
223 |
break;
|
224 |
case 'object' :
|
2 |
/**
|
3 |
* @version $Id: gantryjson.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* This is based on JXtendeds JXJSON GNU/GPL Copyright (C) 2007 Louis Landry. All rights reserved.
|
216 |
$result = 'null';
|
217 |
break;
|
218 |
case 'string' :
|
219 |
+
$i = function(&$e, $p, $l) { return (int)substr($e, $p, $l); };
|
220 |
if (preg_match('/^[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/', $params)) {
|
221 |
+
$result = mktime($i($params, 11, 2), $i($params, 14, 2), $i($params, 17, 2), $i($params, 5, 2), $i($params, 9, 2), $i($params, 0, 4));
|
222 |
}
|
223 |
break;
|
224 |
case 'object' :
|
core/gantrylayout.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrylayout.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantrylayout.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/gantryloader.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryloader.class.php 60342 2014-01-03 17:12:22Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantryloader.class.php 60342 2014-01-03 17:12:22Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/gantryparams.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryparams.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantryparams.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/gantryplatform.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryplatform.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: gantryplatform.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/gantrypositions.class.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* @package Gantry Template Framework - RocketTheme
|
4 |
* @version $Id: gantrypositions.class.php 59361 2013-03-13 23:10:27Z btowles $
|
5 |
* @author RocketTheme http://www.rockettheme.com
|
6 |
-
* @copyright Copyright (C) 2007 -
|
7 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
8 |
*
|
9 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
3 |
* @package Gantry Template Framework - RocketTheme
|
4 |
* @version $Id: gantrypositions.class.php 59361 2013-03-13 23:10:27Z btowles $
|
5 |
* @author RocketTheme http://www.rockettheme.com
|
6 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
7 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
8 |
*
|
9 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
core/gantrystylelink.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrystylelink.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantrystylelink.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/gantrytemplate.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
`` * @version $Id: gantrytemplate.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
`` * @version $Id: gantrytemplate.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/gantrywidget.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrywidget.class.php 61341 2015-02-24 19:42:57Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantrywidget.class.php 61341 2015-02-24 19:42:57Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/params/gantryparamoverride.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryparamoverride.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
2 |
/**
|
3 |
* @version $Id: gantryparamoverride.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
core/params/gantryparamprocessor.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryparamprocessor.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
2 |
/**
|
3 |
* @version $Id: gantryparamprocessor.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
core/params/overrides/gantrycookieparamoverride.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrycookieparamoverride.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantrycookieparamoverride.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/params/overrides/gantryoverrideparamoverride.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryoverrideparamoverride.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantryoverrideparamoverride.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/params/overrides/gantrysessionparamoverride.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrysessionparamoverride.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
@@ -18,7 +18,7 @@ class GantrySessionParamOverride extends GantryParamOverride
|
|
18 |
{
|
19 |
public static function store()
|
20 |
{
|
21 |
-
if (
|
22 |
/** @global $gantry Gantry */
|
23 |
global $gantry;
|
24 |
foreach ($gantry->_setinsession as $session_var) {
|
@@ -35,7 +35,7 @@ class GantrySessionParamOverride extends GantryParamOverride
|
|
35 |
|
36 |
public static function clean()
|
37 |
{
|
38 |
-
if (
|
39 |
/** @global $gantry Gantry */
|
40 |
global $gantry;
|
41 |
foreach ($gantry->_setinsession as $session_var) {
|
@@ -46,7 +46,7 @@ class GantrySessionParamOverride extends GantryParamOverride
|
|
46 |
|
47 |
public static function populate()
|
48 |
{
|
49 |
-
if (
|
50 |
/** @global $gantry Gantry */
|
51 |
global $gantry;
|
52 |
|
@@ -80,4 +80,15 @@ class GantrySessionParamOverride extends GantryParamOverride
|
|
80 |
}
|
81 |
}
|
82 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
}
|
2 |
/**
|
3 |
* @version $Id: gantrysessionparamoverride.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
18 |
{
|
19 |
public static function store()
|
20 |
{
|
21 |
+
if (static::isSessionActive()) {
|
22 |
/** @global $gantry Gantry */
|
23 |
global $gantry;
|
24 |
foreach ($gantry->_setinsession as $session_var) {
|
35 |
|
36 |
public static function clean()
|
37 |
{
|
38 |
+
if (static::isSessionActive()) {
|
39 |
/** @global $gantry Gantry */
|
40 |
global $gantry;
|
41 |
foreach ($gantry->_setinsession as $session_var) {
|
46 |
|
47 |
public static function populate()
|
48 |
{
|
49 |
+
if (static::isSessionActive()) {
|
50 |
/** @global $gantry Gantry */
|
51 |
global $gantry;
|
52 |
|
80 |
}
|
81 |
}
|
82 |
}
|
83 |
+
|
84 |
+
protected static function isSessionActive()
|
85 |
+
{
|
86 |
+
if (php_sapi_name() !== 'cli') {
|
87 |
+
if (version_compare(phpversion(), '5.4.0', '>=')) {
|
88 |
+
return session_status() === PHP_SESSION_ACTIVE;
|
89 |
+
}
|
90 |
+
return session_id() !== '';
|
91 |
+
}
|
92 |
+
return false;
|
93 |
+
}
|
94 |
}
|
core/params/overrides/gantryurlparamoverride.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryurlparamoverride.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantryurlparamoverride.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/params/processors/alias.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: alias.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
2 |
/**
|
3 |
* @version $Id: alias.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
core/renderers/gantrycommentsrenderer.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrycommentsrenderer.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantrycommentsrenderer.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/renderers/gantrydebugmainbodyrenderer.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrydebugmainbodyrenderer.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantrydebugmainbodyrenderer.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/renderers/gantrymainbodyrenderer.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrymainbodyrenderer.class.php 61394 2015-07-04 09:48:11Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantrymainbodyrenderer.class.php 61394 2015-07-04 09:48:11Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/renderers/gantryorderedmainbodyrenderer.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryorderedmainbodyrenderer.class.php 61394 2015-07-04 09:48:11Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantryorderedmainbodyrenderer.class.php 61394 2015-07-04 09:48:11Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/renderers/gantrywidgetsrenderer.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrywidgetsrenderer.class.php 61394 2015-07-04 09:48:11Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantrywidgetsrenderer.class.php 61394 2015-07-04 09:48:11Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/rules/facttypes/archive.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: archive.class.php 60811 2014-05-08 09:28:29Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: archive.class.php 60811 2014-05-08 09:28:29Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/rules/facttypes/post_type.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: post_type.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: post_type.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/rules/facttypes/taxonomy.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: taxonomy.class.php 61615 2015-12-09 11:24:30Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
gantry_import('core.rules.gantryoverridefact');
|
2 |
/**
|
3 |
* @version $Id: taxonomy.class.php 61615 2015-12-09 11:24:30Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
gantry_import('core.rules.gantryoverridefact');
|
core/rules/facttypes/templatepage.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: templatepage.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: templatepage.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/rules/facttypes/wpmllang.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: templatepage.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: templatepage.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/rules/gantryoverridefact.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryoverridefact.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: gantryoverridefact.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/rules/gantryoverrides.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryoverrides.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: gantryoverrides.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/rules/gantryoverridesengine.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryoverridesengine.class.php 61153 2014-11-20 20:09:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
@@ -65,7 +65,8 @@ class GantryOverridesEngine
|
|
65 |
global $gantry_path;
|
66 |
$facttypes_location = $gantry_path . '/core/rules/facttypes/';
|
67 |
|
68 |
-
$
|
|
|
69 |
$override_catalog = gantry_get_override_catalog($templateName);
|
70 |
foreach ($override_catalog as $override_id => $override_name) {
|
71 |
$assignments_option_name = $templateName . '-template-options-override-assignments-' . $override_id;
|
@@ -80,11 +81,13 @@ class GantryOverridesEngine
|
|
80 |
}
|
81 |
foreach ($types as $type => $items) {
|
82 |
if ($items === true) {
|
83 |
-
|
|
|
84 |
}
|
85 |
if (is_array($items)) {
|
86 |
foreach ($items as $item) {
|
87 |
-
|
|
|
88 |
}
|
89 |
}
|
90 |
}
|
2 |
/**
|
3 |
* @version $Id: gantryoverridesengine.class.php 61153 2014-11-20 20:09:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
65 |
global $gantry_path;
|
66 |
$facttypes_location = $gantry_path . '/core/rules/facttypes/';
|
67 |
|
68 |
+
$override = new GantryOverrides();
|
69 |
+
$this->wm->insertActionFassade('output', $override);
|
70 |
$override_catalog = gantry_get_override_catalog($templateName);
|
71 |
foreach ($override_catalog as $override_id => $override_name) {
|
72 |
$assignments_option_name = $templateName . '-template-options-override-assignments-' . $override_id;
|
81 |
}
|
82 |
foreach ($types as $type => $items) {
|
83 |
if ($items === true) {
|
84 |
+
$facttypeobject = new $facttypeclass($override_id, $archetype, $type);
|
85 |
+
$this->wm->insert($facttypeobject);
|
86 |
}
|
87 |
if (is_array($items)) {
|
88 |
foreach ($items as $item) {
|
89 |
+
$facttypeobject = new $facttypeclass($override_id, $archetype, $type, $item);
|
90 |
+
$this->wm->insert($facttypeobject);
|
91 |
}
|
92 |
}
|
93 |
}
|
core/rules/gantrypagecallfact.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrypagecallfact.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
gantry_import('core.rules.phprules.Fact');
|
2 |
/**
|
3 |
* @version $Id: gantrypagecallfact.class.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
gantry_import('core.rules.phprules.Fact');
|
core/utilities/cache/cache.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: cache.class.php 61624 2016-01-05 17:46:05Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*
|
2 |
/**
|
3 |
* @version $Id: cache.class.php 61624 2016-01-05 17:46:05Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*
|
core/utilities/cache/cacheDriver.interface.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
/**
|
4 |
* @version $Id: cacheDriver.interface.php 59361 2013-03-13 23:10:27Z btowles $
|
5 |
* @author RocketTheme http://www.rockettheme.com
|
6 |
-
* @copyright Copyright (C) 2007 -
|
7 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
8 |
*
|
9 |
*
|
3 |
/**
|
4 |
* @version $Id: cacheDriver.interface.php 59361 2013-03-13 23:10:27Z btowles $
|
5 |
* @author RocketTheme http://www.rockettheme.com
|
6 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
7 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
8 |
*
|
9 |
*
|
core/utilities/cache/fileCacheDriver.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: fileCacheDriver.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*
|
2 |
/**
|
3 |
* @version $Id: fileCacheDriver.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*
|
core/utilities/cache/wpTransientCacheDriver.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: wpTransientCacheDriver.class.php 59390 2013-03-15 20:51:45Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: wpTransientCacheDriver.class.php 59390 2013-03-15 20:51:45Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/utilities/gantryarrayhelper.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryarrayhelper.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: gantryarrayhelper.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/utilities/gantrycache.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrycache.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
@@ -26,7 +26,7 @@ class GantryCache
|
|
26 |
/**
|
27 |
*
|
28 |
*/
|
29 |
-
const ADMIN_GROUP_NAME = 'GantryAdmin-4.1.
|
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.1.
|
126 |
$this->cache->addDriver('admin', new WpTransientCacheDriver($this->group, self::ADMIN_LIFETIME));
|
127 |
}
|
128 |
}
|
2 |
/**
|
3 |
* @version $Id: gantrycache.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
26 |
/**
|
27 |
*
|
28 |
*/
|
29 |
+
const ADMIN_GROUP_NAME = 'GantryAdmin-4.1.15';
|
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.1.15';
|
126 |
$this->cache->addDriver('admin', new WpTransientCacheDriver($this->group, self::ADMIN_LIFETIME));
|
127 |
}
|
128 |
}
|
core/utilities/gantrydate.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrydate.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: gantrydate.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/utilities/gantryfile.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryfile.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: gantryfile.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/utilities/gantryfilterinput.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryfilterinput.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: gantryfilterinput.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/utilities/gantryfolder.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryfile.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: gantryfile.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/utilities/gantrylesscompiler.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrylesscompiler.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantrylesscompiler.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/utilities/gantrymobiledetect.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrymobiledetect.class.php 7054 2013-01-31 22:33:57Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* original license:
|
2 |
/**
|
3 |
* @version $Id: gantrymobiledetect.class.php 7054 2013-01-31 22:33:57Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* original license:
|
core/utilities/gantrypath.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryfile.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: gantryfile.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/utilities/gantryregistry.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryregistry.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: gantryregistry.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/utilities/gantrysimplexmlelement.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrysimplexmlelement.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
2 |
/**
|
3 |
* @version $Id: gantrysimplexmlelement.class.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
|
core/utilities/gantrytemplateinfo.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantrytemplateinfo.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: gantrytemplateinfo.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
core/utilities/gantryurl.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryurl.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: gantryurl.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
core/utilities/gantryxml.class.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
*
|
4 |
* @version $Id: gantryxml.class.php 61659 2016-03-08 17:22:12Z matias $
|
5 |
* @author RocketTheme http://www.rockettheme.com
|
6 |
-
* @copyright Copyright (C) 2007 -
|
7 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
8 |
*
|
9 |
* original copyright
|
3 |
*
|
4 |
* @version $Id: gantryxml.class.php 61659 2016-03-08 17:22:12Z matias $
|
5 |
* @author RocketTheme http://www.rockettheme.com
|
6 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
7 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
8 |
*
|
9 |
* original copyright
|
core/utilities/registry/format/ini.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: ini.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: ini.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/utilities/registry/format/json.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: json.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: json.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/utilities/registry/format/php.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: php.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: php.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/utilities/registry/format/xml.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: xml.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: xml.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
core/utilities/registry/gantryregistryformat.class.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantryregistryformat.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
2 |
/**
|
3 |
* @version $Id: gantryregistryformat.class.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* derived from Joomla with original copyright and license
|
css/gantry-ie6.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry-ie6.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantry-ie6.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
css/gantry.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry.css 61149 2014-11-10 18:37:53Z jakub $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantry.css 61149 2014-11-10 18:37:53Z jakub $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
css/gantrydivider.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantrydivider.css 61614 2015-12-09 11:12:41Z jakub $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantrydivider.css 61614 2015-12-09 11:12:41Z jakub $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
css/grid-12.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: grid-12.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: grid-12.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
css/grid-16.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: grid-16.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: grid-16.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
css/grid-responsive.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: grid-responsive.css 2375 2012-08-14 22:41:53Z kevin $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.rockettheme.com/legal/license.php RocketTheme Proprietary Use License
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: grid-responsive.css 2375 2012-08-14 22:41:53Z kevin $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.rockettheme.com/legal/license.php RocketTheme Proprietary Use License
|
6 |
*/
|
7 |
|
css/iphone-gantry.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: iphone-gantry.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: iphone-gantry.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
css/wordpress-ie6.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: wordpress-ie6.css 59361 2013-03-13 23:10:27Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: wordpress-ie6.css 59361 2013-03-13 23:10:27Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
css/wordpress-ie7.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: wordpress-ie7.css 59361 2013-03-13 23:10:27Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
.rt-block,.rt-pagination {zoom:1;}
|
1 |
/**
|
2 |
* @version $Id: wordpress-ie7.css 59361 2013-03-13 23:10:27Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
.rt-block,.rt-pagination {zoom:1;}
|
css/wordpress.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: wordpress.css 59361 2013-03-13 23:10:27Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: wordpress.css 59361 2013-03-13 23:10:27Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
functions.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: functions.php 61628 2016-01-06 19:38:55Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
@@ -168,7 +168,7 @@ function gantry_construct()
|
|
168 |
/**
|
169 |
* @name GANTRY_VERSION
|
170 |
*/
|
171 |
-
define('GANTRY_VERSION', '4.1.
|
172 |
|
173 |
|
174 |
if (!defined('DS')) {
|
@@ -192,7 +192,7 @@ function gantry_construct()
|
|
192 |
|
193 |
// Fix stuff on 4.4
|
194 |
if(!get_option('gantry_4_1_10_execute_scripts') && $wp_version >= '4.4') {
|
195 |
-
$cache_groups = array('gantry', 'Gantry', 'GantryAdmin-4.1.
|
196 |
foreach($cache_groups as $group) {
|
197 |
$cache_handler = GantryCache::getCache( $group, 0, true );
|
198 |
$cache_handler->clearGroupCache();
|
2 |
/**
|
3 |
* @version $Id: functions.php 61628 2016-01-06 19:38:55Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
168 |
/**
|
169 |
* @name GANTRY_VERSION
|
170 |
*/
|
171 |
+
define('GANTRY_VERSION', '4.1.15');
|
172 |
|
173 |
|
174 |
if (!defined('DS')) {
|
192 |
|
193 |
// Fix stuff on 4.4
|
194 |
if(!get_option('gantry_4_1_10_execute_scripts') && $wp_version >= '4.4') {
|
195 |
+
$cache_groups = array('gantry', 'Gantry', 'GantryAdmin-4.1.15', 'GantryLess', 'GantryAdminLess');
|
196 |
foreach($cache_groups as $group) {
|
197 |
$cache_handler = GantryCache::getCache( $group, 0, true );
|
198 |
$cache_handler->clearGroupCache();
|
gantry.config.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantry.config.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: gantry.config.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
gantry.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: gantry.php 61627 2016-01-06 19:34:25Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
@@ -10,7 +10,7 @@
|
|
10 |
Plugin Name: Gantry 4 Framework
|
11 |
Plugin URI: http://www.gantry.org/
|
12 |
Description: This is a Framework to support easily modifiable themes that are very extensible.
|
13 |
-
Version: 4.1.
|
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
|
2 |
/**
|
3 |
* @version $Id: gantry.php 61627 2016-01-06 19:34:25Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
10 |
Plugin Name: Gantry 4 Framework
|
11 |
Plugin URI: http://www.gantry.org/
|
12 |
Description: This is a Framework to support easily modifiable themes that are very extensible.
|
13 |
+
Version: 4.1.15
|
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/analytics.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: analytics.php 60809 2014-05-08 08:48:01Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: analytics.php 60809 2014-05-08 08:48:01Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/autoparagraphs.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: autoparagraphs.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: autoparagraphs.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/bbpress.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: bbpress.php 60800 2014-05-07 13:08:13Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: bbpress.php 60800 2014-05-07 13:08:13Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/belatedpng.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: belatedpng.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: belatedpng.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
gizmos/buddypress.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: buddypress.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: buddypress.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/childcss.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: childcss.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: childcss.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/commentreply.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: commentreply.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: commentreply.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
gizmos/compatibility.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: compatibility.php 60974 2014-06-18 12:01:07Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: compatibility.php 60974 2014-06-18 12:01:07Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/feedlinks.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: feedlinks.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
2 |
/**
|
3 |
* @version $Id: feedlinks.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined('GANTRY_VERSION') or die();
|
gizmos/font.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: webfonts.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: webfonts.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/fontawesomepaths.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: fontawesomepaths.php 60841 2014-05-12 20:13:48Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: fontawesomepaths.php 60841 2014-05-12 20:13:48Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
gizmos/ie6.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: ie6.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: ie6.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/ie6warn.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: ie6warn.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: ie6warn.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/iphonegradients.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: iphonegradients.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: iphonegradients.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/iphoneimages.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: iphoneimages.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: iphoneimages.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/jstools.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: jstools.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: jstools.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/loadposition.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: loadposition.php 61616 2015-12-09 11:31:33Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: loadposition.php 61616 2015-12-09 11:31:33Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/maintenancemode.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: maintenancemode.php 60717 2014-04-10 20:32:32Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: maintenancemode.php 60717 2014-04-10 20:32:32Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/mshelper.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: mshelper.php 60843 2014-05-12 20:17:06Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: mshelper.php 60843 2014-05-12 20:17:06Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
gizmos/pagesuffix.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: pagesuffix.php 60211 2013-11-14 00:02:42Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: pagesuffix.php 60211 2013-11-14 00:02:42Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/rokstyle.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: rokstyle.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: rokstyle.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/rtl.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: rtl.php 61394 2015-07-04 09:48:11Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: rtl.php 61394 2015-07-04 09:48:11Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/searchhighlight.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: search-highlight.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: search-highlight.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/smartload.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: smartload.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: smartload.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/styledeclaration.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: styledeclaration.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: styledeclaration.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/texturize.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: texturize.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: texturize.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/thumbnails.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: thumbnails.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: thumbnails.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/title.php
CHANGED
@@ -2,7 +2,7 @@
|
|
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 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
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 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/webfonts.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: webfonts.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: webfonts.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/widgetshortcodes.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: widgetshortcodes.php 60530 2014-02-10 12:59:26Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: widgetshortcodes.php 60530 2014-02-10 12:59:26Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/woocommerce.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: woocommerce.php 60800 2014-05-07 13:08:13Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
@@ -56,7 +56,7 @@ class GantryGizmoWooCommerce extends GantryGizmo {
|
|
56 |
$shop_items_count = get_option( 'posts_per_page', '10' );
|
57 |
}
|
58 |
|
59 |
-
add_filter( 'loop_shop_per_page',
|
60 |
add_action( 'wp_enqueue_scripts', array( &$this, 'wc_cart_variation_script' ) );
|
61 |
remove_filter( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
|
62 |
add_theme_support( 'woocommerce' );
|
2 |
/**
|
3 |
* @version $Id: woocommerce.php 60800 2014-05-07 13:08:13Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
56 |
$shop_items_count = get_option( 'posts_per_page', '10' );
|
57 |
}
|
58 |
|
59 |
+
add_filter( 'loop_shop_per_page', function($cols) { return $shop_items_count; });
|
60 |
add_action( 'wp_enqueue_scripts', array( &$this, 'wc_cart_variation_script' ) );
|
61 |
remove_filter( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );
|
62 |
add_theme_support( 'woocommerce' );
|
gizmos/wpmenucart.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: wpmenucart.php 60841 2014-05-12 20:13:48Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: wpmenucart.php 60841 2014-05-12 20:13:48Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
gizmos/wpml.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: wpml.php 60800 2014-05-07 13:08:13Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: wpml.php 60800 2014-05-07 13:08:13Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
gizmos/yoast.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: yoast.php 60800 2017-08-28 13:08:13Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: yoast.php 60800 2017-08-28 13:08:13Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
html/layouts/body_debugmainbody.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: body_debugmainbody.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: body_debugmainbody.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
html/layouts/body_iphonemainbody.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: body_iphonemainbody.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: body_iphonemainbody.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
html/layouts/body_mainbody.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: body_mainbody.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: body_mainbody.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
html/layouts/chrome_basic.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: chrome_basic.php 58629 2012-12-16 09:42:44Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: chrome_basic.php 58629 2012-12-16 09:42:44Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
html/layouts/chrome_standard.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: chrome_standard.php 58629 2012-12-16 09:42:44Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: chrome_standard.php 58629 2012-12-16 09:42:44Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
html/layouts/comment_basic.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: comment_basic.php 60343 2014-01-03 18:16:44Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: comment_basic.php 60343 2014-01-03 18:16:44Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
html/layouts/commentstempl_basic.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: commentstempl_basic.php 60343 2014-01-03 18:16:44Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: commentstempl_basic.php 60343 2014-01-03 18:16:44Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
html/layouts/doc_body.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: doc_body.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: doc_body.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
html/layouts/doc_tag.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: doc_tag.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: doc_tag.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
html/layouts/orderedbody_mainbody.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: orderedbody_mainbody.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: orderedbody_mainbody.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
html/layouts/widget_basic.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: widget_basic.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: widget_basic.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
html/layouts/widget_sidebar.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: widget_sidebar.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: widget_sidebar.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
html/layouts/widget_standard.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: widget_standard.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: widget_standard.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
js/fusion.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: fusion.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: fusion.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
js/gantry-ie6menu.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry-ie6menu.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantry-ie6menu.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
js/gantry-ie6warn.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry-ie6warn.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantry-ie6warn.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
js/gantry-inputs.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry-inputs.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantry-inputs.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
js/gantry-search-highlight.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry-inputs.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantry-inputs.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
js/gantry-smartload.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry-smartload.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantry-smartload.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
js/gantry-totop.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantry-totop.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantry-totop.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
js/gantrydivider.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: gantrydivider.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: gantrydivider.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
js/imenu.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: imenu.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: imenu.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
js/sfhover.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: sfhover.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/**
|
2 |
* @version $Id: sfhover.js 58623 2012-12-15 22:01:32Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
libs/phpQuery.php
CHANGED
@@ -1,9 +1,12 @@
|
|
1 |
<?php
|
2 |
/**
|
|
|
|
|
|
|
|
|
3 |
* phpQuery is a server-side, chainable, CSS3 selector driven
|
4 |
* Document Object Model (DOM) API based on jQuery JavaScript Library.
|
5 |
*
|
6 |
-
* @version 0.9.5
|
7 |
* @link http://code.google.com/p/phpquery/
|
8 |
* @link http://phpquery-library.blogspot.com/
|
9 |
* @link http://jquery.com/
|
@@ -18,4372 +21,12 @@ define('DOMDOCUMENT', 'DOMDocument');
|
|
18 |
define('DOMELEMENT', 'DOMElement');
|
19 |
define('DOMNODELIST', 'DOMNodeList');
|
20 |
define('DOMNODE', 'DOMNode');
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
28 |
-
* @package phpQuery
|
29 |
-
* @todo implement ArrayAccess ?
|
30 |
-
*/
|
31 |
-
class DOMEvent {
|
32 |
-
/**
|
33 |
-
* Returns a boolean indicating whether the event bubbles up through the DOM or not.
|
34 |
-
*
|
35 |
-
* @var unknown_type
|
36 |
-
*/
|
37 |
-
public $bubbles = true;
|
38 |
-
/**
|
39 |
-
* Returns a boolean indicating whether the event is cancelable.
|
40 |
-
*
|
41 |
-
* @var unknown_type
|
42 |
-
*/
|
43 |
-
public $cancelable = true;
|
44 |
-
/**
|
45 |
-
* Returns a reference to the currently registered target for the event.
|
46 |
-
*
|
47 |
-
* @var unknown_type
|
48 |
-
*/
|
49 |
-
public $currentTarget;
|
50 |
-
/**
|
51 |
-
* Returns detail about the event, depending on the type of event.
|
52 |
-
*
|
53 |
-
* @var unknown_type
|
54 |
-
* @link http://developer.mozilla.org/en/DOM/event.detail
|
55 |
-
*/
|
56 |
-
public $detail; // ???
|
57 |
-
/**
|
58 |
-
* Used to indicate which phase of the event flow is currently being evaluated.
|
59 |
-
*
|
60 |
-
* NOT IMPLEMENTED
|
61 |
-
*
|
62 |
-
* @var unknown_type
|
63 |
-
* @link http://developer.mozilla.org/en/DOM/event.eventPhase
|
64 |
-
*/
|
65 |
-
public $eventPhase; // ???
|
66 |
-
/**
|
67 |
-
* The explicit original target of the event (Mozilla-specific).
|
68 |
-
*
|
69 |
-
* NOT IMPLEMENTED
|
70 |
-
*
|
71 |
-
* @var unknown_type
|
72 |
-
*/
|
73 |
-
public $explicitOriginalTarget; // moz only
|
74 |
-
/**
|
75 |
-
* The original target of the event, before any retargetings (Mozilla-specific).
|
76 |
-
*
|
77 |
-
* NOT IMPLEMENTED
|
78 |
-
*
|
79 |
-
* @var unknown_type
|
80 |
-
*/
|
81 |
-
public $originalTarget; // moz only
|
82 |
-
/**
|
83 |
-
* Identifies a secondary target for the event.
|
84 |
-
*
|
85 |
-
* @var unknown_type
|
86 |
-
*/
|
87 |
-
public $relatedTarget;
|
88 |
-
/**
|
89 |
-
* Returns a reference to the target to which the event was originally dispatched.
|
90 |
-
*
|
91 |
-
* @var unknown_type
|
92 |
-
*/
|
93 |
-
public $target;
|
94 |
-
/**
|
95 |
-
* Returns the time that the event was created.
|
96 |
-
*
|
97 |
-
* @var unknown_type
|
98 |
-
*/
|
99 |
-
public $timeStamp;
|
100 |
-
/**
|
101 |
-
* Returns the name of the event (case-insensitive).
|
102 |
-
*/
|
103 |
-
public $type;
|
104 |
-
public $runDefault = true;
|
105 |
-
public $data = null;
|
106 |
-
public function __construct($data) {
|
107 |
-
foreach($data as $k => $v) {
|
108 |
-
$this->{$k} = $v;
|
109 |
-
}
|
110 |
-
if (! $this->timeStamp)
|
111 |
-
$this->timeStamp = time();
|
112 |
-
}
|
113 |
-
/**
|
114 |
-
* Cancels the event (if it is cancelable).
|
115 |
-
*
|
116 |
-
*/
|
117 |
-
public function preventDefault() {
|
118 |
-
$this->runDefault = false;
|
119 |
-
}
|
120 |
-
/**
|
121 |
-
* Stops the propagation of events further along in the DOM.
|
122 |
-
*
|
123 |
-
*/
|
124 |
-
public function stopPropagation() {
|
125 |
-
$this->bubbles = false;
|
126 |
-
}
|
127 |
-
}
|
128 |
-
|
129 |
-
|
130 |
-
/**
|
131 |
-
* DOMDocumentWrapper class simplifies work with DOMDocument.
|
132 |
-
*
|
133 |
-
* Know bug:
|
134 |
-
* - in XHTML fragments, <br /> changes to <br clear="none" />
|
135 |
-
*
|
136 |
-
* @todo check XML catalogs compatibility
|
137 |
-
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
138 |
-
* @package phpQuery
|
139 |
-
*/
|
140 |
-
class DOMDocumentWrapper {
|
141 |
-
/**
|
142 |
-
* @var DOMDocument
|
143 |
-
*/
|
144 |
-
public $document;
|
145 |
-
public $id;
|
146 |
-
/**
|
147 |
-
* @todo Rewrite as method and quess if null.
|
148 |
-
* @var unknown_type
|
149 |
-
*/
|
150 |
-
public $contentType = '';
|
151 |
-
public $xpath;
|
152 |
-
public $uuid = 0;
|
153 |
-
public $data = array();
|
154 |
-
public $dataNodes = array();
|
155 |
-
public $events = array();
|
156 |
-
public $eventsNodes = array();
|
157 |
-
public $eventsGlobal = array();
|
158 |
-
/**
|
159 |
-
* @TODO iframes support http://code.google.com/p/phpquery/issues/detail?id=28
|
160 |
-
* @var unknown_type
|
161 |
-
*/
|
162 |
-
public $frames = array();
|
163 |
-
/**
|
164 |
-
* Document root, by default equals to document itself.
|
165 |
-
* Used by documentFragments.
|
166 |
-
*
|
167 |
-
* @var DOMNode
|
168 |
-
*/
|
169 |
-
public $root;
|
170 |
-
public $isDocumentFragment;
|
171 |
-
public $isXML = false;
|
172 |
-
public $isXHTML = false;
|
173 |
-
public $isHTML = false;
|
174 |
-
public $charset;
|
175 |
-
public function __construct($markup = null, $contentType = null, $newDocumentID = null) {
|
176 |
-
if (isset($markup))
|
177 |
-
$this->load($markup, $contentType, $newDocumentID);
|
178 |
-
$this->id = $newDocumentID
|
179 |
-
? $newDocumentID
|
180 |
-
: md5(microtime());
|
181 |
-
}
|
182 |
-
public function load($markup, $contentType = null, $newDocumentID = null) {
|
183 |
-
// phpQuery::$documents[$id] = $this;
|
184 |
-
$this->contentType = strtolower($contentType);
|
185 |
-
if ($markup instanceof DOMDOCUMENT) {
|
186 |
-
$this->document = $markup;
|
187 |
-
$this->root = $this->document;
|
188 |
-
$this->charset = $this->document->encoding;
|
189 |
-
// TODO isDocumentFragment
|
190 |
-
} else {
|
191 |
-
$loaded = $this->loadMarkup($markup);
|
192 |
-
}
|
193 |
-
if ($loaded) {
|
194 |
-
// $this->document->formatOutput = true;
|
195 |
-
$this->document->preserveWhiteSpace = true;
|
196 |
-
$this->xpath = new DOMXPath($this->document);
|
197 |
-
$this->afterMarkupLoad();
|
198 |
-
return true;
|
199 |
-
// remember last loaded document
|
200 |
-
// return phpQuery::selectDocument($id);
|
201 |
-
}
|
202 |
-
return false;
|
203 |
-
}
|
204 |
-
protected function afterMarkupLoad() {
|
205 |
-
if ($this->isXHTML) {
|
206 |
-
$this->xpath->registerNamespace("html", "http://www.w3.org/1999/xhtml");
|
207 |
-
}
|
208 |
-
}
|
209 |
-
protected function loadMarkup($markup) {
|
210 |
-
$loaded = false;
|
211 |
-
if ($this->contentType) {
|
212 |
-
self::debug("Load markup for content type {$this->contentType}");
|
213 |
-
// content determined by contentType
|
214 |
-
list($contentType, $charset) = $this->contentTypeToArray($this->contentType);
|
215 |
-
switch($contentType) {
|
216 |
-
case 'text/html':
|
217 |
-
phpQuery::debug("Loading HTML, content type '{$this->contentType}'");
|
218 |
-
$loaded = $this->loadMarkupHTML($markup, $charset);
|
219 |
-
break;
|
220 |
-
case 'text/xml':
|
221 |
-
case 'application/xhtml+xml':
|
222 |
-
phpQuery::debug("Loading XML, content type '{$this->contentType}'");
|
223 |
-
$loaded = $this->loadMarkupXML($markup, $charset);
|
224 |
-
break;
|
225 |
-
default:
|
226 |
-
// for feeds or anything that sometimes doesn't use text/xml
|
227 |
-
if (strpos('xml', $this->contentType) !== false) {
|
228 |
-
phpQuery::debug("Loading XML, content type '{$this->contentType}'");
|
229 |
-
$loaded = $this->loadMarkupXML($markup, $charset);
|
230 |
-
} else
|
231 |
-
phpQuery::debug("Could not determine document type from content type '{$this->contentType}'");
|
232 |
-
}
|
233 |
-
} else {
|
234 |
-
// content type autodetection
|
235 |
-
if ($this->isXML($markup)) {
|
236 |
-
phpQuery::debug("Loading XML, isXML() == true");
|
237 |
-
$loaded = $this->loadMarkupXML($markup);
|
238 |
-
if (! $loaded && $this->isXHTML) {
|
239 |
-
phpQuery::debug('Loading as XML failed, trying to load as HTML, isXHTML == true');
|
240 |
-
$loaded = $this->loadMarkupHTML($markup);
|
241 |
-
}
|
242 |
-
} else {
|
243 |
-
phpQuery::debug("Loading HTML, isXML() == false");
|
244 |
-
$loaded = $this->loadMarkupHTML($markup);
|
245 |
-
}
|
246 |
-
}
|
247 |
-
return $loaded;
|
248 |
-
}
|
249 |
-
protected function loadMarkupReset() {
|
250 |
-
$this->isXML = $this->isXHTML = $this->isHTML = false;
|
251 |
-
}
|
252 |
-
protected function documentCreate($charset, $version = '1.0') {
|
253 |
-
if (! $version)
|
254 |
-
$version = '1.0';
|
255 |
-
$this->document = new DOMDocument($version, $charset);
|
256 |
-
$this->charset = $this->document->encoding;
|
257 |
-
// $this->document->encoding = $charset;
|
258 |
-
$this->document->formatOutput = true;
|
259 |
-
$this->document->preserveWhiteSpace = true;
|
260 |
-
}
|
261 |
-
protected function loadMarkupHTML($markup, $requestedCharset = null) {
|
262 |
-
if (phpQuery::$debug)
|
263 |
-
phpQuery::debug('Full markup load (HTML): '.substr($markup, 0, 250));
|
264 |
-
$this->loadMarkupReset();
|
265 |
-
$this->isHTML = true;
|
266 |
-
if (!isset($this->isDocumentFragment))
|
267 |
-
$this->isDocumentFragment = self::isDocumentFragmentHTML($markup);
|
268 |
-
$charset = null;
|
269 |
-
$documentCharset = $this->charsetFromHTML($markup);
|
270 |
-
$addDocumentCharset = false;
|
271 |
-
if ($documentCharset) {
|
272 |
-
$charset = $documentCharset;
|
273 |
-
$markup = $this->charsetFixHTML($markup);
|
274 |
-
} else if ($requestedCharset) {
|
275 |
-
$charset = $requestedCharset;
|
276 |
-
}
|
277 |
-
if (! $charset)
|
278 |
-
$charset = phpQuery::$defaultCharset;
|
279 |
-
// HTTP 1.1 says that the default charset is ISO-8859-1
|
280 |
-
// @see http://www.w3.org/International/O-HTTP-charset
|
281 |
-
if (! $documentCharset) {
|
282 |
-
$documentCharset = 'ISO-8859-1';
|
283 |
-
$addDocumentCharset = true;
|
284 |
-
}
|
285 |
-
// Should be careful here, still need 'magic encoding detection' since lots of pages have other 'default encoding'
|
286 |
-
// Worse, some pages can have mixed encodings... we'll try not to worry about that
|
287 |
-
$requestedCharset = strtoupper($requestedCharset);
|
288 |
-
$documentCharset = strtoupper($documentCharset);
|
289 |
-
phpQuery::debug("DOC: $documentCharset REQ: $requestedCharset");
|
290 |
-
if ($requestedCharset && $documentCharset && $requestedCharset !== $documentCharset) {
|
291 |
-
phpQuery::debug("CHARSET CONVERT");
|
292 |
-
// Document Encoding Conversion
|
293 |
-
// http://code.google.com/p/phpquery/issues/detail?id=86
|
294 |
-
if (function_exists('mb_detect_encoding')) {
|
295 |
-
$possibleCharsets = array($documentCharset, $requestedCharset, 'AUTO');
|
296 |
-
$docEncoding = mb_detect_encoding($markup, implode(', ', $possibleCharsets));
|
297 |
-
if (! $docEncoding)
|
298 |
-
$docEncoding = $documentCharset; // ok trust the document
|
299 |
-
phpQuery::debug("DETECTED '$docEncoding'");
|
300 |
-
// Detected does not match what document says...
|
301 |
-
if ($docEncoding !== $documentCharset) {
|
302 |
-
// Tricky..
|
303 |
-
}
|
304 |
-
if ($docEncoding !== $requestedCharset) {
|
305 |
-
phpQuery::debug("CONVERT $docEncoding => $requestedCharset");
|
306 |
-
$markup = mb_convert_encoding($markup, $requestedCharset, $docEncoding);
|
307 |
-
$markup = $this->charsetAppendToHTML($markup, $requestedCharset);
|
308 |
-
$charset = $requestedCharset;
|
309 |
-
}
|
310 |
-
} else {
|
311 |
-
phpQuery::debug("TODO: charset conversion without mbstring...");
|
312 |
-
}
|
313 |
-
}
|
314 |
-
$return = false;
|
315 |
-
if ($this->isDocumentFragment) {
|
316 |
-
phpQuery::debug("Full markup load (HTML), DocumentFragment detected, using charset '$charset'");
|
317 |
-
$return = $this->documentFragmentLoadMarkup($this, $charset, $markup);
|
318 |
-
} else {
|
319 |
-
if ($addDocumentCharset) {
|
320 |
-
phpQuery::debug("Full markup load (HTML), appending charset: '$charset'");
|
321 |
-
$markup = $this->charsetAppendToHTML($markup, $charset);
|
322 |
-
}
|
323 |
-
phpQuery::debug("Full markup load (HTML), documentCreate('$charset')");
|
324 |
-
$this->documentCreate($charset);
|
325 |
-
$return = phpQuery::$debug === 2
|
326 |
-
? $this->document->loadHTML($markup)
|
327 |
-
: @$this->document->loadHTML($markup);
|
328 |
-
if ($return)
|
329 |
-
$this->root = $this->document;
|
330 |
-
}
|
331 |
-
if ($return && ! $this->contentType)
|
332 |
-
$this->contentType = 'text/html';
|
333 |
-
return $return;
|
334 |
-
}
|
335 |
-
protected function loadMarkupXML($markup, $requestedCharset = null) {
|
336 |
-
if (phpQuery::$debug)
|
337 |
-
phpQuery::debug('Full markup load (XML): '.substr($markup, 0, 250));
|
338 |
-
$this->loadMarkupReset();
|
339 |
-
$this->isXML = true;
|
340 |
-
// check agains XHTML in contentType or markup
|
341 |
-
$isContentTypeXHTML = $this->isXHTML();
|
342 |
-
$isMarkupXHTML = $this->isXHTML($markup);
|
343 |
-
if ($isContentTypeXHTML || $isMarkupXHTML) {
|
344 |
-
self::debug('Full markup load (XML), XHTML detected');
|
345 |
-
$this->isXHTML = true;
|
346 |
-
}
|
347 |
-
// determine document fragment
|
348 |
-
if (! isset($this->isDocumentFragment))
|
349 |
-
$this->isDocumentFragment = $this->isXHTML
|
350 |
-
? self::isDocumentFragmentXHTML($markup)
|
351 |
-
: self::isDocumentFragmentXML($markup);
|
352 |
-
// this charset will be used
|
353 |
-
$charset = null;
|
354 |
-
// charset from XML declaration @var string
|
355 |
-
$documentCharset = $this->charsetFromXML($markup);
|
356 |
-
if (! $documentCharset) {
|
357 |
-
if ($this->isXHTML) {
|
358 |
-
// this is XHTML, try to get charset from content-type meta header
|
359 |
-
$documentCharset = $this->charsetFromHTML($markup);
|
360 |
-
if ($documentCharset) {
|
361 |
-
phpQuery::debug("Full markup load (XML), appending XHTML charset '$documentCharset'");
|
362 |
-
$this->charsetAppendToXML($markup, $documentCharset);
|
363 |
-
$charset = $documentCharset;
|
364 |
-
}
|
365 |
-
}
|
366 |
-
if (! $documentCharset) {
|
367 |
-
// if still no document charset...
|
368 |
-
$charset = $requestedCharset;
|
369 |
-
}
|
370 |
-
} else if ($requestedCharset) {
|
371 |
-
$charset = $requestedCharset;
|
372 |
-
}
|
373 |
-
if (! $charset) {
|
374 |
-
$charset = phpQuery::$defaultCharset;
|
375 |
-
}
|
376 |
-
if ($requestedCharset && $documentCharset && $requestedCharset != $documentCharset) {
|
377 |
-
// TODO place for charset conversion
|
378 |
-
// $charset = $requestedCharset;
|
379 |
-
}
|
380 |
-
$return = false;
|
381 |
-
if ($this->isDocumentFragment) {
|
382 |
-
phpQuery::debug("Full markup load (XML), DocumentFragment detected, using charset '$charset'");
|
383 |
-
$return = $this->documentFragmentLoadMarkup($this, $charset, $markup);
|
384 |
-
} else {
|
385 |
-
// FIXME ???
|
386 |
-
if ($isContentTypeXHTML && ! $isMarkupXHTML)
|
387 |
-
if (! $documentCharset) {
|
388 |
-
phpQuery::debug("Full markup load (XML), appending charset '$charset'");
|
389 |
-
$markup = $this->charsetAppendToXML($markup, $charset);
|
390 |
-
}
|
391 |
-
// see http://pl2.php.net/manual/en/book.dom.php#78929
|
392 |
-
// LIBXML_DTDLOAD (>= PHP 5.1)
|
393 |
-
// does XML ctalogues works with LIBXML_NONET
|
394 |
-
// $this->document->resolveExternals = true;
|
395 |
-
// TODO test LIBXML_COMPACT for performance improvement
|
396 |
-
// create document
|
397 |
-
$this->documentCreate($charset);
|
398 |
-
if (phpversion() < 5.1) {
|
399 |
-
$this->document->resolveExternals = true;
|
400 |
-
$return = phpQuery::$debug === 2
|
401 |
-
? $this->document->loadXML($markup)
|
402 |
-
: @$this->document->loadXML($markup);
|
403 |
-
} else {
|
404 |
-
/** @link http://pl2.php.net/manual/en/libxml.constants.php */
|
405 |
-
$libxmlStatic = phpQuery::$debug === 2
|
406 |
-
? LIBXML_DTDLOAD|LIBXML_DTDATTR|LIBXML_NONET
|
407 |
-
: LIBXML_DTDLOAD|LIBXML_DTDATTR|LIBXML_NONET|LIBXML_NOWARNING|LIBXML_NOERROR;
|
408 |
-
$return = $this->document->loadXML($markup, $libxmlStatic);
|
409 |
-
// if (! $return)
|
410 |
-
// $return = $this->document->loadHTML($markup);
|
411 |
-
}
|
412 |
-
if ($return)
|
413 |
-
$this->root = $this->document;
|
414 |
-
}
|
415 |
-
if ($return) {
|
416 |
-
if (! $this->contentType) {
|
417 |
-
if ($this->isXHTML)
|
418 |
-
$this->contentType = 'application/xhtml+xml';
|
419 |
-
else
|
420 |
-
$this->contentType = 'text/xml';
|
421 |
-
}
|
422 |
-
return $return;
|
423 |
-
} else {
|
424 |
-
throw new Exception("Error loading XML markup");
|
425 |
-
}
|
426 |
-
}
|
427 |
-
protected function isXHTML($markup = null) {
|
428 |
-
if (! isset($markup)) {
|
429 |
-
return strpos($this->contentType, 'xhtml') !== false;
|
430 |
-
}
|
431 |
-
// XXX ok ?
|
432 |
-
return strpos($markup, "<!DOCTYPE html") !== false;
|
433 |
-
// return stripos($doctype, 'xhtml') !== false;
|
434 |
-
// $doctype = isset($dom->doctype) && is_object($dom->doctype)
|
435 |
-
// ? $dom->doctype->publicId
|
436 |
-
// : self::$defaultDoctype;
|
437 |
-
}
|
438 |
-
protected function isXML($markup) {
|
439 |
-
// return strpos($markup, '<?xml') !== false && stripos($markup, 'xhtml') === false;
|
440 |
-
return strpos(substr($markup, 0, 100), '<'.'?xml') !== false;
|
441 |
-
}
|
442 |
-
protected function contentTypeToArray($contentType) {
|
443 |
-
$matches = explode(';', trim(strtolower($contentType)));
|
444 |
-
if (isset($matches[1])) {
|
445 |
-
$matches[1] = explode('=', $matches[1]);
|
446 |
-
// strip 'charset='
|
447 |
-
$matches[1] = isset($matches[1][1]) && trim($matches[1][1])
|
448 |
-
? $matches[1][1]
|
449 |
-
: $matches[1][0];
|
450 |
-
} else
|
451 |
-
$matches[1] = null;
|
452 |
-
return $matches;
|
453 |
-
}
|
454 |
-
/**
|
455 |
-
*
|
456 |
-
* @param $markup
|
457 |
-
* @return array contentType, charset
|
458 |
-
*/
|
459 |
-
protected function contentTypeFromHTML($markup) {
|
460 |
-
$matches = array();
|
461 |
-
// find meta tag
|
462 |
-
preg_match('@<meta[^>]+http-equiv\\s*=\\s*(["|\'])Content-Type\\1([^>]+?)>@i',
|
463 |
-
$markup, $matches
|
464 |
-
);
|
465 |
-
if (! isset($matches[0]))
|
466 |
-
return array(null, null);
|
467 |
-
// get attr 'content'
|
468 |
-
preg_match('@content\\s*=\\s*(["|\'])(.+?)\\1@', $matches[0], $matches);
|
469 |
-
if (! isset($matches[0]))
|
470 |
-
return array(null, null);
|
471 |
-
return $this->contentTypeToArray($matches[2]);
|
472 |
-
}
|
473 |
-
protected function charsetFromHTML($markup) {
|
474 |
-
$contentType = $this->contentTypeFromHTML($markup);
|
475 |
-
return $contentType[1];
|
476 |
-
}
|
477 |
-
protected function charsetFromXML($markup) {
|
478 |
-
$matches;
|
479 |
-
// find declaration
|
480 |
-
preg_match('@<'.'?xml[^>]+encoding\\s*=\\s*(["|\'])(.*?)\\1@i',
|
481 |
-
$markup, $matches
|
482 |
-
);
|
483 |
-
return isset($matches[2])
|
484 |
-
? strtolower($matches[2])
|
485 |
-
: null;
|
486 |
-
}
|
487 |
-
/**
|
488 |
-
* Repositions meta[type=charset] at the start of head. Bypasses DOMDocument bug.
|
489 |
-
*
|
490 |
-
* @link http://code.google.com/p/phpquery/issues/detail?id=80
|
491 |
-
* @param $html
|
492 |
-
*/
|
493 |
-
protected function charsetFixHTML($markup) {
|
494 |
-
$matches = array();
|
495 |
-
// find meta tag
|
496 |
-
preg_match('@\s*<meta[^>]+http-equiv\\s*=\\s*(["|\'])Content-Type\\1([^>]+?)>@i',
|
497 |
-
$markup, $matches, PREG_OFFSET_CAPTURE
|
498 |
-
);
|
499 |
-
if (! isset($matches[0]))
|
500 |
-
return;
|
501 |
-
$metaContentType = $matches[0][0];
|
502 |
-
$markup = substr($markup, 0, $matches[0][1])
|
503 |
-
.substr($markup, $matches[0][1]+strlen($metaContentType));
|
504 |
-
$headStart = stripos($markup, '<head>');
|
505 |
-
$markup = substr($markup, 0, $headStart+6).$metaContentType
|
506 |
-
.substr($markup, $headStart+6);
|
507 |
-
return $markup;
|
508 |
-
}
|
509 |
-
protected function charsetAppendToHTML($html, $charset, $xhtml = false) {
|
510 |
-
// remove existing meta[type=content-type]
|
511 |
-
$html = preg_replace('@\s*<meta[^>]+http-equiv\\s*=\\s*(["|\'])Content-Type\\1([^>]+?)>@i', '', $html);
|
512 |
-
$meta = '<meta http-equiv="Content-Type" content="text/html;charset='
|
513 |
-
.$charset.'" '
|
514 |
-
.($xhtml ? '/' : '')
|
515 |
-
.'>';
|
516 |
-
if (strpos($html, '<head') === false) {
|
517 |
-
if (strpos($hltml, '<html') === false) {
|
518 |
-
return $meta.$html;
|
519 |
-
} else {
|
520 |
-
return preg_replace(
|
521 |
-
'@<html(.*?)(?(?<!\?)>)@s',
|
522 |
-
"<html\\1><head>{$meta}</head>",
|
523 |
-
$html
|
524 |
-
);
|
525 |
-
}
|
526 |
-
} else {
|
527 |
-
return preg_replace(
|
528 |
-
'@<head(.*?)(?(?<!\?)>)@s',
|
529 |
-
'<head\\1>'.$meta,
|
530 |
-
$html
|
531 |
-
);
|
532 |
-
}
|
533 |
-
}
|
534 |
-
protected function charsetAppendToXML($markup, $charset) {
|
535 |
-
$declaration = '<'.'?xml version="1.0" encoding="'.$charset.'"?'.'>';
|
536 |
-
return $declaration.$markup;
|
537 |
-
}
|
538 |
-
public static function isDocumentFragmentHTML($markup) {
|
539 |
-
return stripos($markup, '<html') === false && stripos($markup, '<!doctype') === false;
|
540 |
-
}
|
541 |
-
public static function isDocumentFragmentXML($markup) {
|
542 |
-
return stripos($markup, '<'.'?xml') === false;
|
543 |
-
}
|
544 |
-
public static function isDocumentFragmentXHTML($markup) {
|
545 |
-
return self::isDocumentFragmentHTML($markup);
|
546 |
-
}
|
547 |
-
public function importAttr($value) {
|
548 |
-
// TODO
|
549 |
-
}
|
550 |
-
/**
|
551 |
-
*
|
552 |
-
* @param $source
|
553 |
-
* @param $target
|
554 |
-
* @param $sourceCharset
|
555 |
-
* @return array Array of imported nodes.
|
556 |
-
*/
|
557 |
-
public function import($source, $sourceCharset = null) {
|
558 |
-
// TODO charset conversions
|
559 |
-
$return = array();
|
560 |
-
if ($source instanceof DOMNODE && !($source instanceof DOMNODELIST))
|
561 |
-
$source = array($source);
|
562 |
-
// if (is_array($source)) {
|
563 |
-
// foreach($source as $node) {
|
564 |
-
// if (is_string($node)) {
|
565 |
-
// // string markup
|
566 |
-
// $fake = $this->documentFragmentCreate($node, $sourceCharset);
|
567 |
-
// if ($fake === false)
|
568 |
-
// throw new Exception("Error loading documentFragment markup");
|
569 |
-
// else
|
570 |
-
// $return = array_merge($return,
|
571 |
-
// $this->import($fake->root->childNodes)
|
572 |
-
// );
|
573 |
-
// } else {
|
574 |
-
// $return[] = $this->document->importNode($node, true);
|
575 |
-
// }
|
576 |
-
// }
|
577 |
-
// return $return;
|
578 |
-
// } else {
|
579 |
-
// // string markup
|
580 |
-
// $fake = $this->documentFragmentCreate($source, $sourceCharset);
|
581 |
-
// if ($fake === false)
|
582 |
-
// throw new Exception("Error loading documentFragment markup");
|
583 |
-
// else
|
584 |
-
// return $this->import($fake->root->childNodes);
|
585 |
-
// }
|
586 |
-
if (is_array($source) || $source instanceof DOMNODELIST) {
|
587 |
-
// dom nodes
|
588 |
-
self::debug('Importing nodes to document');
|
589 |
-
foreach($source as $node)
|
590 |
-
$return[] = @$this->document->importNode($node, true);
|
591 |
-
} else {
|
592 |
-
// string markup
|
593 |
-
$fake = $this->documentFragmentCreate($source, $sourceCharset);
|
594 |
-
if ($fake === false)
|
595 |
-
throw new Exception("Error loading documentFragment markup");
|
596 |
-
else
|
597 |
-
return $this->import($fake->root->childNodes);
|
598 |
-
}
|
599 |
-
return $return;
|
600 |
-
}
|
601 |
-
/**
|
602 |
-
* Creates new document fragment.
|
603 |
-
*
|
604 |
-
* @param $source
|
605 |
-
* @return DOMDocumentWrapper
|
606 |
-
*/
|
607 |
-
protected function documentFragmentCreate($source, $charset = null) {
|
608 |
-
$fake = new DOMDocumentWrapper();
|
609 |
-
$fake->contentType = $this->contentType;
|
610 |
-
$fake->isXML = $this->isXML;
|
611 |
-
$fake->isHTML = $this->isHTML;
|
612 |
-
$fake->isXHTML = $this->isXHTML;
|
613 |
-
$fake->root = $fake->document;
|
614 |
-
if (! $charset)
|
615 |
-
$charset = $this->charset;
|
616 |
-
// $fake->documentCreate($this->charset);
|
617 |
-
if ($source instanceof DOMNODE && !($source instanceof DOMNODELIST))
|
618 |
-
$source = array($source);
|
619 |
-
if (is_array($source) || $source instanceof DOMNODELIST) {
|
620 |
-
// dom nodes
|
621 |
-
// load fake document
|
622 |
-
if (! $this->documentFragmentLoadMarkup($fake, $charset))
|
623 |
-
return false;
|
624 |
-
$nodes = $fake->import($source);
|
625 |
-
foreach($nodes as $node)
|
626 |
-
$fake->root->appendChild($node);
|
627 |
-
} else {
|
628 |
-
// string markup
|
629 |
-
$this->documentFragmentLoadMarkup($fake, $charset, $source);
|
630 |
-
}
|
631 |
-
return $fake;
|
632 |
-
}
|
633 |
-
/**
|
634 |
-
*
|
635 |
-
* @param $document DOMDocumentWrapper
|
636 |
-
* @param $markup
|
637 |
-
* @return $document
|
638 |
-
*/
|
639 |
-
private function documentFragmentLoadMarkup($fragment, $charset, $markup = null) {
|
640 |
-
// TODO error handling
|
641 |
-
// TODO copy doctype
|
642 |
-
// tempolary turn off
|
643 |
-
$fragment->isDocumentFragment = false;
|
644 |
-
if ($fragment->isXML) {
|
645 |
-
if ($fragment->isXHTML) {
|
646 |
-
// add FAKE element to set default namespace
|
647 |
-
$fragment->loadMarkupXML('<?xml version="1.0" encoding="'.$charset.'"?>'
|
648 |
-
.'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" '
|
649 |
-
.'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
|
650 |
-
.'<fake xmlns="http://www.w3.org/1999/xhtml">'.$markup.'</fake>');
|
651 |
-
$fragment->root = $fragment->document->firstChild->nextSibling;
|
652 |
-
} else {
|
653 |
-
$fragment->loadMarkupXML('<?xml version="1.0" encoding="'.$charset.'"?><fake>'.$markup.'</fake>');
|
654 |
-
$fragment->root = $fragment->document->firstChild;
|
655 |
-
}
|
656 |
-
} else {
|
657 |
-
$markup2 = phpQuery::$defaultDoctype.'<html><head><meta http-equiv="Content-Type" content="text/html;charset='
|
658 |
-
.$charset.'"></head>';
|
659 |
-
$noBody = strpos($markup, '<body') === false;
|
660 |
-
if ($noBody)
|
661 |
-
$markup2 .= '<body>';
|
662 |
-
$markup2 .= $markup;
|
663 |
-
if ($noBody)
|
664 |
-
$markup2 .= '</body>';
|
665 |
-
$markup2 .= '</html>';
|
666 |
-
$fragment->loadMarkupHTML($markup2);
|
667 |
-
// TODO resolv body tag merging issue
|
668 |
-
$fragment->root = $noBody
|
669 |
-
? $fragment->document->firstChild->nextSibling->firstChild->nextSibling
|
670 |
-
: $fragment->document->firstChild->nextSibling->firstChild->nextSibling;
|
671 |
-
}
|
672 |
-
if (! $fragment->root)
|
673 |
-
return false;
|
674 |
-
$fragment->isDocumentFragment = true;
|
675 |
-
return true;
|
676 |
-
}
|
677 |
-
protected function documentFragmentToMarkup($fragment) {
|
678 |
-
phpQuery::debug('documentFragmentToMarkup');
|
679 |
-
$tmp = $fragment->isDocumentFragment;
|
680 |
-
$fragment->isDocumentFragment = false;
|
681 |
-
$markup = $fragment->markup();
|
682 |
-
if ($fragment->isXML) {
|
683 |
-
$markup = substr($markup, 0, strrpos($markup, '</fake>'));
|
684 |
-
if ($fragment->isXHTML) {
|
685 |
-
$markup = substr($markup, strpos($markup, '<fake')+43);
|
686 |
-
} else {
|
687 |
-
$markup = substr($markup, strpos($markup, '<fake>')+6);
|
688 |
-
}
|
689 |
-
} else {
|
690 |
-
$markup = substr($markup, strpos($markup, '<body>')+6);
|
691 |
-
$markup = substr($markup, 0, strrpos($markup, '</body>'));
|
692 |
-
}
|
693 |
-
$fragment->isDocumentFragment = $tmp;
|
694 |
-
if (phpQuery::$debug)
|
695 |
-
phpQuery::debug('documentFragmentToMarkup: '.substr($markup, 0, 150));
|
696 |
-
return $markup;
|
697 |
-
}
|
698 |
-
/**
|
699 |
-
* Return document markup, starting with optional $nodes as root.
|
700 |
-
*
|
701 |
-
* @param $nodes DOMNode|DOMNodeList
|
702 |
-
* @return string
|
703 |
-
*/
|
704 |
-
public function markup($nodes = null, $innerMarkup = false) {
|
705 |
-
if (isset($nodes) && count($nodes) == 1 && $nodes[0] instanceof DOMDOCUMENT)
|
706 |
-
$nodes = null;
|
707 |
-
if (isset($nodes)) {
|
708 |
-
$markup = '';
|
709 |
-
if (!is_array($nodes) && !($nodes instanceof DOMNODELIST) )
|
710 |
-
$nodes = array($nodes);
|
711 |
-
if ($this->isDocumentFragment && ! $innerMarkup)
|
712 |
-
foreach($nodes as $i => $node)
|
713 |
-
if ($node->isSameNode($this->root)) {
|
714 |
-
// var_dump($node);
|
715 |
-
$nodes = array_slice($nodes, 0, $i)
|
716 |
-
+ phpQuery::DOMNodeListToArray($node->childNodes)
|
717 |
-
+ array_slice($nodes, $i+1);
|
718 |
-
}
|
719 |
-
if ($this->isXML && ! $innerMarkup) {
|
720 |
-
self::debug("Getting outerXML with charset '{$this->charset}'");
|
721 |
-
// we need outerXML, so we can benefit from
|
722 |
-
// $node param support in saveXML()
|
723 |
-
foreach($nodes as $node)
|
724 |
-
$markup .= $this->document->saveXML($node);
|
725 |
-
} else {
|
726 |
-
$loop = array();
|
727 |
-
if ($innerMarkup)
|
728 |
-
foreach($nodes as $node) {
|
729 |
-
if ($node->childNodes)
|
730 |
-
foreach($node->childNodes as $child)
|
731 |
-
$loop[] = $child;
|
732 |
-
else
|
733 |
-
$loop[] = $node;
|
734 |
-
}
|
735 |
-
else
|
736 |
-
$loop = $nodes;
|
737 |
-
self::debug("Getting markup, moving selected nodes (".count($loop).") to new DocumentFragment");
|
738 |
-
$fake = $this->documentFragmentCreate($loop);
|
739 |
-
$markup = $this->documentFragmentToMarkup($fake);
|
740 |
-
}
|
741 |
-
if ($this->isXHTML) {
|
742 |
-
self::debug("Fixing XHTML");
|
743 |
-
$markup = self::markupFixXHTML($markup);
|
744 |
-
}
|
745 |
-
self::debug("Markup: ".substr($markup, 0, 250));
|
746 |
-
return $markup;
|
747 |
-
} else {
|
748 |
-
if ($this->isDocumentFragment) {
|
749 |
-
// documentFragment, html only...
|
750 |
-
self::debug("Getting markup, DocumentFragment detected");
|
751 |
-
// return $this->markup(
|
752 |
-
//// $this->document->getElementsByTagName('body')->item(0)
|
753 |
-
// $this->document->root, true
|
754 |
-
// );
|
755 |
-
$markup = $this->documentFragmentToMarkup($this);
|
756 |
-
// no need for markupFixXHTML, as it's done thought markup($nodes) method
|
757 |
-
return $markup;
|
758 |
-
} else {
|
759 |
-
self::debug("Getting markup (".($this->isXML?'XML':'HTML')."), final with charset '{$this->charset}'");
|
760 |
-
$markup = $this->isXML
|
761 |
-
? $this->document->saveXML()
|
762 |
-
: $this->document->saveHTML();
|
763 |
-
if ($this->isXHTML) {
|
764 |
-
self::debug("Fixing XHTML");
|
765 |
-
$markup = self::markupFixXHTML($markup);
|
766 |
-
}
|
767 |
-
self::debug("Markup: ".substr($markup, 0, 250));
|
768 |
-
return $markup;
|
769 |
-
}
|
770 |
-
}
|
771 |
-
}
|
772 |
-
protected static function markupFixXHTML($markup) {
|
773 |
-
$markup = self::expandEmptyTag('script', $markup);
|
774 |
-
$markup = self::expandEmptyTag('select', $markup);
|
775 |
-
$markup = self::expandEmptyTag('textarea', $markup);
|
776 |
-
return $markup;
|
777 |
-
}
|
778 |
-
public static function debug($text) {
|
779 |
-
phpQuery::debug($text);
|
780 |
-
}
|
781 |
-
/**
|
782 |
-
* expandEmptyTag
|
783 |
-
*
|
784 |
-
* @param $tag
|
785 |
-
* @param $xml
|
786 |
-
* @return unknown_type
|
787 |
-
* @author mjaque at ilkebenson dot com
|
788 |
-
* @link http://php.net/manual/en/domdocument.savehtml.php#81256
|
789 |
-
*/
|
790 |
-
public static function expandEmptyTag($tag, $xml){
|
791 |
-
$indice = 0;
|
792 |
-
while ($indice< strlen($xml)){
|
793 |
-
$pos = strpos($xml, "<$tag ", $indice);
|
794 |
-
if ($pos){
|
795 |
-
$posCierre = strpos($xml, ">", $pos);
|
796 |
-
if ($xml[$posCierre-1] == "/"){
|
797 |
-
$xml = substr_replace($xml, "></$tag>", $posCierre-1, 2);
|
798 |
-
}
|
799 |
-
$indice = $posCierre;
|
800 |
-
}
|
801 |
-
else break;
|
802 |
-
}
|
803 |
-
return $xml;
|
804 |
-
}
|
805 |
-
}
|
806 |
-
|
807 |
-
/**
|
808 |
-
* Event handling class.
|
809 |
-
*
|
810 |
-
* @author Tobiasz Cudnik
|
811 |
-
* @package phpQuery
|
812 |
-
* @static
|
813 |
-
*/
|
814 |
-
abstract class phpQueryEvents {
|
815 |
-
/**
|
816 |
-
* Trigger a type of event on every matched element.
|
817 |
-
*
|
818 |
-
* @param DOMNode|phpQueryObject|string $document
|
819 |
-
* @param unknown_type $type
|
820 |
-
* @param unknown_type $data
|
821 |
-
*
|
822 |
-
* @TODO exclusive events (with !)
|
823 |
-
* @TODO global events (test)
|
824 |
-
* @TODO support more than event in $type (space-separated)
|
825 |
-
*/
|
826 |
-
public static function trigger($document, $type, $data = array(), $node = null) {
|
827 |
-
// trigger: function(type, data, elem, donative, extra) {
|
828 |
-
$documentID = phpQuery::getDocumentID($document);
|
829 |
-
$namespace = null;
|
830 |
-
if (strpos($type, '.') !== false)
|
831 |
-
list($name, $namespace) = explode('.', $type);
|
832 |
-
else
|
833 |
-
$name = $type;
|
834 |
-
if (! $node) {
|
835 |
-
if (self::issetGlobal($documentID, $type)) {
|
836 |
-
$pq = phpQuery::getDocument($documentID);
|
837 |
-
// TODO check add($pq->document)
|
838 |
-
$pq->find('*')->add($pq->document)
|
839 |
-
->trigger($type, $data);
|
840 |
-
}
|
841 |
-
} else {
|
842 |
-
if (isset($data[0]) && $data[0] instanceof DOMEvent) {
|
843 |
-
$event = $data[0];
|
844 |
-
$event->relatedTarget = $event->target;
|
845 |
-
$event->target = $node;
|
846 |
-
$data = array_slice($data, 1);
|
847 |
-
} else {
|
848 |
-
$event = new DOMEvent(array(
|
849 |
-
'type' => $type,
|
850 |
-
'target' => $node,
|
851 |
-
'timeStamp' => time(),
|
852 |
-
));
|
853 |
-
}
|
854 |
-
$i = 0;
|
855 |
-
while($node) {
|
856 |
-
// TODO whois
|
857 |
-
phpQuery::debug("Triggering ".($i?"bubbled ":'')."event '{$type}' on "
|
858 |
-
."node \n");//.phpQueryObject::whois($node)."\n");
|
859 |
-
$event->currentTarget = $node;
|
860 |
-
$eventNode = self::getNode($documentID, $node);
|
861 |
-
if (isset($eventNode->eventHandlers)) {
|
862 |
-
foreach($eventNode->eventHandlers as $eventType => $handlers) {
|
863 |
-
$eventNamespace = null;
|
864 |
-
if (strpos($type, '.') !== false)
|
865 |
-
list($eventName, $eventNamespace) = explode('.', $eventType);
|
866 |
-
else
|
867 |
-
$eventName = $eventType;
|
868 |
-
if ($name != $eventName)
|
869 |
-
continue;
|
870 |
-
if ($namespace && $eventNamespace && $namespace != $eventNamespace)
|
871 |
-
continue;
|
872 |
-
foreach($handlers as $handler) {
|
873 |
-
phpQuery::debug("Calling event handler\n");
|
874 |
-
$event->data = $handler['data']
|
875 |
-
? $handler['data']
|
876 |
-
: null;
|
877 |
-
$params = array_merge(array($event), $data);
|
878 |
-
$return = phpQuery::callbackRun($handler['callback'], $params);
|
879 |
-
if ($return === false) {
|
880 |
-
$event->bubbles = false;
|
881 |
-
}
|
882 |
-
}
|
883 |
-
}
|
884 |
-
}
|
885 |
-
// to bubble or not to bubble...
|
886 |
-
if (! $event->bubbles)
|
887 |
-
break;
|
888 |
-
$node = $node->parentNode;
|
889 |
-
$i++;
|
890 |
-
}
|
891 |
-
}
|
892 |
-
}
|
893 |
-
/**
|
894 |
-
* Binds a handler to one or more events (like click) for each matched element.
|
895 |
-
* Can also bind custom events.
|
896 |
-
*
|
897 |
-
* @param DOMNode|phpQueryObject|string $document
|
898 |
-
* @param unknown_type $type
|
899 |
-
* @param unknown_type $data Optional
|
900 |
-
* @param unknown_type $callback
|
901 |
-
*
|
902 |
-
* @TODO support '!' (exclusive) events
|
903 |
-
* @TODO support more than event in $type (space-separated)
|
904 |
-
* @TODO support binding to global events
|
905 |
-
*/
|
906 |
-
public static function add($document, $node, $type, $data, $callback = null) {
|
907 |
-
phpQuery::debug("Binding '$type' event");
|
908 |
-
$documentID = phpQuery::getDocumentID($document);
|
909 |
-
// if (is_null($callback) && is_callable($data)) {
|
910 |
-
// $callback = $data;
|
911 |
-
// $data = null;
|
912 |
-
// }
|
913 |
-
$eventNode = self::getNode($documentID, $node);
|
914 |
-
if (! $eventNode)
|
915 |
-
$eventNode = self::setNode($documentID, $node);
|
916 |
-
if (!isset($eventNode->eventHandlers[$type]))
|
917 |
-
$eventNode->eventHandlers[$type] = array();
|
918 |
-
$eventNode->eventHandlers[$type][] = array(
|
919 |
-
'callback' => $callback,
|
920 |
-
'data' => $data,
|
921 |
-
);
|
922 |
-
}
|
923 |
-
/**
|
924 |
-
* Enter description here...
|
925 |
-
*
|
926 |
-
* @param DOMNode|phpQueryObject|string $document
|
927 |
-
* @param unknown_type $type
|
928 |
-
* @param unknown_type $callback
|
929 |
-
*
|
930 |
-
* @TODO namespace events
|
931 |
-
* @TODO support more than event in $type (space-separated)
|
932 |
-
*/
|
933 |
-
public static function remove($document, $node, $type = null, $callback = null) {
|
934 |
-
$documentID = phpQuery::getDocumentID($document);
|
935 |
-
$eventNode = self::getNode($documentID, $node);
|
936 |
-
if (is_object($eventNode) && isset($eventNode->eventHandlers[$type])) {
|
937 |
-
if ($callback) {
|
938 |
-
foreach($eventNode->eventHandlers[$type] as $k => $handler)
|
939 |
-
if ($handler['callback'] == $callback)
|
940 |
-
unset($eventNode->eventHandlers[$type][$k]);
|
941 |
-
} else {
|
942 |
-
unset($eventNode->eventHandlers[$type]);
|
943 |
-
}
|
944 |
-
}
|
945 |
-
}
|
946 |
-
protected static function getNode($documentID, $node) {
|
947 |
-
foreach(phpQuery::$documents[$documentID]->eventsNodes as $eventNode) {
|
948 |
-
if ($node->isSameNode($eventNode))
|
949 |
-
return $eventNode;
|
950 |
-
}
|
951 |
-
}
|
952 |
-
protected static function setNode($documentID, $node) {
|
953 |
-
phpQuery::$documents[$documentID]->eventsNodes[] = $node;
|
954 |
-
return phpQuery::$documents[$documentID]->eventsNodes[
|
955 |
-
count(phpQuery::$documents[$documentID]->eventsNodes)-1
|
956 |
-
];
|
957 |
-
}
|
958 |
-
protected static function issetGlobal($documentID, $type) {
|
959 |
-
return isset(phpQuery::$documents[$documentID])
|
960 |
-
? in_array($type, phpQuery::$documents[$documentID]->eventsGlobal)
|
961 |
-
: false;
|
962 |
-
}
|
963 |
-
}
|
964 |
-
|
965 |
-
|
966 |
-
interface ICallbackNamed {
|
967 |
-
function hasName();
|
968 |
-
function getName();
|
969 |
-
}
|
970 |
-
/**
|
971 |
-
* Callback class introduces currying-like pattern.
|
972 |
-
*
|
973 |
-
* Example:
|
974 |
-
* function foo($param1, $param2, $param3) {
|
975 |
-
* var_dump($param1, $param2, $param3);
|
976 |
-
* }
|
977 |
-
* $fooCurried = new Callback('foo',
|
978 |
-
* 'param1 is now statically set',
|
979 |
-
* new CallbackParam, new CallbackParam
|
980 |
-
* );
|
981 |
-
* phpQuery::callbackRun($fooCurried,
|
982 |
-
* array('param2 value', 'param3 value'
|
983 |
-
* );
|
984 |
-
*
|
985 |
-
* Callback class is supported in all phpQuery methods which accepts callbacks.
|
986 |
-
*
|
987 |
-
* @link http://code.google.com/p/phpquery/wiki/Callbacks#Param_Structures
|
988 |
-
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
989 |
-
*
|
990 |
-
* @TODO??? return fake forwarding function created via create_function
|
991 |
-
* @TODO honor paramStructure
|
992 |
-
*/
|
993 |
-
class Callback
|
994 |
-
implements ICallbackNamed {
|
995 |
-
public $callback = null;
|
996 |
-
public $params = null;
|
997 |
-
protected $name;
|
998 |
-
public function __construct($callback, $param1 = null, $param2 = null,
|
999 |
-
$param3 = null) {
|
1000 |
-
$params = func_get_args();
|
1001 |
-
$params = array_slice($params, 1);
|
1002 |
-
if ($callback instanceof Callback) {
|
1003 |
-
// TODO implement recurention
|
1004 |
-
} else {
|
1005 |
-
$this->callback = $callback;
|
1006 |
-
$this->params = $params;
|
1007 |
-
}
|
1008 |
-
}
|
1009 |
-
public function getName() {
|
1010 |
-
return 'Callback: '.$this->name;
|
1011 |
-
}
|
1012 |
-
public function hasName() {
|
1013 |
-
return isset($this->name) && $this->name;
|
1014 |
-
}
|
1015 |
-
public function setName($name) {
|
1016 |
-
$this->name = $name;
|
1017 |
-
return $this;
|
1018 |
-
}
|
1019 |
-
// TODO test me
|
1020 |
-
// public function addParams() {
|
1021 |
-
// $params = func_get_args();
|
1022 |
-
// return new Callback($this->callback, $this->params+$params);
|
1023 |
-
// }
|
1024 |
-
}
|
1025 |
-
/**
|
1026 |
-
* Shorthand for new Callback(create_function(...), ...);
|
1027 |
-
*
|
1028 |
-
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
1029 |
-
*/
|
1030 |
-
class CallbackBody extends Callback {
|
1031 |
-
public function __construct($paramList, $code, $param1 = null, $param2 = null,
|
1032 |
-
$param3 = null) {
|
1033 |
-
$params = func_get_args();
|
1034 |
-
$params = array_slice($params, 2);
|
1035 |
-
$this->callback = create_function($paramList, $code);
|
1036 |
-
$this->params = $params;
|
1037 |
-
}
|
1038 |
-
}
|
1039 |
-
/**
|
1040 |
-
* Callback type which on execution returns reference passed during creation.
|
1041 |
-
*
|
1042 |
-
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
1043 |
-
*/
|
1044 |
-
class CallbackReturnReference extends Callback
|
1045 |
-
implements ICallbackNamed {
|
1046 |
-
protected $reference;
|
1047 |
-
public function __construct(&$reference, $name = null){
|
1048 |
-
$this->reference =& $reference;
|
1049 |
-
$this->callback = array($this, 'callback');
|
1050 |
-
}
|
1051 |
-
public function callback() {
|
1052 |
-
return $this->reference;
|
1053 |
-
}
|
1054 |
-
public function getName() {
|
1055 |
-
return 'Callback: '.$this->name;
|
1056 |
-
}
|
1057 |
-
public function hasName() {
|
1058 |
-
return isset($this->name) && $this->name;
|
1059 |
-
}
|
1060 |
-
}
|
1061 |
-
/**
|
1062 |
-
* Callback type which on execution returns value passed during creation.
|
1063 |
-
*
|
1064 |
-
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
1065 |
-
*/
|
1066 |
-
class CallbackReturnValue extends Callback
|
1067 |
-
implements ICallbackNamed {
|
1068 |
-
protected $value;
|
1069 |
-
protected $name;
|
1070 |
-
public function __construct($value, $name = null){
|
1071 |
-
$this->value =& $value;
|
1072 |
-
$this->name = $name;
|
1073 |
-
$this->callback = array($this, 'callback');
|
1074 |
-
}
|
1075 |
-
public function callback() {
|
1076 |
-
return $this->value;
|
1077 |
-
}
|
1078 |
-
public function __toString() {
|
1079 |
-
return $this->getName();
|
1080 |
-
}
|
1081 |
-
public function getName() {
|
1082 |
-
return 'Callback: '.$this->name;
|
1083 |
-
}
|
1084 |
-
public function hasName() {
|
1085 |
-
return isset($this->name) && $this->name;
|
1086 |
-
}
|
1087 |
-
}
|
1088 |
-
/**
|
1089 |
-
* CallbackParameterToReference can be used when we don't really want a callback,
|
1090 |
-
* only parameter passed to it. CallbackParameterToReference takes first
|
1091 |
-
* parameter's value and passes it to reference.
|
1092 |
-
*
|
1093 |
-
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
1094 |
-
*/
|
1095 |
-
class CallbackParameterToReference extends Callback {
|
1096 |
-
/**
|
1097 |
-
* @param $reference
|
1098 |
-
* @TODO implement $paramIndex;
|
1099 |
-
* param index choose which callback param will be passed to reference
|
1100 |
-
*/
|
1101 |
-
public function __construct(&$reference){
|
1102 |
-
$this->callback =& $reference;
|
1103 |
-
}
|
1104 |
-
}
|
1105 |
-
//class CallbackReference extends Callback {
|
1106 |
-
// /**
|
1107 |
-
// *
|
1108 |
-
// * @param $reference
|
1109 |
-
// * @param $paramIndex
|
1110 |
-
// * @todo implement $paramIndex; param index choose which callback param will be passed to reference
|
1111 |
-
// */
|
1112 |
-
// public function __construct(&$reference, $name = null){
|
1113 |
-
// $this->callback =& $reference;
|
1114 |
-
// }
|
1115 |
-
//}
|
1116 |
-
class CallbackParam {}
|
1117 |
-
|
1118 |
-
/**
|
1119 |
-
* Class representing phpQuery objects.
|
1120 |
-
*
|
1121 |
-
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
1122 |
-
* @package phpQuery
|
1123 |
-
* @method phpQueryObject clone() clone()
|
1124 |
-
* @method phpQueryObject empty() empty()
|
1125 |
-
* @method phpQueryObject next() next($selector = null)
|
1126 |
-
* @method phpQueryObject prev() prev($selector = null)
|
1127 |
-
* @property Int $length
|
1128 |
-
*/
|
1129 |
-
class phpQueryObject
|
1130 |
-
implements Iterator, Countable, ArrayAccess {
|
1131 |
-
public $documentID = null;
|
1132 |
-
/**
|
1133 |
-
* DOMDocument class.
|
1134 |
-
*
|
1135 |
-
* @var DOMDocument
|
1136 |
-
*/
|
1137 |
-
public $document = null;
|
1138 |
-
public $charset = null;
|
1139 |
-
/**
|
1140 |
-
*
|
1141 |
-
* @var DOMDocumentWrapper
|
1142 |
-
*/
|
1143 |
-
public $documentWrapper = null;
|
1144 |
-
/**
|
1145 |
-
* XPath interface.
|
1146 |
-
*
|
1147 |
-
* @var DOMXPath
|
1148 |
-
*/
|
1149 |
-
public $xpath = null;
|
1150 |
-
/**
|
1151 |
-
* Stack of selected elements.
|
1152 |
-
* @TODO refactor to ->nodes
|
1153 |
-
* @var array
|
1154 |
-
*/
|
1155 |
-
public $elements = array();
|
1156 |
-
/**
|
1157 |
-
* @access private
|
1158 |
-
*/
|
1159 |
-
protected $elementsBackup = array();
|
1160 |
-
/**
|
1161 |
-
* @access private
|
1162 |
-
*/
|
1163 |
-
protected $previous = null;
|
1164 |
-
/**
|
1165 |
-
* @access private
|
1166 |
-
* @TODO deprecate
|
1167 |
-
*/
|
1168 |
-
protected $root = array();
|
1169 |
-
/**
|
1170 |
-
* Indicated if doument is just a fragment (no <html> tag).
|
1171 |
-
*
|
1172 |
-
* Every document is realy a full document, so even documentFragments can
|
1173 |
-
* be queried against <html>, but getDocument(id)->htmlOuter() will return
|
1174 |
-
* only contents of <body>.
|
1175 |
-
*
|
1176 |
-
* @var bool
|
1177 |
-
*/
|
1178 |
-
public $documentFragment = true;
|
1179 |
-
/**
|
1180 |
-
* Iterator interface helper
|
1181 |
-
* @access private
|
1182 |
-
*/
|
1183 |
-
protected $elementsInterator = array();
|
1184 |
-
/**
|
1185 |
-
* Iterator interface helper
|
1186 |
-
* @access private
|
1187 |
-
*/
|
1188 |
-
protected $valid = false;
|
1189 |
-
/**
|
1190 |
-
* Iterator interface helper
|
1191 |
-
* @access private
|
1192 |
-
*/
|
1193 |
-
protected $current = null;
|
1194 |
-
/**
|
1195 |
-
* Enter description here...
|
1196 |
-
*
|
1197 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1198 |
-
*/
|
1199 |
-
public function __construct($documentID) {
|
1200 |
-
// if ($documentID instanceof self)
|
1201 |
-
// var_dump($documentID->getDocumentID());
|
1202 |
-
$id = $documentID instanceof self
|
1203 |
-
? $documentID->getDocumentID()
|
1204 |
-
: $documentID;
|
1205 |
-
// var_dump($id);
|
1206 |
-
if (! isset(phpQuery::$documents[$id] )) {
|
1207 |
-
// var_dump(phpQuery::$documents);
|
1208 |
-
throw new Exception("Document with ID '{$id}' isn't loaded. Use phpQuery::newDocument(\$html) or phpQuery::newDocumentFile(\$file) first.");
|
1209 |
-
}
|
1210 |
-
$this->documentID = $id;
|
1211 |
-
$this->documentWrapper =& phpQuery::$documents[$id];
|
1212 |
-
$this->document =& $this->documentWrapper->document;
|
1213 |
-
$this->xpath =& $this->documentWrapper->xpath;
|
1214 |
-
$this->charset =& $this->documentWrapper->charset;
|
1215 |
-
$this->documentFragment =& $this->documentWrapper->isDocumentFragment;
|
1216 |
-
// TODO check $this->DOM->documentElement;
|
1217 |
-
// $this->root = $this->document->documentElement;
|
1218 |
-
$this->root =& $this->documentWrapper->root;
|
1219 |
-
// $this->toRoot();
|
1220 |
-
$this->elements = array($this->root);
|
1221 |
-
}
|
1222 |
-
/**
|
1223 |
-
*
|
1224 |
-
* @access private
|
1225 |
-
* @param $attr
|
1226 |
-
* @return unknown_type
|
1227 |
-
*/
|
1228 |
-
public function __get($attr) {
|
1229 |
-
switch($attr) {
|
1230 |
-
// FIXME doesnt work at all ?
|
1231 |
-
case 'length':
|
1232 |
-
return $this->size();
|
1233 |
-
break;
|
1234 |
-
default:
|
1235 |
-
return $this->{$attr};
|
1236 |
-
}
|
1237 |
-
}
|
1238 |
-
/**
|
1239 |
-
* Saves actual object to $var by reference.
|
1240 |
-
* Useful when need to break chain.
|
1241 |
-
* @param phpQueryObject $var
|
1242 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1243 |
-
*/
|
1244 |
-
public function toReference(&$var) {
|
1245 |
-
return $var = $this;
|
1246 |
-
}
|
1247 |
-
public function documentFragment($state = null) {
|
1248 |
-
if ($state) {
|
1249 |
-
phpQuery::$documents[$this->getDocumentID()]['documentFragment'] = $state;
|
1250 |
-
return $this;
|
1251 |
-
}
|
1252 |
-
return $this->documentFragment;
|
1253 |
-
}
|
1254 |
-
/**
|
1255 |
-
* @access private
|
1256 |
-
* @TODO documentWrapper
|
1257 |
-
*/
|
1258 |
-
protected function isRoot( $node) {
|
1259 |
-
// return $node instanceof DOMDOCUMENT || $node->tagName == 'html';
|
1260 |
-
return $node instanceof DOMDOCUMENT
|
1261 |
-
|| ($node instanceof DOMELEMENT && $node->tagName == 'html')
|
1262 |
-
|| $this->root->isSameNode($node);
|
1263 |
-
}
|
1264 |
-
/**
|
1265 |
-
* @access private
|
1266 |
-
*/
|
1267 |
-
protected function stackIsRoot() {
|
1268 |
-
return $this->size() == 1 && $this->isRoot($this->elements[0]);
|
1269 |
-
}
|
1270 |
-
/**
|
1271 |
-
* Enter description here...
|
1272 |
-
* NON JQUERY METHOD
|
1273 |
-
*
|
1274 |
-
* Watch out, it doesn't creates new instance, can be reverted with end().
|
1275 |
-
*
|
1276 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1277 |
-
*/
|
1278 |
-
public function toRoot() {
|
1279 |
-
$this->elements = array($this->root);
|
1280 |
-
return $this;
|
1281 |
-
// return $this->newInstance(array($this->root));
|
1282 |
-
}
|
1283 |
-
/**
|
1284 |
-
* Saves object's DocumentID to $var by reference.
|
1285 |
-
* <code>
|
1286 |
-
* $myDocumentId;
|
1287 |
-
* phpQuery::newDocument('<div/>')
|
1288 |
-
* ->getDocumentIDRef($myDocumentId)
|
1289 |
-
* ->find('div')->...
|
1290 |
-
* </code>
|
1291 |
-
*
|
1292 |
-
* @param unknown_type $domId
|
1293 |
-
* @see phpQuery::newDocument
|
1294 |
-
* @see phpQuery::newDocumentFile
|
1295 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1296 |
-
*/
|
1297 |
-
public function getDocumentIDRef(&$documentID) {
|
1298 |
-
$documentID = $this->getDocumentID();
|
1299 |
-
return $this;
|
1300 |
-
}
|
1301 |
-
/**
|
1302 |
-
* Returns object with stack set to document root.
|
1303 |
-
*
|
1304 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1305 |
-
*/
|
1306 |
-
public function getDocument() {
|
1307 |
-
return phpQuery::getDocument($this->getDocumentID());
|
1308 |
-
}
|
1309 |
-
/**
|
1310 |
-
*
|
1311 |
-
* @return DOMDocument
|
1312 |
-
*/
|
1313 |
-
public function getDOMDocument() {
|
1314 |
-
return $this->document;
|
1315 |
-
}
|
1316 |
-
/**
|
1317 |
-
* Get object's Document ID.
|
1318 |
-
*
|
1319 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1320 |
-
*/
|
1321 |
-
public function getDocumentID() {
|
1322 |
-
return $this->documentID;
|
1323 |
-
}
|
1324 |
-
/**
|
1325 |
-
* Unloads whole document from memory.
|
1326 |
-
* CAUTION! None further operations will be possible on this document.
|
1327 |
-
* All objects refering to it will be useless.
|
1328 |
-
*
|
1329 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1330 |
-
*/
|
1331 |
-
public function unloadDocument() {
|
1332 |
-
phpQuery::unloadDocuments($this->getDocumentID());
|
1333 |
-
}
|
1334 |
-
public function isHTML() {
|
1335 |
-
return $this->documentWrapper->isHTML;
|
1336 |
-
}
|
1337 |
-
public function isXHTML() {
|
1338 |
-
return $this->documentWrapper->isXHTML;
|
1339 |
-
}
|
1340 |
-
public function isXML() {
|
1341 |
-
return $this->documentWrapper->isXML;
|
1342 |
-
}
|
1343 |
-
/**
|
1344 |
-
* Enter description here...
|
1345 |
-
*
|
1346 |
-
* @link http://docs.jquery.com/Ajax/serialize
|
1347 |
-
* @return string
|
1348 |
-
*/
|
1349 |
-
public function serialize() {
|
1350 |
-
return phpQuery::param($this->serializeArray());
|
1351 |
-
}
|
1352 |
-
/**
|
1353 |
-
* Enter description here...
|
1354 |
-
*
|
1355 |
-
* @link http://docs.jquery.com/Ajax/serializeArray
|
1356 |
-
* @return array
|
1357 |
-
*/
|
1358 |
-
public function serializeArray($submit = null) {
|
1359 |
-
$source = $this->filter('form, input, select, textarea')
|
1360 |
-
->find('input, select, textarea')
|
1361 |
-
->andSelf()
|
1362 |
-
->not('form');
|
1363 |
-
$return = array();
|
1364 |
-
// $source->dumpDie();
|
1365 |
-
foreach($source as $input) {
|
1366 |
-
$input = phpQuery::pq($input);
|
1367 |
-
if ($input->is('[disabled]'))
|
1368 |
-
continue;
|
1369 |
-
if (!$input->is('[name]'))
|
1370 |
-
continue;
|
1371 |
-
if ($input->is('[type=checkbox]') && !$input->is('[checked]'))
|
1372 |
-
continue;
|
1373 |
-
// jquery diff
|
1374 |
-
if ($submit && $input->is('[type=submit]')) {
|
1375 |
-
if ($submit instanceof DOMELEMENT && ! $input->elements[0]->isSameNode($submit))
|
1376 |
-
continue;
|
1377 |
-
else if (is_string($submit) && $input->attr('name') != $submit)
|
1378 |
-
continue;
|
1379 |
-
}
|
1380 |
-
$return[] = array(
|
1381 |
-
'name' => $input->attr('name'),
|
1382 |
-
'value' => $input->val(),
|
1383 |
-
);
|
1384 |
-
}
|
1385 |
-
return $return;
|
1386 |
-
}
|
1387 |
-
/**
|
1388 |
-
* @access private
|
1389 |
-
*/
|
1390 |
-
protected function debug($in) {
|
1391 |
-
if (! phpQuery::$debug )
|
1392 |
-
return;
|
1393 |
-
print('<pre>');
|
1394 |
-
print_r($in);
|
1395 |
-
// file debug
|
1396 |
-
// file_put_contents(dirname(__FILE__).'/phpQuery.log', print_r($in, true)."\n", FILE_APPEND);
|
1397 |
-
// quite handy debug trace
|
1398 |
-
// if ( is_array($in))
|
1399 |
-
// print_r(array_slice(debug_backtrace(), 3));
|
1400 |
-
print("</pre>\n");
|
1401 |
-
}
|
1402 |
-
/**
|
1403 |
-
* @access private
|
1404 |
-
*/
|
1405 |
-
protected function isRegexp($pattern) {
|
1406 |
-
return in_array(
|
1407 |
-
$pattern[ mb_strlen($pattern)-1 ],
|
1408 |
-
array('^','*','$')
|
1409 |
-
);
|
1410 |
-
}
|
1411 |
-
/**
|
1412 |
-
* Determines if $char is really a char.
|
1413 |
-
*
|
1414 |
-
* @param string $char
|
1415 |
-
* @return bool
|
1416 |
-
* @todo rewrite me to charcode range ! ;)
|
1417 |
-
* @access private
|
1418 |
-
*/
|
1419 |
-
protected function isChar($char) {
|
1420 |
-
return extension_loaded('mbstring') && in_array('mb_eregi', get_extension_funcs("mbstring")) && phpQuery::$mbstringSupport
|
1421 |
-
? mb_eregi('\w', $char)
|
1422 |
-
: preg_match('@\w@', $char);
|
1423 |
-
}
|
1424 |
-
/**
|
1425 |
-
* @access private
|
1426 |
-
*/
|
1427 |
-
protected function parseSelector($query) {
|
1428 |
-
// clean spaces
|
1429 |
-
// TODO include this inside parsing ?
|
1430 |
-
$query = trim(
|
1431 |
-
preg_replace('@\s+@', ' ',
|
1432 |
-
preg_replace('@\s*(>|\\+|~)\s*@', '\\1', $query)
|
1433 |
-
)
|
1434 |
-
);
|
1435 |
-
$queries = array(array());
|
1436 |
-
if (! $query)
|
1437 |
-
return $queries;
|
1438 |
-
$return =& $queries[0];
|
1439 |
-
$specialChars = array('>',' ');
|
1440 |
-
// $specialCharsMapping = array('/' => '>');
|
1441 |
-
$specialCharsMapping = array();
|
1442 |
-
$strlen = mb_strlen($query);
|
1443 |
-
$classChars = array('.', '-');
|
1444 |
-
$pseudoChars = array('-');
|
1445 |
-
$tagChars = array('*', '|', '-');
|
1446 |
-
// split multibyte string
|
1447 |
-
// http://code.google.com/p/phpquery/issues/detail?id=76
|
1448 |
-
$_query = array();
|
1449 |
-
for ($i=0; $i<$strlen; $i++)
|
1450 |
-
$_query[] = mb_substr($query, $i, 1);
|
1451 |
-
$query = $_query;
|
1452 |
-
// it works, but i dont like it...
|
1453 |
-
$i = 0;
|
1454 |
-
while( $i < $strlen) {
|
1455 |
-
$c = $query[$i];
|
1456 |
-
$tmp = '';
|
1457 |
-
// TAG
|
1458 |
-
if ($this->isChar($c) || in_array($c, $tagChars)) {
|
1459 |
-
while(isset($query[$i])
|
1460 |
-
&& ($this->isChar($query[$i]) || in_array($query[$i], $tagChars))) {
|
1461 |
-
$tmp .= $query[$i];
|
1462 |
-
$i++;
|
1463 |
-
}
|
1464 |
-
$return[] = $tmp;
|
1465 |
-
// IDs
|
1466 |
-
} else if ( $c == '#') {
|
1467 |
-
$i++;
|
1468 |
-
while( isset($query[$i]) && ($this->isChar($query[$i]) || $query[$i] == '-')) {
|
1469 |
-
$tmp .= $query[$i];
|
1470 |
-
$i++;
|
1471 |
-
}
|
1472 |
-
$return[] = '#'.$tmp;
|
1473 |
-
// SPECIAL CHARS
|
1474 |
-
} else if (in_array($c, $specialChars)) {
|
1475 |
-
$return[] = $c;
|
1476 |
-
$i++;
|
1477 |
-
// MAPPED SPECIAL MULTICHARS
|
1478 |
-
// } else if ( $c.$query[$i+1] == '//') {
|
1479 |
-
// $return[] = ' ';
|
1480 |
-
// $i = $i+2;
|
1481 |
-
// MAPPED SPECIAL CHARS
|
1482 |
-
} else if ( isset($specialCharsMapping[$c])) {
|
1483 |
-
$return[] = $specialCharsMapping[$c];
|
1484 |
-
$i++;
|
1485 |
-
// COMMA
|
1486 |
-
} else if ( $c == ',') {
|
1487 |
-
$queries[] = array();
|
1488 |
-
$return =& $queries[ count($queries)-1 ];
|
1489 |
-
$i++;
|
1490 |
-
while( isset($query[$i]) && $query[$i] == ' ')
|
1491 |
-
$i++;
|
1492 |
-
// CLASSES
|
1493 |
-
} else if ($c == '.') {
|
1494 |
-
while( isset($query[$i]) && ($this->isChar($query[$i]) || in_array($query[$i], $classChars))) {
|
1495 |
-
$tmp .= $query[$i];
|
1496 |
-
$i++;
|
1497 |
-
}
|
1498 |
-
$return[] = $tmp;
|
1499 |
-
// ~ General Sibling Selector
|
1500 |
-
} else if ($c == '~') {
|
1501 |
-
$spaceAllowed = true;
|
1502 |
-
$tmp .= $query[$i++];
|
1503 |
-
while( isset($query[$i])
|
1504 |
-
&& ($this->isChar($query[$i])
|
1505 |
-
|| in_array($query[$i], $classChars)
|
1506 |
-
|| $query[$i] == '*'
|
1507 |
-
|| ($query[$i] == ' ' && $spaceAllowed)
|
1508 |
-
)) {
|
1509 |
-
if ($query[$i] != ' ')
|
1510 |
-
$spaceAllowed = false;
|
1511 |
-
$tmp .= $query[$i];
|
1512 |
-
$i++;
|
1513 |
-
}
|
1514 |
-
$return[] = $tmp;
|
1515 |
-
// + Adjacent sibling selectors
|
1516 |
-
} else if ($c == '+') {
|
1517 |
-
$spaceAllowed = true;
|
1518 |
-
$tmp .= $query[$i++];
|
1519 |
-
while( isset($query[$i])
|
1520 |
-
&& ($this->isChar($query[$i])
|
1521 |
-
|| in_array($query[$i], $classChars)
|
1522 |
-
|| $query[$i] == '*'
|
1523 |
-
|| ($spaceAllowed && $query[$i] == ' ')
|
1524 |
-
)) {
|
1525 |
-
if ($query[$i] != ' ')
|
1526 |
-
$spaceAllowed = false;
|
1527 |
-
$tmp .= $query[$i];
|
1528 |
-
$i++;
|
1529 |
-
}
|
1530 |
-
$return[] = $tmp;
|
1531 |
-
// ATTRS
|
1532 |
-
} else if ($c == '[') {
|
1533 |
-
$stack = 1;
|
1534 |
-
$tmp .= $c;
|
1535 |
-
while( isset($query[++$i])) {
|
1536 |
-
$tmp .= $query[$i];
|
1537 |
-
if ( $query[$i] == '[') {
|
1538 |
-
$stack++;
|
1539 |
-
} else if ( $query[$i] == ']') {
|
1540 |
-
$stack--;
|
1541 |
-
if (! $stack )
|
1542 |
-
break;
|
1543 |
-
}
|
1544 |
-
}
|
1545 |
-
$return[] = $tmp;
|
1546 |
-
$i++;
|
1547 |
-
// PSEUDO CLASSES
|
1548 |
-
} else if ($c == ':') {
|
1549 |
-
$stack = 1;
|
1550 |
-
$tmp .= $query[$i++];
|
1551 |
-
while( isset($query[$i]) && ($this->isChar($query[$i]) || in_array($query[$i], $pseudoChars))) {
|
1552 |
-
$tmp .= $query[$i];
|
1553 |
-
$i++;
|
1554 |
-
}
|
1555 |
-
// with arguments ?
|
1556 |
-
if ( isset($query[$i]) && $query[$i] == '(') {
|
1557 |
-
$tmp .= $query[$i];
|
1558 |
-
$stack = 1;
|
1559 |
-
while( isset($query[++$i])) {
|
1560 |
-
$tmp .= $query[$i];
|
1561 |
-
if ( $query[$i] == '(') {
|
1562 |
-
$stack++;
|
1563 |
-
} else if ( $query[$i] == ')') {
|
1564 |
-
$stack--;
|
1565 |
-
if (! $stack )
|
1566 |
-
break;
|
1567 |
-
}
|
1568 |
-
}
|
1569 |
-
$return[] = $tmp;
|
1570 |
-
$i++;
|
1571 |
-
} else {
|
1572 |
-
$return[] = $tmp;
|
1573 |
-
}
|
1574 |
-
} else {
|
1575 |
-
$i++;
|
1576 |
-
}
|
1577 |
-
}
|
1578 |
-
foreach($queries as $k => $q) {
|
1579 |
-
if (isset($q[0])) {
|
1580 |
-
if (isset($q[0][0]) && $q[0][0] == ':')
|
1581 |
-
array_unshift($queries[$k], '*');
|
1582 |
-
if ($q[0] != '>')
|
1583 |
-
array_unshift($queries[$k], ' ');
|
1584 |
-
}
|
1585 |
-
}
|
1586 |
-
return $queries;
|
1587 |
-
}
|
1588 |
-
/**
|
1589 |
-
* Return matched DOM nodes.
|
1590 |
-
*
|
1591 |
-
* @param int $index
|
1592 |
-
* @return array|DOMElement Single DOMElement or array of DOMElement.
|
1593 |
-
*/
|
1594 |
-
public function get($index = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
1595 |
-
$return = isset($index)
|
1596 |
-
? (isset($this->elements[$index]) ? $this->elements[$index] : null)
|
1597 |
-
: $this->elements;
|
1598 |
-
// pass thou callbacks
|
1599 |
-
$args = func_get_args();
|
1600 |
-
$args = array_slice($args, 1);
|
1601 |
-
foreach($args as $callback) {
|
1602 |
-
if (is_array($return))
|
1603 |
-
foreach($return as $k => $v)
|
1604 |
-
$return[$k] = phpQuery::callbackRun($callback, array($v));
|
1605 |
-
else
|
1606 |
-
$return = phpQuery::callbackRun($callback, array($return));
|
1607 |
-
}
|
1608 |
-
return $return;
|
1609 |
-
}
|
1610 |
-
/**
|
1611 |
-
* Return matched DOM nodes.
|
1612 |
-
* jQuery difference.
|
1613 |
-
*
|
1614 |
-
* @param int $index
|
1615 |
-
* @return array|string Returns string if $index != null
|
1616 |
-
* @todo implement callbacks
|
1617 |
-
* @todo return only arrays ?
|
1618 |
-
* @todo maybe other name...
|
1619 |
-
*/
|
1620 |
-
public function getString($index = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
1621 |
-
if ($index)
|
1622 |
-
$return = $this->eq($index)->text();
|
1623 |
-
else {
|
1624 |
-
$return = array();
|
1625 |
-
for($i = 0; $i < $this->size(); $i++) {
|
1626 |
-
$return[] = $this->eq($i)->text();
|
1627 |
-
}
|
1628 |
-
}
|
1629 |
-
// pass thou callbacks
|
1630 |
-
$args = func_get_args();
|
1631 |
-
$args = array_slice($args, 1);
|
1632 |
-
foreach($args as $callback) {
|
1633 |
-
$return = phpQuery::callbackRun($callback, array($return));
|
1634 |
-
}
|
1635 |
-
return $return;
|
1636 |
-
}
|
1637 |
-
/**
|
1638 |
-
* Return matched DOM nodes.
|
1639 |
-
* jQuery difference.
|
1640 |
-
*
|
1641 |
-
* @param int $index
|
1642 |
-
* @return array|string Returns string if $index != null
|
1643 |
-
* @todo implement callbacks
|
1644 |
-
* @todo return only arrays ?
|
1645 |
-
* @todo maybe other name...
|
1646 |
-
*/
|
1647 |
-
public function getStrings($index = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
1648 |
-
if ($index)
|
1649 |
-
$return = $this->eq($index)->text();
|
1650 |
-
else {
|
1651 |
-
$return = array();
|
1652 |
-
for($i = 0; $i < $this->size(); $i++) {
|
1653 |
-
$return[] = $this->eq($i)->text();
|
1654 |
-
}
|
1655 |
-
// pass thou callbacks
|
1656 |
-
$args = func_get_args();
|
1657 |
-
$args = array_slice($args, 1);
|
1658 |
-
}
|
1659 |
-
foreach($args as $callback) {
|
1660 |
-
if (is_array($return))
|
1661 |
-
foreach($return as $k => $v)
|
1662 |
-
$return[$k] = phpQuery::callbackRun($callback, array($v));
|
1663 |
-
else
|
1664 |
-
$return = phpQuery::callbackRun($callback, array($return));
|
1665 |
-
}
|
1666 |
-
return $return;
|
1667 |
-
}
|
1668 |
-
/**
|
1669 |
-
* Returns new instance of actual class.
|
1670 |
-
*
|
1671 |
-
* @param array $newStack Optional. Will replace old stack with new and move old one to history.c
|
1672 |
-
*/
|
1673 |
-
public function newInstance($newStack = null) {
|
1674 |
-
$class = get_class($this);
|
1675 |
-
// support inheritance by passing old object to overloaded constructor
|
1676 |
-
$new = $class != 'phpQuery'
|
1677 |
-
? new $class($this, $this->getDocumentID())
|
1678 |
-
: new phpQueryObject($this->getDocumentID());
|
1679 |
-
$new->previous = $this;
|
1680 |
-
if (is_null($newStack)) {
|
1681 |
-
$new->elements = $this->elements;
|
1682 |
-
if ($this->elementsBackup)
|
1683 |
-
$this->elements = $this->elementsBackup;
|
1684 |
-
} else if (is_string($newStack)) {
|
1685 |
-
$new->elements = phpQuery::pq($newStack, $this->getDocumentID())->stack();
|
1686 |
-
} else {
|
1687 |
-
$new->elements = $newStack;
|
1688 |
-
}
|
1689 |
-
return $new;
|
1690 |
-
}
|
1691 |
-
/**
|
1692 |
-
* Enter description here...
|
1693 |
-
*
|
1694 |
-
* In the future, when PHP will support XLS 2.0, then we would do that this way:
|
1695 |
-
* contains(tokenize(@class, '\s'), "something")
|
1696 |
-
* @param unknown_type $class
|
1697 |
-
* @param unknown_type $node
|
1698 |
-
* @return boolean
|
1699 |
-
* @access private
|
1700 |
-
*/
|
1701 |
-
protected function matchClasses($class, $node) {
|
1702 |
-
// multi-class
|
1703 |
-
if ( mb_strpos($class, '.', 1)) {
|
1704 |
-
$classes = explode('.', substr($class, 1));
|
1705 |
-
$classesCount = count( $classes );
|
1706 |
-
$nodeClasses = explode(' ', $node->getAttribute('class') );
|
1707 |
-
$nodeClassesCount = count( $nodeClasses );
|
1708 |
-
if ( $classesCount > $nodeClassesCount )
|
1709 |
-
return false;
|
1710 |
-
$diff = count(
|
1711 |
-
array_diff(
|
1712 |
-
$classes,
|
1713 |
-
$nodeClasses
|
1714 |
-
)
|
1715 |
-
);
|
1716 |
-
if (! $diff )
|
1717 |
-
return true;
|
1718 |
-
// single-class
|
1719 |
-
} else {
|
1720 |
-
return in_array(
|
1721 |
-
// strip leading dot from class name
|
1722 |
-
substr($class, 1),
|
1723 |
-
// get classes for element as array
|
1724 |
-
explode(' ', $node->getAttribute('class') )
|
1725 |
-
);
|
1726 |
-
}
|
1727 |
-
}
|
1728 |
-
/**
|
1729 |
-
* @access private
|
1730 |
-
*/
|
1731 |
-
protected function runQuery($XQuery, $selector = null, $compare = null) {
|
1732 |
-
if ($compare && ! method_exists($this, $compare))
|
1733 |
-
return false;
|
1734 |
-
$stack = array();
|
1735 |
-
if (! $this->elements)
|
1736 |
-
$this->debug('Stack empty, skipping...');
|
1737 |
-
// var_dump($this->elements[0]->nodeType);
|
1738 |
-
// element, document
|
1739 |
-
foreach($this->stack(array(1, 9, 13)) as $k => $stackNode) {
|
1740 |
-
$detachAfter = false;
|
1741 |
-
// to work on detached nodes we need temporary place them somewhere
|
1742 |
-
// thats because context xpath queries sucks ;]
|
1743 |
-
$testNode = $stackNode;
|
1744 |
-
while ($testNode) {
|
1745 |
-
if (! $testNode->parentNode && ! $this->isRoot($testNode)) {
|
1746 |
-
$this->root->appendChild($testNode);
|
1747 |
-
$detachAfter = $testNode;
|
1748 |
-
break;
|
1749 |
-
}
|
1750 |
-
$testNode = isset($testNode->parentNode)
|
1751 |
-
? $testNode->parentNode
|
1752 |
-
: null;
|
1753 |
-
}
|
1754 |
-
// XXX tmp ?
|
1755 |
-
$xpath = $this->documentWrapper->isXHTML
|
1756 |
-
? $this->getNodeXpath($stackNode, 'html')
|
1757 |
-
: $this->getNodeXpath($stackNode);
|
1758 |
-
// FIXME pseudoclasses-only query, support XML
|
1759 |
-
$query = $XQuery == '//' && $xpath == '/html[1]'
|
1760 |
-
? '//*'
|
1761 |
-
: $xpath.$XQuery;
|
1762 |
-
$this->debug("XPATH: {$query}");
|
1763 |
-
// run query, get elements
|
1764 |
-
$nodes = $this->xpath->query($query);
|
1765 |
-
$this->debug("QUERY FETCHED");
|
1766 |
-
if (! $nodes->length )
|
1767 |
-
$this->debug('Nothing found');
|
1768 |
-
$debug = array();
|
1769 |
-
foreach($nodes as $node) {
|
1770 |
-
$matched = false;
|
1771 |
-
if ( $compare) {
|
1772 |
-
phpQuery::$debug ?
|
1773 |
-
$this->debug("Found: ".$this->whois( $node ).", comparing with {$compare}()")
|
1774 |
-
: null;
|
1775 |
-
$phpQueryDebug = phpQuery::$debug;
|
1776 |
-
phpQuery::$debug = false;
|
1777 |
-
// TODO ??? use phpQuery::callbackRun()
|
1778 |
-
if (call_user_func_array(array($this, $compare), array($selector, $node)))
|
1779 |
-
$matched = true;
|
1780 |
-
phpQuery::$debug = $phpQueryDebug;
|
1781 |
-
} else {
|
1782 |
-
$matched = true;
|
1783 |
-
}
|
1784 |
-
if ( $matched) {
|
1785 |
-
if (phpQuery::$debug)
|
1786 |
-
$debug[] = $this->whois( $node );
|
1787 |
-
$stack[] = $node;
|
1788 |
-
}
|
1789 |
-
}
|
1790 |
-
if (phpQuery::$debug) {
|
1791 |
-
$this->debug("Matched ".count($debug).": ".implode(', ', $debug));
|
1792 |
-
}
|
1793 |
-
if ($detachAfter)
|
1794 |
-
$this->root->removeChild($detachAfter);
|
1795 |
-
}
|
1796 |
-
$this->elements = $stack;
|
1797 |
-
}
|
1798 |
-
/**
|
1799 |
-
* Enter description here...
|
1800 |
-
*
|
1801 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1802 |
-
*/
|
1803 |
-
public function find($selectors, $context = null, $noHistory = false) {
|
1804 |
-
if (!$noHistory)
|
1805 |
-
// backup last stack /for end()/
|
1806 |
-
$this->elementsBackup = $this->elements;
|
1807 |
-
// allow to define context
|
1808 |
-
// TODO combine code below with phpQuery::pq() context guessing code
|
1809 |
-
// as generic function
|
1810 |
-
if ($context) {
|
1811 |
-
if (! is_array($context) && $context instanceof DOMELEMENT)
|
1812 |
-
$this->elements = array($context);
|
1813 |
-
else if (is_array($context)) {
|
1814 |
-
$this->elements = array();
|
1815 |
-
foreach ($context as $c)
|
1816 |
-
if ($c instanceof DOMELEMENT)
|
1817 |
-
$this->elements[] = $c;
|
1818 |
-
} else if ( $context instanceof self )
|
1819 |
-
$this->elements = $context->elements;
|
1820 |
-
}
|
1821 |
-
$queries = $this->parseSelector($selectors);
|
1822 |
-
$this->debug(array('FIND', $selectors, $queries));
|
1823 |
-
$XQuery = '';
|
1824 |
-
// remember stack state because of multi-queries
|
1825 |
-
$oldStack = $this->elements;
|
1826 |
-
// here we will be keeping found elements
|
1827 |
-
$stack = array();
|
1828 |
-
foreach($queries as $selector) {
|
1829 |
-
$this->elements = $oldStack;
|
1830 |
-
$delimiterBefore = false;
|
1831 |
-
foreach($selector as $s) {
|
1832 |
-
// TAG
|
1833 |
-
$isTag = extension_loaded('mbstring') && in_array('mb_ereg_match', get_extension_funcs("mbstring")) && phpQuery::$mbstringSupport
|
1834 |
-
? mb_ereg_match('^[\w|\||-]+$', $s) || $s == '*'
|
1835 |
-
: preg_match('@^[\w|\||-]+$@', $s) || $s == '*';
|
1836 |
-
if ($isTag) {
|
1837 |
-
if ($this->isXML()) {
|
1838 |
-
// namespace support
|
1839 |
-
if (mb_strpos($s, '|') !== false) {
|
1840 |
-
$ns = $tag = null;
|
1841 |
-
list($ns, $tag) = explode('|', $s);
|
1842 |
-
$XQuery .= "$ns:$tag";
|
1843 |
-
} else if ($s == '*') {
|
1844 |
-
$XQuery .= "*";
|
1845 |
-
} else {
|
1846 |
-
$XQuery .= "*[local-name()='$s']";
|
1847 |
-
}
|
1848 |
-
} else {
|
1849 |
-
$XQuery .= $s;
|
1850 |
-
}
|
1851 |
-
// ID
|
1852 |
-
} else if ($s[0] == '#') {
|
1853 |
-
if ($delimiterBefore)
|
1854 |
-
$XQuery .= '*';
|
1855 |
-
$XQuery .= "[@id='".substr($s, 1)."']";
|
1856 |
-
// ATTRIBUTES
|
1857 |
-
} else if ($s[0] == '[') {
|
1858 |
-
if ($delimiterBefore)
|
1859 |
-
$XQuery .= '*';
|
1860 |
-
// strip side brackets
|
1861 |
-
$attr = trim($s, '][');
|
1862 |
-
$execute = false;
|
1863 |
-
// attr with specifed value
|
1864 |
-
if (mb_strpos($s, '=')) {
|
1865 |
-
$value = null;
|
1866 |
-
list($attr, $value) = explode('=', $attr);
|
1867 |
-
$value = trim($value, "'\"");
|
1868 |
-
if ($this->isRegexp($attr)) {
|
1869 |
-
// cut regexp character
|
1870 |
-
$attr = substr($attr, 0, -1);
|
1871 |
-
$execute = true;
|
1872 |
-
$XQuery .= "[@{$attr}]";
|
1873 |
-
} else {
|
1874 |
-
$XQuery .= "[@{$attr}='{$value}']";
|
1875 |
-
}
|
1876 |
-
// attr without specified value
|
1877 |
-
} else {
|
1878 |
-
$XQuery .= "[@{$attr}]";
|
1879 |
-
}
|
1880 |
-
if ($execute) {
|
1881 |
-
$this->runQuery($XQuery, $s, 'is');
|
1882 |
-
$XQuery = '';
|
1883 |
-
if (! $this->length())
|
1884 |
-
break;
|
1885 |
-
}
|
1886 |
-
// CLASSES
|
1887 |
-
} else if ($s[0] == '.') {
|
1888 |
-
// TODO use return $this->find("./self::*[contains(concat(\" \",@class,\" \"), \" $class \")]");
|
1889 |
-
// thx wizDom ;)
|
1890 |
-
if ($delimiterBefore)
|
1891 |
-
$XQuery .= '*';
|
1892 |
-
$XQuery .= '[@class]';
|
1893 |
-
$this->runQuery($XQuery, $s, 'matchClasses');
|
1894 |
-
$XQuery = '';
|
1895 |
-
if (! $this->length() )
|
1896 |
-
break;
|
1897 |
-
// ~ General Sibling Selector
|
1898 |
-
} else if ($s[0] == '~') {
|
1899 |
-
$this->runQuery($XQuery);
|
1900 |
-
$XQuery = '';
|
1901 |
-
$this->elements = $this
|
1902 |
-
->siblings(
|
1903 |
-
substr($s, 1)
|
1904 |
-
)->elements;
|
1905 |
-
if (! $this->length() )
|
1906 |
-
break;
|
1907 |
-
// + Adjacent sibling selectors
|
1908 |
-
} else if ($s[0] == '+') {
|
1909 |
-
// TODO /following-sibling::
|
1910 |
-
$this->runQuery($XQuery);
|
1911 |
-
$XQuery = '';
|
1912 |
-
$subSelector = substr($s, 1);
|
1913 |
-
$subElements = $this->elements;
|
1914 |
-
$this->elements = array();
|
1915 |
-
foreach($subElements as $node) {
|
1916 |
-
// search first DOMElement sibling
|
1917 |
-
$test = $node->nextSibling;
|
1918 |
-
while($test && ! ($test instanceof DOMELEMENT))
|
1919 |
-
$test = $test->nextSibling;
|
1920 |
-
if ($test && $this->is($subSelector, $test))
|
1921 |
-
$this->elements[] = $test;
|
1922 |
-
}
|
1923 |
-
if (! $this->length() )
|
1924 |
-
break;
|
1925 |
-
// PSEUDO CLASSES
|
1926 |
-
} else if ($s[0] == ':') {
|
1927 |
-
// TODO optimization for :first :last
|
1928 |
-
if ($XQuery) {
|
1929 |
-
$this->runQuery($XQuery);
|
1930 |
-
$XQuery = '';
|
1931 |
-
}
|
1932 |
-
if (! $this->length())
|
1933 |
-
break;
|
1934 |
-
$this->pseudoClasses($s);
|
1935 |
-
if (! $this->length())
|
1936 |
-
break;
|
1937 |
-
// DIRECT DESCENDANDS
|
1938 |
-
} else if ($s == '>') {
|
1939 |
-
$XQuery .= '/';
|
1940 |
-
$delimiterBefore = 2;
|
1941 |
-
// ALL DESCENDANDS
|
1942 |
-
} else if ($s == ' ') {
|
1943 |
-
$XQuery .= '//';
|
1944 |
-
$delimiterBefore = 2;
|
1945 |
-
// ERRORS
|
1946 |
-
} else {
|
1947 |
-
phpQuery::debug("Unrecognized token '$s'");
|
1948 |
-
}
|
1949 |
-
$delimiterBefore = $delimiterBefore === 2;
|
1950 |
-
}
|
1951 |
-
// run query if any
|
1952 |
-
if ($XQuery && $XQuery != '//') {
|
1953 |
-
$this->runQuery($XQuery);
|
1954 |
-
$XQuery = '';
|
1955 |
-
}
|
1956 |
-
foreach($this->elements as $node)
|
1957 |
-
if (! $this->elementsContainsNode($node, $stack))
|
1958 |
-
$stack[] = $node;
|
1959 |
-
}
|
1960 |
-
$this->elements = $stack;
|
1961 |
-
return $this->newInstance();
|
1962 |
-
}
|
1963 |
-
/**
|
1964 |
-
* @todo create API for classes with pseudoselectors
|
1965 |
-
* @access private
|
1966 |
-
*/
|
1967 |
-
protected function pseudoClasses($class) {
|
1968 |
-
// TODO clean args parsing ?
|
1969 |
-
$class = ltrim($class, ':');
|
1970 |
-
$haveArgs = mb_strpos($class, '(');
|
1971 |
-
if ($haveArgs !== false) {
|
1972 |
-
$args = substr($class, $haveArgs+1, -1);
|
1973 |
-
$class = substr($class, 0, $haveArgs);
|
1974 |
-
}
|
1975 |
-
switch($class) {
|
1976 |
-
case 'even':
|
1977 |
-
case 'odd':
|
1978 |
-
$stack = array();
|
1979 |
-
foreach($this->elements as $i => $node) {
|
1980 |
-
if ($class == 'even' && ($i%2) == 0)
|
1981 |
-
$stack[] = $node;
|
1982 |
-
else if ( $class == 'odd' && $i % 2 )
|
1983 |
-
$stack[] = $node;
|
1984 |
-
}
|
1985 |
-
$this->elements = $stack;
|
1986 |
-
break;
|
1987 |
-
case 'eq':
|
1988 |
-
$k = intval($args);
|
1989 |
-
$this->elements = isset( $this->elements[$k] )
|
1990 |
-
? array( $this->elements[$k] )
|
1991 |
-
: array();
|
1992 |
-
break;
|
1993 |
-
case 'gt':
|
1994 |
-
$this->elements = array_slice($this->elements, $args+1);
|
1995 |
-
break;
|
1996 |
-
case 'lt':
|
1997 |
-
$this->elements = array_slice($this->elements, 0, $args+1);
|
1998 |
-
break;
|
1999 |
-
case 'first':
|
2000 |
-
if (isset($this->elements[0]))
|
2001 |
-
$this->elements = array($this->elements[0]);
|
2002 |
-
break;
|
2003 |
-
case 'last':
|
2004 |
-
if ($this->elements)
|
2005 |
-
$this->elements = array($this->elements[count($this->elements)-1]);
|
2006 |
-
break;
|
2007 |
-
/*case 'parent':
|
2008 |
-
$stack = array();
|
2009 |
-
foreach($this->elements as $node) {
|
2010 |
-
if ( $node->childNodes->length )
|
2011 |
-
$stack[] = $node;
|
2012 |
-
}
|
2013 |
-
$this->elements = $stack;
|
2014 |
-
break;*/
|
2015 |
-
case 'contains':
|
2016 |
-
$text = trim($args, "\"'");
|
2017 |
-
$stack = array();
|
2018 |
-
foreach($this->elements as $node) {
|
2019 |
-
if (mb_stripos($node->textContent, $text) === false)
|
2020 |
-
continue;
|
2021 |
-
$stack[] = $node;
|
2022 |
-
}
|
2023 |
-
$this->elements = $stack;
|
2024 |
-
break;
|
2025 |
-
case 'not':
|
2026 |
-
$selector = self::unQuote($args);
|
2027 |
-
$this->elements = $this->not($selector)->stack();
|
2028 |
-
break;
|
2029 |
-
case 'slice':
|
2030 |
-
// TODO jQuery difference ?
|
2031 |
-
$args = explode(',',
|
2032 |
-
str_replace(', ', ',', trim($args, "\"'"))
|
2033 |
-
);
|
2034 |
-
$start = $args[0];
|
2035 |
-
$end = isset($args[1])
|
2036 |
-
? $args[1]
|
2037 |
-
: null;
|
2038 |
-
if ($end > 0)
|
2039 |
-
$end = $end-$start;
|
2040 |
-
$this->elements = array_slice($this->elements, $start, $end);
|
2041 |
-
break;
|
2042 |
-
case 'has':
|
2043 |
-
$selector = trim($args, "\"'");
|
2044 |
-
$stack = array();
|
2045 |
-
foreach($this->stack(1) as $el) {
|
2046 |
-
if ($this->find($selector, $el, true)->length)
|
2047 |
-
$stack[] = $el;
|
2048 |
-
}
|
2049 |
-
$this->elements = $stack;
|
2050 |
-
break;
|
2051 |
-
case 'submit':
|
2052 |
-
case 'reset':
|
2053 |
-
$this->elements = phpQuery::merge(
|
2054 |
-
$this->map(array($this, 'is'),
|
2055 |
-
"input[type=$class]", new CallbackParam()
|
2056 |
-
),
|
2057 |
-
$this->map(array($this, 'is'),
|
2058 |
-
"button[type=$class]", new CallbackParam()
|
2059 |
-
)
|
2060 |
-
);
|
2061 |
-
break;
|
2062 |
-
// $stack = array();
|
2063 |
-
// foreach($this->elements as $node)
|
2064 |
-
// if ($node->is('input[type=submit]') || $node->is('button[type=submit]'))
|
2065 |
-
// $stack[] = $el;
|
2066 |
-
// $this->elements = $stack;
|
2067 |
-
case 'input':
|
2068 |
-
$this->elements = $this->map(
|
2069 |
-
array($this, 'is'),
|
2070 |
-
'input', new CallbackParam()
|
2071 |
-
)->elements;
|
2072 |
-
break;
|
2073 |
-
case 'password':
|
2074 |
-
case 'checkbox':
|
2075 |
-
case 'radio':
|
2076 |
-
case 'hidden':
|
2077 |
-
case 'image':
|
2078 |
-
case 'file':
|
2079 |
-
$this->elements = $this->map(
|
2080 |
-
array($this, 'is'),
|
2081 |
-
"input[type=$class]", new CallbackParam()
|
2082 |
-
)->elements;
|
2083 |
-
break;
|
2084 |
-
case 'parent':
|
2085 |
-
$this->elements = $this->map(
|
2086 |
-
create_function('$node', '
|
2087 |
-
return $node instanceof DOMELEMENT && $node->childNodes->length
|
2088 |
-
? $node : null;')
|
2089 |
-
)->elements;
|
2090 |
-
break;
|
2091 |
-
case 'empty':
|
2092 |
-
$this->elements = $this->map(
|
2093 |
-
create_function('$node', '
|
2094 |
-
return $node instanceof DOMELEMENT && $node->childNodes->length
|
2095 |
-
? null : $node;')
|
2096 |
-
)->elements;
|
2097 |
-
break;
|
2098 |
-
case 'disabled':
|
2099 |
-
case 'selected':
|
2100 |
-
case 'checked':
|
2101 |
-
$this->elements = $this->map(
|
2102 |
-
array($this, 'is'),
|
2103 |
-
"[$class]", new CallbackParam()
|
2104 |
-
)->elements;
|
2105 |
-
break;
|
2106 |
-
case 'enabled':
|
2107 |
-
$this->elements = $this->map(
|
2108 |
-
create_function('$node', '
|
2109 |
-
return pq($node)->not(":disabled") ? $node : null;')
|
2110 |
-
)->elements;
|
2111 |
-
break;
|
2112 |
-
case 'header':
|
2113 |
-
$this->elements = $this->map(
|
2114 |
-
create_function('$node',
|
2115 |
-
'$isHeader = isset($node->tagName) && in_array($node->tagName, array(
|
2116 |
-
"h1", "h2", "h3", "h4", "h5", "h6", "h7"
|
2117 |
-
));
|
2118 |
-
return $isHeader
|
2119 |
-
? $node
|
2120 |
-
: null;')
|
2121 |
-
)->elements;
|
2122 |
-
// $this->elements = $this->map(
|
2123 |
-
// create_function('$node', '$node = pq($node);
|
2124 |
-
// return $node->is("h1")
|
2125 |
-
// || $node->is("h2")
|
2126 |
-
// || $node->is("h3")
|
2127 |
-
// || $node->is("h4")
|
2128 |
-
// || $node->is("h5")
|
2129 |
-
// || $node->is("h6")
|
2130 |
-
// || $node->is("h7")
|
2131 |
-
// ? $node
|
2132 |
-
// : null;')
|
2133 |
-
// )->elements;
|
2134 |
-
break;
|
2135 |
-
case 'only-child':
|
2136 |
-
$this->elements = $this->map(
|
2137 |
-
create_function('$node',
|
2138 |
-
'return pq($node)->siblings()->size() == 0 ? $node : null;')
|
2139 |
-
)->elements;
|
2140 |
-
break;
|
2141 |
-
case 'first-child':
|
2142 |
-
$this->elements = $this->map(
|
2143 |
-
create_function('$node', 'return pq($node)->prevAll()->size() == 0 ? $node : null;')
|
2144 |
-
)->elements;
|
2145 |
-
break;
|
2146 |
-
case 'last-child':
|
2147 |
-
$this->elements = $this->map(
|
2148 |
-
create_function('$node', 'return pq($node)->nextAll()->size() == 0 ? $node : null;')
|
2149 |
-
)->elements;
|
2150 |
-
break;
|
2151 |
-
case 'nth-child':
|
2152 |
-
$param = trim($args, "\"'");
|
2153 |
-
if (! $param)
|
2154 |
-
break;
|
2155 |
-
// nth-child(n+b) to nth-child(1n+b)
|
2156 |
-
if ($param{0} == 'n')
|
2157 |
-
$param = '1'.$param;
|
2158 |
-
// :nth-child(index/even/odd/equation)
|
2159 |
-
if ($param == 'even' || $param == 'odd')
|
2160 |
-
$mapped = $this->map(
|
2161 |
-
create_function('$node, $param',
|
2162 |
-
'$index = pq($node)->prevAll()->size()+1;
|
2163 |
-
if ($param == "even" && ($index%2) == 0)
|
2164 |
-
return $node;
|
2165 |
-
else if ($param == "odd" && $index%2 == 1)
|
2166 |
-
return $node;
|
2167 |
-
else
|
2168 |
-
return null;'),
|
2169 |
-
new CallbackParam(), $param
|
2170 |
-
);
|
2171 |
-
else if (mb_strlen($param) > 1 && $param{1} == 'n')
|
2172 |
-
// an+b
|
2173 |
-
$mapped = $this->map(
|
2174 |
-
create_function('$node, $param',
|
2175 |
-
'$prevs = pq($node)->prevAll()->size();
|
2176 |
-
$index = 1+$prevs;
|
2177 |
-
$b = mb_strlen($param) > 3
|
2178 |
-
? $param{3}
|
2179 |
-
: 0;
|
2180 |
-
$a = $param{0};
|
2181 |
-
if ($b && $param{2} == "-")
|
2182 |
-
$b = -$b;
|
2183 |
-
if ($a > 0) {
|
2184 |
-
return ($index-$b)%$a == 0
|
2185 |
-
? $node
|
2186 |
-
: null;
|
2187 |
-
phpQuery::debug($a."*".floor($index/$a)."+$b-1 == ".($a*floor($index/$a)+$b-1)." ?= $prevs");
|
2188 |
-
return $a*floor($index/$a)+$b-1 == $prevs
|
2189 |
-
? $node
|
2190 |
-
: null;
|
2191 |
-
} else if ($a == 0)
|
2192 |
-
return $index == $b
|
2193 |
-
? $node
|
2194 |
-
: null;
|
2195 |
-
else
|
2196 |
-
// negative value
|
2197 |
-
return $index <= $b
|
2198 |
-
? $node
|
2199 |
-
: null;
|
2200 |
-
// if (! $b)
|
2201 |
-
// return $index%$a == 0
|
2202 |
-
// ? $node
|
2203 |
-
// : null;
|
2204 |
-
// else
|
2205 |
-
// return ($index-$b)%$a == 0
|
2206 |
-
// ? $node
|
2207 |
-
// : null;
|
2208 |
-
'),
|
2209 |
-
new CallbackParam(), $param
|
2210 |
-
);
|
2211 |
-
else
|
2212 |
-
// index
|
2213 |
-
$mapped = $this->map(
|
2214 |
-
create_function('$node, $index',
|
2215 |
-
'$prevs = pq($node)->prevAll()->size();
|
2216 |
-
if ($prevs && $prevs == $index-1)
|
2217 |
-
return $node;
|
2218 |
-
else if (! $prevs && $index == 1)
|
2219 |
-
return $node;
|
2220 |
-
else
|
2221 |
-
return null;'),
|
2222 |
-
new CallbackParam(), $param
|
2223 |
-
);
|
2224 |
-
$this->elements = $mapped->elements;
|
2225 |
-
break;
|
2226 |
-
default:
|
2227 |
-
$this->debug("Unknown pseudoclass '{$class}', skipping...");
|
2228 |
-
}
|
2229 |
-
}
|
2230 |
-
/**
|
2231 |
-
* @access private
|
2232 |
-
*/
|
2233 |
-
protected function __pseudoClassParam($paramsString) {
|
2234 |
-
// TODO;
|
2235 |
-
}
|
2236 |
-
/**
|
2237 |
-
* Enter description here...
|
2238 |
-
*
|
2239 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2240 |
-
*/
|
2241 |
-
public function is($selector, $nodes = null) {
|
2242 |
-
phpQuery::debug(array("Is:", $selector));
|
2243 |
-
if (! $selector)
|
2244 |
-
return false;
|
2245 |
-
$oldStack = $this->elements;
|
2246 |
-
$returnArray = false;
|
2247 |
-
if ($nodes && is_array($nodes)) {
|
2248 |
-
$this->elements = $nodes;
|
2249 |
-
} else if ($nodes)
|
2250 |
-
$this->elements = array($nodes);
|
2251 |
-
$this->filter($selector, true);
|
2252 |
-
$stack = $this->elements;
|
2253 |
-
$this->elements = $oldStack;
|
2254 |
-
if ($nodes)
|
2255 |
-
return $stack ? $stack : null;
|
2256 |
-
return (bool)count($stack);
|
2257 |
-
}
|
2258 |
-
/**
|
2259 |
-
* Enter description here...
|
2260 |
-
* jQuery difference.
|
2261 |
-
*
|
2262 |
-
* Callback:
|
2263 |
-
* - $index int
|
2264 |
-
* - $node DOMNode
|
2265 |
-
*
|
2266 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2267 |
-
* @link http://docs.jquery.com/Traversing/filter
|
2268 |
-
*/
|
2269 |
-
public function filterCallback($callback, $_skipHistory = false) {
|
2270 |
-
if (! $_skipHistory) {
|
2271 |
-
$this->elementsBackup = $this->elements;
|
2272 |
-
$this->debug("Filtering by callback");
|
2273 |
-
}
|
2274 |
-
$newStack = array();
|
2275 |
-
foreach($this->elements as $index => $node) {
|
2276 |
-
$result = phpQuery::callbackRun($callback, array($index, $node));
|
2277 |
-
if (is_null($result) || (! is_null($result) && $result))
|
2278 |
-
$newStack[] = $node;
|
2279 |
-
}
|
2280 |
-
$this->elements = $newStack;
|
2281 |
-
return $_skipHistory
|
2282 |
-
? $this
|
2283 |
-
: $this->newInstance();
|
2284 |
-
}
|
2285 |
-
/**
|
2286 |
-
* Enter description here...
|
2287 |
-
*
|
2288 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2289 |
-
* @link http://docs.jquery.com/Traversing/filter
|
2290 |
-
*/
|
2291 |
-
public function filter($selectors, $_skipHistory = false) {
|
2292 |
-
if ($selectors instanceof Callback OR $selectors instanceof Closure)
|
2293 |
-
return $this->filterCallback($selectors, $_skipHistory);
|
2294 |
-
if (! $_skipHistory)
|
2295 |
-
$this->elementsBackup = $this->elements;
|
2296 |
-
$notSimpleSelector = array(' ', '>', '~', '+', '/');
|
2297 |
-
if (! is_array($selectors))
|
2298 |
-
$selectors = $this->parseSelector($selectors);
|
2299 |
-
if (! $_skipHistory)
|
2300 |
-
$this->debug(array("Filtering:", $selectors));
|
2301 |
-
$finalStack = array();
|
2302 |
-
foreach($selectors as $selector) {
|
2303 |
-
$stack = array();
|
2304 |
-
if (! $selector)
|
2305 |
-
break;
|
2306 |
-
// avoid first space or /
|
2307 |
-
if (in_array($selector[0], $notSimpleSelector))
|
2308 |
-
$selector = array_slice($selector, 1);
|
2309 |
-
// PER NODE selector chunks
|
2310 |
-
foreach($this->stack() as $node) {
|
2311 |
-
$break = false;
|
2312 |
-
foreach($selector as $s) {
|
2313 |
-
if (!($node instanceof DOMELEMENT)) {
|
2314 |
-
// all besides DOMElement
|
2315 |
-
if ( $s[0] == '[') {
|
2316 |
-
$attr = trim($s, '[]');
|
2317 |
-
if ( mb_strpos($attr, '=')) {
|
2318 |
-
list( $attr, $val ) = explode('=', $attr);
|
2319 |
-
if ($attr == 'nodeType' && $node->nodeType != $val)
|
2320 |
-
$break = true;
|
2321 |
-
}
|
2322 |
-
} else
|
2323 |
-
$break = true;
|
2324 |
-
} else {
|
2325 |
-
// DOMElement only
|
2326 |
-
// ID
|
2327 |
-
if ( $s[0] == '#') {
|
2328 |
-
if ( $node->getAttribute('id') != substr($s, 1) )
|
2329 |
-
$break = true;
|
2330 |
-
// CLASSES
|
2331 |
-
} else if ( $s[0] == '.') {
|
2332 |
-
if (! $this->matchClasses( $s, $node ) )
|
2333 |
-
$break = true;
|
2334 |
-
// ATTRS
|
2335 |
-
} else if ( $s[0] == '[') {
|
2336 |
-
// strip side brackets
|
2337 |
-
$attr = trim($s, '[]');
|
2338 |
-
if (mb_strpos($attr, '=')) {
|
2339 |
-
list($attr, $val) = explode('=', $attr);
|
2340 |
-
$val = self::unQuote($val);
|
2341 |
-
if ($attr == 'nodeType') {
|
2342 |
-
if ($val != $node->nodeType)
|
2343 |
-
$break = true;
|
2344 |
-
} else if ($this->isRegexp($attr)) {
|
2345 |
-
$val = extension_loaded('mbstring') && phpQuery::$mbstringSupport
|
2346 |
-
? quotemeta(trim($val, '"\''))
|
2347 |
-
: preg_quote(trim($val, '"\''), '@');
|
2348 |
-
// switch last character
|
2349 |
-
switch( substr($attr, -1)) {
|
2350 |
-
// quotemeta used insted of preg_quote
|
2351 |
-
// http://code.google.com/p/phpquery/issues/detail?id=76
|
2352 |
-
case '^':
|
2353 |
-
$pattern = '^'.$val;
|
2354 |
-
break;
|
2355 |
-
case '*':
|
2356 |
-
$pattern = '.*'.$val.'.*';
|
2357 |
-
break;
|
2358 |
-
case '$':
|
2359 |
-
$pattern = '.*'.$val.'$';
|
2360 |
-
break;
|
2361 |
-
}
|
2362 |
-
// cut last character
|
2363 |
-
$attr = substr($attr, 0, -1);
|
2364 |
-
$isMatch = extension_loaded('mbstring') && in_array('mb_ereg_match', get_extension_funcs("mbstring")) && phpQuery::$mbstringSupport
|
2365 |
-
? mb_ereg_match($pattern, $node->getAttribute($attr))
|
2366 |
-
: preg_match("@{$pattern}@", $node->getAttribute($attr));
|
2367 |
-
if (! $isMatch)
|
2368 |
-
$break = true;
|
2369 |
-
} else if ($node->getAttribute($attr) != $val)
|
2370 |
-
$break = true;
|
2371 |
-
} else if (! $node->hasAttribute($attr))
|
2372 |
-
$break = true;
|
2373 |
-
// PSEUDO CLASSES
|
2374 |
-
} else if ( $s[0] == ':') {
|
2375 |
-
// skip
|
2376 |
-
// TAG
|
2377 |
-
} else if (trim($s)) {
|
2378 |
-
if ($s != '*') {
|
2379 |
-
// TODO namespaces
|
2380 |
-
if (isset($node->tagName)) {
|
2381 |
-
if ($node->tagName != $s)
|
2382 |
-
$break = true;
|
2383 |
-
} else if ($s == 'html' && ! $this->isRoot($node))
|
2384 |
-
$break = true;
|
2385 |
-
}
|
2386 |
-
// AVOID NON-SIMPLE SELECTORS
|
2387 |
-
} else if (in_array($s, $notSimpleSelector)) {
|
2388 |
-
$break = true;
|
2389 |
-
$this->debug(array('Skipping non simple selector', $selector));
|
2390 |
-
}
|
2391 |
-
}
|
2392 |
-
if ($break)
|
2393 |
-
break;
|
2394 |
-
}
|
2395 |
-
// if element passed all chunks of selector - add it to new stack
|
2396 |
-
if (! $break )
|
2397 |
-
$stack[] = $node;
|
2398 |
-
}
|
2399 |
-
$tmpStack = $this->elements;
|
2400 |
-
$this->elements = $stack;
|
2401 |
-
// PER ALL NODES selector chunks
|
2402 |
-
foreach($selector as $s)
|
2403 |
-
// PSEUDO CLASSES
|
2404 |
-
if ($s[0] == ':')
|
2405 |
-
$this->pseudoClasses($s);
|
2406 |
-
foreach($this->elements as $node)
|
2407 |
-
// XXX it should be merged without duplicates
|
2408 |
-
// but jQuery doesnt do that
|
2409 |
-
$finalStack[] = $node;
|
2410 |
-
$this->elements = $tmpStack;
|
2411 |
-
}
|
2412 |
-
$this->elements = $finalStack;
|
2413 |
-
if ($_skipHistory) {
|
2414 |
-
return $this;
|
2415 |
-
} else {
|
2416 |
-
$this->debug("Stack length after filter(): ".count($finalStack));
|
2417 |
-
return $this->newInstance();
|
2418 |
-
}
|
2419 |
-
}
|
2420 |
-
/**
|
2421 |
-
*
|
2422 |
-
* @param $value
|
2423 |
-
* @return unknown_type
|
2424 |
-
* @TODO implement in all methods using passed parameters
|
2425 |
-
*/
|
2426 |
-
protected static function unQuote($value) {
|
2427 |
-
return $value[0] == '\'' || $value[0] == '"'
|
2428 |
-
? substr($value, 1, -1)
|
2429 |
-
: $value;
|
2430 |
-
}
|
2431 |
-
/**
|
2432 |
-
* Enter description here...
|
2433 |
-
*
|
2434 |
-
* @link http://docs.jquery.com/Ajax/load
|
2435 |
-
* @return phpQuery|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2436 |
-
* @todo Support $selector
|
2437 |
-
*/
|
2438 |
-
public function load($url, $data = null, $callback = null) {
|
2439 |
-
if ($data && ! is_array($data)) {
|
2440 |
-
$callback = $data;
|
2441 |
-
$data = null;
|
2442 |
-
}
|
2443 |
-
if (mb_strpos($url, ' ') !== false) {
|
2444 |
-
$matches = null;
|
2445 |
-
if (extension_loaded('mbstring') && in_array('mb_ereg', get_extension_funcs("mbstring")) && phpQuery::$mbstringSupport)
|
2446 |
-
mb_ereg('^([^ ]+) (.*)$', $url, $matches);
|
2447 |
-
else
|
2448 |
-
preg_match('^([^ ]+) (.*)$', $url, $matches);
|
2449 |
-
$url = $matches[1];
|
2450 |
-
$selector = $matches[2];
|
2451 |
-
// FIXME this sucks, pass as callback param
|
2452 |
-
$this->_loadSelector = $selector;
|
2453 |
-
}
|
2454 |
-
$ajax = array(
|
2455 |
-
'url' => $url,
|
2456 |
-
'type' => $data ? 'POST' : 'GET',
|
2457 |
-
'data' => $data,
|
2458 |
-
'complete' => $callback,
|
2459 |
-
'success' => array($this, '__loadSuccess')
|
2460 |
-
);
|
2461 |
-
phpQuery::ajax($ajax);
|
2462 |
-
return $this;
|
2463 |
-
}
|
2464 |
-
/**
|
2465 |
-
* @access private
|
2466 |
-
* @param $html
|
2467 |
-
* @return unknown_type
|
2468 |
-
*/
|
2469 |
-
public function __loadSuccess($html) {
|
2470 |
-
if ($this->_loadSelector) {
|
2471 |
-
$html = phpQuery::newDocument($html)->find($this->_loadSelector);
|
2472 |
-
unset($this->_loadSelector);
|
2473 |
-
}
|
2474 |
-
foreach($this->stack(1) as $node) {
|
2475 |
-
phpQuery::pq($node, $this->getDocumentID())
|
2476 |
-
->markup($html);
|
2477 |
-
}
|
2478 |
-
}
|
2479 |
-
/**
|
2480 |
-
* Enter description here...
|
2481 |
-
*
|
2482 |
-
* @return phpQuery|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2483 |
-
* @todo
|
2484 |
-
*/
|
2485 |
-
public function css() {
|
2486 |
-
// TODO
|
2487 |
-
return $this;
|
2488 |
-
}
|
2489 |
-
/**
|
2490 |
-
* @todo
|
2491 |
-
*
|
2492 |
-
*/
|
2493 |
-
public function show(){
|
2494 |
-
// TODO
|
2495 |
-
return $this;
|
2496 |
-
}
|
2497 |
-
/**
|
2498 |
-
* @todo
|
2499 |
-
*
|
2500 |
-
*/
|
2501 |
-
public function hide(){
|
2502 |
-
// TODO
|
2503 |
-
return $this;
|
2504 |
-
}
|
2505 |
-
/**
|
2506 |
-
* Trigger a type of event on every matched element.
|
2507 |
-
*
|
2508 |
-
* @param unknown_type $type
|
2509 |
-
* @param unknown_type $data
|
2510 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2511 |
-
* @TODO support more than event in $type (space-separated)
|
2512 |
-
*/
|
2513 |
-
public function trigger($type, $data = array()) {
|
2514 |
-
foreach($this->elements as $node)
|
2515 |
-
phpQueryEvents::trigger($this->getDocumentID(), $type, $data, $node);
|
2516 |
-
return $this;
|
2517 |
-
}
|
2518 |
-
/**
|
2519 |
-
* This particular method triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browsers default actions.
|
2520 |
-
*
|
2521 |
-
* @param unknown_type $type
|
2522 |
-
* @param unknown_type $data
|
2523 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2524 |
-
* @TODO
|
2525 |
-
*/
|
2526 |
-
public function triggerHandler($type, $data = array()) {
|
2527 |
-
// TODO;
|
2528 |
-
}
|
2529 |
-
/**
|
2530 |
-
* Binds a handler to one or more events (like click) for each matched element.
|
2531 |
-
* Can also bind custom events.
|
2532 |
-
*
|
2533 |
-
* @param unknown_type $type
|
2534 |
-
* @param unknown_type $data Optional
|
2535 |
-
* @param unknown_type $callback
|
2536 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2537 |
-
* @TODO support '!' (exclusive) events
|
2538 |
-
* @TODO support more than event in $type (space-separated)
|
2539 |
-
*/
|
2540 |
-
public function bind($type, $data, $callback = null) {
|
2541 |
-
// TODO check if $data is callable, not using is_callable
|
2542 |
-
if (! isset($callback)) {
|
2543 |
-
$callback = $data;
|
2544 |
-
$data = null;
|
2545 |
-
}
|
2546 |
-
foreach($this->elements as $node)
|
2547 |
-
phpQueryEvents::add($this->getDocumentID(), $node, $type, $data, $callback);
|
2548 |
-
return $this;
|
2549 |
-
}
|
2550 |
-
/**
|
2551 |
-
* Enter description here...
|
2552 |
-
*
|
2553 |
-
* @param unknown_type $type
|
2554 |
-
* @param unknown_type $callback
|
2555 |
-
* @return unknown
|
2556 |
-
* @TODO namespace events
|
2557 |
-
* @TODO support more than event in $type (space-separated)
|
2558 |
-
*/
|
2559 |
-
public function unbind($type = null, $callback = null) {
|
2560 |
-
foreach($this->elements as $node)
|
2561 |
-
phpQueryEvents::remove($this->getDocumentID(), $node, $type, $callback);
|
2562 |
-
return $this;
|
2563 |
-
}
|
2564 |
-
/**
|
2565 |
-
* Enter description here...
|
2566 |
-
*
|
2567 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2568 |
-
*/
|
2569 |
-
public function change($callback = null) {
|
2570 |
-
if ($callback)
|
2571 |
-
return $this->bind('change', $callback);
|
2572 |
-
return $this->trigger('change');
|
2573 |
-
}
|
2574 |
-
/**
|
2575 |
-
* Enter description here...
|
2576 |
-
*
|
2577 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2578 |
-
*/
|
2579 |
-
public function submit($callback = null) {
|
2580 |
-
if ($callback)
|
2581 |
-
return $this->bind('submit', $callback);
|
2582 |
-
return $this->trigger('submit');
|
2583 |
-
}
|
2584 |
-
/**
|
2585 |
-
* Enter description here...
|
2586 |
-
*
|
2587 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2588 |
-
*/
|
2589 |
-
public function click($callback = null) {
|
2590 |
-
if ($callback)
|
2591 |
-
return $this->bind('click', $callback);
|
2592 |
-
return $this->trigger('click');
|
2593 |
-
}
|
2594 |
-
/**
|
2595 |
-
* Enter description here...
|
2596 |
-
*
|
2597 |
-
* @param String|phpQuery
|
2598 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2599 |
-
*/
|
2600 |
-
public function wrapAllOld($wrapper) {
|
2601 |
-
$wrapper = pq($wrapper)->_clone();
|
2602 |
-
if (! $wrapper->length() || ! $this->length() )
|
2603 |
-
return $this;
|
2604 |
-
$wrapper->insertBefore($this->elements[0]);
|
2605 |
-
$deepest = $wrapper->elements[0];
|
2606 |
-
while($deepest->firstChild && $deepest->firstChild instanceof DOMELEMENT)
|
2607 |
-
$deepest = $deepest->firstChild;
|
2608 |
-
pq($deepest)->append($this);
|
2609 |
-
return $this;
|
2610 |
-
}
|
2611 |
-
/**
|
2612 |
-
* Enter description here...
|
2613 |
-
*
|
2614 |
-
* TODO testme...
|
2615 |
-
* @param String|phpQuery
|
2616 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2617 |
-
*/
|
2618 |
-
public function wrapAll($wrapper) {
|
2619 |
-
if (! $this->length())
|
2620 |
-
return $this;
|
2621 |
-
return phpQuery::pq($wrapper, $this->getDocumentID())
|
2622 |
-
->clone()
|
2623 |
-
->insertBefore($this->get(0))
|
2624 |
-
->map(array($this, '___wrapAllCallback'))
|
2625 |
-
->append($this);
|
2626 |
-
}
|
2627 |
-
/**
|
2628 |
-
*
|
2629 |
-
* @param $node
|
2630 |
-
* @return unknown_type
|
2631 |
-
* @access private
|
2632 |
-
*/
|
2633 |
-
public function ___wrapAllCallback($node) {
|
2634 |
-
$deepest = $node;
|
2635 |
-
while($deepest->firstChild && $deepest->firstChild instanceof DOMELEMENT)
|
2636 |
-
$deepest = $deepest->firstChild;
|
2637 |
-
return $deepest;
|
2638 |
-
}
|
2639 |
-
/**
|
2640 |
-
* Enter description here...
|
2641 |
-
* NON JQUERY METHOD
|
2642 |
-
*
|
2643 |
-
* @param String|phpQuery
|
2644 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2645 |
-
*/
|
2646 |
-
public function wrapAllPHP($codeBefore, $codeAfter) {
|
2647 |
-
return $this
|
2648 |
-
->slice(0, 1)
|
2649 |
-
->beforePHP($codeBefore)
|
2650 |
-
->end()
|
2651 |
-
->slice(-1)
|
2652 |
-
->afterPHP($codeAfter)
|
2653 |
-
->end();
|
2654 |
-
}
|
2655 |
-
/**
|
2656 |
-
* Enter description here...
|
2657 |
-
*
|
2658 |
-
* @param String|phpQuery
|
2659 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2660 |
-
*/
|
2661 |
-
public function wrap($wrapper) {
|
2662 |
-
foreach($this->stack() as $node)
|
2663 |
-
phpQuery::pq($node, $this->getDocumentID())->wrapAll($wrapper);
|
2664 |
-
return $this;
|
2665 |
-
}
|
2666 |
-
/**
|
2667 |
-
* Enter description here...
|
2668 |
-
*
|
2669 |
-
* @param String|phpQuery
|
2670 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2671 |
-
*/
|
2672 |
-
public function wrapPHP($codeBefore, $codeAfter) {
|
2673 |
-
foreach($this->stack() as $node)
|
2674 |
-
phpQuery::pq($node, $this->getDocumentID())->wrapAllPHP($codeBefore, $codeAfter);
|
2675 |
-
return $this;
|
2676 |
-
}
|
2677 |
-
/**
|
2678 |
-
* Enter description here...
|
2679 |
-
*
|
2680 |
-
* @param String|phpQuery
|
2681 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2682 |
-
*/
|
2683 |
-
public function wrapInner($wrapper) {
|
2684 |
-
foreach($this->stack() as $node)
|
2685 |
-
phpQuery::pq($node, $this->getDocumentID())->contents()->wrapAll($wrapper);
|
2686 |
-
return $this;
|
2687 |
-
}
|
2688 |
-
/**
|
2689 |
-
* Enter description here...
|
2690 |
-
*
|
2691 |
-
* @param String|phpQuery
|
2692 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2693 |
-
*/
|
2694 |
-
public function wrapInnerPHP($codeBefore, $codeAfter) {
|
2695 |
-
foreach($this->stack(1) as $node)
|
2696 |
-
phpQuery::pq($node, $this->getDocumentID())->contents()
|
2697 |
-
->wrapAllPHP($codeBefore, $codeAfter);
|
2698 |
-
return $this;
|
2699 |
-
}
|
2700 |
-
/**
|
2701 |
-
* Enter description here...
|
2702 |
-
*
|
2703 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2704 |
-
* @testme Support for text nodes
|
2705 |
-
*/
|
2706 |
-
public function contents() {
|
2707 |
-
$stack = array();
|
2708 |
-
foreach($this->stack(1) as $el) {
|
2709 |
-
// FIXME (fixed) http://code.google.com/p/phpquery/issues/detail?id=56
|
2710 |
-
// if (! isset($el->childNodes))
|
2711 |
-
// continue;
|
2712 |
-
foreach($el->childNodes as $node) {
|
2713 |
-
$stack[] = $node;
|
2714 |
-
}
|
2715 |
-
}
|
2716 |
-
return $this->newInstance($stack);
|
2717 |
-
}
|
2718 |
-
/**
|
2719 |
-
* Enter description here...
|
2720 |
-
*
|
2721 |
-
* jQuery difference.
|
2722 |
-
*
|
2723 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2724 |
-
*/
|
2725 |
-
public function contentsUnwrap() {
|
2726 |
-
foreach($this->stack(1) as $node) {
|
2727 |
-
if (! $node->parentNode )
|
2728 |
-
continue;
|
2729 |
-
$childNodes = array();
|
2730 |
-
// any modification in DOM tree breaks childNodes iteration, so cache them first
|
2731 |
-
foreach($node->childNodes as $chNode )
|
2732 |
-
$childNodes[] = $chNode;
|
2733 |
-
foreach($childNodes as $chNode )
|
2734 |
-
// $node->parentNode->appendChild($chNode);
|
2735 |
-
$node->parentNode->insertBefore($chNode, $node);
|
2736 |
-
$node->parentNode->removeChild($node);
|
2737 |
-
}
|
2738 |
-
return $this;
|
2739 |
-
}
|
2740 |
-
/**
|
2741 |
-
* Enter description here...
|
2742 |
-
*
|
2743 |
-
* jQuery difference.
|
2744 |
-
*/
|
2745 |
-
public function switchWith($markup) {
|
2746 |
-
$markup = pq($markup, $this->getDocumentID());
|
2747 |
-
$content = null;
|
2748 |
-
foreach($this->stack(1) as $node) {
|
2749 |
-
pq($node)
|
2750 |
-
->contents()->toReference($content)->end()
|
2751 |
-
->replaceWith($markup->clone()->append($content));
|
2752 |
-
}
|
2753 |
-
return $this;
|
2754 |
-
}
|
2755 |
-
/**
|
2756 |
-
* Enter description here...
|
2757 |
-
*
|
2758 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2759 |
-
*/
|
2760 |
-
public function eq($num) {
|
2761 |
-
$oldStack = $this->elements;
|
2762 |
-
$this->elementsBackup = $this->elements;
|
2763 |
-
$this->elements = array();
|
2764 |
-
if ( isset($oldStack[$num]) )
|
2765 |
-
$this->elements[] = $oldStack[$num];
|
2766 |
-
return $this->newInstance();
|
2767 |
-
}
|
2768 |
-
/**
|
2769 |
-
* Enter description here...
|
2770 |
-
*
|
2771 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2772 |
-
*/
|
2773 |
-
public function size() {
|
2774 |
-
return count($this->elements);
|
2775 |
-
}
|
2776 |
-
/**
|
2777 |
-
* Enter description here...
|
2778 |
-
*
|
2779 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2780 |
-
* @deprecated Use length as attribute
|
2781 |
-
*/
|
2782 |
-
public function length() {
|
2783 |
-
return $this->size();
|
2784 |
-
}
|
2785 |
-
public function count() {
|
2786 |
-
return $this->size();
|
2787 |
-
}
|
2788 |
-
/**
|
2789 |
-
* Enter description here...
|
2790 |
-
*
|
2791 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2792 |
-
* @todo $level
|
2793 |
-
*/
|
2794 |
-
public function end($level = 1) {
|
2795 |
-
// $this->elements = array_pop( $this->history );
|
2796 |
-
// return $this;
|
2797 |
-
// $this->previous->DOM = $this->DOM;
|
2798 |
-
// $this->previous->XPath = $this->XPath;
|
2799 |
-
return $this->previous
|
2800 |
-
? $this->previous
|
2801 |
-
: $this;
|
2802 |
-
}
|
2803 |
-
/**
|
2804 |
-
* Enter description here...
|
2805 |
-
* Normal use ->clone() .
|
2806 |
-
*
|
2807 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2808 |
-
* @access private
|
2809 |
-
*/
|
2810 |
-
public function _clone() {
|
2811 |
-
$newStack = array();
|
2812 |
-
//pr(array('copy... ', $this->whois()));
|
2813 |
-
//$this->dumpHistory('copy');
|
2814 |
-
$this->elementsBackup = $this->elements;
|
2815 |
-
foreach($this->elements as $node) {
|
2816 |
-
$newStack[] = $node->cloneNode(true);
|
2817 |
-
}
|
2818 |
-
$this->elements = $newStack;
|
2819 |
-
return $this->newInstance();
|
2820 |
-
}
|
2821 |
-
/**
|
2822 |
-
* Enter description here...
|
2823 |
-
*
|
2824 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2825 |
-
*/
|
2826 |
-
public function replaceWithPHP($code) {
|
2827 |
-
return $this->replaceWith(phpQuery::php($code));
|
2828 |
-
}
|
2829 |
-
/**
|
2830 |
-
* Enter description here...
|
2831 |
-
*
|
2832 |
-
* @param String|phpQuery $content
|
2833 |
-
* @link http://docs.jquery.com/Manipulation/replaceWith#content
|
2834 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2835 |
-
*/
|
2836 |
-
public function replaceWith($content) {
|
2837 |
-
return $this->after($content)->remove();
|
2838 |
-
}
|
2839 |
-
/**
|
2840 |
-
* Enter description here...
|
2841 |
-
*
|
2842 |
-
* @param String $selector
|
2843 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2844 |
-
* @todo this works ?
|
2845 |
-
*/
|
2846 |
-
public function replaceAll($selector) {
|
2847 |
-
foreach(phpQuery::pq($selector, $this->getDocumentID()) as $node)
|
2848 |
-
phpQuery::pq($node, $this->getDocumentID())
|
2849 |
-
->after($this->_clone())
|
2850 |
-
->remove();
|
2851 |
-
return $this;
|
2852 |
-
}
|
2853 |
-
/**
|
2854 |
-
* Enter description here...
|
2855 |
-
*
|
2856 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2857 |
-
*/
|
2858 |
-
public function remove($selector = null) {
|
2859 |
-
$loop = $selector
|
2860 |
-
? $this->filter($selector)->elements
|
2861 |
-
: $this->elements;
|
2862 |
-
foreach($loop as $node) {
|
2863 |
-
if (! $node->parentNode )
|
2864 |
-
continue;
|
2865 |
-
if (isset($node->tagName))
|
2866 |
-
$this->debug("Removing '{$node->tagName}'");
|
2867 |
-
$node->parentNode->removeChild($node);
|
2868 |
-
// Mutation event
|
2869 |
-
$event = new DOMEvent(array(
|
2870 |
-
'target' => $node,
|
2871 |
-
'type' => 'DOMNodeRemoved'
|
2872 |
-
));
|
2873 |
-
phpQueryEvents::trigger($this->getDocumentID(),
|
2874 |
-
$event->type, array($event), $node
|
2875 |
-
);
|
2876 |
-
}
|
2877 |
-
return $this;
|
2878 |
-
}
|
2879 |
-
protected function markupEvents($newMarkup, $oldMarkup, $node) {
|
2880 |
-
if ($node->tagName == 'textarea' && $newMarkup != $oldMarkup) {
|
2881 |
-
$event = new DOMEvent(array(
|
2882 |
-
'target' => $node,
|
2883 |
-
'type' => 'change'
|
2884 |
-
));
|
2885 |
-
phpQueryEvents::trigger($this->getDocumentID(),
|
2886 |
-
$event->type, array($event), $node
|
2887 |
-
);
|
2888 |
-
}
|
2889 |
-
}
|
2890 |
-
/**
|
2891 |
-
* jQuey difference
|
2892 |
-
*
|
2893 |
-
* @param $markup
|
2894 |
-
* @return unknown_type
|
2895 |
-
* @TODO trigger change event for textarea
|
2896 |
-
*/
|
2897 |
-
public function markup($markup = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
2898 |
-
$args = func_get_args();
|
2899 |
-
if ($this->documentWrapper->isXML)
|
2900 |
-
return call_user_func_array(array($this, 'xml'), $args);
|
2901 |
-
else
|
2902 |
-
return call_user_func_array(array($this, 'html'), $args);
|
2903 |
-
}
|
2904 |
-
/**
|
2905 |
-
* jQuey difference
|
2906 |
-
*
|
2907 |
-
* @param $markup
|
2908 |
-
* @return unknown_type
|
2909 |
-
*/
|
2910 |
-
public function markupOuter($callback1 = null, $callback2 = null, $callback3 = null) {
|
2911 |
-
$args = func_get_args();
|
2912 |
-
if ($this->documentWrapper->isXML)
|
2913 |
-
return call_user_func_array(array($this, 'xmlOuter'), $args);
|
2914 |
-
else
|
2915 |
-
return call_user_func_array(array($this, 'htmlOuter'), $args);
|
2916 |
-
}
|
2917 |
-
/**
|
2918 |
-
* Enter description here...
|
2919 |
-
*
|
2920 |
-
* @param unknown_type $html
|
2921 |
-
* @return string|phpQuery|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2922 |
-
* @TODO force html result
|
2923 |
-
*/
|
2924 |
-
public function html($html = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
2925 |
-
if (isset($html)) {
|
2926 |
-
// INSERT
|
2927 |
-
$nodes = $this->documentWrapper->import($html);
|
2928 |
-
$this->empty();
|
2929 |
-
foreach($this->stack(1) as $alreadyAdded => $node) {
|
2930 |
-
// for now, limit events for textarea
|
2931 |
-
if (($this->isXHTML() || $this->isHTML()) && $node->tagName == 'textarea')
|
2932 |
-
$oldHtml = pq($node, $this->getDocumentID())->markup();
|
2933 |
-
foreach($nodes as $newNode) {
|
2934 |
-
$node->appendChild($alreadyAdded
|
2935 |
-
? $newNode->cloneNode(true)
|
2936 |
-
: $newNode
|
2937 |
-
);
|
2938 |
-
}
|
2939 |
-
// for now, limit events for textarea
|
2940 |
-
if (($this->isXHTML() || $this->isHTML()) && $node->tagName == 'textarea')
|
2941 |
-
$this->markupEvents($html, $oldHtml, $node);
|
2942 |
-
}
|
2943 |
-
return $this;
|
2944 |
-
} else {
|
2945 |
-
// FETCH
|
2946 |
-
$return = $this->documentWrapper->markup($this->elements, true);
|
2947 |
-
$args = func_get_args();
|
2948 |
-
foreach(array_slice($args, 1) as $callback) {
|
2949 |
-
$return = phpQuery::callbackRun($callback, array($return));
|
2950 |
-
}
|
2951 |
-
return $return;
|
2952 |
-
}
|
2953 |
-
}
|
2954 |
-
/**
|
2955 |
-
* @TODO force xml result
|
2956 |
-
*/
|
2957 |
-
public function xml($xml = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
2958 |
-
$args = func_get_args();
|
2959 |
-
return call_user_func_array(array($this, 'html'), $args);
|
2960 |
-
}
|
2961 |
-
/**
|
2962 |
-
* Enter description here...
|
2963 |
-
* @TODO force html result
|
2964 |
-
*
|
2965 |
-
* @return String
|
2966 |
-
*/
|
2967 |
-
public function htmlOuter($callback1 = null, $callback2 = null, $callback3 = null) {
|
2968 |
-
$markup = $this->documentWrapper->markup($this->elements);
|
2969 |
-
// pass thou callbacks
|
2970 |
-
$args = func_get_args();
|
2971 |
-
foreach($args as $callback) {
|
2972 |
-
$markup = phpQuery::callbackRun($callback, array($markup));
|
2973 |
-
}
|
2974 |
-
return $markup;
|
2975 |
-
}
|
2976 |
-
/**
|
2977 |
-
* @TODO force xml result
|
2978 |
-
*/
|
2979 |
-
public function xmlOuter($callback1 = null, $callback2 = null, $callback3 = null) {
|
2980 |
-
$args = func_get_args();
|
2981 |
-
return call_user_func_array(array($this, 'htmlOuter'), $args);
|
2982 |
-
}
|
2983 |
-
public function __toString() {
|
2984 |
-
return $this->markupOuter();
|
2985 |
-
}
|
2986 |
-
/**
|
2987 |
-
* Just like html(), but returns markup with VALID (dangerous) PHP tags.
|
2988 |
-
*
|
2989 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2990 |
-
* @todo support returning markup with PHP tags when called without param
|
2991 |
-
*/
|
2992 |
-
public function php($code = null) {
|
2993 |
-
return $this->markupPHP($code);
|
2994 |
-
}
|
2995 |
-
/**
|
2996 |
-
* Enter description here...
|
2997 |
-
*
|
2998 |
-
* @param $code
|
2999 |
-
* @return unknown_type
|
3000 |
-
*/
|
3001 |
-
public function markupPHP($code = null) {
|
3002 |
-
return isset($code)
|
3003 |
-
? $this->markup(phpQuery::php($code))
|
3004 |
-
: phpQuery::markupToPHP($this->markup());
|
3005 |
-
}
|
3006 |
-
/**
|
3007 |
-
* Enter description here...
|
3008 |
-
*
|
3009 |
-
* @param $code
|
3010 |
-
* @return unknown_type
|
3011 |
-
*/
|
3012 |
-
public function markupOuterPHP() {
|
3013 |
-
return phpQuery::markupToPHP($this->markupOuter());
|
3014 |
-
}
|
3015 |
-
/**
|
3016 |
-
* Enter description here...
|
3017 |
-
*
|
3018 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3019 |
-
*/
|
3020 |
-
public function children($selector = null) {
|
3021 |
-
$stack = array();
|
3022 |
-
foreach($this->stack(1) as $node) {
|
3023 |
-
// foreach($node->getElementsByTagName('*') as $newNode) {
|
3024 |
-
foreach($node->childNodes as $newNode) {
|
3025 |
-
if ($newNode->nodeType != 1)
|
3026 |
-
continue;
|
3027 |
-
if ($selector && ! $this->is($selector, $newNode))
|
3028 |
-
continue;
|
3029 |
-
if ($this->elementsContainsNode($newNode, $stack))
|
3030 |
-
continue;
|
3031 |
-
$stack[] = $newNode;
|
3032 |
-
}
|
3033 |
-
}
|
3034 |
-
$this->elementsBackup = $this->elements;
|
3035 |
-
$this->elements = $stack;
|
3036 |
-
return $this->newInstance();
|
3037 |
-
}
|
3038 |
-
/**
|
3039 |
-
* Enter description here...
|
3040 |
-
*
|
3041 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3042 |
-
*/
|
3043 |
-
public function ancestors($selector = null) {
|
3044 |
-
return $this->children( $selector );
|
3045 |
-
}
|
3046 |
-
/**
|
3047 |
-
* Enter description here...
|
3048 |
-
*
|
3049 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3050 |
-
*/
|
3051 |
-
public function append( $content) {
|
3052 |
-
return $this->insert($content, __FUNCTION__);
|
3053 |
-
}
|
3054 |
-
/**
|
3055 |
-
* Enter description here...
|
3056 |
-
*
|
3057 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3058 |
-
*/
|
3059 |
-
public function appendPHP( $content) {
|
3060 |
-
return $this->insert("<php><!-- {$content} --></php>", 'append');
|
3061 |
-
}
|
3062 |
-
/**
|
3063 |
-
* Enter description here...
|
3064 |
-
*
|
3065 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3066 |
-
*/
|
3067 |
-
public function appendTo( $seletor) {
|
3068 |
-
return $this->insert($seletor, __FUNCTION__);
|
3069 |
-
}
|
3070 |
-
/**
|
3071 |
-
* Enter description here...
|
3072 |
-
*
|
3073 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3074 |
-
*/
|
3075 |
-
public function prepend( $content) {
|
3076 |
-
return $this->insert($content, __FUNCTION__);
|
3077 |
-
}
|
3078 |
-
/**
|
3079 |
-
* Enter description here...
|
3080 |
-
*
|
3081 |
-
* @todo accept many arguments, which are joined, arrays maybe also
|
3082 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3083 |
-
*/
|
3084 |
-
public function prependPHP( $content) {
|
3085 |
-
return $this->insert("<php><!-- {$content} --></php>", 'prepend');
|
3086 |
-
}
|
3087 |
-
/**
|
3088 |
-
* Enter description here...
|
3089 |
-
*
|
3090 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3091 |
-
*/
|
3092 |
-
public function prependTo( $seletor) {
|
3093 |
-
return $this->insert($seletor, __FUNCTION__);
|
3094 |
-
}
|
3095 |
-
/**
|
3096 |
-
* Enter description here...
|
3097 |
-
*
|
3098 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3099 |
-
*/
|
3100 |
-
public function before($content) {
|
3101 |
-
return $this->insert($content, __FUNCTION__);
|
3102 |
-
}
|
3103 |
-
/**
|
3104 |
-
* Enter description here...
|
3105 |
-
*
|
3106 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3107 |
-
*/
|
3108 |
-
public function beforePHP( $content) {
|
3109 |
-
return $this->insert("<php><!-- {$content} --></php>", 'before');
|
3110 |
-
}
|
3111 |
-
/**
|
3112 |
-
* Enter description here...
|
3113 |
-
*
|
3114 |
-
* @param String|phpQuery
|
3115 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3116 |
-
*/
|
3117 |
-
public function insertBefore( $seletor) {
|
3118 |
-
return $this->insert($seletor, __FUNCTION__);
|
3119 |
-
}
|
3120 |
-
/**
|
3121 |
-
* Enter description here...
|
3122 |
-
*
|
3123 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3124 |
-
*/
|
3125 |
-
public function after( $content) {
|
3126 |
-
return $this->insert($content, __FUNCTION__);
|
3127 |
-
}
|
3128 |
-
/**
|
3129 |
-
* Enter description here...
|
3130 |
-
*
|
3131 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3132 |
-
*/
|
3133 |
-
public function afterPHP( $content) {
|
3134 |
-
return $this->insert("<php><!-- {$content} --></php>", 'after');
|
3135 |
-
}
|
3136 |
-
/**
|
3137 |
-
* Enter description here...
|
3138 |
-
*
|
3139 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3140 |
-
*/
|
3141 |
-
public function insertAfter( $seletor) {
|
3142 |
-
return $this->insert($seletor, __FUNCTION__);
|
3143 |
-
}
|
3144 |
-
/**
|
3145 |
-
* Internal insert method. Don't use it.
|
3146 |
-
*
|
3147 |
-
* @param unknown_type $target
|
3148 |
-
* @param unknown_type $type
|
3149 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3150 |
-
* @access private
|
3151 |
-
*/
|
3152 |
-
public function insert($target, $type) {
|
3153 |
-
$this->debug("Inserting data with '{$type}'");
|
3154 |
-
$to = false;
|
3155 |
-
switch( $type) {
|
3156 |
-
case 'appendTo':
|
3157 |
-
case 'prependTo':
|
3158 |
-
case 'insertBefore':
|
3159 |
-
case 'insertAfter':
|
3160 |
-
$to = true;
|
3161 |
-
}
|
3162 |
-
switch(gettype($target)) {
|
3163 |
-
case 'string':
|
3164 |
-
$insertFrom = $insertTo = array();
|
3165 |
-
if ($to) {
|
3166 |
-
// INSERT TO
|
3167 |
-
$insertFrom = $this->elements;
|
3168 |
-
if (phpQuery::isMarkup($target)) {
|
3169 |
-
// $target is new markup, import it
|
3170 |
-
$insertTo = $this->documentWrapper->import($target);
|
3171 |
-
// insert into selected element
|
3172 |
-
} else {
|
3173 |
-
// $tagret is a selector
|
3174 |
-
$thisStack = $this->elements;
|
3175 |
-
$this->toRoot();
|
3176 |
-
$insertTo = $this->find($target)->elements;
|
3177 |
-
$this->elements = $thisStack;
|
3178 |
-
}
|
3179 |
-
} else {
|
3180 |
-
// INSERT FROM
|
3181 |
-
$insertTo = $this->elements;
|
3182 |
-
$insertFrom = $this->documentWrapper->import($target);
|
3183 |
-
}
|
3184 |
-
break;
|
3185 |
-
case 'object':
|
3186 |
-
$insertFrom = $insertTo = array();
|
3187 |
-
// phpQuery
|
3188 |
-
if ($target instanceof self) {
|
3189 |
-
if ($to) {
|
3190 |
-
$insertTo = $target->elements;
|
3191 |
-
if ($this->documentFragment && $this->stackIsRoot())
|
3192 |
-
// get all body children
|
3193 |
-
// $loop = $this->find('body > *')->elements;
|
3194 |
-
// TODO test it, test it hard...
|
3195 |
-
// $loop = $this->newInstance($this->root)->find('> *')->elements;
|
3196 |
-
$loop = $this->root->childNodes;
|
3197 |
-
else
|
3198 |
-
$loop = $this->elements;
|
3199 |
-
// import nodes if needed
|
3200 |
-
$insertFrom = $this->getDocumentID() == $target->getDocumentID()
|
3201 |
-
? $loop
|
3202 |
-
: $target->documentWrapper->import($loop);
|
3203 |
-
} else {
|
3204 |
-
$insertTo = $this->elements;
|
3205 |
-
if ( $target->documentFragment && $target->stackIsRoot() )
|
3206 |
-
// get all body children
|
3207 |
-
// $loop = $target->find('body > *')->elements;
|
3208 |
-
$loop = $target->root->childNodes;
|
3209 |
-
else
|
3210 |
-
$loop = $target->elements;
|
3211 |
-
// import nodes if needed
|
3212 |
-
$insertFrom = $this->getDocumentID() == $target->getDocumentID()
|
3213 |
-
? $loop
|
3214 |
-
: $this->documentWrapper->import($loop);
|
3215 |
-
}
|
3216 |
-
// DOMNODE
|
3217 |
-
} elseif ($target instanceof DOMNODE) {
|
3218 |
-
// import node if needed
|
3219 |
-
// if ( $target->ownerDocument != $this->DOM )
|
3220 |
-
// $target = $this->DOM->importNode($target, true);
|
3221 |
-
if ( $to) {
|
3222 |
-
$insertTo = array($target);
|
3223 |
-
if ($this->documentFragment && $this->stackIsRoot())
|
3224 |
-
// get all body children
|
3225 |
-
$loop = $this->root->childNodes;
|
3226 |
-
// $loop = $this->find('body > *')->elements;
|
3227 |
-
else
|
3228 |
-
$loop = $this->elements;
|
3229 |
-
foreach($loop as $fromNode)
|
3230 |
-
// import nodes if needed
|
3231 |
-
$insertFrom[] = ! $fromNode->ownerDocument->isSameNode($target->ownerDocument)
|
3232 |
-
? $target->ownerDocument->importNode($fromNode, true)
|
3233 |
-
: $fromNode;
|
3234 |
-
} else {
|
3235 |
-
// import node if needed
|
3236 |
-
if (! $target->ownerDocument->isSameNode($this->document))
|
3237 |
-
$target = $this->document->importNode($target, true);
|
3238 |
-
$insertTo = $this->elements;
|
3239 |
-
$insertFrom[] = $target;
|
3240 |
-
}
|
3241 |
-
}
|
3242 |
-
break;
|
3243 |
-
}
|
3244 |
-
phpQuery::debug("From ".count($insertFrom)."; To ".count($insertTo)." nodes");
|
3245 |
-
foreach($insertTo as $insertNumber => $toNode) {
|
3246 |
-
// we need static relative elements in some cases
|
3247 |
-
switch( $type) {
|
3248 |
-
case 'prependTo':
|
3249 |
-
case 'prepend':
|
3250 |
-
$firstChild = $toNode->firstChild;
|
3251 |
-
break;
|
3252 |
-
case 'insertAfter':
|
3253 |
-
case 'after':
|
3254 |
-
$nextSibling = $toNode->nextSibling;
|
3255 |
-
break;
|
3256 |
-
}
|
3257 |
-
foreach($insertFrom as $fromNode) {
|
3258 |
-
// clone if inserted already before
|
3259 |
-
$insert = $insertNumber
|
3260 |
-
? $fromNode->cloneNode(true)
|
3261 |
-
: $fromNode;
|
3262 |
-
switch($type) {
|
3263 |
-
case 'appendTo':
|
3264 |
-
case 'append':
|
3265 |
-
// $toNode->insertBefore(
|
3266 |
-
// $fromNode,
|
3267 |
-
// $toNode->lastChild->nextSibling
|
3268 |
-
// );
|
3269 |
-
$toNode->appendChild($insert);
|
3270 |
-
$eventTarget = $insert;
|
3271 |
-
break;
|
3272 |
-
case 'prependTo':
|
3273 |
-
case 'prepend':
|
3274 |
-
$toNode->insertBefore(
|
3275 |
-
$insert,
|
3276 |
-
$firstChild
|
3277 |
-
);
|
3278 |
-
break;
|
3279 |
-
case 'insertBefore':
|
3280 |
-
case 'before':
|
3281 |
-
if (! $toNode->parentNode)
|
3282 |
-
throw new Exception("No parentNode, can't do {$type}()");
|
3283 |
-
else
|
3284 |
-
$toNode->parentNode->insertBefore(
|
3285 |
-
$insert,
|
3286 |
-
$toNode
|
3287 |
-
);
|
3288 |
-
break;
|
3289 |
-
case 'insertAfter':
|
3290 |
-
case 'after':
|
3291 |
-
if (! $toNode->parentNode)
|
3292 |
-
throw new Exception("No parentNode, can't do {$type}()");
|
3293 |
-
else
|
3294 |
-
$toNode->parentNode->insertBefore(
|
3295 |
-
$insert,
|
3296 |
-
$nextSibling
|
3297 |
-
);
|
3298 |
-
break;
|
3299 |
-
}
|
3300 |
-
// Mutation event
|
3301 |
-
$event = new DOMEvent(array(
|
3302 |
-
'target' => $insert,
|
3303 |
-
'type' => 'DOMNodeInserted'
|
3304 |
-
));
|
3305 |
-
phpQueryEvents::trigger($this->getDocumentID(),
|
3306 |
-
$event->type, array($event), $insert
|
3307 |
-
);
|
3308 |
-
}
|
3309 |
-
}
|
3310 |
-
return $this;
|
3311 |
-
}
|
3312 |
-
/**
|
3313 |
-
* Enter description here...
|
3314 |
-
*
|
3315 |
-
* @return Int
|
3316 |
-
*/
|
3317 |
-
public function index($subject) {
|
3318 |
-
$index = -1;
|
3319 |
-
$subject = $subject instanceof phpQueryObject
|
3320 |
-
? $subject->elements[0]
|
3321 |
-
: $subject;
|
3322 |
-
foreach($this->newInstance() as $k => $node) {
|
3323 |
-
if ($node->isSameNode($subject))
|
3324 |
-
$index = $k;
|
3325 |
-
}
|
3326 |
-
return $index;
|
3327 |
-
}
|
3328 |
-
/**
|
3329 |
-
* Enter description here...
|
3330 |
-
*
|
3331 |
-
* @param unknown_type $start
|
3332 |
-
* @param unknown_type $end
|
3333 |
-
*
|
3334 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3335 |
-
* @testme
|
3336 |
-
*/
|
3337 |
-
public function slice($start, $end = null) {
|
3338 |
-
// $last = count($this->elements)-1;
|
3339 |
-
// $end = $end
|
3340 |
-
// ? min($end, $last)
|
3341 |
-
// : $last;
|
3342 |
-
// if ($start < 0)
|
3343 |
-
// $start = $last+$start;
|
3344 |
-
// if ($start > $last)
|
3345 |
-
// return array();
|
3346 |
-
if ($end > 0)
|
3347 |
-
$end = $end-$start;
|
3348 |
-
return $this->newInstance(
|
3349 |
-
array_slice($this->elements, $start, $end)
|
3350 |
-
);
|
3351 |
-
}
|
3352 |
-
/**
|
3353 |
-
* Enter description here...
|
3354 |
-
*
|
3355 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3356 |
-
*/
|
3357 |
-
public function reverse() {
|
3358 |
-
$this->elementsBackup = $this->elements;
|
3359 |
-
$this->elements = array_reverse($this->elements);
|
3360 |
-
return $this->newInstance();
|
3361 |
-
}
|
3362 |
-
/**
|
3363 |
-
* Return joined text content.
|
3364 |
-
* @return String
|
3365 |
-
*/
|
3366 |
-
public function text($text = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
3367 |
-
if (isset($text))
|
3368 |
-
return $this->html(htmlspecialchars($text));
|
3369 |
-
$args = func_get_args();
|
3370 |
-
$args = array_slice($args, 1);
|
3371 |
-
$return = '';
|
3372 |
-
foreach($this->elements as $node) {
|
3373 |
-
$text = $node->textContent;
|
3374 |
-
if (count($this->elements) > 1 && $text)
|
3375 |
-
$text .= "\n";
|
3376 |
-
foreach($args as $callback) {
|
3377 |
-
$text = phpQuery::callbackRun($callback, array($text));
|
3378 |
-
}
|
3379 |
-
$return .= $text;
|
3380 |
-
}
|
3381 |
-
return $return;
|
3382 |
-
}
|
3383 |
-
/**
|
3384 |
-
* Enter description here...
|
3385 |
-
*
|
3386 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3387 |
-
*/
|
3388 |
-
public function plugin($class, $file = null) {
|
3389 |
-
phpQuery::plugin($class, $file);
|
3390 |
-
return $this;
|
3391 |
-
}
|
3392 |
-
/**
|
3393 |
-
* Deprecated, use $pq->plugin() instead.
|
3394 |
-
*
|
3395 |
-
* @deprecated
|
3396 |
-
* @param $class
|
3397 |
-
* @param $file
|
3398 |
-
* @return unknown_type
|
3399 |
-
*/
|
3400 |
-
public static function extend($class, $file = null) {
|
3401 |
-
return $this->plugin($class, $file);
|
3402 |
-
}
|
3403 |
-
/**
|
3404 |
-
*
|
3405 |
-
* @access private
|
3406 |
-
* @param $method
|
3407 |
-
* @param $args
|
3408 |
-
* @return unknown_type
|
3409 |
-
*/
|
3410 |
-
public function __call($method, $args) {
|
3411 |
-
$aliasMethods = array('clone', 'empty');
|
3412 |
-
if (isset(phpQuery::$extendMethods[$method])) {
|
3413 |
-
array_unshift($args, $this);
|
3414 |
-
return phpQuery::callbackRun(
|
3415 |
-
phpQuery::$extendMethods[$method], $args
|
3416 |
-
);
|
3417 |
-
} else if (isset(phpQuery::$pluginsMethods[$method])) {
|
3418 |
-
array_unshift($args, $this);
|
3419 |
-
$class = phpQuery::$pluginsMethods[$method];
|
3420 |
-
$realClass = "phpQueryObjectPlugin_$class";
|
3421 |
-
$return = call_user_func_array(
|
3422 |
-
array($realClass, $method),
|
3423 |
-
$args
|
3424 |
-
);
|
3425 |
-
// XXX deprecate ?
|
3426 |
-
return is_null($return)
|
3427 |
-
? $this
|
3428 |
-
: $return;
|
3429 |
-
} else if (in_array($method, $aliasMethods)) {
|
3430 |
-
return call_user_func_array(array($this, '_'.$method), $args);
|
3431 |
-
} else
|
3432 |
-
throw new Exception("Method '{$method}' doesnt exist");
|
3433 |
-
}
|
3434 |
-
/**
|
3435 |
-
* Safe rename of next().
|
3436 |
-
*
|
3437 |
-
* Use it ONLY when need to call next() on an iterated object (in same time).
|
3438 |
-
* Normaly there is no need to do such thing ;)
|
3439 |
-
*
|
3440 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3441 |
-
* @access private
|
3442 |
-
*/
|
3443 |
-
public function _next($selector = null) {
|
3444 |
-
return $this->newInstance(
|
3445 |
-
$this->getElementSiblings('nextSibling', $selector, true)
|
3446 |
-
);
|
3447 |
-
}
|
3448 |
-
/**
|
3449 |
-
* Use prev() and next().
|
3450 |
-
*
|
3451 |
-
* @deprecated
|
3452 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3453 |
-
* @access private
|
3454 |
-
*/
|
3455 |
-
public function _prev($selector = null) {
|
3456 |
-
return $this->prev($selector);
|
3457 |
-
}
|
3458 |
-
/**
|
3459 |
-
* Enter description here...
|
3460 |
-
*
|
3461 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3462 |
-
*/
|
3463 |
-
public function prev($selector = null) {
|
3464 |
-
return $this->newInstance(
|
3465 |
-
$this->getElementSiblings('previousSibling', $selector, true)
|
3466 |
-
);
|
3467 |
-
}
|
3468 |
-
/**
|
3469 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3470 |
-
* @todo
|
3471 |
-
*/
|
3472 |
-
public function prevAll($selector = null) {
|
3473 |
-
return $this->newInstance(
|
3474 |
-
$this->getElementSiblings('previousSibling', $selector)
|
3475 |
-
);
|
3476 |
-
}
|
3477 |
-
/**
|
3478 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3479 |
-
* @todo FIXME: returns source elements insted of next siblings
|
3480 |
-
*/
|
3481 |
-
public function nextAll($selector = null) {
|
3482 |
-
return $this->newInstance(
|
3483 |
-
$this->getElementSiblings('nextSibling', $selector)
|
3484 |
-
);
|
3485 |
-
}
|
3486 |
-
/**
|
3487 |
-
* @access private
|
3488 |
-
*/
|
3489 |
-
protected function getElementSiblings($direction, $selector = null, $limitToOne = false) {
|
3490 |
-
$stack = array();
|
3491 |
-
$count = 0;
|
3492 |
-
foreach($this->stack() as $node) {
|
3493 |
-
$test = $node;
|
3494 |
-
while( isset($test->{$direction}) && $test->{$direction}) {
|
3495 |
-
$test = $test->{$direction};
|
3496 |
-
if (! $test instanceof DOMELEMENT)
|
3497 |
-
continue;
|
3498 |
-
$stack[] = $test;
|
3499 |
-
if ($limitToOne)
|
3500 |
-
break;
|
3501 |
-
}
|
3502 |
-
}
|
3503 |
-
if ($selector) {
|
3504 |
-
$stackOld = $this->elements;
|
3505 |
-
$this->elements = $stack;
|
3506 |
-
$stack = $this->filter($selector, true)->stack();
|
3507 |
-
$this->elements = $stackOld;
|
3508 |
-
}
|
3509 |
-
return $stack;
|
3510 |
-
}
|
3511 |
-
/**
|
3512 |
-
* Enter description here...
|
3513 |
-
*
|
3514 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3515 |
-
*/
|
3516 |
-
public function siblings($selector = null) {
|
3517 |
-
$stack = array();
|
3518 |
-
$siblings = array_merge(
|
3519 |
-
$this->getElementSiblings('previousSibling', $selector),
|
3520 |
-
$this->getElementSiblings('nextSibling', $selector)
|
3521 |
-
);
|
3522 |
-
foreach($siblings as $node) {
|
3523 |
-
if (! $this->elementsContainsNode($node, $stack))
|
3524 |
-
$stack[] = $node;
|
3525 |
-
}
|
3526 |
-
return $this->newInstance($stack);
|
3527 |
-
}
|
3528 |
-
/**
|
3529 |
-
* Enter description here...
|
3530 |
-
*
|
3531 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3532 |
-
*/
|
3533 |
-
public function not($selector = null) {
|
3534 |
-
if (is_string($selector))
|
3535 |
-
phpQuery::debug(array('not', $selector));
|
3536 |
-
else
|
3537 |
-
phpQuery::debug('not');
|
3538 |
-
$stack = array();
|
3539 |
-
if ($selector instanceof self || $selector instanceof DOMNODE) {
|
3540 |
-
foreach($this->stack() as $node) {
|
3541 |
-
if ($selector instanceof self) {
|
3542 |
-
$matchFound = false;
|
3543 |
-
foreach($selector->stack() as $notNode) {
|
3544 |
-
if ($notNode->isSameNode($node))
|
3545 |
-
$matchFound = true;
|
3546 |
-
}
|
3547 |
-
if (! $matchFound)
|
3548 |
-
$stack[] = $node;
|
3549 |
-
} else if ($selector instanceof DOMNODE) {
|
3550 |
-
if (! $selector->isSameNode($node))
|
3551 |
-
$stack[] = $node;
|
3552 |
-
} else {
|
3553 |
-
if (! $this->is($selector))
|
3554 |
-
$stack[] = $node;
|
3555 |
-
}
|
3556 |
-
}
|
3557 |
-
} else {
|
3558 |
-
$orgStack = $this->stack();
|
3559 |
-
$matched = $this->filter($selector, true)->stack();
|
3560 |
-
// $matched = array();
|
3561 |
-
// // simulate OR in filter() instead of AND 5y
|
3562 |
-
// foreach($this->parseSelector($selector) as $s) {
|
3563 |
-
// $matched = array_merge($matched,
|
3564 |
-
// $this->filter(array($s))->stack()
|
3565 |
-
// );
|
3566 |
-
// }
|
3567 |
-
foreach($orgStack as $node)
|
3568 |
-
if (! $this->elementsContainsNode($node, $matched))
|
3569 |
-
$stack[] = $node;
|
3570 |
-
}
|
3571 |
-
return $this->newInstance($stack);
|
3572 |
-
}
|
3573 |
-
/**
|
3574 |
-
* Enter description here...
|
3575 |
-
*
|
3576 |
-
* @param string|phpQueryObject
|
3577 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3578 |
-
*/
|
3579 |
-
public function add($selector = null) {
|
3580 |
-
if (! $selector)
|
3581 |
-
return $this;
|
3582 |
-
$stack = array();
|
3583 |
-
$this->elementsBackup = $this->elements;
|
3584 |
-
$found = phpQuery::pq($selector, $this->getDocumentID());
|
3585 |
-
$this->merge($found->elements);
|
3586 |
-
return $this->newInstance();
|
3587 |
-
}
|
3588 |
-
/**
|
3589 |
-
* @access private
|
3590 |
-
*/
|
3591 |
-
protected function merge() {
|
3592 |
-
foreach(func_get_args() as $nodes)
|
3593 |
-
foreach($nodes as $newNode )
|
3594 |
-
if (! $this->elementsContainsNode($newNode) )
|
3595 |
-
$this->elements[] = $newNode;
|
3596 |
-
}
|
3597 |
-
/**
|
3598 |
-
* @access private
|
3599 |
-
* TODO refactor to stackContainsNode
|
3600 |
-
*/
|
3601 |
-
protected function elementsContainsNode($nodeToCheck, $elementsStack = null) {
|
3602 |
-
$loop = ! is_null($elementsStack)
|
3603 |
-
? $elementsStack
|
3604 |
-
: $this->elements;
|
3605 |
-
foreach($loop as $node) {
|
3606 |
-
if ( $node->isSameNode( $nodeToCheck ) )
|
3607 |
-
return true;
|
3608 |
-
}
|
3609 |
-
return false;
|
3610 |
-
}
|
3611 |
-
/**
|
3612 |
-
* Enter description here...
|
3613 |
-
*
|
3614 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3615 |
-
*/
|
3616 |
-
public function parent($selector = null) {
|
3617 |
-
$stack = array();
|
3618 |
-
foreach($this->elements as $node )
|
3619 |
-
if ( $node->parentNode && ! $this->elementsContainsNode($node->parentNode, $stack) )
|
3620 |
-
$stack[] = $node->parentNode;
|
3621 |
-
$this->elementsBackup = $this->elements;
|
3622 |
-
$this->elements = $stack;
|
3623 |
-
if ( $selector )
|
3624 |
-
$this->filter($selector, true);
|
3625 |
-
return $this->newInstance();
|
3626 |
-
}
|
3627 |
-
/**
|
3628 |
-
* Enter description here...
|
3629 |
-
*
|
3630 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3631 |
-
*/
|
3632 |
-
public function parents($selector = null) {
|
3633 |
-
$stack = array();
|
3634 |
-
if (! $this->elements )
|
3635 |
-
$this->debug('parents() - stack empty');
|
3636 |
-
foreach($this->elements as $node) {
|
3637 |
-
$test = $node;
|
3638 |
-
while( $test->parentNode) {
|
3639 |
-
$test = $test->parentNode;
|
3640 |
-
if ($this->isRoot($test))
|
3641 |
-
break;
|
3642 |
-
if (! $this->elementsContainsNode($test, $stack)) {
|
3643 |
-
$stack[] = $test;
|
3644 |
-
continue;
|
3645 |
-
}
|
3646 |
-
}
|
3647 |
-
}
|
3648 |
-
$this->elementsBackup = $this->elements;
|
3649 |
-
$this->elements = $stack;
|
3650 |
-
if ( $selector )
|
3651 |
-
$this->filter($selector, true);
|
3652 |
-
return $this->newInstance();
|
3653 |
-
}
|
3654 |
-
/**
|
3655 |
-
* Internal stack iterator.
|
3656 |
-
*
|
3657 |
-
* @access private
|
3658 |
-
*/
|
3659 |
-
public function stack($nodeTypes = null) {
|
3660 |
-
if (!isset($nodeTypes))
|
3661 |
-
return $this->elements;
|
3662 |
-
if (!is_array($nodeTypes))
|
3663 |
-
$nodeTypes = array($nodeTypes);
|
3664 |
-
$return = array();
|
3665 |
-
foreach($this->elements as $node) {
|
3666 |
-
if (in_array($node->nodeType, $nodeTypes))
|
3667 |
-
$return[] = $node;
|
3668 |
-
}
|
3669 |
-
return $return;
|
3670 |
-
}
|
3671 |
-
// TODO phpdoc; $oldAttr is result of hasAttribute, before any changes
|
3672 |
-
protected function attrEvents($attr, $oldAttr, $oldValue, $node) {
|
3673 |
-
// skip events for XML documents
|
3674 |
-
if (! $this->isXHTML() && ! $this->isHTML())
|
3675 |
-
return;
|
3676 |
-
$event = null;
|
3677 |
-
// identify
|
3678 |
-
$isInputValue = $node->tagName == 'input'
|
3679 |
-
&& (
|
3680 |
-
in_array($node->getAttribute('type'),
|
3681 |
-
array('text', 'password', 'hidden'))
|
3682 |
-
|| !$node->getAttribute('type')
|
3683 |
-
);
|
3684 |
-
$isRadio = $node->tagName == 'input'
|
3685 |
-
&& $node->getAttribute('type') == 'radio';
|
3686 |
-
$isCheckbox = $node->tagName == 'input'
|
3687 |
-
&& $node->getAttribute('type') == 'checkbox';
|
3688 |
-
$isOption = $node->tagName == 'option';
|
3689 |
-
if ($isInputValue && $attr == 'value' && $oldValue != $node->getAttribute($attr)) {
|
3690 |
-
$event = new DOMEvent(array(
|
3691 |
-
'target' => $node,
|
3692 |
-
'type' => 'change'
|
3693 |
-
));
|
3694 |
-
} else if (($isRadio || $isCheckbox) && $attr == 'checked' && (
|
3695 |
-
// check
|
3696 |
-
(! $oldAttr && $node->hasAttribute($attr))
|
3697 |
-
// un-check
|
3698 |
-
|| (! $node->hasAttribute($attr) && $oldAttr)
|
3699 |
-
)) {
|
3700 |
-
$event = new DOMEvent(array(
|
3701 |
-
'target' => $node,
|
3702 |
-
'type' => 'change'
|
3703 |
-
));
|
3704 |
-
} else if ($isOption && $node->parentNode && $attr == 'selected' && (
|
3705 |
-
// select
|
3706 |
-
(! $oldAttr && $node->hasAttribute($attr))
|
3707 |
-
// un-select
|
3708 |
-
|| (! $node->hasAttribute($attr) && $oldAttr)
|
3709 |
-
)) {
|
3710 |
-
$event = new DOMEvent(array(
|
3711 |
-
'target' => $node->parentNode,
|
3712 |
-
'type' => 'change'
|
3713 |
-
));
|
3714 |
-
}
|
3715 |
-
if ($event) {
|
3716 |
-
phpQueryEvents::trigger($this->getDocumentID(),
|
3717 |
-
$event->type, array($event), $node
|
3718 |
-
);
|
3719 |
-
}
|
3720 |
-
}
|
3721 |
-
public function attr($attr = null, $value = null) {
|
3722 |
-
foreach($this->stack(1) as $node) {
|
3723 |
-
if (! is_null($value)) {
|
3724 |
-
$loop = $attr == '*'
|
3725 |
-
? $this->getNodeAttrs($node)
|
3726 |
-
: array($attr);
|
3727 |
-
foreach($loop as $a) {
|
3728 |
-
$oldValue = $node->getAttribute($a);
|
3729 |
-
$oldAttr = $node->hasAttribute($a);
|
3730 |
-
// TODO raises an error when charset other than UTF-8
|
3731 |
-
// while document's charset is also not UTF-8
|
3732 |
-
@$node->setAttribute($a, $value);
|
3733 |
-
$this->attrEvents($a, $oldAttr, $oldValue, $node);
|
3734 |
-
}
|
3735 |
-
} else if ($attr == '*') {
|
3736 |
-
// jQuery difference
|
3737 |
-
$return = array();
|
3738 |
-
foreach($node->attributes as $n => $v)
|
3739 |
-
$return[$n] = $v->value;
|
3740 |
-
return $return;
|
3741 |
-
} else
|
3742 |
-
return $node->hasAttribute($attr)
|
3743 |
-
? $node->getAttribute($attr)
|
3744 |
-
: null;
|
3745 |
-
}
|
3746 |
-
return is_null($value)
|
3747 |
-
? '' : $this;
|
3748 |
-
}
|
3749 |
-
/**
|
3750 |
-
* @access private
|
3751 |
-
*/
|
3752 |
-
protected function getNodeAttrs($node) {
|
3753 |
-
$return = array();
|
3754 |
-
foreach($node->attributes as $n => $o)
|
3755 |
-
$return[] = $n;
|
3756 |
-
return $return;
|
3757 |
-
}
|
3758 |
-
/**
|
3759 |
-
* Enter description here...
|
3760 |
-
*
|
3761 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3762 |
-
* @todo check CDATA ???
|
3763 |
-
*/
|
3764 |
-
public function attrPHP($attr, $code) {
|
3765 |
-
if (! is_null($code)) {
|
3766 |
-
$value = '<'.'?php '.$code.' ?'.'>';
|
3767 |
-
// TODO tempolary solution
|
3768 |
-
// http://code.google.com/p/phpquery/issues/detail?id=17
|
3769 |
-
// if (function_exists('mb_detect_encoding') && mb_detect_encoding($value) == 'ASCII')
|
3770 |
-
// $value = mb_convert_encoding($value, 'UTF-8', 'HTML-ENTITIES');
|
3771 |
-
}
|
3772 |
-
foreach($this->stack(1) as $node) {
|
3773 |
-
if (! is_null($code)) {
|
3774 |
-
// $attrNode = $this->DOM->createAttribute($attr);
|
3775 |
-
$node->setAttribute($attr, $value);
|
3776 |
-
// $attrNode->value = $value;
|
3777 |
-
// $node->appendChild($attrNode);
|
3778 |
-
} else if ( $attr == '*') {
|
3779 |
-
// jQuery diff
|
3780 |
-
$return = array();
|
3781 |
-
foreach($node->attributes as $n => $v)
|
3782 |
-
$return[$n] = $v->value;
|
3783 |
-
return $return;
|
3784 |
-
} else
|
3785 |
-
return $node->getAttribute($attr);
|
3786 |
-
}
|
3787 |
-
return $this;
|
3788 |
-
}
|
3789 |
-
/**
|
3790 |
-
* Enter description here...
|
3791 |
-
*
|
3792 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3793 |
-
*/
|
3794 |
-
public function removeAttr($attr) {
|
3795 |
-
foreach($this->stack(1) as $node) {
|
3796 |
-
$loop = $attr == '*'
|
3797 |
-
? $this->getNodeAttrs($node)
|
3798 |
-
: array($attr);
|
3799 |
-
foreach($loop as $a) {
|
3800 |
-
$oldValue = $node->getAttribute($a);
|
3801 |
-
$node->removeAttribute($a);
|
3802 |
-
$this->attrEvents($a, $oldValue, null, $node);
|
3803 |
-
}
|
3804 |
-
}
|
3805 |
-
return $this;
|
3806 |
-
}
|
3807 |
-
/**
|
3808 |
-
* Return form element value.
|
3809 |
-
*
|
3810 |
-
* @return String Fields value.
|
3811 |
-
*/
|
3812 |
-
public function val($val = null) {
|
3813 |
-
if (! isset($val)) {
|
3814 |
-
if ($this->eq(0)->is('select')) {
|
3815 |
-
$selected = $this->eq(0)->find('option[selected=selected]');
|
3816 |
-
if ($selected->is('[value]'))
|
3817 |
-
return $selected->attr('value');
|
3818 |
-
else
|
3819 |
-
return $selected->text();
|
3820 |
-
} else if ($this->eq(0)->is('textarea'))
|
3821 |
-
return $this->eq(0)->markup();
|
3822 |
-
else
|
3823 |
-
return $this->eq(0)->attr('value');
|
3824 |
-
} else {
|
3825 |
-
$_val = null;
|
3826 |
-
foreach($this->stack(1) as $node) {
|
3827 |
-
$node = pq($node, $this->getDocumentID());
|
3828 |
-
if (is_array($val) && in_array($node->attr('type'), array('checkbox', 'radio'))) {
|
3829 |
-
$isChecked = in_array($node->attr('value'), $val)
|
3830 |
-
|| in_array($node->attr('name'), $val);
|
3831 |
-
if ($isChecked)
|
3832 |
-
$node->attr('checked', 'checked');
|
3833 |
-
else
|
3834 |
-
$node->removeAttr('checked');
|
3835 |
-
} else if ($node->get(0)->tagName == 'select') {
|
3836 |
-
if (! isset($_val)) {
|
3837 |
-
$_val = array();
|
3838 |
-
if (! is_array($val))
|
3839 |
-
$_val = array((string)$val);
|
3840 |
-
else
|
3841 |
-
foreach($val as $v)
|
3842 |
-
$_val[] = $v;
|
3843 |
-
}
|
3844 |
-
foreach($node['option']->stack(1) as $option) {
|
3845 |
-
$option = pq($option, $this->getDocumentID());
|
3846 |
-
$selected = false;
|
3847 |
-
// XXX: workaround for string comparsion, see issue #96
|
3848 |
-
// http://code.google.com/p/phpquery/issues/detail?id=96
|
3849 |
-
$selected = is_null($option->attr('value'))
|
3850 |
-
? in_array($option->markup(), $_val)
|
3851 |
-
: in_array($option->attr('value'), $_val);
|
3852 |
-
// $optionValue = $option->attr('value');
|
3853 |
-
// $optionText = $option->text();
|
3854 |
-
// $optionTextLenght = mb_strlen($optionText);
|
3855 |
-
// foreach($_val as $v)
|
3856 |
-
// if ($optionValue == $v)
|
3857 |
-
// $selected = true;
|
3858 |
-
// else if ($optionText == $v && $optionTextLenght == mb_strlen($v))
|
3859 |
-
// $selected = true;
|
3860 |
-
if ($selected)
|
3861 |
-
$option->attr('selected', 'selected');
|
3862 |
-
else
|
3863 |
-
$option->removeAttr('selected');
|
3864 |
-
}
|
3865 |
-
} else if ($node->get(0)->tagName == 'textarea')
|
3866 |
-
$node->markup($val);
|
3867 |
-
else
|
3868 |
-
$node->attr('value', $val);
|
3869 |
-
}
|
3870 |
-
}
|
3871 |
-
return $this;
|
3872 |
-
}
|
3873 |
-
/**
|
3874 |
-
* Enter description here...
|
3875 |
-
*
|
3876 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3877 |
-
*/
|
3878 |
-
public function andSelf() {
|
3879 |
-
if ( $this->previous )
|
3880 |
-
$this->elements = array_merge($this->elements, $this->previous->elements);
|
3881 |
-
return $this;
|
3882 |
-
}
|
3883 |
-
/**
|
3884 |
-
* Enter description here...
|
3885 |
-
*
|
3886 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3887 |
-
*/
|
3888 |
-
public function addClass( $className) {
|
3889 |
-
if (! $className)
|
3890 |
-
return $this;
|
3891 |
-
foreach($this->stack(1) as $node) {
|
3892 |
-
if (! $this->is(".$className", $node))
|
3893 |
-
$node->setAttribute(
|
3894 |
-
'class',
|
3895 |
-
trim($node->getAttribute('class').' '.$className)
|
3896 |
-
);
|
3897 |
-
}
|
3898 |
-
return $this;
|
3899 |
-
}
|
3900 |
-
/**
|
3901 |
-
* Enter description here...
|
3902 |
-
*
|
3903 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3904 |
-
*/
|
3905 |
-
public function addClassPHP( $className) {
|
3906 |
-
foreach($this->stack(1) as $node) {
|
3907 |
-
$classes = $node->getAttribute('class');
|
3908 |
-
$newValue = $classes
|
3909 |
-
? $classes.' <'.'?php '.$className.' ?'.'>'
|
3910 |
-
: '<'.'?php '.$className.' ?'.'>';
|
3911 |
-
$node->setAttribute('class', $newValue);
|
3912 |
-
}
|
3913 |
-
return $this;
|
3914 |
-
}
|
3915 |
-
/**
|
3916 |
-
* Enter description here...
|
3917 |
-
*
|
3918 |
-
* @param string $className
|
3919 |
-
* @return bool
|
3920 |
-
*/
|
3921 |
-
public function hasClass($className) {
|
3922 |
-
foreach($this->stack(1) as $node) {
|
3923 |
-
if ( $this->is(".$className", $node))
|
3924 |
-
return true;
|
3925 |
-
}
|
3926 |
-
return false;
|
3927 |
-
}
|
3928 |
-
/**
|
3929 |
-
* Enter description here...
|
3930 |
-
*
|
3931 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3932 |
-
*/
|
3933 |
-
public function removeClass($className) {
|
3934 |
-
foreach($this->stack(1) as $node) {
|
3935 |
-
$classes = explode( ' ', $node->getAttribute('class'));
|
3936 |
-
if ( in_array($className, $classes)) {
|
3937 |
-
$classes = array_diff($classes, array($className));
|
3938 |
-
if ( $classes )
|
3939 |
-
$node->setAttribute('class', implode(' ', $classes));
|
3940 |
-
else
|
3941 |
-
$node->removeAttribute('class');
|
3942 |
-
}
|
3943 |
-
}
|
3944 |
-
return $this;
|
3945 |
-
}
|
3946 |
-
/**
|
3947 |
-
* Enter description here...
|
3948 |
-
*
|
3949 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3950 |
-
*/
|
3951 |
-
public function toggleClass($className) {
|
3952 |
-
foreach($this->stack(1) as $node) {
|
3953 |
-
if ( $this->is( $node, '.'.$className ))
|
3954 |
-
$this->removeClass($className);
|
3955 |
-
else
|
3956 |
-
$this->addClass($className);
|
3957 |
-
}
|
3958 |
-
return $this;
|
3959 |
-
}
|
3960 |
-
/**
|
3961 |
-
* Proper name without underscore (just ->empty()) also works.
|
3962 |
-
*
|
3963 |
-
* Removes all child nodes from the set of matched elements.
|
3964 |
-
*
|
3965 |
-
* Example:
|
3966 |
-
* pq("p")._empty()
|
3967 |
-
*
|
3968 |
-
* HTML:
|
3969 |
-
* <p>Hello, <span>Person</span> <a href="#">and person</a></p>
|
3970 |
-
*
|
3971 |
-
* Result:
|
3972 |
-
* [ <p></p> ]
|
3973 |
-
*
|
3974 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3975 |
-
* @access private
|
3976 |
-
*/
|
3977 |
-
public function _empty() {
|
3978 |
-
foreach($this->stack(1) as $node) {
|
3979 |
-
// thx to 'dave at dgx dot cz'
|
3980 |
-
$node->nodeValue = '';
|
3981 |
-
}
|
3982 |
-
return $this;
|
3983 |
-
}
|
3984 |
-
/**
|
3985 |
-
* Enter description here...
|
3986 |
-
*
|
3987 |
-
* @param array|string $callback Expects $node as first param, $index as second
|
3988 |
-
* @param array $scope External variables passed to callback. Use compact('varName1', 'varName2'...) and extract($scope)
|
3989 |
-
* @param array $arg1 Will ba passed as third and futher args to callback.
|
3990 |
-
* @param array $arg2 Will ba passed as fourth and futher args to callback, and so on...
|
3991 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3992 |
-
*/
|
3993 |
-
public function each($callback, $param1 = null, $param2 = null, $param3 = null) {
|
3994 |
-
$paramStructure = null;
|
3995 |
-
if (func_num_args() > 1) {
|
3996 |
-
$paramStructure = func_get_args();
|
3997 |
-
$paramStructure = array_slice($paramStructure, 1);
|
3998 |
-
}
|
3999 |
-
foreach($this->elements as $v)
|
4000 |
-
phpQuery::callbackRun($callback, array($v), $paramStructure);
|
4001 |
-
return $this;
|
4002 |
-
}
|
4003 |
-
/**
|
4004 |
-
* Run callback on actual object.
|
4005 |
-
*
|
4006 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
4007 |
-
*/
|
4008 |
-
public function callback($callback, $param1 = null, $param2 = null, $param3 = null) {
|
4009 |
-
$params = func_get_args();
|
4010 |
-
$params[0] = $this;
|
4011 |
-
phpQuery::callbackRun($callback, $params);
|
4012 |
-
return $this;
|
4013 |
-
}
|
4014 |
-
/**
|
4015 |
-
* Enter description here...
|
4016 |
-
*
|
4017 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
4018 |
-
* @todo add $scope and $args as in each() ???
|
4019 |
-
*/
|
4020 |
-
public function map($callback, $param1 = null, $param2 = null, $param3 = null) {
|
4021 |
-
// $stack = array();
|
4022 |
-
//// foreach($this->newInstance() as $node) {
|
4023 |
-
// foreach($this->newInstance() as $node) {
|
4024 |
-
// $result = call_user_func($callback, $node);
|
4025 |
-
// if ($result)
|
4026 |
-
// $stack[] = $result;
|
4027 |
-
// }
|
4028 |
-
$params = func_get_args();
|
4029 |
-
array_unshift($params, $this->elements);
|
4030 |
-
return $this->newInstance(
|
4031 |
-
call_user_func_array(array('phpQuery', 'map'), $params)
|
4032 |
-
// phpQuery::map($this->elements, $callback)
|
4033 |
-
);
|
4034 |
-
}
|
4035 |
-
/**
|
4036 |
-
* Enter description here...
|
4037 |
-
*
|
4038 |
-
* @param <type> $key
|
4039 |
-
* @param <type> $value
|
4040 |
-
*/
|
4041 |
-
public function data($key, $value = null) {
|
4042 |
-
if (! isset($value)) {
|
4043 |
-
// TODO? implement specific jQuery behavior od returning parent values
|
4044 |
-
// is child which we look up doesn't exist
|
4045 |
-
return phpQuery::data($this->get(0), $key, $value, $this->getDocumentID());
|
4046 |
-
} else {
|
4047 |
-
foreach($this as $node)
|
4048 |
-
phpQuery::data($node, $key, $value, $this->getDocumentID());
|
4049 |
-
return $this;
|
4050 |
-
}
|
4051 |
-
}
|
4052 |
-
/**
|
4053 |
-
* Enter description here...
|
4054 |
-
*
|
4055 |
-
* @param <type> $key
|
4056 |
-
*/
|
4057 |
-
public function removeData($key) {
|
4058 |
-
foreach($this as $node)
|
4059 |
-
phpQuery::removeData($node, $key, $this->getDocumentID());
|
4060 |
-
return $this;
|
4061 |
-
}
|
4062 |
-
// INTERFACE IMPLEMENTATIONS
|
4063 |
-
|
4064 |
-
// ITERATOR INTERFACE
|
4065 |
-
/**
|
4066 |
-
* @access private
|
4067 |
-
*/
|
4068 |
-
public function rewind(){
|
4069 |
-
$this->debug('iterating foreach');
|
4070 |
-
// phpQuery::selectDocument($this->getDocumentID());
|
4071 |
-
$this->elementsBackup = $this->elements;
|
4072 |
-
$this->elementsInterator = $this->elements;
|
4073 |
-
$this->valid = isset( $this->elements[0] )
|
4074 |
-
? 1 : 0;
|
4075 |
-
// $this->elements = $this->valid
|
4076 |
-
// ? array($this->elements[0])
|
4077 |
-
// : array();
|
4078 |
-
$this->current = 0;
|
4079 |
-
}
|
4080 |
-
/**
|
4081 |
-
* @access private
|
4082 |
-
*/
|
4083 |
-
public function current(){
|
4084 |
-
return $this->elementsInterator[ $this->current ];
|
4085 |
-
}
|
4086 |
-
/**
|
4087 |
-
* @access private
|
4088 |
-
*/
|
4089 |
-
public function key(){
|
4090 |
-
return $this->current;
|
4091 |
-
}
|
4092 |
-
/**
|
4093 |
-
* Double-function method.
|
4094 |
-
*
|
4095 |
-
* First: main iterator interface method.
|
4096 |
-
* Second: Returning next sibling, alias for _next().
|
4097 |
-
*
|
4098 |
-
* Proper functionality is choosed automagicaly.
|
4099 |
-
*
|
4100 |
-
* @see phpQueryObject::_next()
|
4101 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
4102 |
-
*/
|
4103 |
-
public function next($cssSelector = null){
|
4104 |
-
// if ($cssSelector || $this->valid)
|
4105 |
-
// return $this->_next($cssSelector);
|
4106 |
-
$this->valid = isset( $this->elementsInterator[ $this->current+1 ] )
|
4107 |
-
? true
|
4108 |
-
: false;
|
4109 |
-
if (! $this->valid && $this->elementsInterator) {
|
4110 |
-
$this->elementsInterator = null;
|
4111 |
-
} else if ($this->valid) {
|
4112 |
-
$this->current++;
|
4113 |
-
} else {
|
4114 |
-
return $this->_next($cssSelector);
|
4115 |
-
}
|
4116 |
-
}
|
4117 |
-
/**
|
4118 |
-
* @access private
|
4119 |
-
*/
|
4120 |
-
public function valid(){
|
4121 |
-
return $this->valid;
|
4122 |
-
}
|
4123 |
-
// ITERATOR INTERFACE END
|
4124 |
-
// ARRAYACCESS INTERFACE
|
4125 |
-
/**
|
4126 |
-
* @access private
|
4127 |
-
*/
|
4128 |
-
public function offsetExists($offset) {
|
4129 |
-
return $this->find($offset)->size() > 0;
|
4130 |
-
}
|
4131 |
-
/**
|
4132 |
-
* @access private
|
4133 |
-
*/
|
4134 |
-
public function offsetGet($offset) {
|
4135 |
-
return $this->find($offset);
|
4136 |
-
}
|
4137 |
-
/**
|
4138 |
-
* @access private
|
4139 |
-
*/
|
4140 |
-
public function offsetSet($offset, $value) {
|
4141 |
-
// $this->find($offset)->replaceWith($value);
|
4142 |
-
$this->find($offset)->html($value);
|
4143 |
-
}
|
4144 |
-
/**
|
4145 |
-
* @access private
|
4146 |
-
*/
|
4147 |
-
public function offsetUnset($offset) {
|
4148 |
-
// empty
|
4149 |
-
throw new Exception("Can't do unset, use array interface only for calling queries and replacing HTML.");
|
4150 |
-
}
|
4151 |
-
// ARRAYACCESS INTERFACE END
|
4152 |
-
/**
|
4153 |
-
* Returns node's XPath.
|
4154 |
-
*
|
4155 |
-
* @param unknown_type $oneNode
|
4156 |
-
* @return string
|
4157 |
-
* @TODO use native getNodePath is avaible
|
4158 |
-
* @access private
|
4159 |
-
*/
|
4160 |
-
protected function getNodeXpath($oneNode = null, $namespace = null) {
|
4161 |
-
$return = array();
|
4162 |
-
$loop = $oneNode
|
4163 |
-
? array($oneNode)
|
4164 |
-
: $this->elements;
|
4165 |
-
// if ($namespace)
|
4166 |
-
// $namespace .= ':';
|
4167 |
-
foreach($loop as $node) {
|
4168 |
-
if ($node instanceof DOMDOCUMENT) {
|
4169 |
-
$return[] = '';
|
4170 |
-
continue;
|
4171 |
-
}
|
4172 |
-
$xpath = array();
|
4173 |
-
while(! ($node instanceof DOMDOCUMENT)) {
|
4174 |
-
$i = 1;
|
4175 |
-
$sibling = $node;
|
4176 |
-
while($sibling->previousSibling) {
|
4177 |
-
$sibling = $sibling->previousSibling;
|
4178 |
-
$isElement = $sibling instanceof DOMELEMENT;
|
4179 |
-
if ($isElement && $sibling->tagName == $node->tagName)
|
4180 |
-
$i++;
|
4181 |
-
}
|
4182 |
-
$xpath[] = $this->isXML()
|
4183 |
-
? "*[local-name()='{$node->tagName}'][{$i}]"
|
4184 |
-
: "{$node->tagName}[{$i}]";
|
4185 |
-
$node = $node->parentNode;
|
4186 |
-
}
|
4187 |
-
$xpath = join('/', array_reverse($xpath));
|
4188 |
-
$return[] = '/'.$xpath;
|
4189 |
-
}
|
4190 |
-
return $oneNode
|
4191 |
-
? $return[0]
|
4192 |
-
: $return;
|
4193 |
-
}
|
4194 |
-
// HELPERS
|
4195 |
-
public function whois($oneNode = null) {
|
4196 |
-
$return = array();
|
4197 |
-
$loop = $oneNode
|
4198 |
-
? array( $oneNode )
|
4199 |
-
: $this->elements;
|
4200 |
-
foreach($loop as $node) {
|
4201 |
-
if (isset($node->tagName)) {
|
4202 |
-
$tag = in_array($node->tagName, array('php', 'js'))
|
4203 |
-
? strtoupper($node->tagName)
|
4204 |
-
: $node->tagName;
|
4205 |
-
$return[] = $tag
|
4206 |
-
.($node->getAttribute('id')
|
4207 |
-
? '#'.$node->getAttribute('id'):'')
|
4208 |
-
.($node->getAttribute('class')
|
4209 |
-
? '.'.join('.', explode(' ', $node->getAttribute('class'))):'')
|
4210 |
-
.($node->getAttribute('name')
|
4211 |
-
? '[name="'.$node->getAttribute('name').'"]':'')
|
4212 |
-
.($node->getAttribute('value') && strpos($node->getAttribute('value'), '<'.'?php') === false
|
4213 |
-
? '[value="'.substr(str_replace("\n", '', $node->getAttribute('value')), 0, 15).'"]':'')
|
4214 |
-
.($node->getAttribute('value') && strpos($node->getAttribute('value'), '<'.'?php') !== false
|
4215 |
-
? '[value=PHP]':'')
|
4216 |
-
.($node->getAttribute('selected')
|
4217 |
-
? '[selected]':'')
|
4218 |
-
.($node->getAttribute('checked')
|
4219 |
-
? '[checked]':'')
|
4220 |
-
;
|
4221 |
-
} else if ($node instanceof DOMTEXT) {
|
4222 |
-
if (trim($node->textContent))
|
4223 |
-
$return[] = 'Text:'.substr(str_replace("\n", ' ', $node->textContent), 0, 15);
|
4224 |
-
} else {
|
4225 |
-
|
4226 |
-
}
|
4227 |
-
}
|
4228 |
-
return $oneNode && isset($return[0])
|
4229 |
-
? $return[0]
|
4230 |
-
: $return;
|
4231 |
-
}
|
4232 |
-
/**
|
4233 |
-
* Dump htmlOuter and preserve chain. Usefull for debugging.
|
4234 |
-
*
|
4235 |
-
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
4236 |
-
*
|
4237 |
-
*/
|
4238 |
-
public function dump() {
|
4239 |
-
print 'DUMP #'.(phpQuery::$dumpCount++).' ';
|
4240 |
-
$debug = phpQuery::$debug;
|
4241 |
-
phpQuery::$debug = false;
|
4242 |
-
// print __FILE__.':'.__LINE__."\n";
|
4243 |
-
var_dump($this->htmlOuter());
|
4244 |
-
return $this;
|
4245 |
-
}
|
4246 |
-
public function dumpWhois() {
|
4247 |
-
print 'DUMP #'.(phpQuery::$dumpCount++).' ';
|
4248 |
-
$debug = phpQuery::$debug;
|
4249 |
-
phpQuery::$debug = false;
|
4250 |
-
// print __FILE__.':'.__LINE__."\n";
|
4251 |
-
var_dump('whois', $this->whois());
|
4252 |
-
phpQuery::$debug = $debug;
|
4253 |
-
return $this;
|
4254 |
-
}
|
4255 |
-
public function dumpLength() {
|
4256 |
-
print 'DUMP #'.(phpQuery::$dumpCount++).' ';
|
4257 |
-
$debug = phpQuery::$debug;
|
4258 |
-
phpQuery::$debug = false;
|
4259 |
-
// print __FILE__.':'.__LINE__."\n";
|
4260 |
-
var_dump('length', $this->length());
|
4261 |
-
phpQuery::$debug = $debug;
|
4262 |
-
return $this;
|
4263 |
-
}
|
4264 |
-
public function dumpTree($html = true, $title = true) {
|
4265 |
-
$output = $title
|
4266 |
-
? 'DUMP #'.(phpQuery::$dumpCount++)." \n" : '';
|
4267 |
-
$debug = phpQuery::$debug;
|
4268 |
-
phpQuery::$debug = false;
|
4269 |
-
foreach($this->stack() as $node)
|
4270 |
-
$output .= $this->__dumpTree($node);
|
4271 |
-
phpQuery::$debug = $debug;
|
4272 |
-
print $html
|
4273 |
-
? nl2br(str_replace(' ', ' ', $output))
|
4274 |
-
: $output;
|
4275 |
-
return $this;
|
4276 |
-
}
|
4277 |
-
private function __dumpTree($node, $intend = 0) {
|
4278 |
-
$whois = $this->whois($node);
|
4279 |
-
$return = '';
|
4280 |
-
if ($whois)
|
4281 |
-
$return .= str_repeat(' - ', $intend).$whois."\n";
|
4282 |
-
if (isset($node->childNodes))
|
4283 |
-
foreach($node->childNodes as $chNode)
|
4284 |
-
$return .= $this->__dumpTree($chNode, $intend+1);
|
4285 |
-
return $return;
|
4286 |
-
}
|
4287 |
-
/**
|
4288 |
-
* Dump htmlOuter and stop script execution. Usefull for debugging.
|
4289 |
-
*
|
4290 |
-
*/
|
4291 |
-
public function dumpDie() {
|
4292 |
-
print __FILE__.':'.__LINE__;
|
4293 |
-
var_dump($this->htmlOuter());
|
4294 |
-
die();
|
4295 |
-
}
|
4296 |
-
}
|
4297 |
-
|
4298 |
-
|
4299 |
-
// -- Multibyte Compatibility functions ---------------------------------------
|
4300 |
-
// http://svn.iphonewebdev.com/lace/lib/mb_compat.php
|
4301 |
-
|
4302 |
-
/**
|
4303 |
-
* mb_internal_encoding()
|
4304 |
-
*
|
4305 |
-
* Included for mbstring pseudo-compatability.
|
4306 |
-
*/
|
4307 |
-
if (!function_exists('mb_internal_encoding'))
|
4308 |
-
{
|
4309 |
-
function mb_internal_encoding($enc) {return true; }
|
4310 |
-
}
|
4311 |
-
|
4312 |
-
/**
|
4313 |
-
* mb_regex_encoding()
|
4314 |
-
*
|
4315 |
-
* Included for mbstring pseudo-compatability.
|
4316 |
-
*/
|
4317 |
-
if (!function_exists('mb_regex_encoding'))
|
4318 |
-
{
|
4319 |
-
function mb_regex_encoding($enc) {return true; }
|
4320 |
-
}
|
4321 |
-
|
4322 |
-
/**
|
4323 |
-
* mb_strlen()
|
4324 |
-
*
|
4325 |
-
* Included for mbstring pseudo-compatability.
|
4326 |
-
*/
|
4327 |
-
if (!function_exists('mb_strlen'))
|
4328 |
-
{
|
4329 |
-
function mb_strlen($str)
|
4330 |
-
{
|
4331 |
-
return strlen($str);
|
4332 |
-
}
|
4333 |
-
}
|
4334 |
-
|
4335 |
-
/**
|
4336 |
-
* mb_strpos()
|
4337 |
-
*
|
4338 |
-
* Included for mbstring pseudo-compatability.
|
4339 |
-
*/
|
4340 |
-
if (!function_exists('mb_strpos'))
|
4341 |
-
{
|
4342 |
-
function mb_strpos($haystack, $needle, $offset=0)
|
4343 |
-
{
|
4344 |
-
return strpos($haystack, $needle, $offset);
|
4345 |
-
}
|
4346 |
-
}
|
4347 |
-
/**
|
4348 |
-
* mb_stripos()
|
4349 |
-
*
|
4350 |
-
* Included for mbstring pseudo-compatability.
|
4351 |
-
*/
|
4352 |
-
if (!function_exists('mb_stripos'))
|
4353 |
-
{
|
4354 |
-
function mb_stripos($haystack, $needle, $offset=0)
|
4355 |
-
{
|
4356 |
-
return stripos($haystack, $needle, $offset);
|
4357 |
-
}
|
4358 |
-
}
|
4359 |
-
|
4360 |
-
/**
|
4361 |
-
* mb_substr()
|
4362 |
-
*
|
4363 |
-
* Included for mbstring pseudo-compatability.
|
4364 |
-
*/
|
4365 |
-
if (!function_exists('mb_substr'))
|
4366 |
-
{
|
4367 |
-
function mb_substr($str, $start, $length=0)
|
4368 |
-
{
|
4369 |
-
return substr($str, $start, $length);
|
4370 |
-
}
|
4371 |
-
}
|
4372 |
-
|
4373 |
-
/**
|
4374 |
-
* mb_substr_count()
|
4375 |
-
*
|
4376 |
-
* Included for mbstring pseudo-compatability.
|
4377 |
-
*/
|
4378 |
-
if (!function_exists('mb_substr_count'))
|
4379 |
-
{
|
4380 |
-
function mb_substr_count($haystack, $needle)
|
4381 |
-
{
|
4382 |
-
return substr_count($haystack, $needle);
|
4383 |
-
}
|
4384 |
-
}
|
4385 |
-
|
4386 |
-
|
4387 |
/**
|
4388 |
* Static namespace for phpQuery functions.
|
4389 |
*
|
@@ -4391,1021 +34,1023 @@ if (!function_exists('mb_substr_count'))
|
|
4391 |
* @package phpQuery
|
4392 |
*/
|
4393 |
abstract class phpQuery {
|
4394 |
-
|
4395 |
-
|
4396 |
-
|
4397 |
-
|
4398 |
-
|
4399 |
-
|
4400 |
-
|
4401 |
-
|
4402 |
-
|
4403 |
// public static $defaultDoctype = 'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"';
|
4404 |
-
|
4405 |
-
|
4406 |
-
|
4407 |
-
|
4408 |
-
|
4409 |
-
|
4410 |
"http://www.w3.org/TR/html4/loose.dtd">';
|
4411 |
-
|
4412 |
-
|
4413 |
-
|
4414 |
-
|
4415 |
-
|
4416 |
-
|
4417 |
-
|
4418 |
-
|
4419 |
-
|
4420 |
-
|
4421 |
-
|
4422 |
-
|
4423 |
-
|
4424 |
-
|
4425 |
-
|
4426 |
-
|
4427 |
-
|
4428 |
-
|
4429 |
-
|
4430 |
-
|
4431 |
-
|
4432 |
-
|
4433 |
-
|
4434 |
-
|
4435 |
-
|
4436 |
-
|
4437 |
-
|
4438 |
-
|
4439 |
-
|
4440 |
-
|
4441 |
-
|
4442 |
-
|
4443 |
-
|
4444 |
-
|
4445 |
-
|
4446 |
-
|
4447 |
-
|
4448 |
-
|
4449 |
-
|
4450 |
-
|
4451 |
-
|
4452 |
-
|
4453 |
// 'async' => true,
|
4454 |
-
|
4455 |
-
|
4456 |
-
|
4457 |
-
|
4458 |
-
|
4459 |
-
|
4460 |
-
|
4461 |
-
|
4462 |
-
|
4463 |
-
|
4464 |
-
|
4465 |
-
|
4466 |
-
|
4467 |
-
|
4468 |
-
|
4469 |
-
|
4470 |
-
|
4471 |
-
|
4472 |
-
|
4473 |
-
|
4474 |
-
|
4475 |
-
|
4476 |
-
|
4477 |
-
|
4478 |
-
|
4479 |
-
|
4480 |
-
|
4481 |
-
|
4482 |
-
|
4483 |
-
|
4484 |
-
|
4485 |
-
|
4486 |
-
|
4487 |
-
|
4488 |
-
|
4489 |
-
|
4490 |
-
|
4491 |
-
|
4492 |
-
|
4493 |
-
|
4494 |
-
|
4495 |
-
|
4496 |
-
|
4497 |
-
|
4498 |
-
|
4499 |
-
|
4500 |
-
|
4501 |
-
|
4502 |
-
|
4503 |
-
|
4504 |
-
|
4505 |
-
|
4506 |
-
|
4507 |
-
|
4508 |
-
|
4509 |
-
|
4510 |
-
|
4511 |
-
|
4512 |
-
|
4513 |
-
|
4514 |
-
|
|
|
|
|
4515 |
// } else if (is_object($context) && ($context instanceof PHPQUERY || is_subclass_of($context, 'phpQueryObject')))
|
4516 |
-
|
4517 |
-
|
4518 |
-
|
4519 |
-
|
4520 |
-
|
4521 |
-
|
4522 |
-
|
4523 |
-
|
4524 |
-
|
4525 |
-
|
4526 |
-
|
4527 |
-
|
4528 |
// $domId = self::newDocument($context->ownerDocument);
|
4529 |
-
|
4530 |
-
|
4531 |
-
|
4532 |
-
|
4533 |
// if (is_object($arg1) && (get_class($arg1) == 'phpQueryObject' || $arg1 instanceof PHPQUERY || is_subclass_of($arg1, 'phpQueryObject'))) {
|
4534 |
-
|
4535 |
-
|
4536 |
-
|
4537 |
-
|
4538 |
-
|
4539 |
-
|
4540 |
-
|
4541 |
-
|
4542 |
-
|
4543 |
-
|
4544 |
-
|
4545 |
-
|
4546 |
-
|
4547 |
-
|
4548 |
-
|
4549 |
-
|
4550 |
-
|
4551 |
-
|
4552 |
-
|
4553 |
-
|
4554 |
-
|
4555 |
-
|
4556 |
-
|
4557 |
-
|
4558 |
-
|
4559 |
-
|
4560 |
-
|
4561 |
-
|
4562 |
-
|
4563 |
-
|
4564 |
-
|
4565 |
-
|
4566 |
-
|
4567 |
-
|
4568 |
-
|
4569 |
-
|
4570 |
-
|
4571 |
-
|
4572 |
-
|
4573 |
-
|
4574 |
-
|
4575 |
-
|
4576 |
-
|
4577 |
-
|
4578 |
-
|
4579 |
-
|
4580 |
-
|
4581 |
// if ($context && ($context instanceof PHPQUERY || is_subclass_of($context, 'phpQueryObject')))
|
4582 |
-
|
4583 |
-
|
4584 |
-
|
4585 |
-
|
4586 |
-
|
4587 |
-
|
4588 |
-
|
4589 |
-
|
4590 |
-
|
4591 |
-
|
4592 |
-
|
4593 |
-
|
4594 |
-
|
4595 |
-
|
4596 |
-
|
4597 |
-
|
4598 |
-
|
4599 |
-
|
4600 |
-
|
4601 |
-
|
4602 |
-
|
4603 |
-
|
4604 |
-
|
4605 |
-
|
4606 |
-
|
4607 |
-
|
4608 |
-
|
4609 |
-
|
4610 |
-
|
4611 |
-
|
4612 |
-
|
4613 |
-
|
4614 |
-
|
4615 |
-
|
4616 |
-
|
4617 |
-
|
4618 |
-
|
4619 |
-
|
4620 |
-
|
4621 |
-
|
4622 |
-
|
4623 |
-
|
4624 |
-
|
4625 |
-
|
4626 |
-
|
4627 |
-
|
4628 |
-
|
4629 |
-
|
4630 |
-
|
4631 |
-
|
4632 |
-
|
4633 |
-
|
4634 |
-
|
4635 |
-
|
4636 |
-
|
4637 |
-
|
4638 |
-
|
4639 |
-
|
4640 |
-
|
4641 |
-
|
4642 |
-
|
4643 |
-
|
4644 |
-
|
4645 |
-
|
4646 |
-
|
4647 |
-
|
4648 |
-
|
4649 |
-
|
4650 |
-
|
4651 |
-
|
4652 |
-
|
4653 |
-
|
4654 |
-
|
4655 |
-
|
4656 |
-
|
4657 |
-
|
4658 |
-
|
4659 |
-
|
4660 |
-
|
4661 |
-
|
4662 |
-
|
4663 |
-
|
4664 |
-
|
4665 |
-
|
4666 |
-
|
4667 |
-
|
4668 |
-
|
4669 |
-
|
4670 |
-
|
4671 |
-
|
4672 |
-
|
4673 |
-
|
4674 |
-
|
4675 |
-
|
4676 |
-
|
4677 |
-
|
4678 |
-
|
4679 |
-
|
4680 |
-
|
4681 |
-
|
4682 |
-
|
4683 |
-
|
4684 |
-
|
4685 |
-
|
4686 |
-
|
4687 |
-
|
4688 |
-
|
4689 |
-
|
4690 |
-
|
4691 |
-
|
4692 |
-
|
4693 |
-
|
4694 |
// create_function('$m, $charset = "'.$charset.'"',
|
4695 |
// 'return $m[1].$m[2]
|
4696 |
// .htmlspecialchars("<"."?php".$m[4]."?".">", ENT_QUOTES|ENT_NOQUOTES, $charset)
|
4697 |
// .$m[5].$m[2];'
|
4698 |
// ),
|
4699 |
-
|
4700 |
-
|
4701 |
-
|
4702 |
-
|
4703 |
-
|
4704 |
//preg_match_all($regex, $php, $matches);
|
4705 |
//var_dump($matches);
|
4706 |
-
|
4707 |
-
|
4708 |
-
|
4709 |
-
|
4710 |
-
|
4711 |
-
|
4712 |
-
|
4713 |
-
|
4714 |
-
|
4715 |
-
|
4716 |
-
|
4717 |
-
|
4718 |
-
|
4719 |
-
|
4720 |
-
|
4721 |
-
|
4722 |
-
|
4723 |
-
|
4724 |
-
|
4725 |
-
|
4726 |
-
|
4727 |
-
|
4728 |
-
|
4729 |
-
|
4730 |
// create_function('$m',
|
4731 |
// 'return "<'.'?php ".htmlspecialchars_decode($m[1])." ?'.'>";'
|
4732 |
// ),
|
4733 |
-
|
4734 |
-
|
4735 |
-
|
4736 |
-
|
4737 |
-
|
4738 |
-
|
4739 |
-
|
4740 |
-
|
4741 |
-
|
4742 |
-
|
4743 |
-
|
4744 |
-
|
4745 |
-
|
4746 |
-
|
4747 |
-
|
4748 |
-
|
4749 |
-
|
4750 |
-
|
4751 |
-
|
4752 |
-
|
4753 |
-
|
4754 |
-
|
4755 |
-
|
4756 |
-
|
4757 |
-
|
4758 |
-
|
4759 |
-
|
4760 |
-
|
4761 |
-
|
4762 |
-
|
4763 |
-
|
4764 |
-
|
4765 |
-
|
4766 |
-
|
4767 |
-
|
4768 |
-
|
4769 |
-
|
4770 |
-
|
4771 |
-
|
4772 |
-
|
4773 |
-
|
4774 |
-
|
4775 |
-
|
4776 |
-
|
4777 |
-
|
4778 |
-
|
4779 |
-
|
4780 |
-
|
4781 |
-
|
4782 |
-
|
4783 |
-
|
4784 |
-
|
4785 |
-
|
4786 |
-
|
4787 |
-
|
4788 |
-
|
4789 |
-
|
4790 |
-
|
4791 |
-
|
4792 |
-
|
4793 |
-
|
4794 |
-
|
4795 |
-
|
4796 |
-
|
4797 |
-
|
4798 |
-
|
4799 |
-
|
4800 |
-
|
4801 |
-
|
4802 |
-
|
4803 |
-
|
4804 |
-
|
4805 |
-
|
4806 |
-
|
4807 |
-
|
4808 |
-
|
4809 |
-
|
4810 |
-
|
4811 |
-
|
4812 |
-
|
4813 |
-
|
4814 |
-
|
4815 |
-
|
4816 |
-
|
4817 |
-
|
4818 |
-
|
4819 |
-
|
4820 |
-
|
4821 |
-
|
4822 |
-
|
4823 |
-
|
4824 |
-
|
4825 |
-
|
4826 |
-
|
4827 |
-
|
4828 |
-
|
4829 |
-
|
4830 |
-
|
4831 |
-
|
4832 |
-
|
4833 |
-
|
4834 |
-
|
4835 |
-
|
4836 |
-
|
4837 |
-
|
4838 |
-
|
4839 |
-
|
4840 |
-
|
4841 |
-
|
4842 |
-
|
4843 |
-
|
4844 |
// $id = $documentID
|
4845 |
// ? $documentID
|
4846 |
// : md5(microtime());
|
4847 |
-
|
4848 |
-
|
4849 |
-
|
4850 |
-
|
4851 |
-
|
4852 |
-
|
4853 |
-
|
4854 |
-
|
4855 |
-
|
4856 |
-
|
4857 |
-
|
4858 |
-
|
4859 |
// $wrapper->id = $id;
|
4860 |
-
|
4861 |
-
|
4862 |
-
|
4863 |
-
|
4864 |
-
|
4865 |
-
|
4866 |
-
|
4867 |
-
|
4868 |
-
|
4869 |
-
|
4870 |
-
|
4871 |
-
|
4872 |
-
|
4873 |
-
|
4874 |
-
|
4875 |
-
|
4876 |
-
|
4877 |
-
|
4878 |
-
|
4879 |
-
|
4880 |
-
|
4881 |
-
|
4882 |
-
|
4883 |
-
|
4884 |
-
|
4885 |
-
|
4886 |
-
|
4887 |
-
|
4888 |
-
|
4889 |
-
|
4890 |
-
|
4891 |
// throw new Exception
|
4892 |
-
|
4893 |
-
|
4894 |
-
|
4895 |
-
|
4896 |
// throw new Exception
|
4897 |
-
|
4898 |
-
|
4899 |
-
|
4900 |
-
|
4901 |
-
|
4902 |
-
|
4903 |
-
|
4904 |
-
|
4905 |
-
|
4906 |
-
|
4907 |
-
|
4908 |
-
|
4909 |
-
|
4910 |
-
|
4911 |
-
|
4912 |
-
|
4913 |
// if (strpos($class, 'phpQuery') === 0)
|
4914 |
// $class = substr($class, 8);
|
4915 |
-
|
4916 |
-
|
4917 |
-
|
4918 |
-
|
4919 |
-
|
4920 |
-
|
4921 |
-
|
4922 |
-
|
4923 |
-
|
4924 |
-
|
4925 |
-
|
4926 |
-
|
4927 |
-
|
4928 |
-
|
4929 |
-
|
4930 |
-
|
4931 |
-
|
4932 |
-
|
4933 |
-
|
4934 |
-
|
4935 |
-
|
4936 |
-
|
4937 |
-
|
4938 |
-
|
4939 |
-
|
4940 |
-
|
4941 |
-
|
4942 |
-
|
4943 |
-
|
4944 |
-
|
4945 |
-
|
4946 |
-
|
4947 |
-
|
4948 |
-
|
4949 |
-
|
4950 |
-
|
4951 |
-
|
4952 |
-
|
4953 |
-
|
4954 |
-
|
4955 |
-
|
4956 |
-
|
4957 |
-
|
4958 |
-
|
4959 |
-
|
4960 |
-
|
4961 |
-
|
4962 |
-
|
4963 |
-
|
4964 |
-
|
4965 |
-
|
4966 |
-
|
4967 |
-
|
4968 |
-
|
4969 |
-
|
4970 |
-
|
4971 |
-
|
4972 |
-
|
4973 |
-
|
4974 |
-
|
4975 |
-
|
4976 |
-
|
4977 |
-
|
4978 |
-
|
4979 |
-
|
4980 |
-
|
4981 |
-
|
4982 |
-
|
4983 |
-
|
4984 |
-
|
4985 |
-
|
4986 |
-
|
4987 |
-
|
4988 |
-
|
4989 |
-
|
4990 |
-
|
4991 |
-
|
4992 |
-
|
4993 |
-
|
4994 |
-
|
4995 |
-
|
4996 |
-
|
4997 |
-
|
4998 |
-
|
4999 |
-
|
5000 |
-
|
5001 |
-
|
5002 |
-
|
5003 |
-
|
5004 |
-
|
5005 |
-
|
5006 |
-
|
5007 |
-
|
5008 |
-
|
5009 |
-
|
5010 |
-
|
5011 |
-
|
5012 |
-
|
5013 |
-
|
5014 |
-
|
5015 |
-
|
5016 |
-
|
5017 |
-
|
5018 |
-
|
5019 |
-
|
5020 |
-
|
5021 |
-
|
5022 |
-
|
5023 |
-
|
5024 |
-
|
5025 |
-
|
5026 |
-
|
5027 |
-
|
5028 |
-
|
5029 |
-
|
5030 |
-
|
5031 |
-
|
5032 |
-
|
5033 |
-
|
5034 |
-
|
5035 |
-
|
5036 |
-
|
5037 |
-
|
5038 |
-
|
5039 |
-
|
5040 |
// $client->setParameterPost(null);
|
5041 |
// $client->setParameterGet(null);
|
5042 |
-
|
5043 |
-
|
5044 |
-
|
5045 |
-
|
5046 |
-
|
5047 |
-
|
5048 |
-
|
5049 |
-
|
5050 |
-
|
5051 |
-
|
5052 |
-
|
5053 |
-
|
5054 |
-
|
5055 |
-
|
5056 |
// 'maxredirects' => 0,
|
5057 |
-
|
5058 |
-
|
5059 |
-
|
5060 |
-
|
5061 |
-
|
5062 |
-
|
5063 |
-
|
5064 |
-
|
5065 |
-
|
5066 |
-
|
5067 |
-
|
5068 |
-
|
5069 |
-
|
5070 |
-
|
5071 |
-
|
5072 |
-
|
5073 |
-
|
5074 |
-
|
5075 |
-
|
5076 |
-
|
5077 |
-
|
5078 |
-
|
5079 |
-
|
5080 |
-
|
5081 |
-
|
5082 |
-
|
5083 |
-
|
5084 |
-
|
5085 |
-
|
5086 |
-
|
5087 |
-
|
5088 |
-
|
5089 |
-
|
5090 |
-
|
5091 |
-
|
5092 |
-
|
5093 |
-
|
5094 |
-
|
5095 |
-
|
5096 |
-
|
5097 |
-
|
5098 |
-
|
5099 |
-
|
5100 |
-
|
5101 |
-
|
5102 |
-
|
5103 |
-
|
5104 |
-
|
5105 |
-
|
5106 |
-
|
5107 |
-
|
5108 |
-
|
5109 |
-
|
5110 |
-
|
5111 |
-
|
5112 |
-
|
5113 |
// 'content-type' => $options['contentType'],
|
5114 |
-
|
5115 |
-
|
5116 |
-
|
5117 |
-
|
5118 |
// 'Connection' => 'keep-alive',
|
5119 |
// 'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
5120 |
-
|
5121 |
-
|
5122 |
-
|
5123 |
-
|
5124 |
-
|
5125 |
-
|
5126 |
-
|
5127 |
-
|
5128 |
-
|
5129 |
-
|
5130 |
-
|
5131 |
-
|
5132 |
-
|
5133 |
-
|
5134 |
-
|
5135 |
-
|
5136 |
-
|
5137 |
-
|
5138 |
-
|
5139 |
-
|
5140 |
-
|
5141 |
-
|
5142 |
-
|
5143 |
-
|
5144 |
-
|
5145 |
-
|
5146 |
-
|
5147 |
-
|
5148 |
-
|
5149 |
-
|
5150 |
-
|
5151 |
-
|
5152 |
-
|
5153 |
-
|
5154 |
-
|
5155 |
-
|
5156 |
-
|
5157 |
-
|
5158 |
-
|
5159 |
-
|
5160 |
-
|
5161 |
// if ($client->getCookieJar())
|
5162 |
// self::debug("Cookies: <pre>".var_export($client->getCookieJar()->getMatchingCookies($options['url']), true)."</pre>\n");
|
5163 |
-
|
5164 |
-
|
5165 |
-
|
5166 |
-
|
5167 |
-
|
5168 |
-
|
5169 |
-
|
5170 |
-
|
5171 |
-
|
5172 |
-
|
5173 |
-
|
5174 |
-
|
5175 |
-
|
5176 |
-
|
5177 |
-
|
5178 |
-
|
5179 |
-
|
5180 |
-
|
5181 |
-
|
5182 |
-
|
5183 |
-
|
5184 |
-
|
5185 |
-
|
5186 |
-
|
5187 |
-
|
5188 |
-
|
5189 |
-
|
5190 |
-
|
5191 |
-
|
5192 |
// if (is_null($domId))
|
5193 |
// $domId = self::$defaultDocumentID ? self::$defaultDocumentID : false;
|
5194 |
// return new phpQueryAjaxResponse($response, $domId);
|
5195 |
-
|
5196 |
-
|
5197 |
-
|
5198 |
-
|
5199 |
-
|
5200 |
-
|
5201 |
-
|
5202 |
-
|
5203 |
-
|
5204 |
-
|
5205 |
-
|
5206 |
-
|
5207 |
-
|
5208 |
-
|
5209 |
-
|
5210 |
-
|
5211 |
-
|
5212 |
-
|
5213 |
-
|
5214 |
-
|
5215 |
-
|
5216 |
-
|
5217 |
-
|
5218 |
-
|
5219 |
-
|
5220 |
-
|
5221 |
-
|
5222 |
-
|
5223 |
-
|
5224 |
-
|
5225 |
-
|
5226 |
-
|
5227 |
-
|
5228 |
-
|
5229 |
-
|
5230 |
-
|
5231 |
-
|
5232 |
-
|
5233 |
-
|
5234 |
-
|
5235 |
-
|
5236 |
-
|
5237 |
-
|
5238 |
-
|
5239 |
-
|
5240 |
-
|
5241 |
-
|
5242 |
-
|
5243 |
-
|
5244 |
-
|
5245 |
-
|
5246 |
-
|
5247 |
-
|
5248 |
-
|
5249 |
-
|
5250 |
-
|
5251 |
-
|
5252 |
-
|
5253 |
-
|
5254 |
-
|
5255 |
-
|
5256 |
-
|
5257 |
-
|
5258 |
-
|
5259 |
-
|
5260 |
-
|
5261 |
-
|
5262 |
-
|
5263 |
-
|
5264 |
-
|
5265 |
-
|
5266 |
-
|
5267 |
-
|
5268 |
-
|
5269 |
-
|
5270 |
-
|
5271 |
-
|
5272 |
-
|
5273 |
-
|
5274 |
-
|
5275 |
-
|
5276 |
-
|
5277 |
-
|
5278 |
-
|
5279 |
-
|
5280 |
-
|
5281 |
-
|
5282 |
-
|
5283 |
-
|
5284 |
-
|
5285 |
-
|
5286 |
-
|
5287 |
-
|
5288 |
-
|
5289 |
-
|
5290 |
-
|
5291 |
-
|
5292 |
-
|
5293 |
-
|
5294 |
-
|
5295 |
-
|
5296 |
-
|
5297 |
-
|
5298 |
-
|
5299 |
-
|
5300 |
-
|
5301 |
-
|
5302 |
-
|
5303 |
-
|
5304 |
-
|
5305 |
-
|
5306 |
-
|
5307 |
-
|
5308 |
-
|
5309 |
-
|
5310 |
-
|
5311 |
-
|
5312 |
-
|
5313 |
-
|
5314 |
-
|
5315 |
-
|
5316 |
-
|
5317 |
-
|
5318 |
-
|
5319 |
-
|
5320 |
-
|
5321 |
-
|
5322 |
-
|
5323 |
-
|
5324 |
-
|
5325 |
-
|
5326 |
-
|
5327 |
-
|
5328 |
-
|
5329 |
-
|
5330 |
-
|
5331 |
-
|
5332 |
-
|
5333 |
-
|
5334 |
-
|
5335 |
-
|
5336 |
-
|
5337 |
-
|
5338 |
-
|
5339 |
-
|
5340 |
-
|
5341 |
-
|
5342 |
-
|
5343 |
-
|
5344 |
-
|
5345 |
-
|
5346 |
-
|
5347 |
-
|
5348 |
-
|
5349 |
|
5350 |
-
|
5351 |
-
|
5352 |
|
5353 |
-
|
5354 |
-
|
5355 |
-
|
5356 |
-
|
5357 |
-
|
5358 |
-
|
5359 |
-
|
5360 |
-
|
5361 |
-
|
5362 |
-
|
5363 |
-
|
5364 |
-
|
5365 |
-
|
5366 |
-
|
5367 |
-
|
5368 |
-
|
5369 |
-
|
5370 |
-
|
5371 |
-
|
5372 |
-
|
5373 |
-
|
5374 |
-
|
5375 |
-
|
5376 |
-
|
5377 |
-
|
5378 |
-
|
5379 |
-
|
5380 |
-
|
5381 |
-
|
5382 |
-
|
5383 |
-
|
5384 |
-
|
5385 |
-
|
5386 |
-
|
5387 |
-
|
5388 |
-
|
5389 |
-
|
5390 |
-
|
5391 |
-
|
5392 |
-
|
5393 |
-
|
5394 |
-
|
5395 |
-
|
5396 |
-
|
5397 |
-
|
5398 |
-
|
5399 |
-
|
5400 |
-
|
5401 |
-
|
5402 |
-
|
5403 |
-
|
5404 |
-
|
5405 |
-
|
5406 |
-
|
5407 |
-
|
5408 |
-
|
5409 |
// $callbackArgs = $args;
|
5410 |
// foreach($args as $i => $arg) {
|
5411 |
// $callbackArgs[$i] = $arg instanceof CallbackParam
|
@@ -5413,233 +1058,233 @@ abstract class phpQuery {
|
|
5413 |
// : $arg;
|
5414 |
// }
|
5415 |
// $vv = call_user_func_array($callback, $callbackArgs);
|
5416 |
-
|
5417 |
-
|
5418 |
-
|
5419 |
-
|
5420 |
-
|
5421 |
-
|
5422 |
-
|
5423 |
-
|
5424 |
-
|
5425 |
-
|
5426 |
-
|
5427 |
-
|
5428 |
-
|
5429 |
-
|
5430 |
-
|
5431 |
-
|
5432 |
-
|
5433 |
-
|
5434 |
-
|
5435 |
-
|
5436 |
-
|
5437 |
-
|
5438 |
-
|
5439 |
-
|
5440 |
-
|
5441 |
-
|
5442 |
-
|
5443 |
-
|
5444 |
-
|
5445 |
-
|
5446 |
-
|
5447 |
-
|
5448 |
-
|
5449 |
-
|
5450 |
-
|
5451 |
-
|
5452 |
-
|
5453 |
-
|
5454 |
-
|
5455 |
-
|
5456 |
-
|
5457 |
-
|
5458 |
-
|
5459 |
-
|
5460 |
-
|
5461 |
-
|
5462 |
-
|
5463 |
-
|
5464 |
-
|
5465 |
-
|
5466 |
-
|
5467 |
-
|
5468 |
-
|
5469 |
-
|
5470 |
-
|
5471 |
-
|
5472 |
-
|
5473 |
-
|
5474 |
// $one = $one->newInstance();
|
5475 |
// $one->elements = $elements;
|
5476 |
// return $one;
|
5477 |
-
|
5478 |
-
|
5479 |
-
|
5480 |
-
|
5481 |
-
|
5482 |
-
|
5483 |
-
|
5484 |
-
|
5485 |
-
|
5486 |
-
|
5487 |
-
|
5488 |
-
|
5489 |
-
|
5490 |
-
|
5491 |
-
|
5492 |
-
|
5493 |
-
|
5494 |
-
|
5495 |
-
|
5496 |
-
|
5497 |
-
|
5498 |
-
|
5499 |
-
|
5500 |
-
|
5501 |
-
|
5502 |
-
|
5503 |
-
|
5504 |
-
|
5505 |
-
|
5506 |
-
|
5507 |
-
|
5508 |
-
|
5509 |
-
|
5510 |
-
|
5511 |
-
|
5512 |
-
|
5513 |
-
|
5514 |
-
|
5515 |
-
|
5516 |
-
|
5517 |
-
|
5518 |
-
|
5519 |
-
|
5520 |
-
|
5521 |
-
|
5522 |
-
|
5523 |
-
|
5524 |
-
|
5525 |
-
|
5526 |
-
|
5527 |
-
|
5528 |
-
|
5529 |
-
|
5530 |
-
|
5531 |
-
|
5532 |
-
|
5533 |
-
|
5534 |
-
|
5535 |
-
|
5536 |
-
|
5537 |
-
|
5538 |
-
|
5539 |
-
|
5540 |
-
|
5541 |
-
|
5542 |
-
|
5543 |
-
|
5544 |
-
|
5545 |
-
|
5546 |
-
|
5547 |
-
|
5548 |
-
|
5549 |
-
|
5550 |
-
|
5551 |
-
|
5552 |
-
|
5553 |
-
|
5554 |
-
|
5555 |
-
|
5556 |
-
|
5557 |
-
|
5558 |
-
|
5559 |
-
|
5560 |
-
|
5561 |
-
|
5562 |
-
|
5563 |
-
|
5564 |
-
|
5565 |
-
|
5566 |
-
|
5567 |
-
|
5568 |
-
|
5569 |
-
|
5570 |
-
|
5571 |
-
|
5572 |
-
|
5573 |
-
|
5574 |
-
|
5575 |
-
|
5576 |
-
|
5577 |
-
|
5578 |
-
|
5579 |
-
|
5580 |
-
|
5581 |
|
5582 |
-
|
5583 |
-
|
5584 |
-
|
5585 |
-
|
5586 |
-
|
5587 |
-
|
5588 |
-
|
5589 |
-
|
5590 |
-
|
5591 |
-
|
5592 |
-
|
5593 |
-
|
5594 |
-
|
5595 |
-
|
5596 |
-
|
5597 |
-
|
5598 |
-
|
5599 |
-
|
5600 |
-
|
5601 |
-
|
5602 |
-
|
5603 |
-
|
5604 |
-
|
5605 |
-
|
5606 |
-
|
5607 |
-
|
5608 |
-
|
5609 |
-
|
5610 |
-
|
5611 |
-
|
5612 |
-
|
5613 |
-
|
5614 |
-
|
5615 |
-
|
5616 |
-
|
5617 |
-
|
5618 |
-
|
5619 |
-
|
5620 |
-
|
5621 |
-
|
5622 |
-
|
5623 |
-
|
5624 |
-
|
5625 |
-
|
5626 |
-
|
5627 |
-
|
5628 |
-
|
5629 |
-
|
5630 |
-
|
5631 |
-
|
5632 |
-
|
5633 |
-
|
5634 |
-
|
5635 |
-
|
5636 |
$name = reset($document->data[$id]);
|
5637 |
-
|
5638 |
-
|
5639 |
-
|
5640 |
-
|
5641 |
-
|
5642 |
-
|
5643 |
}
|
5644 |
/**
|
5645 |
* Plugins static namespace class.
|
@@ -5649,25 +1294,25 @@ abstract class phpQuery {
|
|
5649 |
* @todo move plugin methods here (as statics)
|
5650 |
*/
|
5651 |
class phpQueryPlugins {
|
5652 |
-
|
5653 |
-
|
5654 |
-
|
5655 |
-
|
5656 |
-
|
5657 |
-
|
5658 |
-
|
5659 |
-
|
5660 |
-
|
5661 |
-
|
5662 |
-
|
5663 |
-
|
5664 |
-
|
5665 |
-
|
5666 |
-
|
5667 |
-
|
5668 |
-
|
5669 |
-
|
5670 |
-
|
5671 |
}
|
5672 |
/**
|
5673 |
* Shortcut to phpQuery::pq($arg1, $context)
|
@@ -5679,21 +1324,21 @@ class phpQueryPlugins {
|
|
5679 |
* @package phpQuery
|
5680 |
*/
|
5681 |
function pq($arg1, $context = null) {
|
5682 |
-
|
5683 |
-
|
5684 |
-
|
5685 |
-
|
5686 |
-
|
5687 |
}
|
5688 |
// add plugins dir and Zend framework to include path
|
5689 |
set_include_path(
|
5690 |
-
|
5691 |
-
|
5692 |
-
|
5693 |
);
|
5694 |
// why ? no __call nor __get for statics in php...
|
5695 |
// XXX __callStatic will be available in PHP 5.3
|
5696 |
phpQuery::$plugins = new phpQueryPlugins();
|
5697 |
// include bootstrap file (personal library config)
|
5698 |
if (file_exists(dirname(__FILE__).'/phpQuery/bootstrap.php'))
|
5699 |
-
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Uses updated version of phpQuery (04/17/2018) with some minor tweaks.
|
4 |
+
* https://github.com/electrolinux/phpquery
|
5 |
+
* @version 0.9.6
|
6 |
+
*
|
7 |
* phpQuery is a server-side, chainable, CSS3 selector driven
|
8 |
* Document Object Model (DOM) API based on jQuery JavaScript Library.
|
9 |
*
|
|
|
10 |
* @link http://code.google.com/p/phpquery/
|
11 |
* @link http://phpquery-library.blogspot.com/
|
12 |
* @link http://jquery.com/
|
21 |
define('DOMELEMENT', 'DOMElement');
|
22 |
define('DOMNODELIST', 'DOMNodeList');
|
23 |
define('DOMNODE', 'DOMNode');
|
24 |
+
require_once(dirname(__FILE__).'/phpQuery/DOMEvent.php');
|
25 |
+
require_once(dirname(__FILE__).'/phpQuery/DOMDocumentWrapper.php');
|
26 |
+
require_once(dirname(__FILE__).'/phpQuery/phpQueryEvents.php');
|
27 |
+
require_once(dirname(__FILE__).'/phpQuery/Callback.php');
|
28 |
+
require_once(dirname(__FILE__).'/phpQuery/phpQueryObject.php');
|
29 |
+
require_once(dirname(__FILE__).'/phpQuery/compat/mbstring.php');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
/**
|
31 |
* Static namespace for phpQuery functions.
|
32 |
*
|
34 |
* @package phpQuery
|
35 |
*/
|
36 |
abstract class phpQuery {
|
37 |
+
/**
|
38 |
+
* XXX: Workaround for mbstring problems
|
39 |
+
*
|
40 |
+
* @var bool
|
41 |
+
*/
|
42 |
+
public static $mbstringSupport = true;
|
43 |
+
public static $debug = false;
|
44 |
+
public static $documents = array();
|
45 |
+
public static $defaultDocumentID = null;
|
46 |
// public static $defaultDoctype = 'html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"';
|
47 |
+
/**
|
48 |
+
* Applies only to HTML.
|
49 |
+
*
|
50 |
+
* @var unknown_type
|
51 |
+
*/
|
52 |
+
public static $defaultDoctype = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
53 |
"http://www.w3.org/TR/html4/loose.dtd">';
|
54 |
+
public static $defaultCharset = 'UTF-8';
|
55 |
+
/**
|
56 |
+
* Static namespace for plugins.
|
57 |
+
*
|
58 |
+
* @var object
|
59 |
+
*/
|
60 |
+
public static $plugins = array();
|
61 |
+
/**
|
62 |
+
* List of loaded plugins.
|
63 |
+
*
|
64 |
+
* @var unknown_type
|
65 |
+
*/
|
66 |
+
public static $pluginsLoaded = array();
|
67 |
+
public static $pluginsMethods = array();
|
68 |
+
public static $pluginsStaticMethods = array();
|
69 |
+
public static $extendMethods = array();
|
70 |
+
/**
|
71 |
+
* @TODO implement
|
72 |
+
*/
|
73 |
+
public static $extendStaticMethods = array();
|
74 |
+
/**
|
75 |
+
* Hosts allowed for AJAX connections.
|
76 |
+
* Dot '.' means $_SERVER['HTTP_HOST'] (if any).
|
77 |
+
*
|
78 |
+
* @var array
|
79 |
+
*/
|
80 |
+
public static $ajaxAllowedHosts = array(
|
81 |
+
'.'
|
82 |
+
);
|
83 |
+
/**
|
84 |
+
* AJAX settings.
|
85 |
+
*
|
86 |
+
* @var array
|
87 |
+
* XXX should it be static or not ?
|
88 |
+
*/
|
89 |
+
public static $ajaxSettings = array(
|
90 |
+
'url' => '',//TODO
|
91 |
+
'global' => true,
|
92 |
+
'type' => "GET",
|
93 |
+
'timeout' => null,
|
94 |
+
'contentType' => "application/x-www-form-urlencoded",
|
95 |
+
'processData' => true,
|
96 |
// 'async' => true,
|
97 |
+
'data' => null,
|
98 |
+
'username' => null,
|
99 |
+
'password' => null,
|
100 |
+
'dataType' => null,
|
101 |
+
'ifModified' => null,
|
102 |
+
'accepts' => array(
|
103 |
+
'xml' => "application/xml, text/xml",
|
104 |
+
'html' => "text/html",
|
105 |
+
'script' => "text/javascript, application/javascript",
|
106 |
+
'json' => "application/json, text/javascript",
|
107 |
+
'text' => "text/plain",
|
108 |
+
'_default' => "*/*"
|
109 |
+
)
|
110 |
+
);
|
111 |
+
public static $lastModified = null;
|
112 |
+
public static $active = 0;
|
113 |
+
public static $dumpCount = 0;
|
114 |
+
/**
|
115 |
+
* Multi-purpose function.
|
116 |
+
* Use pq() as shortcut.
|
117 |
+
*
|
118 |
+
* In below examples, $pq is any result of pq(); function.
|
119 |
+
*
|
120 |
+
* 1. Import markup into existing document (without any attaching):
|
121 |
+
* - Import into selected document:
|
122 |
+
* pq('<div/>') // DOESNT accept text nodes at beginning of input string !
|
123 |
+
* - Import into document with ID from $pq->getDocumentID():
|
124 |
+
* pq('<div/>', $pq->getDocumentID())
|
125 |
+
* - Import into same document as DOMNode belongs to:
|
126 |
+
* pq('<div/>', DOMNode)
|
127 |
+
* - Import into document from phpQuery object:
|
128 |
+
* pq('<div/>', $pq)
|
129 |
+
*
|
130 |
+
* 2. Run query:
|
131 |
+
* - Run query on last selected document:
|
132 |
+
* pq('div.myClass')
|
133 |
+
* - Run query on document with ID from $pq->getDocumentID():
|
134 |
+
* pq('div.myClass', $pq->getDocumentID())
|
135 |
+
* - Run query on same document as DOMNode belongs to and use node(s)as root for query:
|
136 |
+
* pq('div.myClass', DOMNode)
|
137 |
+
* - Run query on document from phpQuery object
|
138 |
+
* and use object's stack as root node(s) for query:
|
139 |
+
* pq('div.myClass', $pq)
|
140 |
+
*
|
141 |
+
* @param string|DOMNode|DOMNodeList|array $arg1 HTML markup, CSS Selector, DOMNode or array of DOMNodes
|
142 |
+
* @param string|phpQueryObject|DOMNode $context DOM ID from $pq->getDocumentID(), phpQuery object (determines also query root) or DOMNode (determines also query root)
|
143 |
+
*
|
144 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery|QueryTemplatesPhpQuery|false
|
145 |
+
* phpQuery object or false in case of error.
|
146 |
+
*/
|
147 |
+
public static function pq($arg1, $context = null) {
|
148 |
+
if ($arg1 instanceof DOMNODE && ! isset($context)) {
|
149 |
+
foreach(phpQuery::$documents as $documentWrapper) {
|
150 |
+
$compare = $arg1 instanceof DOMDocument
|
151 |
+
? $arg1 : $arg1->ownerDocument;
|
152 |
+
if ($documentWrapper->document->isSameNode($compare))
|
153 |
+
$context = $documentWrapper->id;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
if (! $context) {
|
157 |
+
$domId = self::$defaultDocumentID;
|
158 |
+
if (! $domId)
|
159 |
+
throw new Exception("Can't use last created DOM, because there isn't any. Use phpQuery::newDocument() first.");
|
160 |
// } else if (is_object($context) && ($context instanceof PHPQUERY || is_subclass_of($context, 'phpQueryObject')))
|
161 |
+
} else if (is_object($context) && $context instanceof phpQueryObject)
|
162 |
+
$domId = $context->getDocumentID();
|
163 |
+
else if ($context instanceof DOMDOCUMENT) {
|
164 |
+
$domId = self::getDocumentID($context);
|
165 |
+
if (! $domId) {
|
166 |
+
//throw new Exception('Orphaned DOMDocument');
|
167 |
+
$domId = self::newDocument($context)->getDocumentID();
|
168 |
+
}
|
169 |
+
} else if ($context instanceof DOMNODE) {
|
170 |
+
$domId = self::getDocumentID($context);
|
171 |
+
if (! $domId) {
|
172 |
+
throw new Exception('Orphaned DOMNode');
|
173 |
// $domId = self::newDocument($context->ownerDocument);
|
174 |
+
}
|
175 |
+
} else
|
176 |
+
$domId = $context;
|
177 |
+
if ($arg1 instanceof phpQueryObject) {
|
178 |
// if (is_object($arg1) && (get_class($arg1) == 'phpQueryObject' || $arg1 instanceof PHPQUERY || is_subclass_of($arg1, 'phpQueryObject'))) {
|
179 |
+
/**
|
180 |
+
* Return $arg1 or import $arg1 stack if document differs:
|
181 |
+
* pq(pq('<div/>'))
|
182 |
+
*/
|
183 |
+
if ($arg1->getDocumentID() == $domId)
|
184 |
+
return $arg1;
|
185 |
+
$class = get_class($arg1);
|
186 |
+
// support inheritance by passing old object to overloaded constructor
|
187 |
+
$phpQuery = $class != 'phpQuery'
|
188 |
+
? new $class($arg1, $domId)
|
189 |
+
: new phpQueryObject($domId);
|
190 |
+
$phpQuery->elements = array();
|
191 |
+
foreach($arg1->elements as $node)
|
192 |
+
$phpQuery->elements[] = $phpQuery->document->importNode($node, true);
|
193 |
+
return $phpQuery;
|
194 |
+
} else if ($arg1 instanceof DOMNODE || (is_array($arg1) && isset($arg1[0]) && $arg1[0] instanceof DOMNODE)) {
|
195 |
+
/*
|
196 |
+
* Wrap DOM nodes with phpQuery object, import into document when needed:
|
197 |
+
* pq(array($domNode1, $domNode2))
|
198 |
+
*/
|
199 |
+
$phpQuery = new phpQueryObject($domId);
|
200 |
+
if (!($arg1 instanceof DOMNODELIST) && ! is_array($arg1))
|
201 |
+
$arg1 = array($arg1);
|
202 |
+
$phpQuery->elements = array();
|
203 |
+
foreach($arg1 as $node) {
|
204 |
+
$sameDocument = $node->ownerDocument instanceof DOMDOCUMENT
|
205 |
+
&& ! $node->ownerDocument->isSameNode($phpQuery->document);
|
206 |
+
$phpQuery->elements[] = $sameDocument
|
207 |
+
? $phpQuery->document->importNode($node, true)
|
208 |
+
: $node;
|
209 |
+
}
|
210 |
+
return $phpQuery;
|
211 |
+
} else if (self::isMarkup($arg1)) {
|
212 |
+
/**
|
213 |
+
* Import HTML:
|
214 |
+
* pq('<div/>')
|
215 |
+
*/
|
216 |
+
$phpQuery = new phpQueryObject($domId);
|
217 |
+
return $phpQuery->newInstance(
|
218 |
+
$phpQuery->documentWrapper->import($arg1)
|
219 |
+
);
|
220 |
+
} else {
|
221 |
+
/**
|
222 |
+
* Run CSS query:
|
223 |
+
* pq('div.myClass')
|
224 |
+
*/
|
225 |
+
$phpQuery = new phpQueryObject($domId);
|
226 |
// if ($context && ($context instanceof PHPQUERY || is_subclass_of($context, 'phpQueryObject')))
|
227 |
+
if ($context && $context instanceof phpQueryObject)
|
228 |
+
$phpQuery->elements = $context->elements;
|
229 |
+
else if ($context && $context instanceof DOMNODELIST) {
|
230 |
+
$phpQuery->elements = array();
|
231 |
+
foreach($context as $node)
|
232 |
+
$phpQuery->elements[] = $node;
|
233 |
+
} else if ($context && $context instanceof DOMNODE)
|
234 |
+
$phpQuery->elements = array($context);
|
235 |
+
return $phpQuery->find($arg1);
|
236 |
+
}
|
237 |
+
}
|
238 |
+
/**
|
239 |
+
* Sets default document to $id. Document has to be loaded prior
|
240 |
+
* to using this method.
|
241 |
+
* $id can be retrived via getDocumentID() or getDocumentIDRef().
|
242 |
+
*
|
243 |
+
* @param unknown_type $id
|
244 |
+
*/
|
245 |
+
public static function selectDocument($id) {
|
246 |
+
$id = self::getDocumentID($id);
|
247 |
+
self::debug("Selecting document '$id' as default one");
|
248 |
+
self::$defaultDocumentID = self::getDocumentID($id);
|
249 |
+
}
|
250 |
+
/**
|
251 |
+
* Returns document with id $id or last used as phpQueryObject.
|
252 |
+
* $id can be retrived via getDocumentID() or getDocumentIDRef().
|
253 |
+
* Chainable.
|
254 |
+
*
|
255 |
+
* @see phpQuery::selectDocument()
|
256 |
+
* @param unknown_type $id
|
257 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
258 |
+
*/
|
259 |
+
public static function getDocument($id = null) {
|
260 |
+
if ($id)
|
261 |
+
phpQuery::selectDocument($id);
|
262 |
+
else
|
263 |
+
$id = phpQuery::$defaultDocumentID;
|
264 |
+
return new phpQueryObject($id);
|
265 |
+
}
|
266 |
+
/**
|
267 |
+
* Creates new document from markup.
|
268 |
+
* Chainable.
|
269 |
+
*
|
270 |
+
* @param unknown_type $markup
|
271 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
272 |
+
*/
|
273 |
+
public static function newDocument($markup = null, $contentType = null) {
|
274 |
+
if (! $markup)
|
275 |
+
$markup = '';
|
276 |
+
$documentID = phpQuery::createDocumentWrapper($markup, $contentType);
|
277 |
+
return new phpQueryObject($documentID);
|
278 |
+
}
|
279 |
+
/**
|
280 |
+
* Creates new document from markup.
|
281 |
+
* Chainable.
|
282 |
+
*
|
283 |
+
* @param unknown_type $markup
|
284 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
285 |
+
*/
|
286 |
+
public static function newDocumentHTML($markup = null, $charset = null) {
|
287 |
+
$contentType = $charset
|
288 |
+
? ";charset=$charset"
|
289 |
+
: '';
|
290 |
+
return self::newDocument($markup, "text/html{$contentType}");
|
291 |
+
}
|
292 |
+
/**
|
293 |
+
* Creates new document from markup.
|
294 |
+
* Chainable.
|
295 |
+
*
|
296 |
+
* @param unknown_type $markup
|
297 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
298 |
+
*/
|
299 |
+
public static function newDocumentXML($markup = null, $charset = null) {
|
300 |
+
$contentType = $charset
|
301 |
+
? ";charset=$charset"
|
302 |
+
: '';
|
303 |
+
return self::newDocument($markup, "text/xml{$contentType}");
|
304 |
+
}
|
305 |
+
/**
|
306 |
+
* Creates new document from markup.
|
307 |
+
* Chainable.
|
308 |
+
*
|
309 |
+
* @param unknown_type $markup
|
310 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
311 |
+
*/
|
312 |
+
public static function newDocumentXHTML($markup = null, $charset = null) {
|
313 |
+
$contentType = $charset
|
314 |
+
? ";charset=$charset"
|
315 |
+
: '';
|
316 |
+
return self::newDocument($markup, "application/xhtml+xml{$contentType}");
|
317 |
+
}
|
318 |
+
/**
|
319 |
+
* Creates new document from markup.
|
320 |
+
* Chainable.
|
321 |
+
*
|
322 |
+
* @param unknown_type $markup
|
323 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
324 |
+
*/
|
325 |
+
public static function newDocumentPHP($markup = null, $contentType = "text/html") {
|
326 |
+
// TODO pass charset to phpToMarkup if possible (use DOMDocumentWrapper function)
|
327 |
+
$markup = phpQuery::phpToMarkup($markup, self::$defaultCharset);
|
328 |
+
return self::newDocument($markup, $contentType);
|
329 |
+
}
|
330 |
+
public static function phpToMarkup($php, $charset = 'utf-8') {
|
331 |
+
$regexes = array(
|
332 |
+
'@(<(?!\\?)(?:[^>]|\\?>)+\\w+\\s*=\\s*)(\')([^\']*)<'.'?php?(.*?)(?:\\?>)([^\']*)\'@s',
|
333 |
+
'@(<(?!\\?)(?:[^>]|\\?>)+\\w+\\s*=\\s*)(")([^"]*)<'.'?php?(.*?)(?:\\?>)([^"]*)"@s',
|
334 |
+
);
|
335 |
+
foreach($regexes as $regex)
|
336 |
+
while (preg_match($regex, $php, $matches)) {
|
337 |
+
$php = preg_replace_callback(
|
338 |
+
$regex,
|
339 |
// create_function('$m, $charset = "'.$charset.'"',
|
340 |
// 'return $m[1].$m[2]
|
341 |
// .htmlspecialchars("<"."?php".$m[4]."?".">", ENT_QUOTES|ENT_NOQUOTES, $charset)
|
342 |
// .$m[5].$m[2];'
|
343 |
// ),
|
344 |
+
array('phpQuery', '_phpToMarkupCallback'),
|
345 |
+
$php
|
346 |
+
);
|
347 |
+
}
|
348 |
+
$regex = '@(^|>[^<]*)+?(<\?php(.*?)(\?>))@s';
|
349 |
//preg_match_all($regex, $php, $matches);
|
350 |
//var_dump($matches);
|
351 |
+
$php = preg_replace($regex, '\\1<php><!-- \\3 --></php>', $php);
|
352 |
+
return $php;
|
353 |
+
}
|
354 |
+
public static function _phpToMarkupCallback($php, $charset = 'utf-8') {
|
355 |
+
return $m[1].$m[2]
|
356 |
+
.htmlspecialchars("<"."?php".$m[4]."?".">", ENT_QUOTES|ENT_NOQUOTES, $charset)
|
357 |
+
.$m[5].$m[2];
|
358 |
+
}
|
359 |
+
public static function _markupToPHPCallback($m) {
|
360 |
+
return "<"."?php ".htmlspecialchars_decode($m[1])." ?".">";
|
361 |
+
}
|
362 |
+
/**
|
363 |
+
* Converts document markup containing PHP code generated by phpQuery::php()
|
364 |
+
* into valid (executable) PHP code syntax.
|
365 |
+
*
|
366 |
+
* @param string|phpQueryObject $content
|
367 |
+
* @return string PHP code.
|
368 |
+
*/
|
369 |
+
public static function markupToPHP($content) {
|
370 |
+
if ($content instanceof phpQueryObject)
|
371 |
+
$content = $content->markupOuter();
|
372 |
+
/* <php>...</php> to <?php...? > */
|
373 |
+
$content = preg_replace_callback(
|
374 |
+
'@<php>\s*<!--(.*?)-->\s*</php>@s',
|
375 |
// create_function('$m',
|
376 |
// 'return "<'.'?php ".htmlspecialchars_decode($m[1])." ?'.'>";'
|
377 |
// ),
|
378 |
+
array('phpQuery', '_markupToPHPCallback'),
|
379 |
+
$content
|
380 |
+
);
|
381 |
+
/* <node attr='< ?php ? >'> extra space added to save highlighters */
|
382 |
+
$regexes = array(
|
383 |
+
'@(<(?!\\?)(?:[^>]|\\?>)+\\w+\\s*=\\s*)(\')([^\']*)(?:<|%3C)\\?(?:php)?(.*?)(?:\\?(?:>|%3E))([^\']*)\'@s',
|
384 |
+
'@(<(?!\\?)(?:[^>]|\\?>)+\\w+\\s*=\\s*)(")([^"]*)(?:<|%3C)\\?(?:php)?(.*?)(?:\\?(?:>|%3E))([^"]*)"@s',
|
385 |
+
);
|
386 |
+
foreach($regexes as $regex)
|
387 |
+
while (preg_match($regex, $content))
|
388 |
+
$content = preg_replace_callback(
|
389 |
+
$regex,
|
390 |
+
function ($m) {
|
391 |
+
return $m[1].$m[2].$m[3]."<?php "
|
392 |
+
.str_replace(
|
393 |
+
array("%20", "%3E", "%09", " ", "	", "%7B", "%24", "%7D", "%22", "%5B", "%5D"),
|
394 |
+
array(" ", ">", " ", "\n", " ", "{", "$", "}", '"', "[", "]"),
|
395 |
+
htmlspecialchars_decode($m[4])
|
396 |
+
)
|
397 |
+
." ?>".$m[5].$m[2];
|
398 |
+
},
|
399 |
+
$content
|
400 |
+
);
|
401 |
+
return $content;
|
402 |
+
}
|
403 |
+
/**
|
404 |
+
* Creates new document from file $file.
|
405 |
+
* Chainable.
|
406 |
+
*
|
407 |
+
* @param string $file URLs allowed. See File wrapper page at php.net for more supported sources.
|
408 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
409 |
+
*/
|
410 |
+
public static function newDocumentFile($file, $contentType = null) {
|
411 |
+
$documentID = self::createDocumentWrapper(
|
412 |
+
file_get_contents($file), $contentType
|
413 |
+
);
|
414 |
+
return new phpQueryObject($documentID);
|
415 |
+
}
|
416 |
+
/**
|
417 |
+
* Creates new document from markup.
|
418 |
+
* Chainable.
|
419 |
+
*
|
420 |
+
* @param unknown_type $markup
|
421 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
422 |
+
*/
|
423 |
+
public static function newDocumentFileHTML($file, $charset = null) {
|
424 |
+
$contentType = $charset
|
425 |
+
? ";charset=$charset"
|
426 |
+
: '';
|
427 |
+
return self::newDocumentFile($file, "text/html{$contentType}");
|
428 |
+
}
|
429 |
+
/**
|
430 |
+
* Creates new document from markup.
|
431 |
+
* Chainable.
|
432 |
+
*
|
433 |
+
* @param unknown_type $markup
|
434 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
435 |
+
*/
|
436 |
+
public static function newDocumentFileXML($file, $charset = null) {
|
437 |
+
$contentType = $charset
|
438 |
+
? ";charset=$charset"
|
439 |
+
: '';
|
440 |
+
return self::newDocumentFile($file, "text/xml{$contentType}");
|
441 |
+
}
|
442 |
+
/**
|
443 |
+
* Creates new document from markup.
|
444 |
+
* Chainable.
|
445 |
+
*
|
446 |
+
* @param unknown_type $markup
|
447 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
448 |
+
*/
|
449 |
+
public static function newDocumentFileXHTML($file, $charset = null) {
|
450 |
+
$contentType = $charset
|
451 |
+
? ";charset=$charset"
|
452 |
+
: '';
|
453 |
+
return self::newDocumentFile($file, "application/xhtml+xml{$contentType}");
|
454 |
+
}
|
455 |
+
/**
|
456 |
+
* Creates new document from markup.
|
457 |
+
* Chainable.
|
458 |
+
*
|
459 |
+
* @param unknown_type $markup
|
460 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
461 |
+
*/
|
462 |
+
public static function newDocumentFilePHP($file, $contentType = null) {
|
463 |
+
return self::newDocumentPHP(file_get_contents($file), $contentType);
|
464 |
+
}
|
465 |
+
/**
|
466 |
+
* Reuses existing DOMDocument object.
|
467 |
+
* Chainable.
|
468 |
+
*
|
469 |
+
* @param $document DOMDocument
|
470 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
471 |
+
* @TODO support DOMDocument
|
472 |
+
*/
|
473 |
+
public static function loadDocument($document) {
|
474 |
+
// TODO
|
475 |
+
die('TODO loadDocument');
|
476 |
+
}
|
477 |
+
/**
|
478 |
+
* Enter description here...
|
479 |
+
*
|
480 |
+
* @param unknown_type $html
|
481 |
+
* @param unknown_type $domId
|
482 |
+
* @return unknown New DOM ID
|
483 |
+
* @todo support PHP tags in input
|
484 |
+
* @todo support passing DOMDocument object from self::loadDocument
|
485 |
+
*/
|
486 |
+
protected static function createDocumentWrapper($html, $contentType = null, $documentID = null) {
|
487 |
+
if (function_exists('domxml_open_mem'))
|
488 |
+
throw new Exception("Old PHP4 DOM XML extension detected. phpQuery won't work until this extension is enabled.");
|
489 |
// $id = $documentID
|
490 |
// ? $documentID
|
491 |
// : md5(microtime());
|
492 |
+
$document = null;
|
493 |
+
if ($html instanceof DOMDOCUMENT) {
|
494 |
+
if (self::getDocumentID($html)) {
|
495 |
+
// document already exists in phpQuery::$documents, make a copy
|
496 |
+
$document = clone $html;
|
497 |
+
} else {
|
498 |
+
// new document, add it to phpQuery::$documents
|
499 |
+
$wrapper = new DOMDocumentWrapper($html, $contentType, $documentID);
|
500 |
+
}
|
501 |
+
} else {
|
502 |
+
$wrapper = new DOMDocumentWrapper($html, $contentType, $documentID);
|
503 |
+
}
|
504 |
// $wrapper->id = $id;
|
505 |
+
// bind document
|
506 |
+
phpQuery::$documents[$wrapper->id] = $wrapper;
|
507 |
+
// remember last loaded document
|
508 |
+
phpQuery::selectDocument($wrapper->id);
|
509 |
+
return $wrapper->id;
|
510 |
+
}
|
511 |
+
/**
|
512 |
+
* Extend class namespace.
|
513 |
+
*
|
514 |
+
* @param string|array $target
|
515 |
+
* @param array $source
|
516 |
+
* @TODO support string $source
|
517 |
+
* @return unknown_type
|
518 |
+
*/
|
519 |
+
public static function extend($target, $source) {
|
520 |
+
switch($target) {
|
521 |
+
case 'phpQueryObject':
|
522 |
+
$targetRef = &self::$extendMethods;
|
523 |
+
$targetRef2 = &self::$pluginsMethods;
|
524 |
+
break;
|
525 |
+
case 'phpQuery':
|
526 |
+
$targetRef = &self::$extendStaticMethods;
|
527 |
+
$targetRef2 = &self::$pluginsStaticMethods;
|
528 |
+
break;
|
529 |
+
default:
|
530 |
+
throw new Exception("Unsupported \$target type");
|
531 |
+
}
|
532 |
+
if (is_string($source))
|
533 |
+
$source = array($source => $source);
|
534 |
+
foreach($source as $method => $callback) {
|
535 |
+
if (isset($targetRef[$method])) {
|
536 |
// throw new Exception
|
537 |
+
self::debug("Duplicate method '{$method}', can\'t extend '{$target}'");
|
538 |
+
continue;
|
539 |
+
}
|
540 |
+
if (isset($targetRef2[$method])) {
|
541 |
// throw new Exception
|
542 |
+
self::debug("Duplicate method '{$method}' from plugin '{$targetRef2[$method]}',"
|
543 |
+
." can\'t extend '{$target}'");
|
544 |
+
continue;
|
545 |
+
}
|
546 |
+
$targetRef[$method] = $callback;
|
547 |
+
}
|
548 |
+
return true;
|
549 |
+
}
|
550 |
+
/**
|
551 |
+
* Extend phpQuery with $class from $file.
|
552 |
+
*
|
553 |
+
* @param string $class Extending class name. Real class name can be prepended phpQuery_.
|
554 |
+
* @param string $file Filename to include. Defaults to "{$class}.php".
|
555 |
+
*/
|
556 |
+
public static function plugin($class, $file = null) {
|
557 |
+
// TODO $class checked agains phpQuery_$class
|
558 |
// if (strpos($class, 'phpQuery') === 0)
|
559 |
// $class = substr($class, 8);
|
560 |
+
if (in_array($class, self::$pluginsLoaded))
|
561 |
+
return true;
|
562 |
+
if (! $file)
|
563 |
+
$file = $class.'.php';
|
564 |
+
$objectClassExists = class_exists('phpQueryObjectPlugin_'.$class);
|
565 |
+
$staticClassExists = class_exists('phpQueryPlugin_'.$class);
|
566 |
+
if (! $objectClassExists && ! $staticClassExists)
|
567 |
+
require_once($file);
|
568 |
+
self::$pluginsLoaded[] = $class;
|
569 |
+
// static methods
|
570 |
+
if (class_exists('phpQueryPlugin_'.$class)) {
|
571 |
+
$realClass = 'phpQueryPlugin_'.$class;
|
572 |
+
$vars = get_class_vars($realClass);
|
573 |
+
$loop = isset($vars['phpQueryMethods'])
|
574 |
+
&& ! is_null($vars['phpQueryMethods'])
|
575 |
+
? $vars['phpQueryMethods']
|
576 |
+
: get_class_methods($realClass);
|
577 |
+
foreach($loop as $method) {
|
578 |
+
if ($method == '__initialize')
|
579 |
+
continue;
|
580 |
+
if (! is_callable(array($realClass, $method)))
|
581 |
+
continue;
|
582 |
+
if (isset(self::$pluginsStaticMethods[$method])) {
|
583 |
+
throw new Exception("Duplicate method '{$method}' from plugin '{$c}' conflicts with same method from plugin '".self::$pluginsStaticMethods[$method]."'");
|
584 |
+
}
|
585 |
+
self::$pluginsStaticMethods[$method] = $class;
|
586 |
+
}
|
587 |
+
if (method_exists($realClass, '__initialize'))
|
588 |
+
call_user_func_array(array($realClass, '__initialize'), array());
|
589 |
+
}
|
590 |
+
// object methods
|
591 |
+
if (class_exists('phpQueryObjectPlugin_'.$class)) {
|
592 |
+
$realClass = 'phpQueryObjectPlugin_'.$class;
|
593 |
+
$vars = get_class_vars($realClass);
|
594 |
+
$loop = isset($vars['phpQueryMethods'])
|
595 |
+
&& ! is_null($vars['phpQueryMethods'])
|
596 |
+
? $vars['phpQueryMethods']
|
597 |
+
: get_class_methods($realClass);
|
598 |
+
foreach($loop as $method) {
|
599 |
+
if (! is_callable(array($realClass, $method)))
|
600 |
+
continue;
|
601 |
+
if (isset(self::$pluginsMethods[$method])) {
|
602 |
+
throw new Exception("Duplicate method '{$method}' from plugin '{$c}' conflicts with same method from plugin '".self::$pluginsMethods[$method]."'");
|
603 |
+
continue;
|
604 |
+
}
|
605 |
+
self::$pluginsMethods[$method] = $class;
|
606 |
+
}
|
607 |
+
}
|
608 |
+
return true;
|
609 |
+
}
|
610 |
+
/**
|
611 |
+
* Unloades all or specified document from memory.
|
612 |
+
*
|
613 |
+
* @param mixed $documentID @see phpQuery::getDocumentID() for supported types.
|
614 |
+
*/
|
615 |
+
public static function unloadDocuments($id = null) {
|
616 |
+
if (isset($id)) {
|
617 |
+
if ($id = self::getDocumentID($id))
|
618 |
+
unset(phpQuery::$documents[$id]);
|
619 |
+
} else {
|
620 |
+
foreach(phpQuery::$documents as $k => $v) {
|
621 |
+
unset(phpQuery::$documents[$k]);
|
622 |
+
}
|
623 |
+
}
|
624 |
+
}
|
625 |
+
/**
|
626 |
+
* Parses phpQuery object or HTML result against PHP tags and makes them active.
|
627 |
+
*
|
628 |
+
* @param phpQuery|string $content
|
629 |
+
* @deprecated
|
630 |
+
* @return string
|
631 |
+
*/
|
632 |
+
public static function unsafePHPTags($content) {
|
633 |
+
return self::markupToPHP($content);
|
634 |
+
}
|
635 |
+
public static function DOMNodeListToArray($DOMNodeList) {
|
636 |
+
$array = array();
|
637 |
+
if (! $DOMNodeList)
|
638 |
+
return $array;
|
639 |
+
foreach($DOMNodeList as $node)
|
640 |
+
$array[] = $node;
|
641 |
+
return $array;
|
642 |
+
}
|
643 |
+
/**
|
644 |
+
* Checks if $input is HTML string, which has to start with '<'.
|
645 |
+
*
|
646 |
+
* @deprecated
|
647 |
+
* @param String $input
|
648 |
+
* @return Bool
|
649 |
+
* @todo still used ?
|
650 |
+
*/
|
651 |
+
public static function isMarkup($input) {
|
652 |
+
return ! is_array($input) && substr(trim($input), 0, 1) == '<';
|
653 |
+
}
|
654 |
+
public static function debug($text) {
|
655 |
+
if (self::$debug)
|
656 |
+
print var_dump($text);
|
657 |
+
}
|
658 |
+
/**
|
659 |
+
* Make an AJAX request.
|
660 |
+
*
|
661 |
+
* @param array See $options http://docs.jquery.com/Ajax/jQuery.ajax#toptions
|
662 |
+
* Additional options are:
|
663 |
+
* 'document' - document for global events, @see phpQuery::getDocumentID()
|
664 |
+
* 'referer' - implemented
|
665 |
+
* 'requested_with' - TODO; not implemented (X-Requested-With)
|
666 |
+
* @return Zend_Http_Client
|
667 |
+
* @link http://docs.jquery.com/Ajax/jQuery.ajax
|
668 |
+
*
|
669 |
+
* @TODO $options['cache']
|
670 |
+
* @TODO $options['processData']
|
671 |
+
* @TODO $options['xhr']
|
672 |
+
* @TODO $options['data'] as string
|
673 |
+
* @TODO XHR interface
|
674 |
+
*/
|
675 |
+
public static function ajax($options = array(), $xhr = null) {
|
676 |
+
$options = array_merge(
|
677 |
+
self::$ajaxSettings, $options
|
678 |
+
);
|
679 |
+
$documentID = isset($options['document'])
|
680 |
+
? self::getDocumentID($options['document'])
|
681 |
+
: null;
|
682 |
+
if ($xhr) {
|
683 |
+
// reuse existing XHR object, but clean it up
|
684 |
+
$client = $xhr;
|
685 |
// $client->setParameterPost(null);
|
686 |
// $client->setParameterGet(null);
|
687 |
+
$client->setAuth(false);
|
688 |
+
$client->setHeaders("If-Modified-Since", null);
|
689 |
+
$client->setHeaders("Referer", null);
|
690 |
+
$client->resetParameters();
|
691 |
+
} else {
|
692 |
+
// create new XHR object
|
693 |
+
require_once('Zend/Http/Client.php');
|
694 |
+
$client = new Zend_Http_Client();
|
695 |
+
$client->setCookieJar();
|
696 |
+
}
|
697 |
+
if (isset($options['timeout']))
|
698 |
+
$client->setConfig(array(
|
699 |
+
'timeout' => $options['timeout'],
|
700 |
+
));
|
701 |
// 'maxredirects' => 0,
|
702 |
+
foreach(self::$ajaxAllowedHosts as $k => $host)
|
703 |
+
if ($host == '.' && isset($_SERVER['HTTP_HOST']))
|
704 |
+
self::$ajaxAllowedHosts[$k] = $_SERVER['HTTP_HOST'];
|
705 |
+
$host = parse_url($options['url'], PHP_URL_HOST);
|
706 |
+
if (! in_array($host, self::$ajaxAllowedHosts)) {
|
707 |
+
throw new Exception("Request not permitted, host '$host' not present in "
|
708 |
+
."phpQuery::\$ajaxAllowedHosts");
|
709 |
+
}
|
710 |
+
// JSONP
|
711 |
+
$jsre = "/=\\?(&|$)/";
|
712 |
+
if (isset($options['dataType']) && $options['dataType'] == 'jsonp') {
|
713 |
+
$jsonpCallbackParam = $options['jsonp']
|
714 |
+
? $options['jsonp'] : 'callback';
|
715 |
+
if (strtolower($options['type']) == 'get') {
|
716 |
+
if (! preg_match($jsre, $options['url'])) {
|
717 |
+
$sep = strpos($options['url'], '?')
|
718 |
+
? '&' : '?';
|
719 |
+
$options['url'] .= "$sep$jsonpCallbackParam=?";
|
720 |
+
}
|
721 |
+
} else if ($options['data']) {
|
722 |
+
$jsonp = false;
|
723 |
+
foreach($options['data'] as $n => $v) {
|
724 |
+
if ($v == '?')
|
725 |
+
$jsonp = true;
|
726 |
+
}
|
727 |
+
if (! $jsonp) {
|
728 |
+
$options['data'][$jsonpCallbackParam] = '?';
|
729 |
+
}
|
730 |
+
}
|
731 |
+
$options['dataType'] = 'json';
|
732 |
+
}
|
733 |
+
if (isset($options['dataType']) && $options['dataType'] == 'json') {
|
734 |
+
$jsonpCallback = 'json_'.md5(microtime());
|
735 |
+
$jsonpData = $jsonpUrl = false;
|
736 |
+
if ($options['data']) {
|
737 |
+
foreach($options['data'] as $n => $v) {
|
738 |
+
if ($v == '?')
|
739 |
+
$jsonpData = $n;
|
740 |
+
}
|
741 |
+
}
|
742 |
+
if (preg_match($jsre, $options['url']))
|
743 |
+
$jsonpUrl = true;
|
744 |
+
if ($jsonpData !== false || $jsonpUrl) {
|
745 |
+
// remember callback name for httpData()
|
746 |
+
$options['_jsonp'] = $jsonpCallback;
|
747 |
+
if ($jsonpData !== false)
|
748 |
+
$options['data'][$jsonpData] = $jsonpCallback;
|
749 |
+
if ($jsonpUrl)
|
750 |
+
$options['url'] = preg_replace($jsre, "=$jsonpCallback\\1", $options['url']);
|
751 |
+
}
|
752 |
+
}
|
753 |
+
$client->setUri($options['url']);
|
754 |
+
$client->setMethod(strtoupper($options['type']));
|
755 |
+
if (isset($options['referer']) && $options['referer'])
|
756 |
+
$client->setHeaders('Referer', $options['referer']);
|
757 |
+
$client->setHeaders(array(
|
758 |
// 'content-type' => $options['contentType'],
|
759 |
+
'User-Agent' => 'Mozilla/5.0 (X11; U; Linux x86; en-US; rv:1.9.0.5) Gecko'
|
760 |
+
.'/2008122010 Firefox/3.0.5',
|
761 |
+
// TODO custom charset
|
762 |
+
'Accept-Charset' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
|
763 |
// 'Connection' => 'keep-alive',
|
764 |
// 'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
765 |
+
'Accept-Language' => 'en-us,en;q=0.5',
|
766 |
+
));
|
767 |
+
if ($options['username'])
|
768 |
+
$client->setAuth($options['username'], $options['password']);
|
769 |
+
if (isset($options['ifModified']) && $options['ifModified'])
|
770 |
+
$client->setHeaders("If-Modified-Since",
|
771 |
+
self::$lastModified
|
772 |
+
? self::$lastModified
|
773 |
+
: "Thu, 01 Jan 1970 00:00:00 GMT"
|
774 |
+
);
|
775 |
+
$client->setHeaders("Accept",
|
776 |
+
isset($options['dataType'])
|
777 |
+
&& isset(self::$ajaxSettings['accepts'][ $options['dataType'] ])
|
778 |
+
? self::$ajaxSettings['accepts'][ $options['dataType'] ].", */*"
|
779 |
+
: self::$ajaxSettings['accepts']['_default']
|
780 |
+
);
|
781 |
+
// TODO $options['processData']
|
782 |
+
if ($options['data'] instanceof phpQueryObject) {
|
783 |
+
$serialized = $options['data']->serializeArray($options['data']);
|
784 |
+
$options['data'] = array();
|
785 |
+
foreach($serialized as $r)
|
786 |
+
$options['data'][ $r['name'] ] = $r['value'];
|
787 |
+
}
|
788 |
+
if (strtolower($options['type']) == 'get') {
|
789 |
+
$client->setParameterGet($options['data']);
|
790 |
+
} else if (strtolower($options['type']) == 'post') {
|
791 |
+
$client->setEncType($options['contentType']);
|
792 |
+
$client->setParameterPost($options['data']);
|
793 |
+
}
|
794 |
+
if (self::$active == 0 && $options['global'])
|
795 |
+
phpQueryEvents::trigger($documentID, 'ajaxStart');
|
796 |
+
self::$active++;
|
797 |
+
// beforeSend callback
|
798 |
+
if (isset($options['beforeSend']) && $options['beforeSend'])
|
799 |
+
phpQuery::callbackRun($options['beforeSend'], array($client));
|
800 |
+
// ajaxSend event
|
801 |
+
if ($options['global'])
|
802 |
+
phpQueryEvents::trigger($documentID, 'ajaxSend', array($client, $options));
|
803 |
+
if (phpQuery::$debug) {
|
804 |
+
self::debug("{$options['type']}: {$options['url']}\n");
|
805 |
+
self::debug("Options: <pre>".var_export($options, true)."</pre>\n");
|
806 |
// if ($client->getCookieJar())
|
807 |
// self::debug("Cookies: <pre>".var_export($client->getCookieJar()->getMatchingCookies($options['url']), true)."</pre>\n");
|
808 |
+
}
|
809 |
+
// request
|
810 |
+
$response = $client->request();
|
811 |
+
if (phpQuery::$debug) {
|
812 |
+
self::debug('Status: '.$response->getStatus().' / '.$response->getMessage());
|
813 |
+
self::debug($client->getLastRequest());
|
814 |
+
self::debug($response->getHeaders());
|
815 |
+
}
|
816 |
+
if ($response->isSuccessful()) {
|
817 |
+
// XXX tempolary
|
818 |
+
self::$lastModified = $response->getHeader('Last-Modified');
|
819 |
+
$data = self::httpData($response->getBody(), $options['dataType'], $options);
|
820 |
+
if (isset($options['success']) && $options['success'])
|
821 |
+
phpQuery::callbackRun($options['success'], array($data, $response->getStatus(), $options));
|
822 |
+
if ($options['global'])
|
823 |
+
phpQueryEvents::trigger($documentID, 'ajaxSuccess', array($client, $options));
|
824 |
+
} else {
|
825 |
+
if (isset($options['error']) && $options['error'])
|
826 |
+
phpQuery::callbackRun($options['error'], array($client, $response->getStatus(), $response->getMessage()));
|
827 |
+
if ($options['global'])
|
828 |
+
phpQueryEvents::trigger($documentID, 'ajaxError', array($client, /*$response->getStatus(),*/$response->getMessage(), $options));
|
829 |
+
}
|
830 |
+
if (isset($options['complete']) && $options['complete'])
|
831 |
+
phpQuery::callbackRun($options['complete'], array($client, $response->getStatus()));
|
832 |
+
if ($options['global'])
|
833 |
+
phpQueryEvents::trigger($documentID, 'ajaxComplete', array($client, $options));
|
834 |
+
if ($options['global'] && ! --self::$active)
|
835 |
+
phpQueryEvents::trigger($documentID, 'ajaxStop');
|
836 |
+
return $client;
|
837 |
// if (is_null($domId))
|
838 |
// $domId = self::$defaultDocumentID ? self::$defaultDocumentID : false;
|
839 |
// return new phpQueryAjaxResponse($response, $domId);
|
840 |
+
}
|
841 |
+
protected static function httpData($data, $type, $options) {
|
842 |
+
if (isset($options['dataFilter']) && $options['dataFilter'])
|
843 |
+
$data = self::callbackRun($options['dataFilter'], array($data, $type));
|
844 |
+
if (is_string($data)) {
|
845 |
+
if ($type == "json") {
|
846 |
+
if (isset($options['_jsonp']) && $options['_jsonp']) {
|
847 |
+
$data = preg_replace('/^\s*\w+\((.*)\)\s*$/s', '$1', $data);
|
848 |
+
}
|
849 |
+
$data = self::parseJSON($data);
|
850 |
+
}
|
851 |
+
}
|
852 |
+
return $data;
|
853 |
+
}
|
854 |
+
/**
|
855 |
+
* Enter description here...
|
856 |
+
*
|
857 |
+
* @param array|phpQuery $data
|
858 |
+
*
|
859 |
+
*/
|
860 |
+
public static function param($data) {
|
861 |
+
return http_build_query($data, null, '&');
|
862 |
+
}
|
863 |
+
public static function get($url, $data = null, $callback = null, $type = null) {
|
864 |
+
if (!is_array($data)) {
|
865 |
+
$callback = $data;
|
866 |
+
$data = null;
|
867 |
+
}
|
868 |
+
// TODO some array_values on this shit
|
869 |
+
return phpQuery::ajax(array(
|
870 |
+
'type' => 'GET',
|
871 |
+
'url' => $url,
|
872 |
+
'data' => $data,
|
873 |
+
'success' => $callback,
|
874 |
+
'dataType' => $type,
|
875 |
+
));
|
876 |
+
}
|
877 |
+
public static function post($url, $data = null, $callback = null, $type = null) {
|
878 |
+
if (!is_array($data)) {
|
879 |
+
$callback = $data;
|
880 |
+
$data = null;
|
881 |
+
}
|
882 |
+
return phpQuery::ajax(array(
|
883 |
+
'type' => 'POST',
|
884 |
+
'url' => $url,
|
885 |
+
'data' => $data,
|
886 |
+
'success' => $callback,
|
887 |
+
'dataType' => $type,
|
888 |
+
));
|
889 |
+
}
|
890 |
+
public static function getJSON($url, $data = null, $callback = null) {
|
891 |
+
if (!is_array($data)) {
|
892 |
+
$callback = $data;
|
893 |
+
$data = null;
|
894 |
+
}
|
895 |
+
// TODO some array_values on this shit
|
896 |
+
return phpQuery::ajax(array(
|
897 |
+
'type' => 'GET',
|
898 |
+
'url' => $url,
|
899 |
+
'data' => $data,
|
900 |
+
'success' => $callback,
|
901 |
+
'dataType' => 'json',
|
902 |
+
));
|
903 |
+
}
|
904 |
+
public static function ajaxSetup($options) {
|
905 |
+
self::$ajaxSettings = array_merge(
|
906 |
+
self::$ajaxSettings,
|
907 |
+
$options
|
908 |
+
);
|
909 |
+
}
|
910 |
+
public static function ajaxAllowHost($host1, $host2 = null, $host3 = null) {
|
911 |
+
$loop = is_array($host1)
|
912 |
+
? $host1
|
913 |
+
: func_get_args();
|
914 |
+
foreach($loop as $host) {
|
915 |
+
if ($host && ! in_array($host, phpQuery::$ajaxAllowedHosts)) {
|
916 |
+
phpQuery::$ajaxAllowedHosts[] = $host;
|
917 |
+
}
|
918 |
+
}
|
919 |
+
}
|
920 |
+
public static function ajaxAllowURL($url1, $url2 = null, $url3 = null) {
|
921 |
+
$loop = is_array($url1)
|
922 |
+
? $url1
|
923 |
+
: func_get_args();
|
924 |
+
foreach($loop as $url)
|
925 |
+
phpQuery::ajaxAllowHost(parse_url($url, PHP_URL_HOST));
|
926 |
+
}
|
927 |
+
/**
|
928 |
+
* Returns JSON representation of $data.
|
929 |
+
*
|
930 |
+
* @static
|
931 |
+
* @param mixed $data
|
932 |
+
* @return string
|
933 |
+
*/
|
934 |
+
public static function toJSON($data) {
|
935 |
+
if (function_exists('json_encode'))
|
936 |
+
return json_encode($data);
|
937 |
+
require_once('Zend/Json/Encoder.php');
|
938 |
+
return Zend_Json_Encoder::encode($data);
|
939 |
+
}
|
940 |
+
/**
|
941 |
+
* Parses JSON into proper PHP type.
|
942 |
+
*
|
943 |
+
* @static
|
944 |
+
* @param string $json
|
945 |
+
* @return mixed
|
946 |
+
*/
|
947 |
+
public static function parseJSON($json) {
|
948 |
+
if (function_exists('json_decode')) {
|
949 |
+
$return = json_decode(trim($json), true);
|
950 |
+
// json_decode and UTF8 issues
|
951 |
+
if (isset($return))
|
952 |
+
return $return;
|
953 |
+
}
|
954 |
+
require_once('Zend/Json/Decoder.php');
|
955 |
+
return Zend_Json_Decoder::decode($json);
|
956 |
+
}
|
957 |
+
/**
|
958 |
+
* Returns source's document ID.
|
959 |
+
*
|
960 |
+
* @param $source DOMNode|phpQueryObject
|
961 |
+
* @return string
|
962 |
+
*/
|
963 |
+
public static function getDocumentID($source) {
|
964 |
+
if ($source instanceof DOMDOCUMENT) {
|
965 |
+
foreach(phpQuery::$documents as $id => $document) {
|
966 |
+
if ($source->isSameNode($document->document))
|
967 |
+
return $id;
|
968 |
+
}
|
969 |
+
} else if ($source instanceof DOMNODE) {
|
970 |
+
foreach(phpQuery::$documents as $id => $document) {
|
971 |
+
if ($source->ownerDocument->isSameNode($document->document))
|
972 |
+
return $id;
|
973 |
+
}
|
974 |
+
} else if ($source instanceof phpQueryObject)
|
975 |
+
return $source->getDocumentID();
|
976 |
+
else if (is_string($source) && isset(phpQuery::$documents[$source]))
|
977 |
+
return $source;
|
978 |
+
}
|
979 |
+
/**
|
980 |
+
* Get DOMDocument object related to $source.
|
981 |
+
* Returns null if such document doesn't exist.
|
982 |
+
*
|
983 |
+
* @param $source DOMNode|phpQueryObject|string
|
984 |
+
* @return string
|
985 |
+
*/
|
986 |
+
public static function getDOMDocument($source) {
|
987 |
+
if ($source instanceof DOMDOCUMENT)
|
988 |
+
return $source;
|
989 |
+
$source = self::getDocumentID($source);
|
990 |
+
return $source
|
991 |
+
? self::$documents[$id]['document']
|
992 |
+
: null;
|
993 |
+
}
|
994 |
|
995 |
+
// UTILITIES
|
996 |
+
// http://docs.jquery.com/Utilities
|
997 |
|
998 |
+
/**
|
999 |
+
*
|
1000 |
+
* @return unknown_type
|
1001 |
+
* @link http://docs.jquery.com/Utilities/jQuery.makeArray
|
1002 |
+
*/
|
1003 |
+
public static function makeArray($object) {
|
1004 |
+
$array = array();
|
1005 |
+
if (is_object($object) && $object instanceof DOMNODELIST) {
|
1006 |
+
foreach($object as $value)
|
1007 |
+
$array[] = $value;
|
1008 |
+
} else if (is_object($object) && ! ($object instanceof Iterator)) {
|
1009 |
+
foreach(get_object_vars($object) as $name => $value)
|
1010 |
+
$array[0][$name] = $value;
|
1011 |
+
} else {
|
1012 |
+
foreach($object as $name => $value)
|
1013 |
+
$array[0][$name] = $value;
|
1014 |
+
}
|
1015 |
+
return $array;
|
1016 |
+
}
|
1017 |
+
public static function inArray($value, $array) {
|
1018 |
+
return in_array($value, $array);
|
1019 |
+
}
|
1020 |
+
/**
|
1021 |
+
*
|
1022 |
+
* @param $object
|
1023 |
+
* @param $callback
|
1024 |
+
* @return unknown_type
|
1025 |
+
* @link http://docs.jquery.com/Utilities/jQuery.each
|
1026 |
+
*/
|
1027 |
+
public static function each($object, $callback, $param1 = null, $param2 = null, $param3 = null) {
|
1028 |
+
$paramStructure = null;
|
1029 |
+
if (func_num_args() > 2) {
|
1030 |
+
$paramStructure = func_get_args();
|
1031 |
+
$paramStructure = array_slice($paramStructure, 2);
|
1032 |
+
}
|
1033 |
+
if (is_object($object) && ! ($object instanceof Iterator)) {
|
1034 |
+
foreach(get_object_vars($object) as $name => $value)
|
1035 |
+
phpQuery::callbackRun($callback, array($name, $value), $paramStructure);
|
1036 |
+
} else {
|
1037 |
+
foreach($object as $name => $value)
|
1038 |
+
phpQuery::callbackRun($callback, array($name, $value), $paramStructure);
|
1039 |
+
}
|
1040 |
+
}
|
1041 |
+
/**
|
1042 |
+
*
|
1043 |
+
* @link http://docs.jquery.com/Utilities/jQuery.map
|
1044 |
+
*/
|
1045 |
+
public static function map($array, $callback, $param1 = null, $param2 = null, $param3 = null) {
|
1046 |
+
$result = array();
|
1047 |
+
$paramStructure = null;
|
1048 |
+
if (func_num_args() > 2) {
|
1049 |
+
$paramStructure = func_get_args();
|
1050 |
+
$paramStructure = array_slice($paramStructure, 2);
|
1051 |
+
}
|
1052 |
+
foreach($array as $v) {
|
1053 |
+
$vv = phpQuery::callbackRun($callback, array($v), $paramStructure);
|
1054 |
// $callbackArgs = $args;
|
1055 |
// foreach($args as $i => $arg) {
|
1056 |
// $callbackArgs[$i] = $arg instanceof CallbackParam
|
1058 |
// : $arg;
|
1059 |
// }
|
1060 |
// $vv = call_user_func_array($callback, $callbackArgs);
|
1061 |
+
if (is_array($vv)) {
|
1062 |
+
foreach($vv as $vvv)
|
1063 |
+
$result[] = $vvv;
|
1064 |
+
} else if ($vv !== null) {
|
1065 |
+
$result[] = $vv;
|
1066 |
+
}
|
1067 |
+
}
|
1068 |
+
return $result;
|
1069 |
+
}
|
1070 |
+
/**
|
1071 |
+
*
|
1072 |
+
* @param $callback Callback
|
1073 |
+
* @param $params
|
1074 |
+
* @param $paramStructure
|
1075 |
+
* @return unknown_type
|
1076 |
+
*/
|
1077 |
+
public static function callbackRun($callback, $params = array(), $paramStructure = null) {
|
1078 |
+
if (! $callback)
|
1079 |
+
return;
|
1080 |
+
if ($callback instanceof CallbackParameterToReference) {
|
1081 |
+
// TODO support ParamStructure to select which $param push to reference
|
1082 |
+
if (isset($params[0]))
|
1083 |
+
$callback->callback = $params[0];
|
1084 |
+
return true;
|
1085 |
+
}
|
1086 |
+
if ($callback instanceof Callback) {
|
1087 |
+
$paramStructure = $callback->params;
|
1088 |
+
$callback = $callback->callback;
|
1089 |
+
}
|
1090 |
+
if (! $paramStructure)
|
1091 |
+
return call_user_func_array($callback, $params);
|
1092 |
+
$p = 0;
|
1093 |
+
foreach($paramStructure as $i => $v) {
|
1094 |
+
$paramStructure[$i] = $v instanceof CallbackParam
|
1095 |
+
? $params[$p++]
|
1096 |
+
: $v;
|
1097 |
+
}
|
1098 |
+
return call_user_func_array($callback, $paramStructure);
|
1099 |
+
}
|
1100 |
+
/**
|
1101 |
+
* Merge 2 phpQuery objects.
|
1102 |
+
* @param array $one
|
1103 |
+
* @param array $two
|
1104 |
+
* @protected
|
1105 |
+
* @todo node lists, phpQueryObject
|
1106 |
+
*/
|
1107 |
+
public static function merge($one, $two) {
|
1108 |
+
$elements = $one->elements;
|
1109 |
+
foreach($two->elements as $node) {
|
1110 |
+
$exists = false;
|
1111 |
+
foreach($elements as $node2) {
|
1112 |
+
if ($node2->isSameNode($node))
|
1113 |
+
$exists = true;
|
1114 |
+
}
|
1115 |
+
if (! $exists)
|
1116 |
+
$elements[] = $node;
|
1117 |
+
}
|
1118 |
+
return $elements;
|
1119 |
// $one = $one->newInstance();
|
1120 |
// $one->elements = $elements;
|
1121 |
// return $one;
|
1122 |
+
}
|
1123 |
+
/**
|
1124 |
+
*
|
1125 |
+
* @param $array
|
1126 |
+
* @param $callback
|
1127 |
+
* @param $invert
|
1128 |
+
* @return unknown_type
|
1129 |
+
* @link http://docs.jquery.com/Utilities/jQuery.grep
|
1130 |
+
*/
|
1131 |
+
public static function grep($array, $callback, $invert = false) {
|
1132 |
+
$result = array();
|
1133 |
+
foreach($array as $k => $v) {
|
1134 |
+
$r = call_user_func_array($callback, array($v, $k));
|
1135 |
+
if ($r === !(bool)$invert)
|
1136 |
+
$result[] = $v;
|
1137 |
+
}
|
1138 |
+
return $result;
|
1139 |
+
}
|
1140 |
+
public static function unique($array) {
|
1141 |
+
return array_unique($array);
|
1142 |
+
}
|
1143 |
+
/**
|
1144 |
+
*
|
1145 |
+
* @param $function
|
1146 |
+
* @return unknown_type
|
1147 |
+
* @TODO there are problems with non-static methods, second parameter pass it
|
1148 |
+
* but doesnt verify is method is really callable
|
1149 |
+
*/
|
1150 |
+
public static function isFunction($function) {
|
1151 |
+
return is_callable($function);
|
1152 |
+
}
|
1153 |
+
public static function trim($str) {
|
1154 |
+
return trim($str);
|
1155 |
+
}
|
1156 |
+
/* PLUGINS NAMESPACE */
|
1157 |
+
/**
|
1158 |
+
*
|
1159 |
+
* @param $url
|
1160 |
+
* @param $callback
|
1161 |
+
* @param $param1
|
1162 |
+
* @param $param2
|
1163 |
+
* @param $param3
|
1164 |
+
* @return phpQueryObject
|
1165 |
+
*/
|
1166 |
+
public static function browserGet($url, $callback, $param1 = null, $param2 = null, $param3 = null) {
|
1167 |
+
if (self::plugin('WebBrowser')) {
|
1168 |
+
$params = func_get_args();
|
1169 |
+
return self::callbackRun(array(self::$plugins, 'browserGet'), $params);
|
1170 |
+
} else {
|
1171 |
+
self::debug('WebBrowser plugin not available...');
|
1172 |
+
}
|
1173 |
+
}
|
1174 |
+
/**
|
1175 |
+
*
|
1176 |
+
* @param $url
|
1177 |
+
* @param $data
|
1178 |
+
* @param $callback
|
1179 |
+
* @param $param1
|
1180 |
+
* @param $param2
|
1181 |
+
* @param $param3
|
1182 |
+
* @return phpQueryObject
|
1183 |
+
*/
|
1184 |
+
public static function browserPost($url, $data, $callback, $param1 = null, $param2 = null, $param3 = null) {
|
1185 |
+
if (self::plugin('WebBrowser')) {
|
1186 |
+
$params = func_get_args();
|
1187 |
+
return self::callbackRun(array(self::$plugins, 'browserPost'), $params);
|
1188 |
+
} else {
|
1189 |
+
self::debug('WebBrowser plugin not available...');
|
1190 |
+
}
|
1191 |
+
}
|
1192 |
+
/**
|
1193 |
+
*
|
1194 |
+
* @param $ajaxSettings
|
1195 |
+
* @param $callback
|
1196 |
+
* @param $param1
|
1197 |
+
* @param $param2
|
1198 |
+
* @param $param3
|
1199 |
+
* @return phpQueryObject
|
1200 |
+
*/
|
1201 |
+
public static function browser($ajaxSettings, $callback, $param1 = null, $param2 = null, $param3 = null) {
|
1202 |
+
if (self::plugin('WebBrowser')) {
|
1203 |
+
$params = func_get_args();
|
1204 |
+
return self::callbackRun(array(self::$plugins, 'browser'), $params);
|
1205 |
+
} else {
|
1206 |
+
self::debug('WebBrowser plugin not available...');
|
1207 |
+
}
|
1208 |
+
}
|
1209 |
+
/**
|
1210 |
+
*
|
1211 |
+
* @param $code
|
1212 |
+
* @return string
|
1213 |
+
*/
|
1214 |
+
public static function php($code) {
|
1215 |
+
return self::code('php', $code);
|
1216 |
+
}
|
1217 |
+
/**
|
1218 |
+
*
|
1219 |
+
* @param $type
|
1220 |
+
* @param $code
|
1221 |
+
* @return string
|
1222 |
+
*/
|
1223 |
+
public static function code($type, $code) {
|
1224 |
+
return "<$type><!-- ".trim($code)." --></$type>";
|
1225 |
+
}
|
1226 |
|
1227 |
+
public static function __callStatic($method, $params) {
|
1228 |
+
return call_user_func_array(
|
1229 |
+
array(phpQuery::$plugins, $method),
|
1230 |
+
$params
|
1231 |
+
);
|
1232 |
+
}
|
1233 |
+
protected static function dataSetupNode($node, $documentID) {
|
1234 |
+
// search are return if alredy exists
|
1235 |
+
foreach(phpQuery::$documents[$documentID]->dataNodes as $dataNode) {
|
1236 |
+
if ($node->isSameNode($dataNode))
|
1237 |
+
return $dataNode;
|
1238 |
+
}
|
1239 |
+
// if doesn't, add it
|
1240 |
+
phpQuery::$documents[$documentID]->dataNodes[] = $node;
|
1241 |
+
return $node;
|
1242 |
+
}
|
1243 |
+
protected static function dataRemoveNode($node, $documentID) {
|
1244 |
+
// search are return if alredy exists
|
1245 |
+
foreach(phpQuery::$documents[$documentID]->dataNodes as $k => $dataNode) {
|
1246 |
+
if ($node->isSameNode($dataNode)) {
|
1247 |
+
unset(self::$documents[$documentID]->dataNodes[$k]);
|
1248 |
+
unset(self::$documents[$documentID]->data[ $dataNode->dataID ]);
|
1249 |
+
}
|
1250 |
+
}
|
1251 |
+
}
|
1252 |
+
public static function data($node, $name, $data, $documentID = null) {
|
1253 |
+
if (! $documentID)
|
1254 |
+
// TODO check if this works
|
1255 |
+
$documentID = self::getDocumentID($node);
|
1256 |
+
$document = phpQuery::$documents[$documentID];
|
1257 |
+
$node = self::dataSetupNode($node, $documentID);
|
1258 |
+
if (! isset($node->dataID))
|
1259 |
+
$node->dataID = ++phpQuery::$documents[$documentID]->uuid;
|
1260 |
+
$id = $node->dataID;
|
1261 |
+
if (! isset($document->data[$id]))
|
1262 |
+
$document->data[$id] = array();
|
1263 |
+
if (! is_null($data))
|
1264 |
+
$document->data[$id][$name] = $data;
|
1265 |
+
if ($name) {
|
1266 |
+
if (isset($document->data[$id][$name]))
|
1267 |
+
return $document->data[$id][$name];
|
1268 |
+
} else
|
1269 |
+
return $id;
|
1270 |
+
}
|
1271 |
+
public static function removeData($node, $name, $documentID) {
|
1272 |
+
if (! $documentID)
|
1273 |
+
// TODO check if this works
|
1274 |
+
$documentID = self::getDocumentID($node);
|
1275 |
+
$document = phpQuery::$documents[$documentID];
|
1276 |
+
$node = self::dataSetupNode($node, $documentID);
|
1277 |
+
$id = $node->dataID;
|
1278 |
+
if ($name) {
|
1279 |
+
if (isset($document->data[$id][$name]))
|
1280 |
+
unset($document->data[$id][$name]);
|
1281 |
$name = reset($document->data[$id]);
|
1282 |
+
if (! $name)
|
1283 |
+
self::removeData($node, $name, $documentID);
|
1284 |
+
} else {
|
1285 |
+
self::dataRemoveNode($node, $documentID);
|
1286 |
+
}
|
1287 |
+
}
|
1288 |
}
|
1289 |
/**
|
1290 |
* Plugins static namespace class.
|
1294 |
* @todo move plugin methods here (as statics)
|
1295 |
*/
|
1296 |
class phpQueryPlugins {
|
1297 |
+
public function __call($method, $args) {
|
1298 |
+
if (isset(phpQuery::$extendStaticMethods[$method])) {
|
1299 |
+
$return = call_user_func_array(
|
1300 |
+
phpQuery::$extendStaticMethods[$method],
|
1301 |
+
$args
|
1302 |
+
);
|
1303 |
+
} else if (isset(phpQuery::$pluginsStaticMethods[$method])) {
|
1304 |
+
$class = phpQuery::$pluginsStaticMethods[$method];
|
1305 |
+
$realClass = "phpQueryPlugin_$class";
|
1306 |
+
$return = call_user_func_array(
|
1307 |
+
array($realClass, $method),
|
1308 |
+
$args
|
1309 |
+
);
|
1310 |
+
return isset($return)
|
1311 |
+
? $return
|
1312 |
+
: $this;
|
1313 |
+
} else
|
1314 |
+
throw new Exception("Method '{$method}' doesnt exist");
|
1315 |
+
}
|
1316 |
}
|
1317 |
/**
|
1318 |
* Shortcut to phpQuery::pq($arg1, $context)
|
1324 |
* @package phpQuery
|
1325 |
*/
|
1326 |
function pq($arg1, $context = null) {
|
1327 |
+
$args = func_get_args();
|
1328 |
+
return call_user_func_array(
|
1329 |
+
array('phpQuery', 'pq'),
|
1330 |
+
$args
|
1331 |
+
);
|
1332 |
}
|
1333 |
// add plugins dir and Zend framework to include path
|
1334 |
set_include_path(
|
1335 |
+
get_include_path()
|
1336 |
+
.PATH_SEPARATOR.dirname(__FILE__).'/phpQuery/'
|
1337 |
+
.PATH_SEPARATOR.dirname(__FILE__).'/phpQuery/plugins/'
|
1338 |
);
|
1339 |
// why ? no __call nor __get for statics in php...
|
1340 |
// XXX __callStatic will be available in PHP 5.3
|
1341 |
phpQuery::$plugins = new phpQueryPlugins();
|
1342 |
// include bootstrap file (personal library config)
|
1343 |
if (file_exists(dirname(__FILE__).'/phpQuery/bootstrap.php'))
|
1344 |
+
require_once dirname(__FILE__).'/phpQuery/bootstrap.php';
|
libs/phpQuery/Callback.php
ADDED
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
interface ICallbackNamed {
|
3 |
+
function hasName();
|
4 |
+
function getName();
|
5 |
+
}
|
6 |
+
/**
|
7 |
+
* Callback class introduces currying-like pattern.
|
8 |
+
*
|
9 |
+
* Example:
|
10 |
+
* function foo($param1, $param2, $param3) {
|
11 |
+
* var_dump($param1, $param2, $param3);
|
12 |
+
* }
|
13 |
+
* $fooCurried = new Callback('foo',
|
14 |
+
* 'param1 is now statically set',
|
15 |
+
* new CallbackParam, new CallbackParam
|
16 |
+
* );
|
17 |
+
* phpQuery::callbackRun($fooCurried,
|
18 |
+
* array('param2 value', 'param3 value'
|
19 |
+
* );
|
20 |
+
*
|
21 |
+
* Callback class is supported in all phpQuery methods which accepts callbacks.
|
22 |
+
*
|
23 |
+
* @link http://code.google.com/p/phpquery/wiki/Callbacks#Param_Structures
|
24 |
+
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
25 |
+
*
|
26 |
+
* @TODO??? return fake forwarding function created via create_function
|
27 |
+
* @TODO honor paramStructure
|
28 |
+
*/
|
29 |
+
class Callback
|
30 |
+
implements ICallbackNamed {
|
31 |
+
public $callback = null;
|
32 |
+
public $params = null;
|
33 |
+
protected $name;
|
34 |
+
public function __construct($callback, $param1 = null, $param2 = null,
|
35 |
+
$param3 = null) {
|
36 |
+
$params = func_get_args();
|
37 |
+
$params = array_slice($params, 1);
|
38 |
+
if ($callback instanceof Callback) {
|
39 |
+
// TODO implement recurention
|
40 |
+
} else {
|
41 |
+
$this->callback = $callback;
|
42 |
+
$this->params = $params;
|
43 |
+
}
|
44 |
+
}
|
45 |
+
public function getName() {
|
46 |
+
return 'Callback: '.$this->name;
|
47 |
+
}
|
48 |
+
public function hasName() {
|
49 |
+
return isset($this->name) && $this->name;
|
50 |
+
}
|
51 |
+
public function setName($name) {
|
52 |
+
$this->name = $name;
|
53 |
+
return $this;
|
54 |
+
}
|
55 |
+
// TODO test me
|
56 |
+
// public function addParams() {
|
57 |
+
// $params = func_get_args();
|
58 |
+
// return new Callback($this->callback, $this->params+$params);
|
59 |
+
// }
|
60 |
+
}
|
61 |
+
/**
|
62 |
+
* Shorthand for new Callback(create_function(...), ...);
|
63 |
+
*
|
64 |
+
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
65 |
+
*/
|
66 |
+
class CallbackBody extends Callback {
|
67 |
+
public function __construct($paramList, $code, $param1 = null, $param2 = null,
|
68 |
+
$param3 = null) {
|
69 |
+
$params = func_get_args();
|
70 |
+
$params = array_slice($params, 2);
|
71 |
+
$this->callback = create_function($paramList, $code);
|
72 |
+
$this->params = $params;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
/**
|
76 |
+
* Callback type which on execution returns reference passed during creation.
|
77 |
+
*
|
78 |
+
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
79 |
+
*/
|
80 |
+
class CallbackReturnReference extends Callback
|
81 |
+
implements ICallbackNamed {
|
82 |
+
protected $reference;
|
83 |
+
public function __construct(&$reference, $name = null){
|
84 |
+
$this->reference =& $reference;
|
85 |
+
$this->callback = array($this, 'callback');
|
86 |
+
}
|
87 |
+
public function callback() {
|
88 |
+
return $this->reference;
|
89 |
+
}
|
90 |
+
public function getName() {
|
91 |
+
return 'Callback: '.$this->name;
|
92 |
+
}
|
93 |
+
public function hasName() {
|
94 |
+
return isset($this->name) && $this->name;
|
95 |
+
}
|
96 |
+
}
|
97 |
+
/**
|
98 |
+
* Callback type which on execution returns value passed during creation.
|
99 |
+
*
|
100 |
+
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
101 |
+
*/
|
102 |
+
class CallbackReturnValue extends Callback
|
103 |
+
implements ICallbackNamed {
|
104 |
+
protected $value;
|
105 |
+
protected $name;
|
106 |
+
public function __construct($value, $name = null){
|
107 |
+
$this->value =& $value;
|
108 |
+
$this->name = $name;
|
109 |
+
$this->callback = array($this, 'callback');
|
110 |
+
}
|
111 |
+
public function callback() {
|
112 |
+
return $this->value;
|
113 |
+
}
|
114 |
+
public function __toString() {
|
115 |
+
return $this->getName();
|
116 |
+
}
|
117 |
+
public function getName() {
|
118 |
+
return 'Callback: '.$this->name;
|
119 |
+
}
|
120 |
+
public function hasName() {
|
121 |
+
return isset($this->name) && $this->name;
|
122 |
+
}
|
123 |
+
}
|
124 |
+
/**
|
125 |
+
* CallbackParameterToReference can be used when we don't really want a callback,
|
126 |
+
* only parameter passed to it. CallbackParameterToReference takes first
|
127 |
+
* parameter's value and passes it to reference.
|
128 |
+
*
|
129 |
+
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
130 |
+
*/
|
131 |
+
class CallbackParameterToReference extends Callback {
|
132 |
+
/**
|
133 |
+
* @param $reference
|
134 |
+
* @TODO implement $paramIndex;
|
135 |
+
* param index choose which callback param will be passed to reference
|
136 |
+
*/
|
137 |
+
public function __construct(&$reference){
|
138 |
+
$this->callback =& $reference;
|
139 |
+
}
|
140 |
+
}
|
141 |
+
//class CallbackReference extends Callback {
|
142 |
+
// /**
|
143 |
+
// *
|
144 |
+
// * @param $reference
|
145 |
+
// * @param $paramIndex
|
146 |
+
// * @todo implement $paramIndex; param index choose which callback param will be passed to reference
|
147 |
+
// */
|
148 |
+
// public function __construct(&$reference, $name = null){
|
149 |
+
// $this->callback =& $reference;
|
150 |
+
// }
|
151 |
+
//}
|
152 |
+
class CallbackParam {}
|
libs/phpQuery/DOMDocumentWrapper.php
ADDED
@@ -0,0 +1,679 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* DOMDocumentWrapper class simplifies work with DOMDocument.
|
4 |
+
*
|
5 |
+
* Know bug:
|
6 |
+
* - in XHTML fragments, <br /> changes to <br clear="none" />
|
7 |
+
*
|
8 |
+
* @todo check XML catalogs compatibility
|
9 |
+
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
10 |
+
* @package phpQuery
|
11 |
+
*/
|
12 |
+
class DOMDocumentWrapper {
|
13 |
+
/**
|
14 |
+
* @var DOMDocument
|
15 |
+
*/
|
16 |
+
public $document;
|
17 |
+
public $id;
|
18 |
+
/**
|
19 |
+
* @todo Rewrite as method and quess if null.
|
20 |
+
* @var unknown_type
|
21 |
+
*/
|
22 |
+
public $contentType = '';
|
23 |
+
public $xpath;
|
24 |
+
public $uuid = 0;
|
25 |
+
public $data = array();
|
26 |
+
public $dataNodes = array();
|
27 |
+
public $events = array();
|
28 |
+
public $eventsNodes = array();
|
29 |
+
public $eventsGlobal = array();
|
30 |
+
/**
|
31 |
+
* @TODO iframes support http://code.google.com/p/phpquery/issues/detail?id=28
|
32 |
+
* @var unknown_type
|
33 |
+
*/
|
34 |
+
public $frames = array();
|
35 |
+
/**
|
36 |
+
* Document root, by default equals to document itself.
|
37 |
+
* Used by documentFragments.
|
38 |
+
*
|
39 |
+
* @var DOMNode
|
40 |
+
*/
|
41 |
+
public $root;
|
42 |
+
public $isDocumentFragment;
|
43 |
+
public $isXML = false;
|
44 |
+
public $isXHTML = false;
|
45 |
+
public $isHTML = false;
|
46 |
+
public $charset;
|
47 |
+
public function __construct($markup = null, $contentType = null, $newDocumentID = null) {
|
48 |
+
if (isset($markup))
|
49 |
+
$this->load($markup, $contentType, $newDocumentID);
|
50 |
+
$this->id = $newDocumentID
|
51 |
+
? $newDocumentID
|
52 |
+
: md5(microtime());
|
53 |
+
}
|
54 |
+
public function load($markup, $contentType = null, $newDocumentID = null) {
|
55 |
+
// phpQuery::$documents[$id] = $this;
|
56 |
+
$this->contentType = strtolower($contentType);
|
57 |
+
if ($markup instanceof DOMDOCUMENT) {
|
58 |
+
$this->document = $markup;
|
59 |
+
$this->root = $this->document;
|
60 |
+
$this->charset = $this->document->encoding;
|
61 |
+
// TODO isDocumentFragment
|
62 |
+
$loaded = true;
|
63 |
+
} else {
|
64 |
+
$loaded = $this->loadMarkup($markup);
|
65 |
+
}
|
66 |
+
if ($loaded) {
|
67 |
+
// $this->document->formatOutput = true;
|
68 |
+
$this->document->preserveWhiteSpace = true;
|
69 |
+
$this->xpath = new DOMXPath($this->document);
|
70 |
+
$this->afterMarkupLoad();
|
71 |
+
return true;
|
72 |
+
// remember last loaded document
|
73 |
+
// return phpQuery::selectDocument($id);
|
74 |
+
}
|
75 |
+
return false;
|
76 |
+
}
|
77 |
+
protected function afterMarkupLoad() {
|
78 |
+
if ($this->isXHTML) {
|
79 |
+
$this->xpath->registerNamespace("html", "http://www.w3.org/1999/xhtml");
|
80 |
+
}
|
81 |
+
}
|
82 |
+
protected function loadMarkup($markup) {
|
83 |
+
$loaded = false;
|
84 |
+
if ($this->contentType) {
|
85 |
+
self::debug("Load markup for content type {$this->contentType}");
|
86 |
+
// content determined by contentType
|
87 |
+
list($contentType, $charset) = $this->contentTypeToArray($this->contentType);
|
88 |
+
switch($contentType) {
|
89 |
+
case 'text/html':
|
90 |
+
phpQuery::debug("Loading HTML, content type '{$this->contentType}'");
|
91 |
+
$loaded = $this->loadMarkupHTML($markup, $charset);
|
92 |
+
break;
|
93 |
+
case 'text/xml':
|
94 |
+
case 'application/xhtml+xml':
|
95 |
+
phpQuery::debug("Loading XML, content type '{$this->contentType}'");
|
96 |
+
$loaded = $this->loadMarkupXML($markup, $charset);
|
97 |
+
break;
|
98 |
+
default:
|
99 |
+
// for feeds or anything that sometimes doesn't use text/xml
|
100 |
+
if (strpos('xml', $this->contentType) !== false) {
|
101 |
+
phpQuery::debug("Loading XML, content type '{$this->contentType}'");
|
102 |
+
$loaded = $this->loadMarkupXML($markup, $charset);
|
103 |
+
} else
|
104 |
+
phpQuery::debug("Could not determine document type from content type '{$this->contentType}'");
|
105 |
+
}
|
106 |
+
} else {
|
107 |
+
// content type autodetection
|
108 |
+
if ($this->isXML($markup)) {
|
109 |
+
phpQuery::debug("Loading XML, isXML() == true");
|
110 |
+
$loaded = $this->loadMarkupXML($markup);
|
111 |
+
if (! $loaded && $this->isXHTML) {
|
112 |
+
phpQuery::debug('Loading as XML failed, trying to load as HTML, isXHTML == true');
|
113 |
+
$loaded = $this->loadMarkupHTML($markup);
|
114 |
+
}
|
115 |
+
} else {
|
116 |
+
phpQuery::debug("Loading HTML, isXML() == false");
|
117 |
+
$loaded = $this->loadMarkupHTML($markup);
|
118 |
+
}
|
119 |
+
}
|
120 |
+
return $loaded;
|
121 |
+
}
|
122 |
+
protected function loadMarkupReset() {
|
123 |
+
$this->isXML = $this->isXHTML = $this->isHTML = false;
|
124 |
+
}
|
125 |
+
protected function documentCreate($charset, $version = '1.0') {
|
126 |
+
if (! $version)
|
127 |
+
$version = '1.0';
|
128 |
+
$this->document = new DOMDocument($version, $charset);
|
129 |
+
$this->charset = $this->document->encoding;
|
130 |
+
// $this->document->encoding = $charset;
|
131 |
+
$this->document->formatOutput = true;
|
132 |
+
$this->document->preserveWhiteSpace = true;
|
133 |
+
}
|
134 |
+
protected function loadMarkupHTML($markup, $requestedCharset = null) {
|
135 |
+
if (phpQuery::$debug)
|
136 |
+
phpQuery::debug('Full markup load (HTML): '.substr($markup, 0, 250));
|
137 |
+
$this->loadMarkupReset();
|
138 |
+
$this->isHTML = true;
|
139 |
+
if (!isset($this->isDocumentFragment))
|
140 |
+
$this->isDocumentFragment = self::isDocumentFragmentHTML($markup);
|
141 |
+
$charset = null;
|
142 |
+
$documentCharset = $this->charsetFromHTML($markup);
|
143 |
+
$addDocumentCharset = false;
|
144 |
+
if ($documentCharset) {
|
145 |
+
$charset = $documentCharset;
|
146 |
+
$markup = $this->charsetFixHTML($markup);
|
147 |
+
} else if ($requestedCharset) {
|
148 |
+
$charset = $requestedCharset;
|
149 |
+
}
|
150 |
+
if (! $charset)
|
151 |
+
$charset = phpQuery::$defaultCharset;
|
152 |
+
// HTTP 1.1 says that the default charset is ISO-8859-1
|
153 |
+
// @see http://www.w3.org/International/O-HTTP-charset
|
154 |
+
if (! $documentCharset) {
|
155 |
+
$documentCharset = 'ISO-8859-1';
|
156 |
+
$addDocumentCharset = true;
|
157 |
+
}
|
158 |
+
// Should be careful here, still need 'magic encoding detection' since lots of pages have other 'default encoding'
|
159 |
+
// Worse, some pages can have mixed encodings... we'll try not to worry about that
|
160 |
+
$requestedCharset = strtoupper($requestedCharset);
|
161 |
+
$documentCharset = strtoupper($documentCharset);
|
162 |
+
phpQuery::debug("DOC: $documentCharset REQ: $requestedCharset");
|
163 |
+
if ($requestedCharset && $documentCharset && $requestedCharset !== $documentCharset) {
|
164 |
+
phpQuery::debug("CHARSET CONVERT");
|
165 |
+
// Document Encoding Conversion
|
166 |
+
// http://code.google.com/p/phpquery/issues/detail?id=86
|
167 |
+
if (function_exists('mb_detect_encoding')) {
|
168 |
+
$possibleCharsets = array($documentCharset, $requestedCharset, 'AUTO');
|
169 |
+
$docEncoding = mb_detect_encoding($markup, implode(', ', $possibleCharsets));
|
170 |
+
if (! $docEncoding)
|
171 |
+
$docEncoding = $documentCharset; // ok trust the document
|
172 |
+
phpQuery::debug("DETECTED '$docEncoding'");
|
173 |
+
// Detected does not match what document says...
|
174 |
+
if ($docEncoding !== $documentCharset) {
|
175 |
+
// Tricky..
|
176 |
+
}
|
177 |
+
if ($docEncoding !== $requestedCharset) {
|
178 |
+
phpQuery::debug("CONVERT $docEncoding => $requestedCharset");
|
179 |
+
$markup = mb_convert_encoding($markup, $requestedCharset, $docEncoding);
|
180 |
+
$markup = $this->charsetAppendToHTML($markup, $requestedCharset);
|
181 |
+
$charset = $requestedCharset;
|
182 |
+
}
|
183 |
+
} else {
|
184 |
+
phpQuery::debug("TODO: charset conversion without mbstring...");
|
185 |
+
}
|
186 |
+
}
|
187 |
+
$return = false;
|
188 |
+
if ($this->isDocumentFragment) {
|
189 |
+
phpQuery::debug("Full markup load (HTML), DocumentFragment detected, using charset '$charset'");
|
190 |
+
$return = $this->documentFragmentLoadMarkup($this, $charset, $markup);
|
191 |
+
} else {
|
192 |
+
if ($addDocumentCharset) {
|
193 |
+
phpQuery::debug("Full markup load (HTML), appending charset: '$charset'");
|
194 |
+
$markup = $this->charsetAppendToHTML($markup, $charset);
|
195 |
+
}
|
196 |
+
phpQuery::debug("Full markup load (HTML), documentCreate('$charset')");
|
197 |
+
$this->documentCreate($charset);
|
198 |
+
$return = phpQuery::$debug === 2
|
199 |
+
? $this->document->loadHTML($markup)
|
200 |
+
: @$this->document->loadHTML($markup);
|
201 |
+
if ($return)
|
202 |
+
$this->root = $this->document;
|
203 |
+
}
|
204 |
+
if ($return && ! $this->contentType)
|
205 |
+
$this->contentType = 'text/html';
|
206 |
+
return $return;
|
207 |
+
}
|
208 |
+
protected function loadMarkupXML($markup, $requestedCharset = null) {
|
209 |
+
if (phpQuery::$debug)
|
210 |
+
phpQuery::debug('Full markup load (XML): '.substr($markup, 0, 250));
|
211 |
+
$this->loadMarkupReset();
|
212 |
+
$this->isXML = true;
|
213 |
+
// check agains XHTML in contentType or markup
|
214 |
+
$isContentTypeXHTML = $this->isXHTML();
|
215 |
+
$isMarkupXHTML = $this->isXHTML($markup);
|
216 |
+
if ($isContentTypeXHTML || $isMarkupXHTML) {
|
217 |
+
self::debug('Full markup load (XML), XHTML detected');
|
218 |
+
$this->isXHTML = true;
|
219 |
+
}
|
220 |
+
// determine document fragment
|
221 |
+
if (! isset($this->isDocumentFragment))
|
222 |
+
$this->isDocumentFragment = $this->isXHTML
|
223 |
+
? self::isDocumentFragmentXHTML($markup)
|
224 |
+
: self::isDocumentFragmentXML($markup);
|
225 |
+
// this charset will be used
|
226 |
+
$charset = null;
|
227 |
+
// charset from XML declaration @var string
|
228 |
+
$documentCharset = $this->charsetFromXML($markup);
|
229 |
+
if (! $documentCharset) {
|
230 |
+
if ($this->isXHTML) {
|
231 |
+
// this is XHTML, try to get charset from content-type meta header
|
232 |
+
$documentCharset = $this->charsetFromHTML($markup);
|
233 |
+
if ($documentCharset) {
|
234 |
+
phpQuery::debug("Full markup load (XML), appending XHTML charset '$documentCharset'");
|
235 |
+
$this->charsetAppendToXML($markup, $documentCharset);
|
236 |
+
$charset = $documentCharset;
|
237 |
+
}
|
238 |
+
}
|
239 |
+
if (! $documentCharset) {
|
240 |
+
// if still no document charset...
|
241 |
+
$charset = $requestedCharset;
|
242 |
+
}
|
243 |
+
} else if ($requestedCharset) {
|
244 |
+
$charset = $requestedCharset;
|
245 |
+
}
|
246 |
+
if (! $charset) {
|
247 |
+
$charset = phpQuery::$defaultCharset;
|
248 |
+
}
|
249 |
+
if ($requestedCharset && $documentCharset && $requestedCharset != $documentCharset) {
|
250 |
+
// TODO place for charset conversion
|
251 |
+
// $charset = $requestedCharset;
|
252 |
+
}
|
253 |
+
$return = false;
|
254 |
+
if ($this->isDocumentFragment) {
|
255 |
+
phpQuery::debug("Full markup load (XML), DocumentFragment detected, using charset '$charset'");
|
256 |
+
$return = $this->documentFragmentLoadMarkup($this, $charset, $markup);
|
257 |
+
} else {
|
258 |
+
// FIXME ???
|
259 |
+
if ($isContentTypeXHTML && ! $isMarkupXHTML)
|
260 |
+
if (! $documentCharset) {
|
261 |
+
phpQuery::debug("Full markup load (XML), appending charset '$charset'");
|
262 |
+
$markup = $this->charsetAppendToXML($markup, $charset);
|
263 |
+
}
|
264 |
+
// see http://pl2.php.net/manual/en/book.dom.php#78929
|
265 |
+
// LIBXML_DTDLOAD (>= PHP 5.1)
|
266 |
+
// does XML ctalogues works with LIBXML_NONET
|
267 |
+
// $this->document->resolveExternals = true;
|
268 |
+
// TODO test LIBXML_COMPACT for performance improvement
|
269 |
+
// create document
|
270 |
+
$this->documentCreate($charset);
|
271 |
+
if (phpversion() < 5.1) {
|
272 |
+
$this->document->resolveExternals = true;
|
273 |
+
$return = phpQuery::$debug === 2
|
274 |
+
? $this->document->loadXML($markup)
|
275 |
+
: @$this->document->loadXML($markup);
|
276 |
+
} else {
|
277 |
+
/** @link http://pl2.php.net/manual/en/libxml.constants.php */
|
278 |
+
$libxmlStatic = phpQuery::$debug === 2
|
279 |
+
? LIBXML_DTDLOAD|LIBXML_DTDATTR|LIBXML_NONET
|
280 |
+
: LIBXML_DTDLOAD|LIBXML_DTDATTR|LIBXML_NONET|LIBXML_NOWARNING|LIBXML_NOERROR;
|
281 |
+
$return = $this->document->loadXML($markup, $libxmlStatic);
|
282 |
+
// if (! $return)
|
283 |
+
// $return = $this->document->loadHTML($markup);
|
284 |
+
}
|
285 |
+
if ($return)
|
286 |
+
$this->root = $this->document;
|
287 |
+
}
|
288 |
+
if ($return) {
|
289 |
+
if (! $this->contentType) {
|
290 |
+
if ($this->isXHTML)
|
291 |
+
$this->contentType = 'application/xhtml+xml';
|
292 |
+
else
|
293 |
+
$this->contentType = 'text/xml';
|
294 |
+
}
|
295 |
+
return $return;
|
296 |
+
} else {
|
297 |
+
throw new Exception("Error loading XML markup");
|
298 |
+
}
|
299 |
+
}
|
300 |
+
protected function isXHTML($markup = null) {
|
301 |
+
if (! isset($markup)) {
|
302 |
+
return strpos($this->contentType, 'xhtml') !== false;
|
303 |
+
}
|
304 |
+
// XXX ok ?
|
305 |
+
return strpos($markup, "<!DOCTYPE html") !== false;
|
306 |
+
// return stripos($doctype, 'xhtml') !== false;
|
307 |
+
// $doctype = isset($dom->doctype) && is_object($dom->doctype)
|
308 |
+
// ? $dom->doctype->publicId
|
309 |
+
// : self::$defaultDoctype;
|
310 |
+
}
|
311 |
+
protected function isXML($markup) {
|
312 |
+
// return strpos($markup, '<?xml') !== false && stripos($markup, 'xhtml') === false;
|
313 |
+
return strpos(substr($markup, 0, 100), '<'.'?xml') !== false;
|
314 |
+
}
|
315 |
+
|
316 |
+
protected function contentTypeToArray($contentType) {
|
317 |
+
$matches = explode(';', trim(strtolower($contentType)));
|
318 |
+
if (isset($matches[1])) {
|
319 |
+
$matches[1] = explode('=', $matches[1]);
|
320 |
+
// strip 'charset='
|
321 |
+
$matches[1] = isset($matches[1][1]) && trim($matches[1][1])
|
322 |
+
? $matches[1][1]
|
323 |
+
: $matches[1][0];
|
324 |
+
} else
|
325 |
+
$matches[1] = null;
|
326 |
+
return $matches;
|
327 |
+
}
|
328 |
+
/**
|
329 |
+
*
|
330 |
+
* @param $markup
|
331 |
+
* @return array contentType, charset
|
332 |
+
*/
|
333 |
+
protected function contentTypeFromHTML($markup) {
|
334 |
+
$matches = array();
|
335 |
+
// find meta tag
|
336 |
+
preg_match('@<meta[^>]+http-equiv\\s*=\\s*(["|\'])Content-Type\\1([^>]+?)>@i',
|
337 |
+
$markup, $matches
|
338 |
+
);
|
339 |
+
if (! isset($matches[0]))
|
340 |
+
return array(null, null);
|
341 |
+
// get attr 'content'
|
342 |
+
preg_match('@content\\s*=\\s*(["|\'])(.+?)\\1@', $matches[0], $matches);
|
343 |
+
if (! isset($matches[0]))
|
344 |
+
return array(null, null);
|
345 |
+
return $this->contentTypeToArray($matches[2]);
|
346 |
+
}
|
347 |
+
protected function charsetFromHTML($markup) {
|
348 |
+
$contentType = $this->contentTypeFromHTML($markup);
|
349 |
+
return $contentType[1];
|
350 |
+
}
|
351 |
+
protected function charsetFromXML($markup) {
|
352 |
+
$matches = array();
|
353 |
+
// find declaration
|
354 |
+
preg_match('@<'.'?xml[^>]+encoding\\s*=\\s*(["|\'])(.*?)\\1@i',
|
355 |
+
$markup, $matches
|
356 |
+
);
|
357 |
+
return isset($matches[2])
|
358 |
+
? strtolower($matches[2])
|
359 |
+
: null;
|
360 |
+
}
|
361 |
+
/**
|
362 |
+
* Repositions meta[type=charset] at the start of head. Bypasses DOMDocument bug.
|
363 |
+
*
|
364 |
+
* @link http://code.google.com/p/phpquery/issues/detail?id=80
|
365 |
+
* @param $html
|
366 |
+
*/
|
367 |
+
protected function charsetFixHTML($markup) {
|
368 |
+
$matches = array();
|
369 |
+
// find meta tag
|
370 |
+
preg_match('@\s*<meta[^>]+http-equiv\\s*=\\s*(["|\'])Content-Type\\1([^>]+?)>@i',
|
371 |
+
$markup, $matches, PREG_OFFSET_CAPTURE
|
372 |
+
);
|
373 |
+
if (! isset($matches[0]))
|
374 |
+
return;
|
375 |
+
$metaContentType = $matches[0][0];
|
376 |
+
$markup = substr($markup, 0, $matches[0][1])
|
377 |
+
.substr($markup, $matches[0][1]+strlen($metaContentType));
|
378 |
+
$headStart = stripos($markup, '<head>');
|
379 |
+
$markup = substr($markup, 0, $headStart+6).$metaContentType
|
380 |
+
.substr($markup, $headStart+6);
|
381 |
+
return $markup;
|
382 |
+
}
|
383 |
+
protected function charsetAppendToHTML($html, $charset, $xhtml = false) {
|
384 |
+
// remove existing meta[type=content-type]
|
385 |
+
$html = preg_replace('@\s*<meta[^>]+http-equiv\\s*=\\s*(["|\'])Content-Type\\1([^>]+?)>@i', '', $html);
|
386 |
+
$meta = '<meta http-equiv="Content-Type" content="text/html;charset='
|
387 |
+
.$charset.'" '
|
388 |
+
.($xhtml ? '/' : '')
|
389 |
+
.'>';
|
390 |
+
if (strpos($html, '<head') === false) {
|
391 |
+
if (strpos($html, '<html') === false) {
|
392 |
+
return $meta.$html;
|
393 |
+
} else {
|
394 |
+
return preg_replace(
|
395 |
+
'@<html(.*?)(?(?<!\?)>)@s',
|
396 |
+
"<html\\1><head>{$meta}</head>",
|
397 |
+
$html
|
398 |
+
);
|
399 |
+
}
|
400 |
+
} else {
|
401 |
+
return preg_replace(
|
402 |
+
'@<head(.*?)(?(?<!\?)>)@s',
|
403 |
+
'<head\\1>'.$meta,
|
404 |
+
$html
|
405 |
+
);
|
406 |
+
}
|
407 |
+
}
|
408 |
+
protected function charsetAppendToXML($markup, $charset) {
|
409 |
+
$declaration = '<'.'?xml version="1.0" encoding="'.$charset.'"?'.'>';
|
410 |
+
return $declaration.$markup;
|
411 |
+
}
|
412 |
+
public static function isDocumentFragmentHTML($markup) {
|
413 |
+
return stripos($markup, '<html') === false && stripos($markup, '<!doctype') === false;
|
414 |
+
}
|
415 |
+
public static function isDocumentFragmentXML($markup) {
|
416 |
+
return stripos($markup, '<'.'?xml') === false;
|
417 |
+
}
|
418 |
+
public static function isDocumentFragmentXHTML($markup) {
|
419 |
+
return self::isDocumentFragmentHTML($markup);
|
420 |
+
}
|
421 |
+
public function importAttr($value) {
|
422 |
+
// TODO
|
423 |
+
}
|
424 |
+
/**
|
425 |
+
*
|
426 |
+
* @param $source
|
427 |
+
* @param $target
|
428 |
+
* @param $sourceCharset
|
429 |
+
* @return array Array of imported nodes.
|
430 |
+
*/
|
431 |
+
public function import($source, $sourceCharset = null) {
|
432 |
+
// TODO charset conversions
|
433 |
+
$return = array();
|
434 |
+
if ($source instanceof DOMNODE && !($source instanceof DOMNODELIST))
|
435 |
+
$source = array($source);
|
436 |
+
// if (is_array($source)) {
|
437 |
+
// foreach($source as $node) {
|
438 |
+
// if (is_string($node)) {
|
439 |
+
// // string markup
|
440 |
+
// $fake = $this->documentFragmentCreate($node, $sourceCharset);
|
441 |
+
// if ($fake === false)
|
442 |
+
// throw new Exception("Error loading documentFragment markup");
|
443 |
+
// else
|
444 |
+
// $return = array_merge($return,
|
445 |
+
// $this->import($fake->root->childNodes)
|
446 |
+
// );
|
447 |
+
// } else {
|
448 |
+
// $return[] = $this->document->importNode($node, true);
|
449 |
+
// }
|
450 |
+
// }
|
451 |
+
// return $return;
|
452 |
+
// } else {
|
453 |
+
// // string markup
|
454 |
+
// $fake = $this->documentFragmentCreate($source, $sourceCharset);
|
455 |
+
// if ($fake === false)
|
456 |
+
// throw new Exception("Error loading documentFragment markup");
|
457 |
+
// else
|
458 |
+
// return $this->import($fake->root->childNodes);
|
459 |
+
// }
|
460 |
+
if (is_array($source) || $source instanceof DOMNODELIST) {
|
461 |
+
// dom nodes
|
462 |
+
self::debug('Importing nodes to document');
|
463 |
+
foreach($source as $node)
|
464 |
+
$return[] = @$this->document->importNode($node, true);
|
465 |
+
} else {
|
466 |
+
// string markup
|
467 |
+
$fake = $this->documentFragmentCreate($source, $sourceCharset);
|
468 |
+
if ($fake === false)
|
469 |
+
throw new Exception("Error loading documentFragment markup");
|
470 |
+
else
|
471 |
+
return $this->import($fake->root->childNodes);
|
472 |
+
}
|
473 |
+
return $return;
|
474 |
+
}
|
475 |
+
/**
|
476 |
+
* Creates new document fragment.
|
477 |
+
*
|
478 |
+
* @param $source
|
479 |
+
* @return DOMDocumentWrapper
|
480 |
+
*/
|
481 |
+
protected function documentFragmentCreate($source, $charset = null) {
|
482 |
+
$fake = new DOMDocumentWrapper();
|
483 |
+
$fake->contentType = $this->contentType;
|
484 |
+
$fake->isXML = $this->isXML;
|
485 |
+
$fake->isHTML = $this->isHTML;
|
486 |
+
$fake->isXHTML = $this->isXHTML;
|
487 |
+
$fake->root = $fake->document;
|
488 |
+
if (! $charset)
|
489 |
+
$charset = $this->charset;
|
490 |
+
// $fake->documentCreate($this->charset);
|
491 |
+
if ($source instanceof DOMNODE && !($source instanceof DOMNODELIST))
|
492 |
+
$source = array($source);
|
493 |
+
if (is_array($source) || $source instanceof DOMNODELIST) {
|
494 |
+
// dom nodes
|
495 |
+
// load fake document
|
496 |
+
if (! $this->documentFragmentLoadMarkup($fake, $charset))
|
497 |
+
return false;
|
498 |
+
$nodes = $fake->import($source);
|
499 |
+
foreach($nodes as $node)
|
500 |
+
$fake->root->appendChild($node);
|
501 |
+
} else {
|
502 |
+
// string markup
|
503 |
+
$this->documentFragmentLoadMarkup($fake, $charset, $source);
|
504 |
+
}
|
505 |
+
return $fake;
|
506 |
+
}
|
507 |
+
/**
|
508 |
+
*
|
509 |
+
* @param $document DOMDocumentWrapper
|
510 |
+
* @param $markup
|
511 |
+
* @return $document
|
512 |
+
*/
|
513 |
+
private function documentFragmentLoadMarkup($fragment, $charset, $markup = null) {
|
514 |
+
// TODO error handling
|
515 |
+
// TODO copy doctype
|
516 |
+
// tempolary turn off
|
517 |
+
$fragment->isDocumentFragment = false;
|
518 |
+
if ($fragment->isXML) {
|
519 |
+
if ($fragment->isXHTML) {
|
520 |
+
// add FAKE element to set default namespace
|
521 |
+
$fragment->loadMarkupXML('<?xml version="1.0" encoding="'.$charset.'"?>'
|
522 |
+
.'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" '
|
523 |
+
.'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
|
524 |
+
.'<fake xmlns="http://www.w3.org/1999/xhtml">'.$markup.'</fake>');
|
525 |
+
$fragment->root = $fragment->document->firstChild->nextSibling;
|
526 |
+
} else {
|
527 |
+
$fragment->loadMarkupXML('<?xml version="1.0" encoding="'.$charset.'"?><fake>'.$markup.'</fake>');
|
528 |
+
$fragment->root = $fragment->document->firstChild;
|
529 |
+
}
|
530 |
+
} else {
|
531 |
+
$markup2 = phpQuery::$defaultDoctype.'<html><head><meta http-equiv="Content-Type" content="text/html;charset='
|
532 |
+
.$charset.'"></head>';
|
533 |
+
$noBody = strpos($markup, '<body') === false;
|
534 |
+
if ($noBody)
|
535 |
+
$markup2 .= '<body>';
|
536 |
+
$markup2 .= $markup;
|
537 |
+
if ($noBody)
|
538 |
+
$markup2 .= '</body>';
|
539 |
+
$markup2 .= '</html>';
|
540 |
+
$fragment->loadMarkupHTML($markup2);
|
541 |
+
// TODO resolv body tag merging issue
|
542 |
+
$fragment->root = $noBody
|
543 |
+
? $fragment->document->firstChild->nextSibling->firstChild->nextSibling
|
544 |
+
: $fragment->document->firstChild->nextSibling->firstChild->nextSibling;
|
545 |
+
}
|
546 |
+
if (! $fragment->root)
|
547 |
+
return false;
|
548 |
+
$fragment->isDocumentFragment = true;
|
549 |
+
return true;
|
550 |
+
}
|
551 |
+
protected function documentFragmentToMarkup($fragment) {
|
552 |
+
phpQuery::debug('documentFragmentToMarkup');
|
553 |
+
$tmp = $fragment->isDocumentFragment;
|
554 |
+
$fragment->isDocumentFragment = false;
|
555 |
+
$markup = $fragment->markup();
|
556 |
+
if ($fragment->isXML) {
|
557 |
+
$markup = substr($markup, 0, strrpos($markup, '</fake>'));
|
558 |
+
if ($fragment->isXHTML) {
|
559 |
+
$markup = substr($markup, strpos($markup, '<fake')+43);
|
560 |
+
} else {
|
561 |
+
$markup = substr($markup, strpos($markup, '<fake>')+6);
|
562 |
+
}
|
563 |
+
} else {
|
564 |
+
$markup = substr($markup, strpos($markup, '<body>')+6);
|
565 |
+
$markup = substr($markup, 0, strrpos($markup, '</body>'));
|
566 |
+
}
|
567 |
+
$fragment->isDocumentFragment = $tmp;
|
568 |
+
if (phpQuery::$debug)
|
569 |
+
phpQuery::debug('documentFragmentToMarkup: '.substr($markup, 0, 150));
|
570 |
+
return $markup;
|
571 |
+
}
|
572 |
+
/**
|
573 |
+
* Return document markup, starting with optional $nodes as root.
|
574 |
+
*
|
575 |
+
* @param $nodes DOMNode|DOMNodeList
|
576 |
+
* @return string
|
577 |
+
*/
|
578 |
+
public function markup($nodes = null, $innerMarkup = false) {
|
579 |
+
if (isset($nodes) && count($nodes) == 1 && $nodes[0] instanceof DOMDOCUMENT)
|
580 |
+
$nodes = null;
|
581 |
+
if (isset($nodes)) {
|
582 |
+
$markup = '';
|
583 |
+
if (!is_array($nodes) && !($nodes instanceof DOMNODELIST) )
|
584 |
+
$nodes = array($nodes);
|
585 |
+
if ($this->isDocumentFragment && ! $innerMarkup)
|
586 |
+
foreach($nodes as $i => $node)
|
587 |
+
if ($node->isSameNode($this->root)) {
|
588 |
+
// var_dump($node);
|
589 |
+
$nodes = array_slice($nodes, 0, $i)
|
590 |
+
+ phpQuery::DOMNodeListToArray($node->childNodes)
|
591 |
+
+ array_slice($nodes, $i+1);
|
592 |
+
}
|
593 |
+
if ($this->isXML && ! $innerMarkup) {
|
594 |
+
self::debug("Getting outerXML with charset '{$this->charset}'");
|
595 |
+
// we need outerXML, so we can benefit from
|
596 |
+
// $node param support in saveXML()
|
597 |
+
foreach($nodes as $node)
|
598 |
+
$markup .= $this->document->saveXML($node);
|
599 |
+
} else {
|
600 |
+
$loop = array();
|
601 |
+
if ($innerMarkup)
|
602 |
+
foreach($nodes as $node) {
|
603 |
+
if ($node->childNodes)
|
604 |
+
foreach($node->childNodes as $child)
|
605 |
+
$loop[] = $child;
|
606 |
+
else
|
607 |
+
$loop[] = $node;
|
608 |
+
}
|
609 |
+
else
|
610 |
+
$loop = $nodes;
|
611 |
+
self::debug("Getting markup, moving selected nodes (".count($loop).") to new DocumentFragment");
|
612 |
+
$fake = $this->documentFragmentCreate($loop);
|
613 |
+
$markup = $this->documentFragmentToMarkup($fake);
|
614 |
+
}
|
615 |
+
if ($this->isXHTML) {
|
616 |
+
self::debug("Fixing XHTML");
|
617 |
+
$markup = self::markupFixXHTML($markup);
|
618 |
+
}
|
619 |
+
self::debug("Markup: ".substr($markup, 0, 250));
|
620 |
+
return $markup;
|
621 |
+
} else {
|
622 |
+
if ($this->isDocumentFragment) {
|
623 |
+
// documentFragment, html only...
|
624 |
+
self::debug("Getting markup, DocumentFragment detected");
|
625 |
+
// return $this->markup(
|
626 |
+
//// $this->document->getElementsByTagName('body')->item(0)
|
627 |
+
// $this->document->root, true
|
628 |
+
// );
|
629 |
+
$markup = $this->documentFragmentToMarkup($this);
|
630 |
+
// no need for markupFixXHTML, as it's done thought markup($nodes) method
|
631 |
+
return $markup;
|
632 |
+
} else {
|
633 |
+
self::debug("Getting markup (".($this->isXML?'XML':'HTML')."), final with charset '{$this->charset}'");
|
634 |
+
$markup = $this->isXML
|
635 |
+
? $this->document->saveXML()
|
636 |
+
: $this->document->saveHTML();
|
637 |
+
if ($this->isXHTML) {
|
638 |
+
self::debug("Fixing XHTML");
|
639 |
+
$markup = self::markupFixXHTML($markup);
|
640 |
+
}
|
641 |
+
self::debug("Markup: ".substr($markup, 0, 250));
|
642 |
+
return $markup;
|
643 |
+
}
|
644 |
+
}
|
645 |
+
}
|
646 |
+
protected static function markupFixXHTML($markup) {
|
647 |
+
$markup = self::expandEmptyTag('script', $markup);
|
648 |
+
$markup = self::expandEmptyTag('select', $markup);
|
649 |
+
$markup = self::expandEmptyTag('textarea', $markup);
|
650 |
+
return $markup;
|
651 |
+
}
|
652 |
+
public static function debug($text) {
|
653 |
+
phpQuery::debug($text);
|
654 |
+
}
|
655 |
+
/**
|
656 |
+
* expandEmptyTag
|
657 |
+
*
|
658 |
+
* @param $tag
|
659 |
+
* @param $xml
|
660 |
+
* @return string
|
661 |
+
* @author mjaque at ilkebenson dot com
|
662 |
+
* @link http://php.net/manual/en/domdocument.savehtml.php#81256
|
663 |
+
*/
|
664 |
+
public static function expandEmptyTag($tag, $xml){
|
665 |
+
$indice = 0;
|
666 |
+
while ($indice< strlen($xml)){
|
667 |
+
$pos = strpos($xml, "<$tag ", $indice);
|
668 |
+
if ($pos){
|
669 |
+
$posCierre = strpos($xml, ">", $pos);
|
670 |
+
if ($xml[$posCierre-1] == "/"){
|
671 |
+
$xml = substr_replace($xml, "></$tag>", $posCierre-1, 2);
|
672 |
+
}
|
673 |
+
$indice = $posCierre;
|
674 |
+
}
|
675 |
+
else break;
|
676 |
+
}
|
677 |
+
return $xml;
|
678 |
+
}
|
679 |
+
}
|
libs/phpQuery/DOMEvent.php
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* DOMEvent class.
|
4 |
+
*
|
5 |
+
* Based on
|
6 |
+
* @link http://developer.mozilla.org/En/DOM:event
|
7 |
+
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
8 |
+
* @package phpQuery
|
9 |
+
* @todo implement ArrayAccess ?
|
10 |
+
*/
|
11 |
+
class DOMEvent {
|
12 |
+
/**
|
13 |
+
* Returns a boolean indicating whether the event bubbles up through the DOM or not.
|
14 |
+
*
|
15 |
+
* @var unknown_type
|
16 |
+
*/
|
17 |
+
public $bubbles = true;
|
18 |
+
/**
|
19 |
+
* Returns a boolean indicating whether the event is cancelable.
|
20 |
+
*
|
21 |
+
* @var unknown_type
|
22 |
+
*/
|
23 |
+
public $cancelable = true;
|
24 |
+
/**
|
25 |
+
* Returns a reference to the currently registered target for the event.
|
26 |
+
*
|
27 |
+
* @var unknown_type
|
28 |
+
*/
|
29 |
+
public $currentTarget;
|
30 |
+
/**
|
31 |
+
* Returns detail about the event, depending on the type of event.
|
32 |
+
*
|
33 |
+
* @var unknown_type
|
34 |
+
* @link http://developer.mozilla.org/en/DOM/event.detail
|
35 |
+
*/
|
36 |
+
public $detail; // ???
|
37 |
+
/**
|
38 |
+
* Used to indicate which phase of the event flow is currently being evaluated.
|
39 |
+
*
|
40 |
+
* NOT IMPLEMENTED
|
41 |
+
*
|
42 |
+
* @var unknown_type
|
43 |
+
* @link http://developer.mozilla.org/en/DOM/event.eventPhase
|
44 |
+
*/
|
45 |
+
public $eventPhase; // ???
|
46 |
+
/**
|
47 |
+
* The explicit original target of the event (Mozilla-specific).
|
48 |
+
*
|
49 |
+
* NOT IMPLEMENTED
|
50 |
+
*
|
51 |
+
* @var unknown_type
|
52 |
+
*/
|
53 |
+
public $explicitOriginalTarget; // moz only
|
54 |
+
/**
|
55 |
+
* The original target of the event, before any retargetings (Mozilla-specific).
|
56 |
+
*
|
57 |
+
* NOT IMPLEMENTED
|
58 |
+
*
|
59 |
+
* @var unknown_type
|
60 |
+
*/
|
61 |
+
public $originalTarget; // moz only
|
62 |
+
/**
|
63 |
+
* Identifies a secondary target for the event.
|
64 |
+
*
|
65 |
+
* @var unknown_type
|
66 |
+
*/
|
67 |
+
public $relatedTarget;
|
68 |
+
/**
|
69 |
+
* Returns a reference to the target to which the event was originally dispatched.
|
70 |
+
*
|
71 |
+
* @var unknown_type
|
72 |
+
*/
|
73 |
+
public $target;
|
74 |
+
/**
|
75 |
+
* Returns the time that the event was created.
|
76 |
+
*
|
77 |
+
* @var unknown_type
|
78 |
+
*/
|
79 |
+
public $timeStamp;
|
80 |
+
/**
|
81 |
+
* Returns the name of the event (case-insensitive).
|
82 |
+
*/
|
83 |
+
public $type;
|
84 |
+
public $runDefault = true;
|
85 |
+
public $data = null;
|
86 |
+
public function __construct($data) {
|
87 |
+
foreach($data as $k => $v) {
|
88 |
+
$this->{$k} = $v;
|
89 |
+
}
|
90 |
+
if (! $this->timeStamp)
|
91 |
+
$this->timeStamp = time();
|
92 |
+
}
|
93 |
+
/**
|
94 |
+
* Cancels the event (if it is cancelable).
|
95 |
+
*
|
96 |
+
*/
|
97 |
+
public function preventDefault() {
|
98 |
+
$this->runDefault = false;
|
99 |
+
}
|
100 |
+
/**
|
101 |
+
* Stops the propagation of events further along in the DOM.
|
102 |
+
*
|
103 |
+
*/
|
104 |
+
public function stopPropagation() {
|
105 |
+
$this->bubbles = false;
|
106 |
+
}
|
107 |
+
}
|
libs/phpQuery/compat/mbstring.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// -- Multibyte Compatibility functions ---------------------------------------
|
3 |
+
// http://svn.iphonewebdev.com/lace/lib/mb_compat.php
|
4 |
+
|
5 |
+
/**
|
6 |
+
* mb_internal_encoding()
|
7 |
+
*
|
8 |
+
* Included for mbstring pseudo-compatability.
|
9 |
+
*/
|
10 |
+
if (!function_exists('mb_internal_encoding'))
|
11 |
+
{
|
12 |
+
function mb_internal_encoding($enc) {return true; }
|
13 |
+
}
|
14 |
+
|
15 |
+
/**
|
16 |
+
* mb_regex_encoding()
|
17 |
+
*
|
18 |
+
* Included for mbstring pseudo-compatability.
|
19 |
+
*/
|
20 |
+
if (!function_exists('mb_regex_encoding'))
|
21 |
+
{
|
22 |
+
function mb_regex_encoding($enc) {return true; }
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* mb_strlen()
|
27 |
+
*
|
28 |
+
* Included for mbstring pseudo-compatability.
|
29 |
+
*/
|
30 |
+
if (!function_exists('mb_strlen'))
|
31 |
+
{
|
32 |
+
function mb_strlen($str)
|
33 |
+
{
|
34 |
+
return strlen($str);
|
35 |
+
}
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* mb_strpos()
|
40 |
+
*
|
41 |
+
* Included for mbstring pseudo-compatability.
|
42 |
+
*/
|
43 |
+
if (!function_exists('mb_strpos'))
|
44 |
+
{
|
45 |
+
function mb_strpos($haystack, $needle, $offset=0)
|
46 |
+
{
|
47 |
+
return strpos($haystack, $needle, $offset);
|
48 |
+
}
|
49 |
+
}
|
50 |
+
/**
|
51 |
+
* mb_stripos()
|
52 |
+
*
|
53 |
+
* Included for mbstring pseudo-compatability.
|
54 |
+
*/
|
55 |
+
if (!function_exists('mb_stripos'))
|
56 |
+
{
|
57 |
+
function mb_stripos($haystack, $needle, $offset=0)
|
58 |
+
{
|
59 |
+
return stripos($haystack, $needle, $offset);
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* mb_substr()
|
65 |
+
*
|
66 |
+
* Included for mbstring pseudo-compatability.
|
67 |
+
*/
|
68 |
+
if (!function_exists('mb_substr'))
|
69 |
+
{
|
70 |
+
function mb_substr($str, $start, $length=0)
|
71 |
+
{
|
72 |
+
return substr($str, $start, $length);
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* mb_substr_count()
|
78 |
+
*
|
79 |
+
* Included for mbstring pseudo-compatability.
|
80 |
+
*/
|
81 |
+
if (!function_exists('mb_substr_count'))
|
82 |
+
{
|
83 |
+
function mb_substr_count($haystack, $needle)
|
84 |
+
{
|
85 |
+
return substr_count($haystack, $needle);
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
libs/phpQuery/phpQueryEvents.php
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Event handling class.
|
4 |
+
*
|
5 |
+
* @author Tobiasz Cudnik
|
6 |
+
* @package phpQuery
|
7 |
+
* @static
|
8 |
+
*/
|
9 |
+
abstract class phpQueryEvents {
|
10 |
+
/**
|
11 |
+
* Trigger a type of event on every matched element.
|
12 |
+
*
|
13 |
+
* @param DOMNode|phpQueryObject|string $document
|
14 |
+
* @param unknown_type $type
|
15 |
+
* @param unknown_type $data
|
16 |
+
*
|
17 |
+
* @TODO exclusive events (with !)
|
18 |
+
* @TODO global events (test)
|
19 |
+
* @TODO support more than event in $type (space-separated)
|
20 |
+
*/
|
21 |
+
public static function trigger($document, $type, $data = array(), $node = null) {
|
22 |
+
// trigger: function(type, data, elem, donative, extra) {
|
23 |
+
$documentID = phpQuery::getDocumentID($document);
|
24 |
+
$namespace = null;
|
25 |
+
if (strpos($type, '.') !== false)
|
26 |
+
list($name, $namespace) = explode('.', $type);
|
27 |
+
else
|
28 |
+
$name = $type;
|
29 |
+
if (! $node) {
|
30 |
+
if (self::issetGlobal($documentID, $type)) {
|
31 |
+
$pq = phpQuery::getDocument($documentID);
|
32 |
+
// TODO check add($pq->document)
|
33 |
+
$pq->find('*')->add($pq->document)
|
34 |
+
->trigger($type, $data);
|
35 |
+
}
|
36 |
+
} else {
|
37 |
+
if (isset($data[0]) && $data[0] instanceof DOMEvent) {
|
38 |
+
$event = $data[0];
|
39 |
+
$event->relatedTarget = $event->target;
|
40 |
+
$event->target = $node;
|
41 |
+
$data = array_slice($data, 1);
|
42 |
+
} else {
|
43 |
+
$event = new DOMEvent(array(
|
44 |
+
'type' => $type,
|
45 |
+
'target' => $node,
|
46 |
+
'timeStamp' => time(),
|
47 |
+
));
|
48 |
+
}
|
49 |
+
$i = 0;
|
50 |
+
while($node) {
|
51 |
+
// TODO whois
|
52 |
+
phpQuery::debug("Triggering ".($i?"bubbled ":'')."event '{$type}' on "
|
53 |
+
."node \n");//.phpQueryObject::whois($node)."\n");
|
54 |
+
$event->currentTarget = $node;
|
55 |
+
$eventNode = self::getNode($documentID, $node);
|
56 |
+
if (isset($eventNode->eventHandlers)) {
|
57 |
+
foreach($eventNode->eventHandlers as $eventType => $handlers) {
|
58 |
+
$eventNamespace = null;
|
59 |
+
if (strpos($type, '.') !== false)
|
60 |
+
list($eventName, $eventNamespace) = explode('.', $eventType);
|
61 |
+
else
|
62 |
+
$eventName = $eventType;
|
63 |
+
if ($name != $eventName)
|
64 |
+
continue;
|
65 |
+
if ($namespace && $eventNamespace && $namespace != $eventNamespace)
|
66 |
+
continue;
|
67 |
+
foreach($handlers as $handler) {
|
68 |
+
phpQuery::debug("Calling event handler\n");
|
69 |
+
$event->data = $handler['data']
|
70 |
+
? $handler['data']
|
71 |
+
: null;
|
72 |
+
$params = array_merge(array($event), $data);
|
73 |
+
$return = phpQuery::callbackRun($handler['callback'], $params);
|
74 |
+
if ($return === false) {
|
75 |
+
$event->bubbles = false;
|
76 |
+
}
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
// to bubble or not to bubble...
|
81 |
+
if (! $event->bubbles)
|
82 |
+
break;
|
83 |
+
$node = $node->parentNode;
|
84 |
+
$i++;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
}
|
88 |
+
/**
|
89 |
+
* Binds a handler to one or more events (like click) for each matched element.
|
90 |
+
* Can also bind custom events.
|
91 |
+
*
|
92 |
+
* @param DOMNode|phpQueryObject|string $document
|
93 |
+
* @param unknown_type $type
|
94 |
+
* @param unknown_type $data Optional
|
95 |
+
* @param unknown_type $callback
|
96 |
+
*
|
97 |
+
* @TODO support '!' (exclusive) events
|
98 |
+
* @TODO support more than event in $type (space-separated)
|
99 |
+
* @TODO support binding to global events
|
100 |
+
*/
|
101 |
+
public static function add($document, $node, $type, $data, $callback = null) {
|
102 |
+
phpQuery::debug("Binding '$type' event");
|
103 |
+
$documentID = phpQuery::getDocumentID($document);
|
104 |
+
// if (is_null($callback) && is_callable($data)) {
|
105 |
+
// $callback = $data;
|
106 |
+
// $data = null;
|
107 |
+
// }
|
108 |
+
$eventNode = self::getNode($documentID, $node);
|
109 |
+
if (! $eventNode)
|
110 |
+
$eventNode = self::setNode($documentID, $node);
|
111 |
+
if (!isset($eventNode->eventHandlers[$type]))
|
112 |
+
$eventNode->eventHandlers[$type] = array();
|
113 |
+
$eventNode->eventHandlers[$type][] = array(
|
114 |
+
'callback' => $callback,
|
115 |
+
'data' => $data,
|
116 |
+
);
|
117 |
+
}
|
118 |
+
/**
|
119 |
+
* Enter description here...
|
120 |
+
*
|
121 |
+
* @param DOMNode|phpQueryObject|string $document
|
122 |
+
* @param unknown_type $type
|
123 |
+
* @param unknown_type $callback
|
124 |
+
*
|
125 |
+
* @TODO namespace events
|
126 |
+
* @TODO support more than event in $type (space-separated)
|
127 |
+
*/
|
128 |
+
public static function remove($document, $node, $type = null, $callback = null) {
|
129 |
+
$documentID = phpQuery::getDocumentID($document);
|
130 |
+
$eventNode = self::getNode($documentID, $node);
|
131 |
+
if (is_object($eventNode) && isset($eventNode->eventHandlers[$type])) {
|
132 |
+
if ($callback) {
|
133 |
+
foreach($eventNode->eventHandlers[$type] as $k => $handler)
|
134 |
+
if ($handler['callback'] == $callback)
|
135 |
+
unset($eventNode->eventHandlers[$type][$k]);
|
136 |
+
} else {
|
137 |
+
unset($eventNode->eventHandlers[$type]);
|
138 |
+
}
|
139 |
+
}
|
140 |
+
}
|
141 |
+
protected static function getNode($documentID, $node) {
|
142 |
+
foreach(phpQuery::$documents[$documentID]->eventsNodes as $eventNode) {
|
143 |
+
if ($node->isSameNode($eventNode))
|
144 |
+
return $eventNode;
|
145 |
+
}
|
146 |
+
}
|
147 |
+
protected static function setNode($documentID, $node) {
|
148 |
+
phpQuery::$documents[$documentID]->eventsNodes[] = $node;
|
149 |
+
return phpQuery::$documents[$documentID]->eventsNodes[
|
150 |
+
count(phpQuery::$documents[$documentID]->eventsNodes)-1
|
151 |
+
];
|
152 |
+
}
|
153 |
+
protected static function issetGlobal($documentID, $type) {
|
154 |
+
return isset(phpQuery::$documents[$documentID])
|
155 |
+
? in_array($type, phpQuery::$documents[$documentID]->eventsGlobal)
|
156 |
+
: false;
|
157 |
+
}
|
158 |
+
}
|
libs/phpQuery/phpQueryObject.php
ADDED
@@ -0,0 +1,3220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Class representing phpQuery objects.
|
4 |
+
*
|
5 |
+
* @author Tobiasz Cudnik <tobiasz.cudnik/gmail.com>
|
6 |
+
* @package phpQuery
|
7 |
+
* @method phpQueryObject clone() clone()
|
8 |
+
* @method phpQueryObject empty() empty()
|
9 |
+
* @method phpQueryObject next() next($selector = null)
|
10 |
+
* @method phpQueryObject prev() prev($selector = null)
|
11 |
+
* @property Int $length
|
12 |
+
*/
|
13 |
+
class phpQueryObject
|
14 |
+
implements Iterator, Countable, ArrayAccess {
|
15 |
+
public $documentID = null;
|
16 |
+
/**
|
17 |
+
* DOMDocument class.
|
18 |
+
*
|
19 |
+
* @var DOMDocument
|
20 |
+
*/
|
21 |
+
public $document = null;
|
22 |
+
public $charset = null;
|
23 |
+
/**
|
24 |
+
*
|
25 |
+
* @var DOMDocumentWrapper
|
26 |
+
*/
|
27 |
+
public $documentWrapper = null;
|
28 |
+
/**
|
29 |
+
* XPath interface.
|
30 |
+
*
|
31 |
+
* @var DOMXPath
|
32 |
+
*/
|
33 |
+
public $xpath = null;
|
34 |
+
/**
|
35 |
+
* Stack of selected elements.
|
36 |
+
* @TODO refactor to ->nodes
|
37 |
+
* @var array
|
38 |
+
*/
|
39 |
+
public $elements = array();
|
40 |
+
/**
|
41 |
+
* @access private
|
42 |
+
*/
|
43 |
+
protected $elementsBackup = array();
|
44 |
+
/**
|
45 |
+
* @access private
|
46 |
+
*/
|
47 |
+
protected $previous = null;
|
48 |
+
/**
|
49 |
+
* @access private
|
50 |
+
* @TODO deprecate
|
51 |
+
*/
|
52 |
+
protected $root = array();
|
53 |
+
/**
|
54 |
+
* Indicated if doument is just a fragment (no <html> tag).
|
55 |
+
*
|
56 |
+
* Every document is realy a full document, so even documentFragments can
|
57 |
+
* be queried against <html>, but getDocument(id)->htmlOuter() will return
|
58 |
+
* only contents of <body>.
|
59 |
+
*
|
60 |
+
* @var bool
|
61 |
+
*/
|
62 |
+
public $documentFragment = true;
|
63 |
+
/**
|
64 |
+
* Iterator interface helper
|
65 |
+
* @access private
|
66 |
+
*/
|
67 |
+
protected $elementsInterator = array();
|
68 |
+
/**
|
69 |
+
* Iterator interface helper
|
70 |
+
* @access private
|
71 |
+
*/
|
72 |
+
protected $valid = false;
|
73 |
+
/**
|
74 |
+
* Iterator interface helper
|
75 |
+
* @access private
|
76 |
+
*/
|
77 |
+
protected $current = null;
|
78 |
+
/**
|
79 |
+
* Enter description here...
|
80 |
+
*
|
81 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
82 |
+
*/
|
83 |
+
public function __construct($documentID) {
|
84 |
+
// if ($documentID instanceof self)
|
85 |
+
// var_dump($documentID->getDocumentID());
|
86 |
+
$id = $documentID instanceof self
|
87 |
+
? $documentID->getDocumentID()
|
88 |
+
: $documentID;
|
89 |
+
// var_dump($id);
|
90 |
+
if (! isset(phpQuery::$documents[$id] )) {
|
91 |
+
// var_dump(phpQuery::$documents);
|
92 |
+
throw new Exception("Document with ID '{$id}' isn't loaded. Use phpQuery::newDocument(\$html) or phpQuery::newDocumentFile(\$file) first.");
|
93 |
+
}
|
94 |
+
$this->documentID = $id;
|
95 |
+
$this->documentWrapper =& phpQuery::$documents[$id];
|
96 |
+
$this->document =& $this->documentWrapper->document;
|
97 |
+
$this->xpath =& $this->documentWrapper->xpath;
|
98 |
+
$this->charset =& $this->documentWrapper->charset;
|
99 |
+
$this->documentFragment =& $this->documentWrapper->isDocumentFragment;
|
100 |
+
// TODO check $this->DOM->documentElement;
|
101 |
+
// $this->root = $this->document->documentElement;
|
102 |
+
$this->root =& $this->documentWrapper->root;
|
103 |
+
// $this->toRoot();
|
104 |
+
$this->elements = array($this->root);
|
105 |
+
}
|
106 |
+
/**
|
107 |
+
*
|
108 |
+
* @access private
|
109 |
+
* @param $attr
|
110 |
+
* @return unknown_type
|
111 |
+
*/
|
112 |
+
public function __get($attr) {
|
113 |
+
switch($attr) {
|
114 |
+
// FIXME doesnt work at all ?
|
115 |
+
case 'length':
|
116 |
+
return $this->size();
|
117 |
+
break;
|
118 |
+
default:
|
119 |
+
return $this->{$attr};
|
120 |
+
}
|
121 |
+
}
|
122 |
+
/**
|
123 |
+
* Saves actual object to $var by reference.
|
124 |
+
* Useful when need to break chain.
|
125 |
+
* @param phpQueryObject $var
|
126 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
127 |
+
*/
|
128 |
+
public function toReference(&$var) {
|
129 |
+
return $var = $this;
|
130 |
+
}
|
131 |
+
public function documentFragment($state = null) {
|
132 |
+
if ($state) {
|
133 |
+
phpQuery::$documents[$this->getDocumentID()]['documentFragment'] = $state;
|
134 |
+
return $this;
|
135 |
+
}
|
136 |
+
return $this->documentFragment;
|
137 |
+
}
|
138 |
+
/**
|
139 |
+
* @access private
|
140 |
+
* @TODO documentWrapper
|
141 |
+
*/
|
142 |
+
protected function isRoot( $node) {
|
143 |
+
// return $node instanceof DOMDOCUMENT || $node->tagName == 'html';
|
144 |
+
return $node instanceof DOMDOCUMENT
|
145 |
+
|| ($node instanceof DOMELEMENT && $node->tagName == 'html')
|
146 |
+
|| $this->root->isSameNode($node);
|
147 |
+
}
|
148 |
+
/**
|
149 |
+
* @access private
|
150 |
+
*/
|
151 |
+
protected function stackIsRoot() {
|
152 |
+
return $this->size() == 1 && $this->isRoot($this->elements[0]);
|
153 |
+
}
|
154 |
+
/**
|
155 |
+
* Enter description here...
|
156 |
+
* NON JQUERY METHOD
|
157 |
+
*
|
158 |
+
* Watch out, it doesn't creates new instance, can be reverted with end().
|
159 |
+
*
|
160 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
161 |
+
*/
|
162 |
+
public function toRoot() {
|
163 |
+
$this->elements = array($this->root);
|
164 |
+
return $this;
|
165 |
+
// return $this->newInstance(array($this->root));
|
166 |
+
}
|
167 |
+
/**
|
168 |
+
* Saves object's DocumentID to $var by reference.
|
169 |
+
* <code>
|
170 |
+
* $myDocumentId;
|
171 |
+
* phpQuery::newDocument('<div/>')
|
172 |
+
* ->getDocumentIDRef($myDocumentId)
|
173 |
+
* ->find('div')->...
|
174 |
+
* </code>
|
175 |
+
*
|
176 |
+
* @param unknown_type $domId
|
177 |
+
* @see phpQuery::newDocument
|
178 |
+
* @see phpQuery::newDocumentFile
|
179 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
180 |
+
*/
|
181 |
+
public function getDocumentIDRef(&$documentID) {
|
182 |
+
$documentID = $this->getDocumentID();
|
183 |
+
return $this;
|
184 |
+
}
|
185 |
+
/**
|
186 |
+
* Returns object with stack set to document root.
|
187 |
+
*
|
188 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
189 |
+
*/
|
190 |
+
public function getDocument() {
|
191 |
+
return phpQuery::getDocument($this->getDocumentID());
|
192 |
+
}
|
193 |
+
/**
|
194 |
+
*
|
195 |
+
* @return DOMDocument
|
196 |
+
*/
|
197 |
+
public function getDOMDocument() {
|
198 |
+
return $this->document;
|
199 |
+
}
|
200 |
+
/**
|
201 |
+
* Get object's Document ID.
|
202 |
+
*
|
203 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
204 |
+
*/
|
205 |
+
public function getDocumentID() {
|
206 |
+
return $this->documentID;
|
207 |
+
}
|
208 |
+
/**
|
209 |
+
* Unloads whole document from memory.
|
210 |
+
* CAUTION! None further operations will be possible on this document.
|
211 |
+
* All objects refering to it will be useless.
|
212 |
+
*
|
213 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
214 |
+
*/
|
215 |
+
public function unloadDocument() {
|
216 |
+
phpQuery::unloadDocuments($this->getDocumentID());
|
217 |
+
}
|
218 |
+
public function isHTML() {
|
219 |
+
return $this->documentWrapper->isHTML;
|
220 |
+
}
|
221 |
+
public function isXHTML() {
|
222 |
+
return $this->documentWrapper->isXHTML;
|
223 |
+
}
|
224 |
+
public function isXML() {
|
225 |
+
return $this->documentWrapper->isXML;
|
226 |
+
}
|
227 |
+
/**
|
228 |
+
* Enter description here...
|
229 |
+
*
|
230 |
+
* @link http://docs.jquery.com/Ajax/serialize
|
231 |
+
* @return string
|
232 |
+
*/
|
233 |
+
public function serialize() {
|
234 |
+
return phpQuery::param($this->serializeArray());
|
235 |
+
}
|
236 |
+
/**
|
237 |
+
* Enter description here...
|
238 |
+
*
|
239 |
+
* @link http://docs.jquery.com/Ajax/serializeArray
|
240 |
+
* @return array
|
241 |
+
*/
|
242 |
+
public function serializeArray($submit = null) {
|
243 |
+
$source = $this->filter('form, input, select, textarea')
|
244 |
+
->find('input, select, textarea')
|
245 |
+
->andSelf()
|
246 |
+
->not('form');
|
247 |
+
$return = array();
|
248 |
+
// $source->dumpDie();
|
249 |
+
foreach($source as $input) {
|
250 |
+
$input = phpQuery::pq($input);
|
251 |
+
if ($input->is('[disabled]'))
|
252 |
+
continue;
|
253 |
+
if (!$input->is('[name]'))
|
254 |
+
continue;
|
255 |
+
if ($input->is('[type=checkbox]') && !$input->is('[checked]'))
|
256 |
+
continue;
|
257 |
+
// jquery diff
|
258 |
+
if ($submit && $input->is('[type=submit]')) {
|
259 |
+
if ($submit instanceof DOMELEMENT && ! $input->elements[0]->isSameNode($submit))
|
260 |
+
continue;
|
261 |
+
else if (is_string($submit) && $input->attr('name') != $submit)
|
262 |
+
continue;
|
263 |
+
}
|
264 |
+
$return[] = array(
|
265 |
+
'name' => $input->attr('name'),
|
266 |
+
'value' => $input->val(),
|
267 |
+
);
|
268 |
+
}
|
269 |
+
return $return;
|
270 |
+
}
|
271 |
+
/**
|
272 |
+
* @access private
|
273 |
+
*/
|
274 |
+
protected function debug($in) {
|
275 |
+
if (! phpQuery::$debug )
|
276 |
+
return;
|
277 |
+
print('<pre>');
|
278 |
+
print_r($in);
|
279 |
+
// file debug
|
280 |
+
// file_put_contents(dirname(__FILE__).'/phpQuery.log', print_r($in, true)."\n", FILE_APPEND);
|
281 |
+
// quite handy debug trace
|
282 |
+
// if ( is_array($in))
|
283 |
+
// print_r(array_slice(debug_backtrace(), 3));
|
284 |
+
print("</pre>\n");
|
285 |
+
}
|
286 |
+
/**
|
287 |
+
* @access private
|
288 |
+
*/
|
289 |
+
protected function isRegexp($pattern) {
|
290 |
+
return in_array(
|
291 |
+
$pattern[ mb_strlen($pattern)-1 ],
|
292 |
+
array('^','*','$')
|
293 |
+
);
|
294 |
+
}
|
295 |
+
/**
|
296 |
+
* Determines if $char is really a char.
|
297 |
+
*
|
298 |
+
* @param string $char
|
299 |
+
* @return bool
|
300 |
+
* @todo rewrite me to charcode range ! ;)
|
301 |
+
* @access private
|
302 |
+
*/
|
303 |
+
protected function isChar($char) {
|
304 |
+
return extension_loaded('mbstring') && in_array('mb_eregi', get_extension_funcs("mbstring")) && phpQuery::$mbstringSupport
|
305 |
+
? mb_eregi('\w', $char)
|
306 |
+
: preg_match('@\w@', $char);
|
307 |
+
}
|
308 |
+
/**
|
309 |
+
* @access private
|
310 |
+
*/
|
311 |
+
protected function parseSelector($query) {
|
312 |
+
// clean spaces
|
313 |
+
// TODO include this inside parsing ?
|
314 |
+
$query = trim(
|
315 |
+
preg_replace('@\s+@', ' ',
|
316 |
+
preg_replace('@\s*(>|\\+|~)\s*@', '\\1', $query)
|
317 |
+
)
|
318 |
+
);
|
319 |
+
$queries = array(array());
|
320 |
+
if (! $query)
|
321 |
+
return $queries;
|
322 |
+
$return =& $queries[0];
|
323 |
+
$specialChars = array('>',' ');
|
324 |
+
// $specialCharsMapping = array('/' => '>');
|
325 |
+
$specialCharsMapping = array();
|
326 |
+
$strlen = mb_strlen($query);
|
327 |
+
$classChars = array('.', '-');
|
328 |
+
$pseudoChars = array('-');
|
329 |
+
$tagChars = array('*', '|', '-');
|
330 |
+
// split multibyte string
|
331 |
+
// http://code.google.com/p/phpquery/issues/detail?id=76
|
332 |
+
$_query = array();
|
333 |
+
for ($i=0; $i<$strlen; $i++)
|
334 |
+
$_query[] = mb_substr($query, $i, 1);
|
335 |
+
$query = $_query;
|
336 |
+
// it works, but i dont like it...
|
337 |
+
$i = 0;
|
338 |
+
while( $i < $strlen) {
|
339 |
+
$c = $query[$i];
|
340 |
+
$tmp = '';
|
341 |
+
// TAG
|
342 |
+
if ($this->isChar($c) || in_array($c, $tagChars)) {
|
343 |
+
while(isset($query[$i])
|
344 |
+
&& ($this->isChar($query[$i]) || in_array($query[$i], $tagChars))) {
|
345 |
+
$tmp .= $query[$i];
|
346 |
+
$i++;
|
347 |
+
}
|
348 |
+
$return[] = $tmp;
|
349 |
+
// IDs
|
350 |
+
} else if ( $c == '#') {
|
351 |
+
$i++;
|
352 |
+
while( isset($query[$i]) && ($this->isChar($query[$i]) || $query[$i] == '-')) {
|
353 |
+
$tmp .= $query[$i];
|
354 |
+
$i++;
|
355 |
+
}
|
356 |
+
$return[] = '#'.$tmp;
|
357 |
+
// SPECIAL CHARS
|
358 |
+
} else if (in_array($c, $specialChars)) {
|
359 |
+
$return[] = $c;
|
360 |
+
$i++;
|
361 |
+
// MAPPED SPECIAL MULTICHARS
|
362 |
+
// } else if ( $c.$query[$i+1] == '//') {
|
363 |
+
// $return[] = ' ';
|
364 |
+
// $i = $i+2;
|
365 |
+
// MAPPED SPECIAL CHARS
|
366 |
+
} else if ( isset($specialCharsMapping[$c])) {
|
367 |
+
$return[] = $specialCharsMapping[$c];
|
368 |
+
$i++;
|
369 |
+
// COMMA
|
370 |
+
} else if ( $c == ',') {
|
371 |
+
$queries[] = array();
|
372 |
+
$return =& $queries[ count($queries)-1 ];
|
373 |
+
$i++;
|
374 |
+
while( isset($query[$i]) && $query[$i] == ' ')
|
375 |
+
$i++;
|
376 |
+
// CLASSES
|
377 |
+
} else if ($c == '.') {
|
378 |
+
while( isset($query[$i]) && ($this->isChar($query[$i]) || in_array($query[$i], $classChars))) {
|
379 |
+
$tmp .= $query[$i];
|
380 |
+
$i++;
|
381 |
+
}
|
382 |
+
$return[] = $tmp;
|
383 |
+
// ~ General Sibling Selector
|
384 |
+
} else if ($c == '~') {
|
385 |
+
$spaceAllowed = true;
|
386 |
+
$tmp .= $query[$i++];
|
387 |
+
while( isset($query[$i])
|
388 |
+
&& ($this->isChar($query[$i])
|
389 |
+
|| in_array($query[$i], $classChars)
|
390 |
+
|| $query[$i] == '*'
|
391 |
+
|| ($query[$i] == ' ' && $spaceAllowed)
|
392 |
+
)) {
|
393 |
+
if ($query[$i] != ' ')
|
394 |
+
$spaceAllowed = false;
|
395 |
+
$tmp .= $query[$i];
|
396 |
+
$i++;
|
397 |
+
}
|
398 |
+
$return[] = $tmp;
|
399 |
+
// + Adjacent sibling selectors
|
400 |
+
} else if ($c == '+') {
|
401 |
+
$spaceAllowed = true;
|
402 |
+
$tmp .= $query[$i++];
|
403 |
+
while( isset($query[$i])
|
404 |
+
&& ($this->isChar($query[$i])
|
405 |
+
|| in_array($query[$i], $classChars)
|
406 |
+
|| $query[$i] == '*'
|
407 |
+
|| ($spaceAllowed && $query[$i] == ' ')
|
408 |
+
)) {
|
409 |
+
if ($query[$i] != ' ')
|
410 |
+
$spaceAllowed = false;
|
411 |
+
$tmp .= $query[$i];
|
412 |
+
$i++;
|
413 |
+
}
|
414 |
+
$return[] = $tmp;
|
415 |
+
// ATTRS
|
416 |
+
} else if ($c == '[') {
|
417 |
+
$stack = 1;
|
418 |
+
$tmp .= $c;
|
419 |
+
while( isset($query[++$i])) {
|
420 |
+
$tmp .= $query[$i];
|
421 |
+
if ( $query[$i] == '[') {
|
422 |
+
$stack++;
|
423 |
+
} else if ( $query[$i] == ']') {
|
424 |
+
$stack--;
|
425 |
+
if (! $stack )
|
426 |
+
break;
|
427 |
+
}
|
428 |
+
}
|
429 |
+
$return[] = $tmp;
|
430 |
+
$i++;
|
431 |
+
// PSEUDO CLASSES
|
432 |
+
} else if ($c == ':') {
|
433 |
+
$stack = 1;
|
434 |
+
$tmp .= $query[$i++];
|
435 |
+
while( isset($query[$i]) && ($this->isChar($query[$i]) || in_array($query[$i], $pseudoChars))) {
|
436 |
+
$tmp .= $query[$i];
|
437 |
+
$i++;
|
438 |
+
}
|
439 |
+
// with arguments ?
|
440 |
+
if ( isset($query[$i]) && $query[$i] == '(') {
|
441 |
+
$tmp .= $query[$i];
|
442 |
+
$stack = 1;
|
443 |
+
while( isset($query[++$i])) {
|
444 |
+
$tmp .= $query[$i];
|
445 |
+
if ( $query[$i] == '(') {
|
446 |
+
$stack++;
|
447 |
+
} else if ( $query[$i] == ')') {
|
448 |
+
$stack--;
|
449 |
+
if (! $stack )
|
450 |
+
break;
|
451 |
+
}
|
452 |
+
}
|
453 |
+
$return[] = $tmp;
|
454 |
+
$i++;
|
455 |
+
} else {
|
456 |
+
$return[] = $tmp;
|
457 |
+
}
|
458 |
+
} else {
|
459 |
+
$i++;
|
460 |
+
}
|
461 |
+
}
|
462 |
+
foreach($queries as $k => $q) {
|
463 |
+
if (isset($q[0])) {
|
464 |
+
if (isset($q[0][0]) && $q[0][0] == ':')
|
465 |
+
array_unshift($queries[$k], '*');
|
466 |
+
if ($q[0] != '>')
|
467 |
+
array_unshift($queries[$k], ' ');
|
468 |
+
}
|
469 |
+
}
|
470 |
+
return $queries;
|
471 |
+
}
|
472 |
+
/**
|
473 |
+
* Return matched DOM nodes.
|
474 |
+
*
|
475 |
+
* @param int $index
|
476 |
+
* @return array|DOMElement Single DOMElement or array of DOMElement.
|
477 |
+
*/
|
478 |
+
public function get($index = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
479 |
+
$return = isset($index)
|
480 |
+
? (isset($this->elements[$index]) ? $this->elements[$index] : null)
|
481 |
+
: $this->elements;
|
482 |
+
// pass thou callbacks
|
483 |
+
$args = func_get_args();
|
484 |
+
$args = array_slice($args, 1);
|
485 |
+
foreach($args as $callback) {
|
486 |
+
if (is_array($return))
|
487 |
+
foreach($return as $k => $v)
|
488 |
+
$return[$k] = phpQuery::callbackRun($callback, array($v));
|
489 |
+
else
|
490 |
+
$return = phpQuery::callbackRun($callback, array($return));
|
491 |
+
}
|
492 |
+
return $return;
|
493 |
+
}
|
494 |
+
/**
|
495 |
+
* Return matched DOM nodes.
|
496 |
+
* jQuery difference.
|
497 |
+
*
|
498 |
+
* @param int $index
|
499 |
+
* @return array|string Returns string if $index != null
|
500 |
+
* @todo implement callbacks
|
501 |
+
* @todo return only arrays ?
|
502 |
+
* @todo maybe other name...
|
503 |
+
*/
|
504 |
+
public function getString($index = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
505 |
+
if (!is_null($index) && is_int($index))
|
506 |
+
$return = $this->eq($index)->text();
|
507 |
+
else {
|
508 |
+
$return = array();
|
509 |
+
for($i = 0; $i < $this->size(); $i++) {
|
510 |
+
$return[] = $this->eq($i)->text();
|
511 |
+
}
|
512 |
+
}
|
513 |
+
// pass thou callbacks
|
514 |
+
$args = func_get_args();
|
515 |
+
$args = array_slice($args, 1);
|
516 |
+
foreach($args as $callback) {
|
517 |
+
$return = phpQuery::callbackRun($callback, array($return));
|
518 |
+
}
|
519 |
+
return $return;
|
520 |
+
}
|
521 |
+
/**
|
522 |
+
* Return matched DOM nodes.
|
523 |
+
* jQuery difference.
|
524 |
+
*
|
525 |
+
* @param int $index
|
526 |
+
* @return array|string Returns string if $index != null
|
527 |
+
* @todo implement callbacks
|
528 |
+
* @todo return only arrays ?
|
529 |
+
* @todo maybe other name...
|
530 |
+
*/
|
531 |
+
public function getStrings($index = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
532 |
+
if (!is_null($index) && is_int($index))
|
533 |
+
$return = $this->eq($index)->text();
|
534 |
+
else {
|
535 |
+
$return = array();
|
536 |
+
for($i = 0; $i < $this->size(); $i++) {
|
537 |
+
$return[] = $this->eq($i)->text();
|
538 |
+
}
|
539 |
+
// pass thou callbacks
|
540 |
+
$args = func_get_args();
|
541 |
+
$args = array_slice($args, 1);
|
542 |
+
}
|
543 |
+
foreach($args as $callback) {
|
544 |
+
if (is_array($return))
|
545 |
+
foreach($return as $k => $v)
|
546 |
+
$return[$k] = phpQuery::callbackRun($callback, array($v));
|
547 |
+
else
|
548 |
+
$return = phpQuery::callbackRun($callback, array($return));
|
549 |
+
}
|
550 |
+
return $return;
|
551 |
+
}
|
552 |
+
/**
|
553 |
+
* Returns new instance of actual class.
|
554 |
+
*
|
555 |
+
* @param array $newStack Optional. Will replace old stack with new and move old one to history.c
|
556 |
+
*/
|
557 |
+
public function newInstance($newStack = null) {
|
558 |
+
$class = get_class($this);
|
559 |
+
// support inheritance by passing old object to overloaded constructor
|
560 |
+
$new = $class != 'phpQuery'
|
561 |
+
? new $class($this, $this->getDocumentID())
|
562 |
+
: new phpQueryObject($this->getDocumentID());
|
563 |
+
$new->previous = $this;
|
564 |
+
if (is_null($newStack)) {
|
565 |
+
$new->elements = $this->elements;
|
566 |
+
if ($this->elementsBackup)
|
567 |
+
$this->elements = $this->elementsBackup;
|
568 |
+
} else if (is_string($newStack)) {
|
569 |
+
$new->elements = phpQuery::pq($newStack, $this->getDocumentID())->stack();
|
570 |
+
} else {
|
571 |
+
$new->elements = $newStack;
|
572 |
+
}
|
573 |
+
return $new;
|
574 |
+
}
|
575 |
+
/**
|
576 |
+
* Enter description here...
|
577 |
+
*
|
578 |
+
* In the future, when PHP will support XLS 2.0, then we would do that this way:
|
579 |
+
* contains(tokenize(@class, '\s'), "something")
|
580 |
+
* @param unknown_type $class
|
581 |
+
* @param unknown_type $node
|
582 |
+
* @return boolean
|
583 |
+
* @access private
|
584 |
+
*/
|
585 |
+
protected function matchClasses($class, $node) {
|
586 |
+
// multi-class
|
587 |
+
if ( mb_strpos($class, '.', 1)) {
|
588 |
+
$classes = explode('.', substr($class, 1));
|
589 |
+
$classesCount = count( $classes );
|
590 |
+
$nodeClasses = preg_split("/[\s\t\r\n]+/", $node->getAttribute('class'),-1, PREG_SPLIT_NO_EMPTY);
|
591 |
+
$nodeClassesCount = count( $nodeClasses );
|
592 |
+
if ( $classesCount > $nodeClassesCount )
|
593 |
+
return false;
|
594 |
+
$diff = count(
|
595 |
+
array_diff(
|
596 |
+
$classes,
|
597 |
+
$nodeClasses
|
598 |
+
)
|
599 |
+
);
|
600 |
+
if (! $diff )
|
601 |
+
return true;
|
602 |
+
// single-class
|
603 |
+
} else {
|
604 |
+
return in_array(
|
605 |
+
// strip leading dot from class name
|
606 |
+
substr($class, 1),
|
607 |
+
// get classes for element as array
|
608 |
+
preg_split("/[\s\t\r\n]+/", $node->getAttribute('class'),-1, PREG_SPLIT_NO_EMPTY)
|
609 |
+
);
|
610 |
+
}
|
611 |
+
}
|
612 |
+
/**
|
613 |
+
* @access private
|
614 |
+
*/
|
615 |
+
protected function runQuery($XQuery, $selector = null, $compare = null) {
|
616 |
+
if ($compare && ! method_exists($this, $compare))
|
617 |
+
return false;
|
618 |
+
$stack = array();
|
619 |
+
if (! $this->elements)
|
620 |
+
$this->debug('Stack empty, skipping...');
|
621 |
+
// var_dump($this->elements[0]->nodeType);
|
622 |
+
// element, document
|
623 |
+
foreach($this->stack(array(1, 9, 13)) as $k => $stackNode) {
|
624 |
+
$detachAfter = false;
|
625 |
+
// to work on detached nodes we need temporary place them somewhere
|
626 |
+
// thats because context xpath queries sucks ;]
|
627 |
+
$testNode = $stackNode;
|
628 |
+
while ($testNode) {
|
629 |
+
if (! $testNode->parentNode && ! $this->isRoot($testNode)) {
|
630 |
+
$this->root->appendChild($testNode);
|
631 |
+
$detachAfter = $testNode;
|
632 |
+
break;
|
633 |
+
}
|
634 |
+
$testNode = isset($testNode->parentNode)
|
635 |
+
? $testNode->parentNode
|
636 |
+
: null;
|
637 |
+
}
|
638 |
+
// XXX tmp ?
|
639 |
+
$xpath = $this->documentWrapper->isXHTML
|
640 |
+
? $this->getNodeXpath($stackNode, 'html')
|
641 |
+
: $this->getNodeXpath($stackNode);
|
642 |
+
// FIXME pseudoclasses-only query, support XML
|
643 |
+
$query = $XQuery == '//' && $xpath == '/html[1]'
|
644 |
+
? '//*'
|
645 |
+
: $xpath.$XQuery;
|
646 |
+
$this->debug("XPATH: {$query}");
|
647 |
+
// run query, get elements
|
648 |
+
$nodes = $this->xpath->query($query);
|
649 |
+
$this->debug("QUERY FETCHED");
|
650 |
+
if (! $nodes->length )
|
651 |
+
$this->debug('Nothing found');
|
652 |
+
$debug = array();
|
653 |
+
foreach($nodes as $node) {
|
654 |
+
$matched = false;
|
655 |
+
if ( $compare) {
|
656 |
+
phpQuery::$debug ?
|
657 |
+
$this->debug("Found: ".$this->whois( $node ).", comparing with {$compare}()")
|
658 |
+
: null;
|
659 |
+
$phpQueryDebug = phpQuery::$debug;
|
660 |
+
phpQuery::$debug = false;
|
661 |
+
// TODO ??? use phpQuery::callbackRun()
|
662 |
+
if (call_user_func_array(array($this, $compare), array($selector, $node)))
|
663 |
+
$matched = true;
|
664 |
+
phpQuery::$debug = $phpQueryDebug;
|
665 |
+
} else {
|
666 |
+
$matched = true;
|
667 |
+
}
|
668 |
+
if ( $matched) {
|
669 |
+
if (phpQuery::$debug)
|
670 |
+
$debug[] = $this->whois( $node );
|
671 |
+
$stack[] = $node;
|
672 |
+
}
|
673 |
+
}
|
674 |
+
if (phpQuery::$debug) {
|
675 |
+
$this->debug("Matched ".count($debug).": ".implode(', ', $debug));
|
676 |
+
}
|
677 |
+
if ($detachAfter)
|
678 |
+
$this->root->removeChild($detachAfter);
|
679 |
+
}
|
680 |
+
$this->elements = $stack;
|
681 |
+
}
|
682 |
+
/**
|
683 |
+
* Enter description here...
|
684 |
+
*
|
685 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
686 |
+
*/
|
687 |
+
public function find($selectors, $context = null, $noHistory = false) {
|
688 |
+
if (!$noHistory)
|
689 |
+
// backup last stack /for end()/
|
690 |
+
$this->elementsBackup = $this->elements;
|
691 |
+
// allow to define context
|
692 |
+
// TODO combine code below with phpQuery::pq() context guessing code
|
693 |
+
// as generic function
|
694 |
+
if ($context) {
|
695 |
+
if (! is_array($context) && $context instanceof DOMELEMENT)
|
696 |
+
$this->elements = array($context);
|
697 |
+
else if (is_array($context)) {
|
698 |
+
$this->elements = array();
|
699 |
+
foreach ($context as $c)
|
700 |
+
if ($c instanceof DOMELEMENT)
|
701 |
+
$this->elements[] = $c;
|
702 |
+
} else if ( $context instanceof self )
|
703 |
+
$this->elements = $context->elements;
|
704 |
+
}
|
705 |
+
$queries = $this->parseSelector($selectors);
|
706 |
+
$this->debug(array('FIND', $selectors, $queries));
|
707 |
+
$XQuery = '';
|
708 |
+
// remember stack state because of multi-queries
|
709 |
+
$oldStack = $this->elements;
|
710 |
+
// here we will be keeping found elements
|
711 |
+
$stack = array();
|
712 |
+
foreach($queries as $selector) {
|
713 |
+
$this->elements = $oldStack;
|
714 |
+
$delimiterBefore = false;
|
715 |
+
foreach($selector as $s) {
|
716 |
+
// TAG
|
717 |
+
$isTag = extension_loaded('mbstring') && in_array('mb_ereg_match', get_extension_funcs("mbstring")) && phpQuery::$mbstringSupport
|
718 |
+
? mb_ereg_match('^[\w|\||-]+$', $s) || $s == '*'
|
719 |
+
: preg_match('@^[\w|\||-]+$@', $s) || $s == '*';
|
720 |
+
if ($isTag) {
|
721 |
+
if ($this->isXML()) {
|
722 |
+
// namespace support
|
723 |
+
if (mb_strpos($s, '|') !== false) {
|
724 |
+
$ns = $tag = null;
|
725 |
+
list($ns, $tag) = explode('|', $s);
|
726 |
+
$XQuery .= "$ns:$tag";
|
727 |
+
} else if ($s == '*') {
|
728 |
+
$XQuery .= "*";
|
729 |
+
} else {
|
730 |
+
$XQuery .= "*[local-name()='$s']";
|
731 |
+
}
|
732 |
+
} else {
|
733 |
+
$XQuery .= $s;
|
734 |
+
}
|
735 |
+
// ID
|
736 |
+
} else if ($s[0] == '#') {
|
737 |
+
if ($delimiterBefore)
|
738 |
+
$XQuery .= '*';
|
739 |
+
$XQuery .= "[@id='".substr($s, 1)."']";
|
740 |
+
// ATTRIBUTES
|
741 |
+
} else if ($s[0] == '[') {
|
742 |
+
if ($delimiterBefore)
|
743 |
+
$XQuery .= '*';
|
744 |
+
// strip side brackets
|
745 |
+
$attr = trim($s, '][');
|
746 |
+
$execute = false;
|
747 |
+
// attr with specifed value
|
748 |
+
if (mb_strpos($s, '=')) {
|
749 |
+
$value = null;
|
750 |
+
list($attr, $value) = explode('=', $attr);
|
751 |
+
$value = trim($value, "'\"");
|
752 |
+
if ($this->isRegexp($attr)) {
|
753 |
+
// cut regexp character
|
754 |
+
$attr = substr($attr, 0, -1);
|
755 |
+
$execute = true;
|
756 |
+
$XQuery .= "[@{$attr}]";
|
757 |
+
} else {
|
758 |
+
$XQuery .= "[@{$attr}='{$value}']";
|
759 |
+
}
|
760 |
+
// attr without specified value
|
761 |
+
} else {
|
762 |
+
$XQuery .= "[@{$attr}]";
|
763 |
+
}
|
764 |
+
if ($execute) {
|
765 |
+
$this->runQuery($XQuery, $s, 'is');
|
766 |
+
$XQuery = '';
|
767 |
+
if (! $this->length())
|
768 |
+
break;
|
769 |
+
}
|
770 |
+
// CLASSES
|
771 |
+
} else if ($s[0] == '.') {
|
772 |
+
// TODO use return $this->find("./self::*[contains(concat(\" \",@class,\" \"), \" $class \")]");
|
773 |
+
// thx wizDom ;)
|
774 |
+
if ($delimiterBefore)
|
775 |
+
$XQuery .= '*';
|
776 |
+
$XQuery .= '[@class]';
|
777 |
+
$this->runQuery($XQuery, $s, 'matchClasses');
|
778 |
+
$XQuery = '';
|
779 |
+
if (! $this->length() )
|
780 |
+
break;
|
781 |
+
// ~ General Sibling Selector
|
782 |
+
} else if ($s[0] == '~') {
|
783 |
+
$this->runQuery($XQuery);
|
784 |
+
$XQuery = '';
|
785 |
+
$this->elements = $this
|
786 |
+
->siblings(
|
787 |
+
substr($s, 1)
|
788 |
+
)->elements;
|
789 |
+
if (! $this->length() )
|
790 |
+
break;
|
791 |
+
// + Adjacent sibling selectors
|
792 |
+
} else if ($s[0] == '+') {
|
793 |
+
// TODO /following-sibling::
|
794 |
+
$this->runQuery($XQuery);
|
795 |
+
$XQuery = '';
|
796 |
+
$subSelector = substr($s, 1);
|
797 |
+
$subElements = $this->elements;
|
798 |
+
$this->elements = array();
|
799 |
+
foreach($subElements as $node) {
|
800 |
+
// search first DOMElement sibling
|
801 |
+
$test = $node->nextSibling;
|
802 |
+
while($test && ! ($test instanceof DOMELEMENT))
|
803 |
+
$test = $test->nextSibling;
|
804 |
+
if ($test && $this->is($subSelector, $test))
|
805 |
+
$this->elements[] = $test;
|
806 |
+
}
|
807 |
+
if (! $this->length() )
|
808 |
+
break;
|
809 |
+
// PSEUDO CLASSES
|
810 |
+
} else if ($s[0] == ':') {
|
811 |
+
// TODO optimization for :first :last
|
812 |
+
if ($XQuery) {
|
813 |
+
$this->runQuery($XQuery);
|
814 |
+
$XQuery = '';
|
815 |
+
}
|
816 |
+
if (! $this->length())
|
817 |
+
break;
|
818 |
+
$this->pseudoClasses($s);
|
819 |
+
if (! $this->length())
|
820 |
+
break;
|
821 |
+
// DIRECT DESCENDANDS
|
822 |
+
} else if ($s == '>') {
|
823 |
+
$XQuery .= '/';
|
824 |
+
$delimiterBefore = 2;
|
825 |
+
// ALL DESCENDANDS
|
826 |
+
} else if ($s == ' ') {
|
827 |
+
$XQuery .= '//';
|
828 |
+
$delimiterBefore = 2;
|
829 |
+
// ERRORS
|
830 |
+
} else {
|
831 |
+
phpQuery::debug("Unrecognized token '$s'");
|
832 |
+
}
|
833 |
+
$delimiterBefore = $delimiterBefore === 2;
|
834 |
+
}
|
835 |
+
// run query if any
|
836 |
+
if ($XQuery && $XQuery != '//') {
|
837 |
+
$this->runQuery($XQuery);
|
838 |
+
$XQuery = '';
|
839 |
+
}
|
840 |
+
foreach($this->elements as $node)
|
841 |
+
if (! $this->elementsContainsNode($node, $stack))
|
842 |
+
$stack[] = $node;
|
843 |
+
}
|
844 |
+
$this->elements = $stack;
|
845 |
+
return $this->newInstance();
|
846 |
+
}
|
847 |
+
/**
|
848 |
+
* @todo create API for classes with pseudoselectors
|
849 |
+
* @access private
|
850 |
+
*/
|
851 |
+
protected function pseudoClasses($class) {
|
852 |
+
// TODO clean args parsing ?
|
853 |
+
$class = ltrim($class, ':');
|
854 |
+
$haveArgs = mb_strpos($class, '(');
|
855 |
+
if ($haveArgs !== false) {
|
856 |
+
$args = substr($class, $haveArgs+1, -1);
|
857 |
+
$class = substr($class, 0, $haveArgs);
|
858 |
+
}
|
859 |
+
switch($class) {
|
860 |
+
case 'even':
|
861 |
+
case 'odd':
|
862 |
+
$stack = array();
|
863 |
+
foreach($this->elements as $i => $node) {
|
864 |
+
if ($class == 'even' && ($i%2) == 0)
|
865 |
+
$stack[] = $node;
|
866 |
+
else if ( $class == 'odd' && $i % 2 )
|
867 |
+
$stack[] = $node;
|
868 |
+
}
|
869 |
+
$this->elements = $stack;
|
870 |
+
break;
|
871 |
+
case 'eq':
|
872 |
+
$k = intval($args);
|
873 |
+
$this->elements = isset( $this->elements[$k] )
|
874 |
+
? array( $this->elements[$k] )
|
875 |
+
: array();
|
876 |
+
break;
|
877 |
+
case 'gt':
|
878 |
+
$this->elements = array_slice($this->elements, $args+1);
|
879 |
+
break;
|
880 |
+
case 'lt':
|
881 |
+
$this->elements = array_slice($this->elements, 0, $args+1);
|
882 |
+
break;
|
883 |
+
case 'first':
|
884 |
+
if (isset($this->elements[0]))
|
885 |
+
$this->elements = array($this->elements[0]);
|
886 |
+
break;
|
887 |
+
case 'last':
|
888 |
+
if ($this->elements)
|
889 |
+
$this->elements = array($this->elements[count($this->elements)-1]);
|
890 |
+
break;
|
891 |
+
/*case 'parent':
|
892 |
+
$stack = array();
|
893 |
+
foreach($this->elements as $node) {
|
894 |
+
if ( $node->childNodes->length )
|
895 |
+
$stack[] = $node;
|
896 |
+
}
|
897 |
+
$this->elements = $stack;
|
898 |
+
break;*/
|
899 |
+
case 'contains':
|
900 |
+
$text = trim($args, "\"'");
|
901 |
+
$stack = array();
|
902 |
+
foreach($this->elements as $node) {
|
903 |
+
if (mb_stripos($node->textContent, $text) === false)
|
904 |
+
continue;
|
905 |
+
$stack[] = $node;
|
906 |
+
}
|
907 |
+
$this->elements = $stack;
|
908 |
+
break;
|
909 |
+
case 'not':
|
910 |
+
$selector = self::unQuote($args);
|
911 |
+
$this->elements = $this->not($selector)->stack();
|
912 |
+
break;
|
913 |
+
case 'slice':
|
914 |
+
// TODO jQuery difference ?
|
915 |
+
$args = explode(',',
|
916 |
+
str_replace(', ', ',', trim($args, "\"'"))
|
917 |
+
);
|
918 |
+
$start = $args[0];
|
919 |
+
$end = isset($args[1])
|
920 |
+
? $args[1]
|
921 |
+
: null;
|
922 |
+
if ($end > 0)
|
923 |
+
$end = $end-$start;
|
924 |
+
$this->elements = array_slice($this->elements, $start, $end);
|
925 |
+
break;
|
926 |
+
case 'has':
|
927 |
+
$selector = trim($args, "\"'");
|
928 |
+
$stack = array();
|
929 |
+
foreach($this->stack(1) as $el) {
|
930 |
+
if ($this->find($selector, $el, true)->length)
|
931 |
+
$stack[] = $el;
|
932 |
+
}
|
933 |
+
$this->elements = $stack;
|
934 |
+
break;
|
935 |
+
case 'submit':
|
936 |
+
case 'reset':
|
937 |
+
$this->elements = phpQuery::merge(
|
938 |
+
$this->map(array($this, 'is'),
|
939 |
+
"input[type=$class]", new CallbackParam()
|
940 |
+
),
|
941 |
+
$this->map(array($this, 'is'),
|
942 |
+
"button[type=$class]", new CallbackParam()
|
943 |
+
)
|
944 |
+
);
|
945 |
+
break;
|
946 |
+
// $stack = array();
|
947 |
+
// foreach($this->elements as $node)
|
948 |
+
// if ($node->is('input[type=submit]') || $node->is('button[type=submit]'))
|
949 |
+
// $stack[] = $el;
|
950 |
+
// $this->elements = $stack;
|
951 |
+
case 'input':
|
952 |
+
$this->elements = $this->map(
|
953 |
+
array($this, 'is'),
|
954 |
+
'input', new CallbackParam()
|
955 |
+
)->elements;
|
956 |
+
break;
|
957 |
+
case 'password':
|
958 |
+
case 'checkbox':
|
959 |
+
case 'radio':
|
960 |
+
case 'hidden':
|
961 |
+
case 'image':
|
962 |
+
case 'file':
|
963 |
+
$this->elements = $this->map(
|
964 |
+
array($this, 'is'),
|
965 |
+
"input[type=$class]", new CallbackParam()
|
966 |
+
)->elements;
|
967 |
+
break;
|
968 |
+
case 'parent':
|
969 |
+
$this->elements = $this->map(
|
970 |
+
function ($node) {
|
971 |
+
return $node instanceof DOMELEMENT && $node->childNodes->length
|
972 |
+
? $node : null;
|
973 |
+
}
|
974 |
+
)->elements;
|
975 |
+
break;
|
976 |
+
case 'empty':
|
977 |
+
$this->elements = $this->map(
|
978 |
+
function ($node) {
|
979 |
+
return $node instanceof DOMELEMENT && $node->childNodes->length
|
980 |
+
? null : $node;
|
981 |
+
}
|
982 |
+
)->elements;
|
983 |
+
break;
|
984 |
+
case 'disabled':
|
985 |
+
case 'selected':
|
986 |
+
case 'checked':
|
987 |
+
$this->elements = $this->map(
|
988 |
+
array($this, 'is'),
|
989 |
+
"[$class]", new CallbackParam()
|
990 |
+
)->elements;
|
991 |
+
break;
|
992 |
+
case 'enabled':
|
993 |
+
$this->elements = $this->map(
|
994 |
+
function ($node) {
|
995 |
+
return pq($node)->not(":disabled") ? $node : null;
|
996 |
+
}
|
997 |
+
)->elements;
|
998 |
+
break;
|
999 |
+
case 'header':
|
1000 |
+
$this->elements = $this->map(
|
1001 |
+
function ($node) {
|
1002 |
+
$isHeader = isset($node->tagName) && in_array($node->tagName, array(
|
1003 |
+
"h1", "h2", "h3", "h4", "h5", "h6", "h7"
|
1004 |
+
));
|
1005 |
+
return $isHeader
|
1006 |
+
? $node
|
1007 |
+
: null;
|
1008 |
+
}
|
1009 |
+
)->elements;
|
1010 |
+
// $this->elements = $this->map(
|
1011 |
+
// create_function('$node', '$node = pq($node);
|
1012 |
+
// return $node->is("h1")
|
1013 |
+
// || $node->is("h2")
|
1014 |
+
// || $node->is("h3")
|
1015 |
+
// || $node->is("h4")
|
1016 |
+
// || $node->is("h5")
|
1017 |
+
// || $node->is("h6")
|
1018 |
+
// || $node->is("h7")
|
1019 |
+
// ? $node
|
1020 |
+
// : null;')
|
1021 |
+
// )->elements;
|
1022 |
+
break;
|
1023 |
+
case 'only-child':
|
1024 |
+
$this->elements = $this->map(
|
1025 |
+
function ($node) {
|
1026 |
+
return pq($node)->siblings()->size() == 0 ? $node : null;
|
1027 |
+
}
|
1028 |
+
)->elements;
|
1029 |
+
break;
|
1030 |
+
case 'first-child':
|
1031 |
+
$this->elements = $this->map(
|
1032 |
+
function ($node) { return pq($node)->prevAll()->size() == 0 ? $node : null; }
|
1033 |
+
)->elements;
|
1034 |
+
break;
|
1035 |
+
case 'last-child':
|
1036 |
+
$this->elements = $this->map(
|
1037 |
+
function ($node) { return pq($node)->nextAll()->size() == 0 ? $node : null; }
|
1038 |
+
)->elements;
|
1039 |
+
break;
|
1040 |
+
case 'nth-child':
|
1041 |
+
$param = trim($args, "\"'");
|
1042 |
+
if (! $param)
|
1043 |
+
break;
|
1044 |
+
// nth-child(n+b) to nth-child(1n+b)
|
1045 |
+
if ($param{0} == 'n')
|
1046 |
+
$param = '1'.$param;
|
1047 |
+
// :nth-child(index/even/odd/equation)
|
1048 |
+
if ($param == 'even' || $param == 'odd')
|
1049 |
+
$mapped = $this->map(
|
1050 |
+
function ($node, $param) {
|
1051 |
+
$index = pq($node)->prevAll()->size()+1;
|
1052 |
+
if ($param == "even" && ($index%2) == 0)
|
1053 |
+
return $node;
|
1054 |
+
else if ($param == "odd" && $index%2 == 1)
|
1055 |
+
return $node;
|
1056 |
+
else
|
1057 |
+
return null;
|
1058 |
+
},
|
1059 |
+
new CallbackParam(), $param
|
1060 |
+
);
|
1061 |
+
else if (mb_strlen($param) > 1 && preg_match('/^(\d*)n([-+]?)(\d*)/', $param) === 1)
|
1062 |
+
// an+b
|
1063 |
+
$mapped = $this->map(
|
1064 |
+
function ($node, $param) {
|
1065 |
+
$prevs = pq($node)->prevAll()->size();
|
1066 |
+
$index = 1+$prevs;
|
1067 |
+
|
1068 |
+
preg_match("/^(\d*)n([-+]?)(\d*)/", $param, $matches);
|
1069 |
+
$a = intval($matches[1]);
|
1070 |
+
$b = intval($matches[3]);
|
1071 |
+
if( $matches[2] === "-" ) {
|
1072 |
+
$b = -$b;
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
if ($a > 0) {
|
1076 |
+
return ($index-$b)%$a == 0
|
1077 |
+
? $node
|
1078 |
+
: null;
|
1079 |
+
phpQuery::debug($a."*".floor($index/$a)."+$b-1 == ".($a*floor($index/$a)+$b-1)." ?= $prevs");
|
1080 |
+
return $a*floor($index/$a)+$b-1 == $prevs
|
1081 |
+
? $node
|
1082 |
+
: null;
|
1083 |
+
} else if ($a == 0)
|
1084 |
+
return $index == $b
|
1085 |
+
? $node
|
1086 |
+
: null;
|
1087 |
+
else
|
1088 |
+
// negative value
|
1089 |
+
return $index <= $b
|
1090 |
+
? $node
|
1091 |
+
: null;
|
1092 |
+
// if (! $b)
|
1093 |
+
// return $index%$a == 0
|
1094 |
+
// ? $node
|
1095 |
+
// : null;
|
1096 |
+
// else
|
1097 |
+
// return ($index-$b)%$a == 0
|
1098 |
+
// ? $node
|
1099 |
+
// : null;
|
1100 |
+
},
|
1101 |
+
new CallbackParam(), $param
|
1102 |
+
);
|
1103 |
+
else
|
1104 |
+
// index
|
1105 |
+
$mapped = $this->map(
|
1106 |
+
function ($node, $index) {
|
1107 |
+
$prevs = pq($node)->prevAll()->size();
|
1108 |
+
if ($prevs && $prevs == $index-1)
|
1109 |
+
return $node;
|
1110 |
+
else if (! $prevs && $index == 1)
|
1111 |
+
return $node;
|
1112 |
+
else
|
1113 |
+
return null;
|
1114 |
+
},
|
1115 |
+
new CallbackParam(), $param
|
1116 |
+
);
|
1117 |
+
$this->elements = $mapped->elements;
|
1118 |
+
break;
|
1119 |
+
default:
|
1120 |
+
$this->debug("Unknown pseudoclass '{$class}', skipping...");
|
1121 |
+
}
|
1122 |
+
}
|
1123 |
+
/**
|
1124 |
+
* @access private
|
1125 |
+
*/
|
1126 |
+
protected function __pseudoClassParam($paramsString) {
|
1127 |
+
// TODO;
|
1128 |
+
}
|
1129 |
+
/**
|
1130 |
+
* Enter description here...
|
1131 |
+
*
|
1132 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1133 |
+
*/
|
1134 |
+
public function is($selector, $nodes = null) {
|
1135 |
+
phpQuery::debug(array("Is:", $selector));
|
1136 |
+
if (! $selector)
|
1137 |
+
return false;
|
1138 |
+
$oldStack = $this->elements;
|
1139 |
+
$returnArray = false;
|
1140 |
+
if ($nodes && is_array($nodes)) {
|
1141 |
+
$this->elements = $nodes;
|
1142 |
+
} else if ($nodes)
|
1143 |
+
$this->elements = array($nodes);
|
1144 |
+
$this->filter($selector, true);
|
1145 |
+
$stack = $this->elements;
|
1146 |
+
$this->elements = $oldStack;
|
1147 |
+
if ($nodes)
|
1148 |
+
return $stack ? $stack : null;
|
1149 |
+
return (bool)count($stack);
|
1150 |
+
}
|
1151 |
+
/**
|
1152 |
+
* Enter description here...
|
1153 |
+
* jQuery difference.
|
1154 |
+
*
|
1155 |
+
* Callback:
|
1156 |
+
* - $index int
|
1157 |
+
* - $node DOMNode
|
1158 |
+
*
|
1159 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1160 |
+
* @link http://docs.jquery.com/Traversing/filter
|
1161 |
+
*/
|
1162 |
+
public function filterCallback($callback, $_skipHistory = false) {
|
1163 |
+
if (! $_skipHistory) {
|
1164 |
+
$this->elementsBackup = $this->elements;
|
1165 |
+
$this->debug("Filtering by callback");
|
1166 |
+
}
|
1167 |
+
$newStack = array();
|
1168 |
+
foreach($this->elements as $index => $node) {
|
1169 |
+
$result = phpQuery::callbackRun($callback, array($index, $node));
|
1170 |
+
if (is_null($result) || (! is_null($result) && $result))
|
1171 |
+
$newStack[] = $node;
|
1172 |
+
}
|
1173 |
+
$this->elements = $newStack;
|
1174 |
+
return $_skipHistory
|
1175 |
+
? $this
|
1176 |
+
: $this->newInstance();
|
1177 |
+
}
|
1178 |
+
/**
|
1179 |
+
* Enter description here...
|
1180 |
+
*
|
1181 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1182 |
+
* @link http://docs.jquery.com/Traversing/filter
|
1183 |
+
*/
|
1184 |
+
public function filter($selectors, $_skipHistory = false) {
|
1185 |
+
if ($selectors instanceof Callback OR $selectors instanceof Closure)
|
1186 |
+
return $this->filterCallback($selectors, $_skipHistory);
|
1187 |
+
if (! $_skipHistory)
|
1188 |
+
$this->elementsBackup = $this->elements;
|
1189 |
+
$notSimpleSelector = array(' ', '>', '~', '+', '/');
|
1190 |
+
if (! is_array($selectors))
|
1191 |
+
$selectors = $this->parseSelector($selectors);
|
1192 |
+
if (! $_skipHistory)
|
1193 |
+
$this->debug(array("Filtering:", $selectors));
|
1194 |
+
$finalStack = array();
|
1195 |
+
foreach($selectors as $selector) {
|
1196 |
+
$stack = array();
|
1197 |
+
if (! $selector)
|
1198 |
+
break;
|
1199 |
+
// avoid first space or /
|
1200 |
+
if (in_array($selector[0], $notSimpleSelector))
|
1201 |
+
$selector = array_slice($selector, 1);
|
1202 |
+
// PER NODE selector chunks
|
1203 |
+
foreach($this->stack() as $node) {
|
1204 |
+
$break = false;
|
1205 |
+
foreach($selector as $s) {
|
1206 |
+
if (!($node instanceof DOMELEMENT)) {
|
1207 |
+
// all besides DOMElement
|
1208 |
+
if ( $s[0] == '[') {
|
1209 |
+
$attr = trim($s, '[]');
|
1210 |
+
if ( mb_strpos($attr, '=')) {
|
1211 |
+
list( $attr, $val ) = explode('=', $attr);
|
1212 |
+
if ($attr == 'nodeType' && $node->nodeType != $val)
|
1213 |
+
$break = true;
|
1214 |
+
}
|
1215 |
+
} else
|
1216 |
+
$break = true;
|
1217 |
+
} else {
|
1218 |
+
// DOMElement only
|
1219 |
+
// ID
|
1220 |
+
if ( $s[0] == '#') {
|
1221 |
+
if ( $node->getAttribute('id') != substr($s, 1) )
|
1222 |
+
$break = true;
|
1223 |
+
// CLASSES
|
1224 |
+
} else if ( $s[0] == '.') {
|
1225 |
+
if (! $this->matchClasses( $s, $node ) )
|
1226 |
+
$break = true;
|
1227 |
+
// ATTRS
|
1228 |
+
} else if ( $s[0] == '[') {
|
1229 |
+
// strip side brackets
|
1230 |
+
$attr = trim($s, '[]');
|
1231 |
+
if (mb_strpos($attr, '=')) {
|
1232 |
+
list($attr, $val) = explode('=', $attr);
|
1233 |
+
$val = self::unQuote($val);
|
1234 |
+
if ($attr == 'nodeType') {
|
1235 |
+
if ($val != $node->nodeType)
|
1236 |
+
$break = true;
|
1237 |
+
} else if ($this->isRegexp($attr)) {
|
1238 |
+
$val = extension_loaded('mbstring') && phpQuery::$mbstringSupport
|
1239 |
+
? quotemeta(trim($val, '"\''))
|
1240 |
+
: preg_quote(trim($val, '"\''), '@');
|
1241 |
+
// switch last character
|
1242 |
+
switch( substr($attr, -1)) {
|
1243 |
+
// quotemeta used insted of preg_quote
|
1244 |
+
// http://code.google.com/p/phpquery/issues/detail?id=76
|
1245 |
+
case '^':
|
1246 |
+
$pattern = '^'.$val;
|
1247 |
+
break;
|
1248 |
+
case '*':
|
1249 |
+
$pattern = '.*'.$val.'.*';
|
1250 |
+
break;
|
1251 |
+
case '$':
|
1252 |
+
$pattern = '.*'.$val.'$';
|
1253 |
+
break;
|
1254 |
+
}
|
1255 |
+
// cut last character
|
1256 |
+
$attr = substr($attr, 0, -1);
|
1257 |
+
$isMatch = extension_loaded('mbstring') && in_array('mb_ereg_match', get_extension_funcs("mbstring")) && phpQuery::$mbstringSupport
|
1258 |
+
? mb_ereg_match($pattern, $node->getAttribute($attr))
|
1259 |
+
: preg_match("@{$pattern}@", $node->getAttribute($attr));
|
1260 |
+
if (! $isMatch)
|
1261 |
+
$break = true;
|
1262 |
+
} else if ($node->getAttribute($attr) != $val)
|
1263 |
+
$break = true;
|
1264 |
+
} else if (! $node->hasAttribute($attr))
|
1265 |
+
$break = true;
|
1266 |
+
// PSEUDO CLASSES
|
1267 |
+
} else if ( $s[0] == ':') {
|
1268 |
+
// skip
|
1269 |
+
// TAG
|
1270 |
+
} else if (trim($s)) {
|
1271 |
+
if ($s != '*') {
|
1272 |
+
// TODO namespaces
|
1273 |
+
if (isset($node->tagName)) {
|
1274 |
+
if ($node->tagName != $s)
|
1275 |
+
$break = true;
|
1276 |
+
} else if ($s == 'html' && ! $this->isRoot($node))
|
1277 |
+
$break = true;
|
1278 |
+
}
|
1279 |
+
// AVOID NON-SIMPLE SELECTORS
|
1280 |
+
} else if (in_array($s, $notSimpleSelector)) {
|
1281 |
+
$break = true;
|
1282 |
+
$this->debug(array('Skipping non simple selector', $selector));
|
1283 |
+
}
|
1284 |
+
}
|
1285 |
+
if ($break)
|
1286 |
+
break;
|
1287 |
+
}
|
1288 |
+
// if element passed all chunks of selector - add it to new stack
|
1289 |
+
if (! $break )
|
1290 |
+
$stack[] = $node;
|
1291 |
+
}
|
1292 |
+
$tmpStack = $this->elements;
|
1293 |
+
$this->elements = $stack;
|
1294 |
+
// PER ALL NODES selector chunks
|
1295 |
+
foreach($selector as $s)
|
1296 |
+
// PSEUDO CLASSES
|
1297 |
+
if ($s[0] == ':')
|
1298 |
+
$this->pseudoClasses($s);
|
1299 |
+
foreach($this->elements as $node)
|
1300 |
+
// XXX it should be merged without duplicates
|
1301 |
+
// but jQuery doesnt do that
|
1302 |
+
$finalStack[] = $node;
|
1303 |
+
$this->elements = $tmpStack;
|
1304 |
+
}
|
1305 |
+
$this->elements = $finalStack;
|
1306 |
+
if ($_skipHistory) {
|
1307 |
+
return $this;
|
1308 |
+
} else {
|
1309 |
+
$this->debug("Stack length after filter(): ".count($finalStack));
|
1310 |
+
return $this->newInstance();
|
1311 |
+
}
|
1312 |
+
}
|
1313 |
+
/**
|
1314 |
+
*
|
1315 |
+
* @param $value
|
1316 |
+
* @return unknown_type
|
1317 |
+
* @TODO implement in all methods using passed parameters
|
1318 |
+
*/
|
1319 |
+
protected static function unQuote($value) {
|
1320 |
+
return $value[0] == '\'' || $value[0] == '"'
|
1321 |
+
? substr($value, 1, -1)
|
1322 |
+
: $value;
|
1323 |
+
}
|
1324 |
+
/**
|
1325 |
+
* Enter description here...
|
1326 |
+
*
|
1327 |
+
* @link http://docs.jquery.com/Ajax/load
|
1328 |
+
* @return phpQuery|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1329 |
+
* @todo Support $selector
|
1330 |
+
*/
|
1331 |
+
public function load($url, $data = null, $callback = null) {
|
1332 |
+
if ($data && ! is_array($data)) {
|
1333 |
+
$callback = $data;
|
1334 |
+
$data = null;
|
1335 |
+
}
|
1336 |
+
if (mb_strpos($url, ' ') !== false) {
|
1337 |
+
$matches = null;
|
1338 |
+
if (extension_loaded('mbstring') && in_array('mb_ereg', get_extension_funcs("mbstring")) && phpQuery::$mbstringSupport)
|
1339 |
+
mb_ereg('^([^ ]+) (.*)$', $url, $matches);
|
1340 |
+
else
|
1341 |
+
preg_match('@^([^ ]+) (.*)$@', $url, $matches);
|
1342 |
+
$url = $matches[1];
|
1343 |
+
$selector = $matches[2];
|
1344 |
+
// FIXME this sucks, pass as callback param
|
1345 |
+
$this->_loadSelector = $selector;
|
1346 |
+
}
|
1347 |
+
$ajax = array(
|
1348 |
+
'url' => $url,
|
1349 |
+
'type' => $data ? 'POST' : 'GET',
|
1350 |
+
'data' => $data,
|
1351 |
+
'complete' => $callback,
|
1352 |
+
'success' => array($this, '__loadSuccess')
|
1353 |
+
);
|
1354 |
+
phpQuery::ajax($ajax);
|
1355 |
+
return $this;
|
1356 |
+
}
|
1357 |
+
/**
|
1358 |
+
* @access private
|
1359 |
+
* @param $html
|
1360 |
+
* @return unknown_type
|
1361 |
+
*/
|
1362 |
+
public function __loadSuccess($html) {
|
1363 |
+
if ($this->_loadSelector) {
|
1364 |
+
$html = phpQuery::newDocument($html)->find($this->_loadSelector);
|
1365 |
+
unset($this->_loadSelector);
|
1366 |
+
}
|
1367 |
+
foreach($this->stack(1) as $node) {
|
1368 |
+
phpQuery::pq($node, $this->getDocumentID())
|
1369 |
+
->markup($html);
|
1370 |
+
}
|
1371 |
+
}
|
1372 |
+
/**
|
1373 |
+
* Enter description here...
|
1374 |
+
*
|
1375 |
+
* @return phpQuery|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1376 |
+
* @todo
|
1377 |
+
*/
|
1378 |
+
public function css() {
|
1379 |
+
// TODO
|
1380 |
+
return $this;
|
1381 |
+
}
|
1382 |
+
/**
|
1383 |
+
* @todo
|
1384 |
+
*
|
1385 |
+
*/
|
1386 |
+
public function show(){
|
1387 |
+
// TODO
|
1388 |
+
return $this;
|
1389 |
+
}
|
1390 |
+
/**
|
1391 |
+
* @todo
|
1392 |
+
*
|
1393 |
+
*/
|
1394 |
+
public function hide(){
|
1395 |
+
// TODO
|
1396 |
+
return $this;
|
1397 |
+
}
|
1398 |
+
/**
|
1399 |
+
* Trigger a type of event on every matched element.
|
1400 |
+
*
|
1401 |
+
* @param unknown_type $type
|
1402 |
+
* @param unknown_type $data
|
1403 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1404 |
+
* @TODO support more than event in $type (space-separated)
|
1405 |
+
*/
|
1406 |
+
public function trigger($type, $data = array()) {
|
1407 |
+
foreach($this->elements as $node)
|
1408 |
+
phpQueryEvents::trigger($this->getDocumentID(), $type, $data, $node);
|
1409 |
+
return $this;
|
1410 |
+
}
|
1411 |
+
/**
|
1412 |
+
* This particular method triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browsers default actions.
|
1413 |
+
*
|
1414 |
+
* @param unknown_type $type
|
1415 |
+
* @param unknown_type $data
|
1416 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1417 |
+
* @TODO
|
1418 |
+
*/
|
1419 |
+
public function triggerHandler($type, $data = array()) {
|
1420 |
+
// TODO;
|
1421 |
+
}
|
1422 |
+
/**
|
1423 |
+
* Binds a handler to one or more events (like click) for each matched element.
|
1424 |
+
* Can also bind custom events.
|
1425 |
+
*
|
1426 |
+
* @param unknown_type $type
|
1427 |
+
* @param unknown_type $data Optional
|
1428 |
+
* @param unknown_type $callback
|
1429 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1430 |
+
* @TODO support '!' (exclusive) events
|
1431 |
+
* @TODO support more than event in $type (space-separated)
|
1432 |
+
*/
|
1433 |
+
public function bind($type, $data, $callback = null) {
|
1434 |
+
// TODO check if $data is callable, not using is_callable
|
1435 |
+
if (! isset($callback)) {
|
1436 |
+
$callback = $data;
|
1437 |
+
$data = null;
|
1438 |
+
}
|
1439 |
+
foreach($this->elements as $node)
|
1440 |
+
phpQueryEvents::add($this->getDocumentID(), $node, $type, $data, $callback);
|
1441 |
+
return $this;
|
1442 |
+
}
|
1443 |
+
/**
|
1444 |
+
* Enter description here...
|
1445 |
+
*
|
1446 |
+
* @param unknown_type $type
|
1447 |
+
* @param unknown_type $callback
|
1448 |
+
* @return unknown
|
1449 |
+
* @TODO namespace events
|
1450 |
+
* @TODO support more than event in $type (space-separated)
|
1451 |
+
*/
|
1452 |
+
public function unbind($type = null, $callback = null) {
|
1453 |
+
foreach($this->elements as $node)
|
1454 |
+
phpQueryEvents::remove($this->getDocumentID(), $node, $type, $callback);
|
1455 |
+
return $this;
|
1456 |
+
}
|
1457 |
+
/**
|
1458 |
+
* Enter description here...
|
1459 |
+
*
|
1460 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1461 |
+
*/
|
1462 |
+
public function change($callback = null) {
|
1463 |
+
if ($callback)
|
1464 |
+
return $this->bind('change', $callback);
|
1465 |
+
return $this->trigger('change');
|
1466 |
+
}
|
1467 |
+
/**
|
1468 |
+
* Enter description here...
|
1469 |
+
*
|
1470 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1471 |
+
*/
|
1472 |
+
public function submit($callback = null) {
|
1473 |
+
if ($callback)
|
1474 |
+
return $this->bind('submit', $callback);
|
1475 |
+
return $this->trigger('submit');
|
1476 |
+
}
|
1477 |
+
/**
|
1478 |
+
* Enter description here...
|
1479 |
+
*
|
1480 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1481 |
+
*/
|
1482 |
+
public function click($callback = null) {
|
1483 |
+
if ($callback)
|
1484 |
+
return $this->bind('click', $callback);
|
1485 |
+
return $this->trigger('click');
|
1486 |
+
}
|
1487 |
+
/**
|
1488 |
+
* Enter description here...
|
1489 |
+
*
|
1490 |
+
* @param String|phpQuery
|
1491 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1492 |
+
*/
|
1493 |
+
public function wrapAllOld($wrapper) {
|
1494 |
+
$wrapper = pq($wrapper)->_clone();
|
1495 |
+
if (! $wrapper->length() || ! $this->length() )
|
1496 |
+
return $this;
|
1497 |
+
$wrapper->insertBefore($this->elements[0]);
|
1498 |
+
$deepest = $wrapper->elements[0];
|
1499 |
+
while($deepest->firstChild && $deepest->firstChild instanceof DOMELEMENT)
|
1500 |
+
$deepest = $deepest->firstChild;
|
1501 |
+
pq($deepest)->append($this);
|
1502 |
+
return $this;
|
1503 |
+
}
|
1504 |
+
/**
|
1505 |
+
* Enter description here...
|
1506 |
+
*
|
1507 |
+
* TODO testme...
|
1508 |
+
* @param String|phpQuery
|
1509 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1510 |
+
*/
|
1511 |
+
public function wrapAll($wrapper) {
|
1512 |
+
if (! $this->length())
|
1513 |
+
return $this;
|
1514 |
+
return phpQuery::pq($wrapper, $this->getDocumentID())
|
1515 |
+
->clone()
|
1516 |
+
->insertBefore($this->get(0))
|
1517 |
+
->map(array($this, '___wrapAllCallback'))
|
1518 |
+
->append($this);
|
1519 |
+
}
|
1520 |
+
/**
|
1521 |
+
*
|
1522 |
+
* @param $node
|
1523 |
+
* @return unknown_type
|
1524 |
+
* @access private
|
1525 |
+
*/
|
1526 |
+
public function ___wrapAllCallback($node) {
|
1527 |
+
$deepest = $node;
|
1528 |
+
while($deepest->firstChild && $deepest->firstChild instanceof DOMELEMENT)
|
1529 |
+
$deepest = $deepest->firstChild;
|
1530 |
+
return $deepest;
|
1531 |
+
}
|
1532 |
+
/**
|
1533 |
+
* Enter description here...
|
1534 |
+
* NON JQUERY METHOD
|
1535 |
+
*
|
1536 |
+
* @param String|phpQuery
|
1537 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1538 |
+
*/
|
1539 |
+
public function wrapAllPHP($codeBefore, $codeAfter) {
|
1540 |
+
return $this
|
1541 |
+
->slice(0, 1)
|
1542 |
+
->beforePHP($codeBefore)
|
1543 |
+
->end()
|
1544 |
+
->slice(-1)
|
1545 |
+
->afterPHP($codeAfter)
|
1546 |
+
->end();
|
1547 |
+
}
|
1548 |
+
/**
|
1549 |
+
* Enter description here...
|
1550 |
+
*
|
1551 |
+
* @param String|phpQuery
|
1552 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1553 |
+
*/
|
1554 |
+
public function wrap($wrapper) {
|
1555 |
+
foreach($this->stack() as $node)
|
1556 |
+
phpQuery::pq($node, $this->getDocumentID())->wrapAll($wrapper);
|
1557 |
+
return $this;
|
1558 |
+
}
|
1559 |
+
/**
|
1560 |
+
* Enter description here...
|
1561 |
+
*
|
1562 |
+
* @param String|phpQuery
|
1563 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1564 |
+
*/
|
1565 |
+
public function wrapPHP($codeBefore, $codeAfter) {
|
1566 |
+
foreach($this->stack() as $node)
|
1567 |
+
phpQuery::pq($node, $this->getDocumentID())->wrapAllPHP($codeBefore, $codeAfter);
|
1568 |
+
return $this;
|
1569 |
+
}
|
1570 |
+
/**
|
1571 |
+
* Enter description here...
|
1572 |
+
*
|
1573 |
+
* @param String|phpQuery
|
1574 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1575 |
+
*/
|
1576 |
+
public function wrapInner($wrapper) {
|
1577 |
+
foreach($this->stack() as $node)
|
1578 |
+
phpQuery::pq($node, $this->getDocumentID())->contents()->wrapAll($wrapper);
|
1579 |
+
return $this;
|
1580 |
+
}
|
1581 |
+
/**
|
1582 |
+
* Enter description here...
|
1583 |
+
*
|
1584 |
+
* @param String|phpQuery
|
1585 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1586 |
+
*/
|
1587 |
+
public function wrapInnerPHP($codeBefore, $codeAfter) {
|
1588 |
+
foreach($this->stack(1) as $node)
|
1589 |
+
phpQuery::pq($node, $this->getDocumentID())->contents()
|
1590 |
+
->wrapAllPHP($codeBefore, $codeAfter);
|
1591 |
+
return $this;
|
1592 |
+
}
|
1593 |
+
/**
|
1594 |
+
* Enter description here...
|
1595 |
+
*
|
1596 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1597 |
+
* @testme Support for text nodes
|
1598 |
+
*/
|
1599 |
+
public function contents() {
|
1600 |
+
$stack = array();
|
1601 |
+
foreach($this->stack(1) as $el) {
|
1602 |
+
// FIXME (fixed) http://code.google.com/p/phpquery/issues/detail?id=56
|
1603 |
+
// if (! isset($el->childNodes))
|
1604 |
+
// continue;
|
1605 |
+
foreach($el->childNodes as $node) {
|
1606 |
+
$stack[] = $node;
|
1607 |
+
}
|
1608 |
+
}
|
1609 |
+
return $this->newInstance($stack);
|
1610 |
+
}
|
1611 |
+
/**
|
1612 |
+
* Enter description here...
|
1613 |
+
*
|
1614 |
+
* jQuery difference.
|
1615 |
+
*
|
1616 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1617 |
+
*/
|
1618 |
+
public function contentsUnwrap() {
|
1619 |
+
foreach($this->stack(1) as $node) {
|
1620 |
+
if (! $node->parentNode )
|
1621 |
+
continue;
|
1622 |
+
$childNodes = array();
|
1623 |
+
// any modification in DOM tree breaks childNodes iteration, so cache them first
|
1624 |
+
foreach($node->childNodes as $chNode )
|
1625 |
+
$childNodes[] = $chNode;
|
1626 |
+
foreach($childNodes as $chNode )
|
1627 |
+
// $node->parentNode->appendChild($chNode);
|
1628 |
+
$node->parentNode->insertBefore($chNode, $node);
|
1629 |
+
$node->parentNode->removeChild($node);
|
1630 |
+
}
|
1631 |
+
return $this;
|
1632 |
+
}
|
1633 |
+
/**
|
1634 |
+
* Enter description here...
|
1635 |
+
*
|
1636 |
+
* jQuery difference.
|
1637 |
+
*/
|
1638 |
+
public function switchWith($markup) {
|
1639 |
+
$markup = pq($markup, $this->getDocumentID());
|
1640 |
+
$content = null;
|
1641 |
+
foreach($this->stack(1) as $node) {
|
1642 |
+
pq($node)
|
1643 |
+
->contents()->toReference($content)->end()
|
1644 |
+
->replaceWith($markup->clone()->append($content));
|
1645 |
+
}
|
1646 |
+
return $this;
|
1647 |
+
}
|
1648 |
+
/**
|
1649 |
+
* Enter description here...
|
1650 |
+
*
|
1651 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1652 |
+
*/
|
1653 |
+
public function eq($num) {
|
1654 |
+
$oldStack = $this->elements;
|
1655 |
+
$this->elementsBackup = $this->elements;
|
1656 |
+
$this->elements = array();
|
1657 |
+
if ( isset($oldStack[$num]) )
|
1658 |
+
$this->elements[] = $oldStack[$num];
|
1659 |
+
return $this->newInstance();
|
1660 |
+
}
|
1661 |
+
/**
|
1662 |
+
* Enter description here...
|
1663 |
+
*
|
1664 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1665 |
+
*/
|
1666 |
+
public function size() {
|
1667 |
+
return count($this->elements);
|
1668 |
+
}
|
1669 |
+
/**
|
1670 |
+
* Enter description here...
|
1671 |
+
*
|
1672 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1673 |
+
* @deprecated Use length as attribute
|
1674 |
+
*/
|
1675 |
+
public function length() {
|
1676 |
+
return $this->size();
|
1677 |
+
}
|
1678 |
+
public function count() {
|
1679 |
+
return $this->size();
|
1680 |
+
}
|
1681 |
+
/**
|
1682 |
+
* Enter description here...
|
1683 |
+
*
|
1684 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1685 |
+
* @todo $level
|
1686 |
+
*/
|
1687 |
+
public function end($level = 1) {
|
1688 |
+
// $this->elements = array_pop( $this->history );
|
1689 |
+
// return $this;
|
1690 |
+
// $this->previous->DOM = $this->DOM;
|
1691 |
+
// $this->previous->XPath = $this->XPath;
|
1692 |
+
return $this->previous
|
1693 |
+
? $this->previous
|
1694 |
+
: $this;
|
1695 |
+
}
|
1696 |
+
/**
|
1697 |
+
* Enter description here...
|
1698 |
+
* Normal use ->clone() .
|
1699 |
+
*
|
1700 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1701 |
+
* @access private
|
1702 |
+
*/
|
1703 |
+
public function _clone() {
|
1704 |
+
$newStack = array();
|
1705 |
+
//pr(array('copy... ', $this->whois()));
|
1706 |
+
//$this->dumpHistory('copy');
|
1707 |
+
$this->elementsBackup = $this->elements;
|
1708 |
+
foreach($this->elements as $node) {
|
1709 |
+
$newStack[] = $node->cloneNode(true);
|
1710 |
+
}
|
1711 |
+
$this->elements = $newStack;
|
1712 |
+
return $this->newInstance();
|
1713 |
+
}
|
1714 |
+
/**
|
1715 |
+
* Enter description here...
|
1716 |
+
*
|
1717 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1718 |
+
*/
|
1719 |
+
public function replaceWithPHP($code) {
|
1720 |
+
return $this->replaceWith(phpQuery::php($code));
|
1721 |
+
}
|
1722 |
+
/**
|
1723 |
+
* Enter description here...
|
1724 |
+
*
|
1725 |
+
* @param String|phpQuery $content
|
1726 |
+
* @link http://docs.jquery.com/Manipulation/replaceWith#content
|
1727 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1728 |
+
*/
|
1729 |
+
public function replaceWith($content) {
|
1730 |
+
return $this->after($content)->remove();
|
1731 |
+
}
|
1732 |
+
/**
|
1733 |
+
* Enter description here...
|
1734 |
+
*
|
1735 |
+
* @param String $selector
|
1736 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1737 |
+
* @todo this works ?
|
1738 |
+
*/
|
1739 |
+
public function replaceAll($selector) {
|
1740 |
+
foreach(phpQuery::pq($selector, $this->getDocumentID()) as $node)
|
1741 |
+
phpQuery::pq($node, $this->getDocumentID())
|
1742 |
+
->after($this->_clone())
|
1743 |
+
->remove();
|
1744 |
+
return $this;
|
1745 |
+
}
|
1746 |
+
/**
|
1747 |
+
* Enter description here...
|
1748 |
+
*
|
1749 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1750 |
+
*/
|
1751 |
+
public function remove($selector = null) {
|
1752 |
+
$loop = $selector
|
1753 |
+
? $this->filter($selector)->elements
|
1754 |
+
: $this->elements;
|
1755 |
+
foreach($loop as $node) {
|
1756 |
+
if (! $node->parentNode )
|
1757 |
+
continue;
|
1758 |
+
if (isset($node->tagName))
|
1759 |
+
$this->debug("Removing '{$node->tagName}'");
|
1760 |
+
$node->parentNode->removeChild($node);
|
1761 |
+
// Mutation event
|
1762 |
+
$event = new DOMEvent(array(
|
1763 |
+
'target' => $node,
|
1764 |
+
'type' => 'DOMNodeRemoved'
|
1765 |
+
));
|
1766 |
+
phpQueryEvents::trigger($this->getDocumentID(),
|
1767 |
+
$event->type, array($event), $node
|
1768 |
+
);
|
1769 |
+
}
|
1770 |
+
return $this;
|
1771 |
+
}
|
1772 |
+
protected function markupEvents($newMarkup, $oldMarkup, $node) {
|
1773 |
+
if ($node->tagName == 'textarea' && $newMarkup != $oldMarkup) {
|
1774 |
+
$event = new DOMEvent(array(
|
1775 |
+
'target' => $node,
|
1776 |
+
'type' => 'change'
|
1777 |
+
));
|
1778 |
+
phpQueryEvents::trigger($this->getDocumentID(),
|
1779 |
+
$event->type, array($event), $node
|
1780 |
+
);
|
1781 |
+
}
|
1782 |
+
}
|
1783 |
+
/**
|
1784 |
+
* jQuey difference
|
1785 |
+
*
|
1786 |
+
* @param $markup
|
1787 |
+
* @return unknown_type
|
1788 |
+
* @TODO trigger change event for textarea
|
1789 |
+
*/
|
1790 |
+
public function markup($markup = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
1791 |
+
$args = func_get_args();
|
1792 |
+
if ($this->documentWrapper->isXML)
|
1793 |
+
return call_user_func_array(array($this, 'xml'), $args);
|
1794 |
+
else
|
1795 |
+
return call_user_func_array(array($this, 'html'), $args);
|
1796 |
+
}
|
1797 |
+
/**
|
1798 |
+
* jQuey difference
|
1799 |
+
*
|
1800 |
+
* @param $markup
|
1801 |
+
* @return unknown_type
|
1802 |
+
*/
|
1803 |
+
public function markupOuter($callback1 = null, $callback2 = null, $callback3 = null) {
|
1804 |
+
$args = func_get_args();
|
1805 |
+
if ($this->documentWrapper->isXML)
|
1806 |
+
return call_user_func_array(array($this, 'xmlOuter'), $args);
|
1807 |
+
else
|
1808 |
+
return call_user_func_array(array($this, 'htmlOuter'), $args);
|
1809 |
+
}
|
1810 |
+
/**
|
1811 |
+
* Enter description here...
|
1812 |
+
*
|
1813 |
+
* @param unknown_type $html
|
1814 |
+
* @return string|phpQuery|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1815 |
+
* @TODO force html result
|
1816 |
+
*/
|
1817 |
+
public function html($html = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
1818 |
+
if (isset($html)) {
|
1819 |
+
// INSERT
|
1820 |
+
$nodes = $this->documentWrapper->import($html);
|
1821 |
+
$this->empty();
|
1822 |
+
foreach($this->stack(1) as $alreadyAdded => $node) {
|
1823 |
+
// for now, limit events for textarea
|
1824 |
+
if (($this->isXHTML() || $this->isHTML()) && $node->tagName == 'textarea')
|
1825 |
+
$oldHtml = pq($node, $this->getDocumentID())->markup();
|
1826 |
+
foreach($nodes as $newNode) {
|
1827 |
+
$node->appendChild($alreadyAdded
|
1828 |
+
? $newNode->cloneNode(true)
|
1829 |
+
: $newNode
|
1830 |
+
);
|
1831 |
+
}
|
1832 |
+
// for now, limit events for textarea
|
1833 |
+
if (($this->isXHTML() || $this->isHTML()) && $node->tagName == 'textarea')
|
1834 |
+
$this->markupEvents($html, $oldHtml, $node);
|
1835 |
+
}
|
1836 |
+
return $this;
|
1837 |
+
} else {
|
1838 |
+
// FETCH
|
1839 |
+
$return = $this->documentWrapper->markup($this->elements, true);
|
1840 |
+
$args = func_get_args();
|
1841 |
+
foreach(array_slice($args, 1) as $callback) {
|
1842 |
+
$return = phpQuery::callbackRun($callback, array($return));
|
1843 |
+
}
|
1844 |
+
return $return;
|
1845 |
+
}
|
1846 |
+
}
|
1847 |
+
/**
|
1848 |
+
* @TODO force xml result
|
1849 |
+
*/
|
1850 |
+
public function xml($xml = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
1851 |
+
$args = func_get_args();
|
1852 |
+
return call_user_func_array(array($this, 'html'), $args);
|
1853 |
+
}
|
1854 |
+
/**
|
1855 |
+
* Enter description here...
|
1856 |
+
* @TODO force html result
|
1857 |
+
*
|
1858 |
+
* @return String
|
1859 |
+
*/
|
1860 |
+
public function htmlOuter($callback1 = null, $callback2 = null, $callback3 = null) {
|
1861 |
+
$markup = $this->documentWrapper->markup($this->elements);
|
1862 |
+
// pass thou callbacks
|
1863 |
+
$args = func_get_args();
|
1864 |
+
foreach($args as $callback) {
|
1865 |
+
$markup = phpQuery::callbackRun($callback, array($markup));
|
1866 |
+
}
|
1867 |
+
return $markup;
|
1868 |
+
}
|
1869 |
+
/**
|
1870 |
+
* @TODO force xml result
|
1871 |
+
*/
|
1872 |
+
public function xmlOuter($callback1 = null, $callback2 = null, $callback3 = null) {
|
1873 |
+
$args = func_get_args();
|
1874 |
+
return call_user_func_array(array($this, 'htmlOuter'), $args);
|
1875 |
+
}
|
1876 |
+
public function __toString() {
|
1877 |
+
return (string)$this->markupOuter();
|
1878 |
+
}
|
1879 |
+
/**
|
1880 |
+
* Just like html(), but returns markup with VALID (dangerous) PHP tags.
|
1881 |
+
*
|
1882 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1883 |
+
* @todo support returning markup with PHP tags when called without param
|
1884 |
+
*/
|
1885 |
+
public function php($code = null) {
|
1886 |
+
return $this->markupPHP($code);
|
1887 |
+
}
|
1888 |
+
/**
|
1889 |
+
* Enter description here...
|
1890 |
+
*
|
1891 |
+
* @param $code
|
1892 |
+
* @return unknown_type
|
1893 |
+
*/
|
1894 |
+
public function markupPHP($code = null) {
|
1895 |
+
return isset($code)
|
1896 |
+
? $this->markup(phpQuery::php($code))
|
1897 |
+
: phpQuery::markupToPHP($this->markup());
|
1898 |
+
}
|
1899 |
+
/**
|
1900 |
+
* Enter description here...
|
1901 |
+
*
|
1902 |
+
* @param $code
|
1903 |
+
* @return unknown_type
|
1904 |
+
*/
|
1905 |
+
public function markupOuterPHP() {
|
1906 |
+
return phpQuery::markupToPHP($this->markupOuter());
|
1907 |
+
}
|
1908 |
+
/**
|
1909 |
+
* Enter description here...
|
1910 |
+
*
|
1911 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1912 |
+
*/
|
1913 |
+
public function children($selector = null) {
|
1914 |
+
$stack = array();
|
1915 |
+
foreach($this->stack(1) as $node) {
|
1916 |
+
// foreach($node->getElementsByTagName('*') as $newNode) {
|
1917 |
+
foreach($node->childNodes as $newNode) {
|
1918 |
+
if ($newNode->nodeType != 1)
|
1919 |
+
continue;
|
1920 |
+
if ($selector && ! $this->is($selector, $newNode))
|
1921 |
+
continue;
|
1922 |
+
if ($this->elementsContainsNode($newNode, $stack))
|
1923 |
+
continue;
|
1924 |
+
$stack[] = $newNode;
|
1925 |
+
}
|
1926 |
+
}
|
1927 |
+
$this->elementsBackup = $this->elements;
|
1928 |
+
$this->elements = $stack;
|
1929 |
+
return $this->newInstance();
|
1930 |
+
}
|
1931 |
+
/**
|
1932 |
+
* Enter description here...
|
1933 |
+
*
|
1934 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1935 |
+
*/
|
1936 |
+
public function ancestors($selector = null) {
|
1937 |
+
return $this->children( $selector );
|
1938 |
+
}
|
1939 |
+
/**
|
1940 |
+
* Enter description here...
|
1941 |
+
*
|
1942 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1943 |
+
*/
|
1944 |
+
public function append( $content) {
|
1945 |
+
return $this->insert($content, __FUNCTION__);
|
1946 |
+
}
|
1947 |
+
/**
|
1948 |
+
* Enter description here...
|
1949 |
+
*
|
1950 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1951 |
+
*/
|
1952 |
+
public function appendPHP( $content) {
|
1953 |
+
return $this->insert("<php><!-- {$content} --></php>", 'append');
|
1954 |
+
}
|
1955 |
+
/**
|
1956 |
+
* Enter description here...
|
1957 |
+
*
|
1958 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1959 |
+
*/
|
1960 |
+
public function appendTo( $seletor) {
|
1961 |
+
return $this->insert($seletor, __FUNCTION__);
|
1962 |
+
}
|
1963 |
+
/**
|
1964 |
+
* Enter description here...
|
1965 |
+
*
|
1966 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1967 |
+
*/
|
1968 |
+
public function prepend( $content) {
|
1969 |
+
return $this->insert($content, __FUNCTION__);
|
1970 |
+
}
|
1971 |
+
/**
|
1972 |
+
* Enter description here...
|
1973 |
+
*
|
1974 |
+
* @todo accept many arguments, which are joined, arrays maybe also
|
1975 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1976 |
+
*/
|
1977 |
+
public function prependPHP( $content) {
|
1978 |
+
return $this->insert("<php><!-- {$content} --></php>", 'prepend');
|
1979 |
+
}
|
1980 |
+
/**
|
1981 |
+
* Enter description here...
|
1982 |
+
*
|
1983 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1984 |
+
*/
|
1985 |
+
public function prependTo( $seletor) {
|
1986 |
+
return $this->insert($seletor, __FUNCTION__);
|
1987 |
+
}
|
1988 |
+
/**
|
1989 |
+
* Enter description here...
|
1990 |
+
*
|
1991 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
1992 |
+
*/
|
1993 |
+
public function before($content) {
|
1994 |
+
return $this->insert($content, __FUNCTION__);
|
1995 |
+
}
|
1996 |
+
/**
|
1997 |
+
* Enter description here...
|
1998 |
+
*
|
1999 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2000 |
+
*/
|
2001 |
+
public function beforePHP( $content) {
|
2002 |
+
return $this->insert("<php><!-- {$content} --></php>", 'before');
|
2003 |
+
}
|
2004 |
+
/**
|
2005 |
+
* Enter description here...
|
2006 |
+
*
|
2007 |
+
* @param String|phpQuery
|
2008 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2009 |
+
*/
|
2010 |
+
public function insertBefore( $seletor) {
|
2011 |
+
return $this->insert($seletor, __FUNCTION__);
|
2012 |
+
}
|
2013 |
+
/**
|
2014 |
+
* Enter description here...
|
2015 |
+
*
|
2016 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2017 |
+
*/
|
2018 |
+
public function after( $content) {
|
2019 |
+
return $this->insert($content, __FUNCTION__);
|
2020 |
+
}
|
2021 |
+
/**
|
2022 |
+
* Enter description here...
|
2023 |
+
*
|
2024 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2025 |
+
*/
|
2026 |
+
public function afterPHP( $content) {
|
2027 |
+
return $this->insert("<php><!-- {$content} --></php>", 'after');
|
2028 |
+
}
|
2029 |
+
/**
|
2030 |
+
* Enter description here...
|
2031 |
+
*
|
2032 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2033 |
+
*/
|
2034 |
+
public function insertAfter( $seletor) {
|
2035 |
+
return $this->insert($seletor, __FUNCTION__);
|
2036 |
+
}
|
2037 |
+
/**
|
2038 |
+
* Internal insert method. Don't use it.
|
2039 |
+
*
|
2040 |
+
* @param unknown_type $target
|
2041 |
+
* @param unknown_type $type
|
2042 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2043 |
+
* @access private
|
2044 |
+
*/
|
2045 |
+
public function insert($target, $type) {
|
2046 |
+
$this->debug("Inserting data with '{$type}'");
|
2047 |
+
$to = false;
|
2048 |
+
switch( $type) {
|
2049 |
+
case 'appendTo':
|
2050 |
+
case 'prependTo':
|
2051 |
+
case 'insertBefore':
|
2052 |
+
case 'insertAfter':
|
2053 |
+
$to = true;
|
2054 |
+
}
|
2055 |
+
switch(gettype($target)) {
|
2056 |
+
case 'string':
|
2057 |
+
$insertFrom = $insertTo = array();
|
2058 |
+
if ($to) {
|
2059 |
+
// INSERT TO
|
2060 |
+
$insertFrom = $this->elements;
|
2061 |
+
if (phpQuery::isMarkup($target)) {
|
2062 |
+
// $target is new markup, import it
|
2063 |
+
$insertTo = $this->documentWrapper->import($target);
|
2064 |
+
// insert into selected element
|
2065 |
+
} else {
|
2066 |
+
// $tagret is a selector
|
2067 |
+
$thisStack = $this->elements;
|
2068 |
+
$this->toRoot();
|
2069 |
+
$insertTo = $this->find($target)->elements;
|
2070 |
+
$this->elements = $thisStack;
|
2071 |
+
}
|
2072 |
+
} else {
|
2073 |
+
// INSERT FROM
|
2074 |
+
$insertTo = $this->elements;
|
2075 |
+
$insertFrom = $this->documentWrapper->import($target);
|
2076 |
+
}
|
2077 |
+
break;
|
2078 |
+
case 'object':
|
2079 |
+
$insertFrom = $insertTo = array();
|
2080 |
+
// phpQuery
|
2081 |
+
if ($target instanceof self) {
|
2082 |
+
if ($to) {
|
2083 |
+
$insertTo = $target->elements;
|
2084 |
+
if ($this->documentFragment && $this->stackIsRoot())
|
2085 |
+
// get all body children
|
2086 |
+
// $loop = $this->find('body > *')->elements;
|
2087 |
+
// TODO test it, test it hard...
|
2088 |
+
// $loop = $this->newInstance($this->root)->find('> *')->elements;
|
2089 |
+
$loop = $this->root->childNodes;
|
2090 |
+
else
|
2091 |
+
$loop = $this->elements;
|
2092 |
+
// import nodes if needed
|
2093 |
+
$insertFrom = $this->getDocumentID() == $target->getDocumentID()
|
2094 |
+
? $loop
|
2095 |
+
: $target->documentWrapper->import($loop);
|
2096 |
+
} else {
|
2097 |
+
$insertTo = $this->elements;
|
2098 |
+
if ( $target->documentFragment && $target->stackIsRoot() )
|
2099 |
+
// get all body children
|
2100 |
+
// $loop = $target->find('body > *')->elements;
|
2101 |
+
$loop = $target->root->childNodes;
|
2102 |
+
else
|
2103 |
+
$loop = $target->elements;
|
2104 |
+
// import nodes if needed
|
2105 |
+
$insertFrom = $this->getDocumentID() == $target->getDocumentID()
|
2106 |
+
? $loop
|
2107 |
+
: $this->documentWrapper->import($loop);
|
2108 |
+
}
|
2109 |
+
// DOMNODE
|
2110 |
+
} elseif ($target instanceof DOMNODE) {
|
2111 |
+
// import node if needed
|
2112 |
+
// if ( $target->ownerDocument != $this->DOM )
|
2113 |
+
// $target = $this->DOM->importNode($target, true);
|
2114 |
+
if ( $to) {
|
2115 |
+
$insertTo = array($target);
|
2116 |
+
if ($this->documentFragment && $this->stackIsRoot())
|
2117 |
+
// get all body children
|
2118 |
+
$loop = $this->root->childNodes;
|
2119 |
+
// $loop = $this->find('body > *')->elements;
|
2120 |
+
else
|
2121 |
+
$loop = $this->elements;
|
2122 |
+
foreach($loop as $fromNode)
|
2123 |
+
// import nodes if needed
|
2124 |
+
$insertFrom[] = ! $fromNode->ownerDocument->isSameNode($target->ownerDocument)
|
2125 |
+
? $target->ownerDocument->importNode($fromNode, true)
|
2126 |
+
: $fromNode;
|
2127 |
+
} else {
|
2128 |
+
// import node if needed
|
2129 |
+
if (! $target->ownerDocument->isSameNode($this->document))
|
2130 |
+
$target = $this->document->importNode($target, true);
|
2131 |
+
$insertTo = $this->elements;
|
2132 |
+
$insertFrom[] = $target;
|
2133 |
+
}
|
2134 |
+
}
|
2135 |
+
break;
|
2136 |
+
}
|
2137 |
+
phpQuery::debug("From ".count($insertFrom)."; To ".count($insertTo)." nodes");
|
2138 |
+
foreach($insertTo as $insertNumber => $toNode) {
|
2139 |
+
// we need static relative elements in some cases
|
2140 |
+
switch( $type) {
|
2141 |
+
case 'prependTo':
|
2142 |
+
case 'prepend':
|
2143 |
+
$firstChild = $toNode->firstChild;
|
2144 |
+
break;
|
2145 |
+
case 'insertAfter':
|
2146 |
+
case 'after':
|
2147 |
+
$nextSibling = $toNode->nextSibling;
|
2148 |
+
break;
|
2149 |
+
}
|
2150 |
+
foreach($insertFrom as $fromNode) {
|
2151 |
+
// clone if inserted already before
|
2152 |
+
$insert = $insertNumber
|
2153 |
+
? $fromNode->cloneNode(true)
|
2154 |
+
: $fromNode;
|
2155 |
+
switch($type) {
|
2156 |
+
case 'appendTo':
|
2157 |
+
case 'append':
|
2158 |
+
// $toNode->insertBefore(
|
2159 |
+
// $fromNode,
|
2160 |
+
// $toNode->lastChild->nextSibling
|
2161 |
+
// );
|
2162 |
+
$toNode->appendChild($insert);
|
2163 |
+
$eventTarget = $insert;
|
2164 |
+
break;
|
2165 |
+
case 'prependTo':
|
2166 |
+
case 'prepend':
|
2167 |
+
$toNode->insertBefore(
|
2168 |
+
$insert,
|
2169 |
+
$firstChild
|
2170 |
+
);
|
2171 |
+
break;
|
2172 |
+
case 'insertBefore':
|
2173 |
+
case 'before':
|
2174 |
+
if (! $toNode->parentNode)
|
2175 |
+
throw new Exception("No parentNode, can't do {$type}()");
|
2176 |
+
else
|
2177 |
+
$toNode->parentNode->insertBefore(
|
2178 |
+
$insert,
|
2179 |
+
$toNode
|
2180 |
+
);
|
2181 |
+
break;
|
2182 |
+
case 'insertAfter':
|
2183 |
+
case 'after':
|
2184 |
+
if (! $toNode->parentNode)
|
2185 |
+
throw new Exception("No parentNode, can't do {$type}()");
|
2186 |
+
else
|
2187 |
+
$toNode->parentNode->insertBefore(
|
2188 |
+
$insert,
|
2189 |
+
$nextSibling
|
2190 |
+
);
|
2191 |
+
break;
|
2192 |
+
}
|
2193 |
+
// Mutation event
|
2194 |
+
$event = new DOMEvent(array(
|
2195 |
+
'target' => $insert,
|
2196 |
+
'type' => 'DOMNodeInserted'
|
2197 |
+
));
|
2198 |
+
phpQueryEvents::trigger($this->getDocumentID(),
|
2199 |
+
$event->type, array($event), $insert
|
2200 |
+
);
|
2201 |
+
}
|
2202 |
+
}
|
2203 |
+
return $this;
|
2204 |
+
}
|
2205 |
+
/**
|
2206 |
+
* Enter description here...
|
2207 |
+
*
|
2208 |
+
* @return Int
|
2209 |
+
*/
|
2210 |
+
public function index($subject) {
|
2211 |
+
$index = -1;
|
2212 |
+
$subject = $subject instanceof phpQueryObject
|
2213 |
+
? $subject->elements[0]
|
2214 |
+
: $subject;
|
2215 |
+
foreach($this->newInstance() as $k => $node) {
|
2216 |
+
if ($node->isSameNode($subject))
|
2217 |
+
$index = $k;
|
2218 |
+
}
|
2219 |
+
return $index;
|
2220 |
+
}
|
2221 |
+
/**
|
2222 |
+
* Enter description here...
|
2223 |
+
*
|
2224 |
+
* @param unknown_type $start
|
2225 |
+
* @param unknown_type $end
|
2226 |
+
*
|
2227 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2228 |
+
* @testme
|
2229 |
+
*/
|
2230 |
+
public function slice($start, $end = null) {
|
2231 |
+
// $last = count($this->elements)-1;
|
2232 |
+
// $end = $end
|
2233 |
+
// ? min($end, $last)
|
2234 |
+
// : $last;
|
2235 |
+
// if ($start < 0)
|
2236 |
+
// $start = $last+$start;
|
2237 |
+
// if ($start > $last)
|
2238 |
+
// return array();
|
2239 |
+
if ($end > 0)
|
2240 |
+
$end = $end-$start;
|
2241 |
+
return $this->newInstance(
|
2242 |
+
array_slice($this->elements, $start, $end)
|
2243 |
+
);
|
2244 |
+
}
|
2245 |
+
/**
|
2246 |
+
* Enter description here...
|
2247 |
+
*
|
2248 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2249 |
+
*/
|
2250 |
+
public function reverse() {
|
2251 |
+
$this->elementsBackup = $this->elements;
|
2252 |
+
$this->elements = array_reverse($this->elements);
|
2253 |
+
return $this->newInstance();
|
2254 |
+
}
|
2255 |
+
/**
|
2256 |
+
* Return joined text content.
|
2257 |
+
* @return String
|
2258 |
+
*/
|
2259 |
+
public function text($text = null, $callback1 = null, $callback2 = null, $callback3 = null) {
|
2260 |
+
if (isset($text))
|
2261 |
+
return $this->html(htmlspecialchars($text));
|
2262 |
+
$args = func_get_args();
|
2263 |
+
$args = array_slice($args, 1);
|
2264 |
+
$return = '';
|
2265 |
+
foreach($this->elements as $node) {
|
2266 |
+
$text = $node->textContent;
|
2267 |
+
if (count($this->elements) > 1 && $text)
|
2268 |
+
$text .= "\n";
|
2269 |
+
foreach($args as $callback) {
|
2270 |
+
$text = phpQuery::callbackRun($callback, array($text));
|
2271 |
+
}
|
2272 |
+
$return .= $text;
|
2273 |
+
}
|
2274 |
+
return $return;
|
2275 |
+
}
|
2276 |
+
|
2277 |
+
/**
|
2278 |
+
* @return The text content of each matching element, like
|
2279 |
+
* text() but returns an array with one entry per matched element.
|
2280 |
+
* Read only.
|
2281 |
+
*/
|
2282 |
+
public function texts($attr = null) {
|
2283 |
+
$results = array();
|
2284 |
+
foreach($this->elements as $node) {
|
2285 |
+
$results[] = $node->textContent;
|
2286 |
+
}
|
2287 |
+
return $results;
|
2288 |
+
}
|
2289 |
+
|
2290 |
+
/**
|
2291 |
+
* Enter description here...
|
2292 |
+
*
|
2293 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2294 |
+
*/
|
2295 |
+
public function plugin($class, $file = null) {
|
2296 |
+
phpQuery::plugin($class, $file);
|
2297 |
+
return $this;
|
2298 |
+
}
|
2299 |
+
/**
|
2300 |
+
* Deprecated, use $pq->plugin() instead.
|
2301 |
+
*
|
2302 |
+
* @deprecated
|
2303 |
+
* @param $class
|
2304 |
+
* @param $file
|
2305 |
+
* @return unknown_type
|
2306 |
+
*/
|
2307 |
+
public static function extend($class, $file = null) {
|
2308 |
+
return $this->plugin($class, $file);
|
2309 |
+
}
|
2310 |
+
/**
|
2311 |
+
*
|
2312 |
+
* @access private
|
2313 |
+
* @param $method
|
2314 |
+
* @param $args
|
2315 |
+
* @return unknown_type
|
2316 |
+
*/
|
2317 |
+
public function __call($method, $args) {
|
2318 |
+
$aliasMethods = array('clone', 'empty');
|
2319 |
+
if (isset(phpQuery::$extendMethods[$method])) {
|
2320 |
+
array_unshift($args, $this);
|
2321 |
+
return phpQuery::callbackRun(
|
2322 |
+
phpQuery::$extendMethods[$method], $args
|
2323 |
+
);
|
2324 |
+
} else if (isset(phpQuery::$pluginsMethods[$method])) {
|
2325 |
+
array_unshift($args, $this);
|
2326 |
+
$class = phpQuery::$pluginsMethods[$method];
|
2327 |
+
$realClass = "phpQueryObjectPlugin_$class";
|
2328 |
+
$return = call_user_func_array(
|
2329 |
+
array($realClass, $method),
|
2330 |
+
$args
|
2331 |
+
);
|
2332 |
+
// XXX deprecate ?
|
2333 |
+
return is_null($return)
|
2334 |
+
? $this
|
2335 |
+
: $return;
|
2336 |
+
} else if (in_array($method, $aliasMethods)) {
|
2337 |
+
return call_user_func_array(array($this, '_'.$method), $args);
|
2338 |
+
} else
|
2339 |
+
throw new Exception("Method '{$method}' doesnt exist");
|
2340 |
+
}
|
2341 |
+
/**
|
2342 |
+
* Safe rename of next().
|
2343 |
+
*
|
2344 |
+
* Use it ONLY when need to call next() on an iterated object (in same time).
|
2345 |
+
* Normaly there is no need to do such thing ;)
|
2346 |
+
*
|
2347 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2348 |
+
* @access private
|
2349 |
+
*/
|
2350 |
+
public function _next($selector = null) {
|
2351 |
+
return $this->newInstance(
|
2352 |
+
$this->getElementSiblings('nextSibling', $selector, true)
|
2353 |
+
);
|
2354 |
+
}
|
2355 |
+
/**
|
2356 |
+
* Use prev() and next().
|
2357 |
+
*
|
2358 |
+
* @deprecated
|
2359 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2360 |
+
* @access private
|
2361 |
+
*/
|
2362 |
+
public function _prev($selector = null) {
|
2363 |
+
return $this->prev($selector);
|
2364 |
+
}
|
2365 |
+
/**
|
2366 |
+
* Enter description here...
|
2367 |
+
*
|
2368 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2369 |
+
*/
|
2370 |
+
public function prev($selector = null) {
|
2371 |
+
return $this->newInstance(
|
2372 |
+
$this->getElementSiblings('previousSibling', $selector, true)
|
2373 |
+
);
|
2374 |
+
}
|
2375 |
+
/**
|
2376 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2377 |
+
* @todo
|
2378 |
+
*/
|
2379 |
+
public function prevAll($selector = null) {
|
2380 |
+
return $this->newInstance(
|
2381 |
+
$this->getElementSiblings('previousSibling', $selector)
|
2382 |
+
);
|
2383 |
+
}
|
2384 |
+
/**
|
2385 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2386 |
+
* @todo FIXME: returns source elements insted of next siblings
|
2387 |
+
*/
|
2388 |
+
public function nextAll($selector = null) {
|
2389 |
+
return $this->newInstance(
|
2390 |
+
$this->getElementSiblings('nextSibling', $selector)
|
2391 |
+
);
|
2392 |
+
}
|
2393 |
+
/**
|
2394 |
+
* @access private
|
2395 |
+
*/
|
2396 |
+
protected function getElementSiblings($direction, $selector = null, $limitToOne = false) {
|
2397 |
+
$stack = array();
|
2398 |
+
$count = 0;
|
2399 |
+
foreach($this->stack() as $node) {
|
2400 |
+
$test = $node;
|
2401 |
+
while( isset($test->{$direction}) && $test->{$direction}) {
|
2402 |
+
$test = $test->{$direction};
|
2403 |
+
if (! $test instanceof DOMELEMENT)
|
2404 |
+
continue;
|
2405 |
+
$stack[] = $test;
|
2406 |
+
if ($limitToOne)
|
2407 |
+
break;
|
2408 |
+
}
|
2409 |
+
}
|
2410 |
+
if ($selector) {
|
2411 |
+
$stackOld = $this->elements;
|
2412 |
+
$this->elements = $stack;
|
2413 |
+
$stack = $this->filter($selector, true)->stack();
|
2414 |
+
$this->elements = $stackOld;
|
2415 |
+
}
|
2416 |
+
return $stack;
|
2417 |
+
}
|
2418 |
+
/**
|
2419 |
+
* Enter description here...
|
2420 |
+
*
|
2421 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2422 |
+
*/
|
2423 |
+
public function siblings($selector = null) {
|
2424 |
+
$stack = array();
|
2425 |
+
$siblings = array_merge(
|
2426 |
+
$this->getElementSiblings('previousSibling', $selector),
|
2427 |
+
$this->getElementSiblings('nextSibling', $selector)
|
2428 |
+
);
|
2429 |
+
foreach($siblings as $node) {
|
2430 |
+
if (! $this->elementsContainsNode($node, $stack))
|
2431 |
+
$stack[] = $node;
|
2432 |
+
}
|
2433 |
+
return $this->newInstance($stack);
|
2434 |
+
}
|
2435 |
+
/**
|
2436 |
+
* Enter description here...
|
2437 |
+
*
|
2438 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2439 |
+
*/
|
2440 |
+
public function not($selector = null) {
|
2441 |
+
if (is_string($selector))
|
2442 |
+
phpQuery::debug(array('not', $selector));
|
2443 |
+
else
|
2444 |
+
phpQuery::debug('not');
|
2445 |
+
$stack = array();
|
2446 |
+
if ($selector instanceof self || $selector instanceof DOMNODE) {
|
2447 |
+
foreach($this->stack() as $node) {
|
2448 |
+
if ($selector instanceof self) {
|
2449 |
+
$matchFound = false;
|
2450 |
+
foreach($selector->stack() as $notNode) {
|
2451 |
+
if ($notNode->isSameNode($node))
|
2452 |
+
$matchFound = true;
|
2453 |
+
}
|
2454 |
+
if (! $matchFound)
|
2455 |
+
$stack[] = $node;
|
2456 |
+
} else if ($selector instanceof DOMNODE) {
|
2457 |
+
if (! $selector->isSameNode($node))
|
2458 |
+
$stack[] = $node;
|
2459 |
+
} else {
|
2460 |
+
if (! $this->is($selector))
|
2461 |
+
$stack[] = $node;
|
2462 |
+
}
|
2463 |
+
}
|
2464 |
+
} else {
|
2465 |
+
$orgStack = $this->stack();
|
2466 |
+
$matched = $this->filter($selector, true)->stack();
|
2467 |
+
// $matched = array();
|
2468 |
+
// // simulate OR in filter() instead of AND 5y
|
2469 |
+
// foreach($this->parseSelector($selector) as $s) {
|
2470 |
+
// $matched = array_merge($matched,
|
2471 |
+
// $this->filter(array($s))->stack()
|
2472 |
+
// );
|
2473 |
+
// }
|
2474 |
+
foreach($orgStack as $node)
|
2475 |
+
if (! $this->elementsContainsNode($node, $matched))
|
2476 |
+
$stack[] = $node;
|
2477 |
+
}
|
2478 |
+
return $this->newInstance($stack);
|
2479 |
+
}
|
2480 |
+
/**
|
2481 |
+
* Enter description here...
|
2482 |
+
*
|
2483 |
+
* @param string|phpQueryObject
|
2484 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2485 |
+
*/
|
2486 |
+
public function add($selector = null) {
|
2487 |
+
if (! $selector)
|
2488 |
+
return $this;
|
2489 |
+
$stack = array();
|
2490 |
+
$this->elementsBackup = $this->elements;
|
2491 |
+
$found = phpQuery::pq($selector, $this->getDocumentID());
|
2492 |
+
$this->merge($found->elements);
|
2493 |
+
return $this->newInstance();
|
2494 |
+
}
|
2495 |
+
/**
|
2496 |
+
* @access private
|
2497 |
+
*/
|
2498 |
+
protected function merge() {
|
2499 |
+
foreach(func_get_args() as $nodes)
|
2500 |
+
foreach($nodes as $newNode )
|
2501 |
+
if (! $this->elementsContainsNode($newNode) )
|
2502 |
+
$this->elements[] = $newNode;
|
2503 |
+
}
|
2504 |
+
/**
|
2505 |
+
* @access private
|
2506 |
+
* TODO refactor to stackContainsNode
|
2507 |
+
*/
|
2508 |
+
protected function elementsContainsNode($nodeToCheck, $elementsStack = null) {
|
2509 |
+
$loop = ! is_null($elementsStack)
|
2510 |
+
? $elementsStack
|
2511 |
+
: $this->elements;
|
2512 |
+
foreach($loop as $node) {
|
2513 |
+
if ( $node->isSameNode( $nodeToCheck ) )
|
2514 |
+
return true;
|
2515 |
+
}
|
2516 |
+
return false;
|
2517 |
+
}
|
2518 |
+
/**
|
2519 |
+
* Enter description here...
|
2520 |
+
*
|
2521 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2522 |
+
*/
|
2523 |
+
public function parent($selector = null) {
|
2524 |
+
$stack = array();
|
2525 |
+
foreach($this->elements as $node )
|
2526 |
+
if ( $node->parentNode && ! $this->elementsContainsNode($node->parentNode, $stack) )
|
2527 |
+
$stack[] = $node->parentNode;
|
2528 |
+
$this->elementsBackup = $this->elements;
|
2529 |
+
$this->elements = $stack;
|
2530 |
+
if ( $selector )
|
2531 |
+
$this->filter($selector, true);
|
2532 |
+
return $this->newInstance();
|
2533 |
+
}
|
2534 |
+
/**
|
2535 |
+
* Enter description here...
|
2536 |
+
*
|
2537 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2538 |
+
*/
|
2539 |
+
public function parents($selector = null) {
|
2540 |
+
$stack = array();
|
2541 |
+
if (! $this->elements )
|
2542 |
+
$this->debug('parents() - stack empty');
|
2543 |
+
foreach($this->elements as $node) {
|
2544 |
+
$test = $node;
|
2545 |
+
while( $test->parentNode) {
|
2546 |
+
$test = $test->parentNode;
|
2547 |
+
if ($this->isRoot($test))
|
2548 |
+
break;
|
2549 |
+
if (! $this->elementsContainsNode($test, $stack)) {
|
2550 |
+
$stack[] = $test;
|
2551 |
+
continue;
|
2552 |
+
}
|
2553 |
+
}
|
2554 |
+
}
|
2555 |
+
$this->elementsBackup = $this->elements;
|
2556 |
+
$this->elements = $stack;
|
2557 |
+
if ( $selector )
|
2558 |
+
$this->filter($selector, true);
|
2559 |
+
return $this->newInstance();
|
2560 |
+
}
|
2561 |
+
/**
|
2562 |
+
* Internal stack iterator.
|
2563 |
+
*
|
2564 |
+
* @access private
|
2565 |
+
* @return {Array.<DOMNode>}
|
2566 |
+
*/
|
2567 |
+
public function stack($nodeTypes = null) {
|
2568 |
+
if (!isset($nodeTypes))
|
2569 |
+
return $this->elements;
|
2570 |
+
if (!is_array($nodeTypes))
|
2571 |
+
$nodeTypes = array($nodeTypes);
|
2572 |
+
$return = array();
|
2573 |
+
foreach($this->elements as $node) {
|
2574 |
+
if (in_array($node->nodeType, $nodeTypes))
|
2575 |
+
$return[] = $node;
|
2576 |
+
}
|
2577 |
+
return $return;
|
2578 |
+
}
|
2579 |
+
// TODO phpdoc; $oldAttr is result of hasAttribute, before any changes
|
2580 |
+
protected function attrEvents($attr, $oldAttr, $oldValue, $node) {
|
2581 |
+
// skip events for XML documents
|
2582 |
+
if (! $this->isXHTML() && ! $this->isHTML())
|
2583 |
+
return;
|
2584 |
+
$event = null;
|
2585 |
+
// identify
|
2586 |
+
$isInputValue = $node->tagName == 'input'
|
2587 |
+
&& (
|
2588 |
+
in_array($node->getAttribute('type'),
|
2589 |
+
array('text', 'password', 'hidden'))
|
2590 |
+
|| !$node->getAttribute('type')
|
2591 |
+
);
|
2592 |
+
$isRadio = $node->tagName == 'input'
|
2593 |
+
&& $node->getAttribute('type') == 'radio';
|
2594 |
+
$isCheckbox = $node->tagName == 'input'
|
2595 |
+
&& $node->getAttribute('type') == 'checkbox';
|
2596 |
+
$isOption = $node->tagName == 'option';
|
2597 |
+
if ($isInputValue && $attr == 'value' && $oldValue != $node->getAttribute($attr)) {
|
2598 |
+
$event = new DOMEvent(array(
|
2599 |
+
'target' => $node,
|
2600 |
+
'type' => 'change'
|
2601 |
+
));
|
2602 |
+
} else if (($isRadio || $isCheckbox) && $attr == 'checked' && (
|
2603 |
+
// check
|
2604 |
+
(! $oldAttr && $node->hasAttribute($attr))
|
2605 |
+
// un-check
|
2606 |
+
|| (! $node->hasAttribute($attr) && $oldAttr)
|
2607 |
+
)) {
|
2608 |
+
$event = new DOMEvent(array(
|
2609 |
+
'target' => $node,
|
2610 |
+
'type' => 'change'
|
2611 |
+
));
|
2612 |
+
} else if ($isOption && $node->parentNode && $attr == 'selected' && (
|
2613 |
+
// select
|
2614 |
+
(! $oldAttr && $node->hasAttribute($attr))
|
2615 |
+
// un-select
|
2616 |
+
|| (! $node->hasAttribute($attr) && $oldAttr)
|
2617 |
+
)) {
|
2618 |
+
$event = new DOMEvent(array(
|
2619 |
+
'target' => $node->parentNode,
|
2620 |
+
'type' => 'change'
|
2621 |
+
));
|
2622 |
+
}
|
2623 |
+
if ($event) {
|
2624 |
+
phpQueryEvents::trigger($this->getDocumentID(),
|
2625 |
+
$event->type, array($event), $node
|
2626 |
+
);
|
2627 |
+
}
|
2628 |
+
}
|
2629 |
+
public function attr($attr = null, $value = null) {
|
2630 |
+
foreach($this->stack(1) as $node) {
|
2631 |
+
if (! is_null($value)) {
|
2632 |
+
$loop = $attr == '*'
|
2633 |
+
? $this->getNodeAttrs($node)
|
2634 |
+
: array($attr);
|
2635 |
+
foreach($loop as $a) {
|
2636 |
+
$oldValue = $node->getAttribute($a);
|
2637 |
+
$oldAttr = $node->hasAttribute($a);
|
2638 |
+
// TODO raises an error when charset other than UTF-8
|
2639 |
+
// while document's charset is also not UTF-8
|
2640 |
+
@$node->setAttribute($a, $value);
|
2641 |
+
$this->attrEvents($a, $oldAttr, $oldValue, $node);
|
2642 |
+
}
|
2643 |
+
} else if ($attr == '*') {
|
2644 |
+
// jQuery difference
|
2645 |
+
$return = array();
|
2646 |
+
foreach($node->attributes as $n => $v)
|
2647 |
+
$return[$n] = $v->value;
|
2648 |
+
return $return;
|
2649 |
+
} else
|
2650 |
+
return $node->hasAttribute($attr)
|
2651 |
+
? $node->getAttribute($attr)
|
2652 |
+
: null;
|
2653 |
+
}
|
2654 |
+
return is_null($value)
|
2655 |
+
? '' : $this;
|
2656 |
+
}
|
2657 |
+
|
2658 |
+
/**
|
2659 |
+
* @return The same attribute of each matching element, like
|
2660 |
+
* attr() but returns an array with one entry per matched element.
|
2661 |
+
* Read only.
|
2662 |
+
*/
|
2663 |
+
public function attrs($attr = null) {
|
2664 |
+
$results = array();
|
2665 |
+
foreach($this->stack(1) as $node) {
|
2666 |
+
$results[] = $node->hasAttribute($attr)
|
2667 |
+
? $node->getAttribute($attr)
|
2668 |
+
: null;
|
2669 |
+
}
|
2670 |
+
return $results;
|
2671 |
+
}
|
2672 |
+
|
2673 |
+
/**
|
2674 |
+
* @access private
|
2675 |
+
*/
|
2676 |
+
protected function getNodeAttrs($node) {
|
2677 |
+
$return = array();
|
2678 |
+
foreach($node->attributes as $n => $o)
|
2679 |
+
$return[] = $n;
|
2680 |
+
return $return;
|
2681 |
+
}
|
2682 |
+
/**
|
2683 |
+
* Enter description here...
|
2684 |
+
*
|
2685 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2686 |
+
* @todo check CDATA ???
|
2687 |
+
*/
|
2688 |
+
public function attrPHP($attr, $code) {
|
2689 |
+
if (! is_null($code)) {
|
2690 |
+
$value = '<'.'?php '.$code.' ?'.'>';
|
2691 |
+
// TODO tempolary solution
|
2692 |
+
// http://code.google.com/p/phpquery/issues/detail?id=17
|
2693 |
+
// if (function_exists('mb_detect_encoding') && mb_detect_encoding($value) == 'ASCII')
|
2694 |
+
// $value = mb_convert_encoding($value, 'UTF-8', 'HTML-ENTITIES');
|
2695 |
+
}
|
2696 |
+
foreach($this->stack(1) as $node) {
|
2697 |
+
if (! is_null($code)) {
|
2698 |
+
// $attrNode = $this->DOM->createAttribute($attr);
|
2699 |
+
$node->setAttribute($attr, $value);
|
2700 |
+
// $attrNode->value = $value;
|
2701 |
+
// $node->appendChild($attrNode);
|
2702 |
+
} else if ( $attr == '*') {
|
2703 |
+
// jQuery diff
|
2704 |
+
$return = array();
|
2705 |
+
foreach($node->attributes as $n => $v)
|
2706 |
+
$return[$n] = $v->value;
|
2707 |
+
return $return;
|
2708 |
+
} else
|
2709 |
+
return $node->getAttribute($attr);
|
2710 |
+
}
|
2711 |
+
return $this;
|
2712 |
+
}
|
2713 |
+
/**
|
2714 |
+
* Enter description here...
|
2715 |
+
*
|
2716 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2717 |
+
*/
|
2718 |
+
public function removeAttr($attr) {
|
2719 |
+
foreach($this->stack(1) as $node) {
|
2720 |
+
$loop = $attr == '*'
|
2721 |
+
? $this->getNodeAttrs($node)
|
2722 |
+
: array($attr);
|
2723 |
+
foreach($loop as $a) {
|
2724 |
+
$oldValue = $node->getAttribute($a);
|
2725 |
+
$node->removeAttribute($a);
|
2726 |
+
$this->attrEvents($a, $oldValue, null, $node);
|
2727 |
+
}
|
2728 |
+
}
|
2729 |
+
return $this;
|
2730 |
+
}
|
2731 |
+
/**
|
2732 |
+
* Return form element value.
|
2733 |
+
*
|
2734 |
+
* @return String Fields value.
|
2735 |
+
*/
|
2736 |
+
public function val($val = null) {
|
2737 |
+
if (! isset($val)) {
|
2738 |
+
if ($this->eq(0)->is('select')) {
|
2739 |
+
$selected = $this->eq(0)->find('option[selected=selected]');
|
2740 |
+
if ($selected->is('[value]'))
|
2741 |
+
return $selected->attr('value');
|
2742 |
+
else
|
2743 |
+
return $selected->text();
|
2744 |
+
} else if ($this->eq(0)->is('textarea'))
|
2745 |
+
return $this->eq(0)->markup();
|
2746 |
+
else
|
2747 |
+
return $this->eq(0)->attr('value');
|
2748 |
+
} else {
|
2749 |
+
$_val = null;
|
2750 |
+
foreach($this->stack(1) as $node) {
|
2751 |
+
$node = pq($node, $this->getDocumentID());
|
2752 |
+
if (is_array($val) && in_array($node->attr('type'), array('checkbox', 'radio'))) {
|
2753 |
+
$isChecked = in_array($node->attr('value'), $val)
|
2754 |
+
|| in_array($node->attr('name'), $val);
|
2755 |
+
if ($isChecked)
|
2756 |
+
$node->attr('checked', 'checked');
|
2757 |
+
else
|
2758 |
+
$node->removeAttr('checked');
|
2759 |
+
} else if ($node->get(0)->tagName == 'select') {
|
2760 |
+
if (! isset($_val)) {
|
2761 |
+
$_val = array();
|
2762 |
+
if (! is_array($val))
|
2763 |
+
$_val = array((string)$val);
|
2764 |
+
else
|
2765 |
+
foreach($val as $v)
|
2766 |
+
$_val[] = $v;
|
2767 |
+
}
|
2768 |
+
foreach($node['option']->stack(1) as $option) {
|
2769 |
+
$option = pq($option, $this->getDocumentID());
|
2770 |
+
$selected = false;
|
2771 |
+
// XXX: workaround for string comparsion, see issue #96
|
2772 |
+
// http://code.google.com/p/phpquery/issues/detail?id=96
|
2773 |
+
$selected = is_null($option->attr('value'))
|
2774 |
+
? in_array($option->markup(), $_val)
|
2775 |
+
: in_array($option->attr('value'), $_val);
|
2776 |
+
// $optionValue = $option->attr('value');
|
2777 |
+
// $optionText = $option->text();
|
2778 |
+
// $optionTextLenght = mb_strlen($optionText);
|
2779 |
+
// foreach($_val as $v)
|
2780 |
+
// if ($optionValue == $v)
|
2781 |
+
// $selected = true;
|
2782 |
+
// else if ($optionText == $v && $optionTextLenght == mb_strlen($v))
|
2783 |
+
// $selected = true;
|
2784 |
+
if ($selected)
|
2785 |
+
$option->attr('selected', 'selected');
|
2786 |
+
else
|
2787 |
+
$option->removeAttr('selected');
|
2788 |
+
}
|
2789 |
+
} else if ($node->get(0)->tagName == 'textarea')
|
2790 |
+
$node->markup($val);
|
2791 |
+
else
|
2792 |
+
$node->attr('value', $val);
|
2793 |
+
}
|
2794 |
+
}
|
2795 |
+
return $this;
|
2796 |
+
}
|
2797 |
+
/**
|
2798 |
+
* Enter description here...
|
2799 |
+
*
|
2800 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2801 |
+
*/
|
2802 |
+
public function andSelf() {
|
2803 |
+
if ( $this->previous )
|
2804 |
+
$this->elements = array_merge($this->elements, $this->previous->elements);
|
2805 |
+
return $this;
|
2806 |
+
}
|
2807 |
+
/**
|
2808 |
+
* Enter description here...
|
2809 |
+
*
|
2810 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2811 |
+
*/
|
2812 |
+
public function addClass( $className) {
|
2813 |
+
if (! $className)
|
2814 |
+
return $this;
|
2815 |
+
foreach($this->stack(1) as $node) {
|
2816 |
+
if (! $this->is(".$className", $node))
|
2817 |
+
$node->setAttribute(
|
2818 |
+
'class',
|
2819 |
+
trim($node->getAttribute('class').' '.$className)
|
2820 |
+
);
|
2821 |
+
}
|
2822 |
+
return $this;
|
2823 |
+
}
|
2824 |
+
/**
|
2825 |
+
* Enter description here...
|
2826 |
+
*
|
2827 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2828 |
+
*/
|
2829 |
+
public function addClassPHP( $className) {
|
2830 |
+
foreach($this->stack(1) as $node) {
|
2831 |
+
$classes = $node->getAttribute('class');
|
2832 |
+
$newValue = $classes
|
2833 |
+
? $classes.' <'.'?php '.$className.' ?'.'>'
|
2834 |
+
: '<'.'?php '.$className.' ?'.'>';
|
2835 |
+
$node->setAttribute('class', $newValue);
|
2836 |
+
}
|
2837 |
+
return $this;
|
2838 |
+
}
|
2839 |
+
/**
|
2840 |
+
* Enter description here...
|
2841 |
+
*
|
2842 |
+
* @param string $className
|
2843 |
+
* @return bool
|
2844 |
+
*/
|
2845 |
+
public function hasClass($className) {
|
2846 |
+
foreach($this->stack(1) as $node) {
|
2847 |
+
if ( $this->is(".$className", $node))
|
2848 |
+
return true;
|
2849 |
+
}
|
2850 |
+
return false;
|
2851 |
+
}
|
2852 |
+
/**
|
2853 |
+
* Enter description here...
|
2854 |
+
*
|
2855 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2856 |
+
*/
|
2857 |
+
public function removeClass($className) {
|
2858 |
+
foreach($this->stack(1) as $node) {
|
2859 |
+
$classes = explode( ' ', $node->getAttribute('class'));
|
2860 |
+
if ( in_array($className, $classes)) {
|
2861 |
+
$classes = array_diff($classes, array($className));
|
2862 |
+
if ( $classes )
|
2863 |
+
$node->setAttribute('class', implode(' ', $classes));
|
2864 |
+
else
|
2865 |
+
$node->removeAttribute('class');
|
2866 |
+
}
|
2867 |
+
}
|
2868 |
+
return $this;
|
2869 |
+
}
|
2870 |
+
/**
|
2871 |
+
* Enter description here...
|
2872 |
+
*
|
2873 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2874 |
+
*/
|
2875 |
+
public function toggleClass($className) {
|
2876 |
+
foreach($this->stack(1) as $node) {
|
2877 |
+
if ( $this->is( $node, '.'.$className ))
|
2878 |
+
$this->removeClass($className);
|
2879 |
+
else
|
2880 |
+
$this->addClass($className);
|
2881 |
+
}
|
2882 |
+
return $this;
|
2883 |
+
}
|
2884 |
+
/**
|
2885 |
+
* Proper name without underscore (just ->empty()) also works.
|
2886 |
+
*
|
2887 |
+
* Removes all child nodes from the set of matched elements.
|
2888 |
+
*
|
2889 |
+
* Example:
|
2890 |
+
* pq("p")._empty()
|
2891 |
+
*
|
2892 |
+
* HTML:
|
2893 |
+
* <p>Hello, <span>Person</span> <a href="#">and person</a></p>
|
2894 |
+
*
|
2895 |
+
* Result:
|
2896 |
+
* [ <p></p> ]
|
2897 |
+
*
|
2898 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2899 |
+
* @access private
|
2900 |
+
*/
|
2901 |
+
public function _empty() {
|
2902 |
+
foreach($this->stack(1) as $node) {
|
2903 |
+
// thx to 'dave at dgx dot cz'
|
2904 |
+
$node->nodeValue = '';
|
2905 |
+
}
|
2906 |
+
return $this;
|
2907 |
+
}
|
2908 |
+
/**
|
2909 |
+
* Enter description here...
|
2910 |
+
*
|
2911 |
+
* @param array|string $callback Expects $node as first param, $index as second
|
2912 |
+
* @param array $scope External variables passed to callback. Use compact('varName1', 'varName2'...) and extract($scope)
|
2913 |
+
* @param array $arg1 Will ba passed as third and futher args to callback.
|
2914 |
+
* @param array $arg2 Will ba passed as fourth and futher args to callback, and so on...
|
2915 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2916 |
+
*/
|
2917 |
+
public function each($callback, $param1 = null, $param2 = null, $param3 = null) {
|
2918 |
+
$paramStructure = null;
|
2919 |
+
if (func_num_args() > 1) {
|
2920 |
+
$paramStructure = func_get_args();
|
2921 |
+
$paramStructure = array_slice($paramStructure, 1);
|
2922 |
+
}
|
2923 |
+
foreach($this->elements as $v)
|
2924 |
+
phpQuery::callbackRun($callback, array($v), $paramStructure);
|
2925 |
+
return $this;
|
2926 |
+
}
|
2927 |
+
/**
|
2928 |
+
* Run callback on actual object.
|
2929 |
+
*
|
2930 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2931 |
+
*/
|
2932 |
+
public function callback($callback, $param1 = null, $param2 = null, $param3 = null) {
|
2933 |
+
$params = func_get_args();
|
2934 |
+
$params[0] = $this;
|
2935 |
+
phpQuery::callbackRun($callback, $params);
|
2936 |
+
return $this;
|
2937 |
+
}
|
2938 |
+
/**
|
2939 |
+
* Enter description here...
|
2940 |
+
*
|
2941 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
2942 |
+
* @todo add $scope and $args as in each() ???
|
2943 |
+
*/
|
2944 |
+
public function map($callback, $param1 = null, $param2 = null, $param3 = null) {
|
2945 |
+
// $stack = array();
|
2946 |
+
//// foreach($this->newInstance() as $node) {
|
2947 |
+
// foreach($this->newInstance() as $node) {
|
2948 |
+
// $result = call_user_func($callback, $node);
|
2949 |
+
// if ($result)
|
2950 |
+
// $stack[] = $result;
|
2951 |
+
// }
|
2952 |
+
$params = func_get_args();
|
2953 |
+
array_unshift($params, $this->elements);
|
2954 |
+
return $this->newInstance(
|
2955 |
+
call_user_func_array(array('phpQuery', 'map'), $params)
|
2956 |
+
// phpQuery::map($this->elements, $callback)
|
2957 |
+
);
|
2958 |
+
}
|
2959 |
+
/**
|
2960 |
+
* Enter description here...
|
2961 |
+
*
|
2962 |
+
* @param <type> $key
|
2963 |
+
* @param <type> $value
|
2964 |
+
*/
|
2965 |
+
public function data($key, $value = null) {
|
2966 |
+
if (! isset($value)) {
|
2967 |
+
// TODO? implement specific jQuery behavior od returning parent values
|
2968 |
+
// is child which we look up doesn't exist
|
2969 |
+
return phpQuery::data($this->get(0), $key, $value, $this->getDocumentID());
|
2970 |
+
} else {
|
2971 |
+
foreach($this as $node)
|
2972 |
+
phpQuery::data($node, $key, $value, $this->getDocumentID());
|
2973 |
+
return $this;
|
2974 |
+
}
|
2975 |
+
}
|
2976 |
+
/**
|
2977 |
+
* Enter description here...
|
2978 |
+
*
|
2979 |
+
* @param <type> $key
|
2980 |
+
*/
|
2981 |
+
public function removeData($key) {
|
2982 |
+
foreach($this as $node)
|
2983 |
+
phpQuery::removeData($node, $key, $this->getDocumentID());
|
2984 |
+
return $this;
|
2985 |
+
}
|
2986 |
+
// INTERFACE IMPLEMENTATIONS
|
2987 |
+
|
2988 |
+
// ITERATOR INTERFACE
|
2989 |
+
/**
|
2990 |
+
* @access private
|
2991 |
+
*/
|
2992 |
+
public function rewind(){
|
2993 |
+
$this->debug('iterating foreach');
|
2994 |
+
// phpQuery::selectDocument($this->getDocumentID());
|
2995 |
+
$this->elementsBackup = $this->elements;
|
2996 |
+
$this->elementsInterator = $this->elements;
|
2997 |
+
$this->valid = isset( $this->elements[0] )
|
2998 |
+
? 1 : 0;
|
2999 |
+
// $this->elements = $this->valid
|
3000 |
+
// ? array($this->elements[0])
|
3001 |
+
// : array();
|
3002 |
+
$this->current = 0;
|
3003 |
+
}
|
3004 |
+
/**
|
3005 |
+
* @access private
|
3006 |
+
*/
|
3007 |
+
public function current(){
|
3008 |
+
return $this->elementsInterator[ $this->current ];
|
3009 |
+
}
|
3010 |
+
/**
|
3011 |
+
* @access private
|
3012 |
+
*/
|
3013 |
+
public function key(){
|
3014 |
+
return $this->current;
|
3015 |
+
}
|
3016 |
+
/**
|
3017 |
+
* Double-function method.
|
3018 |
+
*
|
3019 |
+
* First: main iterator interface method.
|
3020 |
+
* Second: Returning next sibling, alias for _next().
|
3021 |
+
*
|
3022 |
+
* Proper functionality is choosed automagicaly.
|
3023 |
+
*
|
3024 |
+
* @see phpQueryObject::_next()
|
3025 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3026 |
+
*/
|
3027 |
+
public function next($cssSelector = null){
|
3028 |
+
// if ($cssSelector || $this->valid)
|
3029 |
+
// return $this->_next($cssSelector);
|
3030 |
+
$this->valid = isset( $this->elementsInterator[ $this->current+1 ] )
|
3031 |
+
? true
|
3032 |
+
: false;
|
3033 |
+
if (! $this->valid && $this->elementsInterator) {
|
3034 |
+
$this->elementsInterator = null;
|
3035 |
+
} else if ($this->valid) {
|
3036 |
+
$this->current++;
|
3037 |
+
} else {
|
3038 |
+
return $this->_next($cssSelector);
|
3039 |
+
}
|
3040 |
+
}
|
3041 |
+
/**
|
3042 |
+
* @access private
|
3043 |
+
*/
|
3044 |
+
public function valid(){
|
3045 |
+
return $this->valid;
|
3046 |
+
}
|
3047 |
+
// ITERATOR INTERFACE END
|
3048 |
+
// ARRAYACCESS INTERFACE
|
3049 |
+
/**
|
3050 |
+
* @access private
|
3051 |
+
*/
|
3052 |
+
public function offsetExists($offset) {
|
3053 |
+
return $this->find($offset)->size() > 0;
|
3054 |
+
}
|
3055 |
+
/**
|
3056 |
+
* @access private
|
3057 |
+
*/
|
3058 |
+
public function offsetGet($offset) {
|
3059 |
+
return $this->find($offset);
|
3060 |
+
}
|
3061 |
+
/**
|
3062 |
+
* @access private
|
3063 |
+
*/
|
3064 |
+
public function offsetSet($offset, $value) {
|
3065 |
+
// $this->find($offset)->replaceWith($value);
|
3066 |
+
$this->find($offset)->html($value);
|
3067 |
+
}
|
3068 |
+
/**
|
3069 |
+
* @access private
|
3070 |
+
*/
|
3071 |
+
public function offsetUnset($offset) {
|
3072 |
+
// empty
|
3073 |
+
throw new Exception("Can't do unset, use array interface only for calling queries and replacing HTML.");
|
3074 |
+
}
|
3075 |
+
// ARRAYACCESS INTERFACE END
|
3076 |
+
/**
|
3077 |
+
* Returns node's XPath.
|
3078 |
+
*
|
3079 |
+
* @param unknown_type $oneNode
|
3080 |
+
* @return string
|
3081 |
+
* @TODO use native getNodePath is avaible
|
3082 |
+
* @access private
|
3083 |
+
*/
|
3084 |
+
protected function getNodeXpath($oneNode = null, $namespace = null) {
|
3085 |
+
$return = array();
|
3086 |
+
$loop = $oneNode
|
3087 |
+
? array($oneNode)
|
3088 |
+
: $this->elements;
|
3089 |
+
// if ($namespace)
|
3090 |
+
// $namespace .= ':';
|
3091 |
+
foreach($loop as $node) {
|
3092 |
+
if ($node instanceof DOMDOCUMENT) {
|
3093 |
+
$return[] = '';
|
3094 |
+
continue;
|
3095 |
+
}
|
3096 |
+
$xpath = array();
|
3097 |
+
while(! ($node instanceof DOMDOCUMENT)) {
|
3098 |
+
$i = 1;
|
3099 |
+
$sibling = $node;
|
3100 |
+
while($sibling->previousSibling) {
|
3101 |
+
$sibling = $sibling->previousSibling;
|
3102 |
+
$isElement = $sibling instanceof DOMELEMENT;
|
3103 |
+
if ($isElement && $sibling->tagName == $node->tagName)
|
3104 |
+
$i++;
|
3105 |
+
}
|
3106 |
+
$xpath[] = $this->isXML()
|
3107 |
+
? "*[local-name()='{$node->tagName}'][{$i}]"
|
3108 |
+
: "{$node->tagName}[{$i}]";
|
3109 |
+
$node = $node->parentNode;
|
3110 |
+
}
|
3111 |
+
$xpath = implode('/', array_reverse($xpath));
|
3112 |
+
$return[] = '/'.$xpath;
|
3113 |
+
}
|
3114 |
+
return $oneNode
|
3115 |
+
? $return[0]
|
3116 |
+
: $return;
|
3117 |
+
}
|
3118 |
+
// HELPERS
|
3119 |
+
public function whois($oneNode = null) {
|
3120 |
+
$return = array();
|
3121 |
+
$loop = $oneNode
|
3122 |
+
? array( $oneNode )
|
3123 |
+
: $this->elements;
|
3124 |
+
foreach($loop as $node) {
|
3125 |
+
if (isset($node->tagName)) {
|
3126 |
+
$tag = in_array($node->tagName, array('php', 'js'))
|
3127 |
+
? strtoupper($node->tagName)
|
3128 |
+
: $node->tagName;
|
3129 |
+
$return[] = $tag
|
3130 |
+
.($node->getAttribute('id')
|
3131 |
+
? '#'.$node->getAttribute('id'):'')
|
3132 |
+
.($node->getAttribute('class')
|
3133 |
+
? '.'.implode('.', explode(' ', $node->getAttribute('class'))):'')
|
3134 |
+
.($node->getAttribute('name')
|
3135 |
+
? '[name="'.$node->getAttribute('name').'"]':'')
|
3136 |
+
.($node->getAttribute('value') && strpos($node->getAttribute('value'), '<'.'?php') === false
|
3137 |
+
? '[value="'.substr(str_replace("\n", '', $node->getAttribute('value')), 0, 15).'"]':'')
|
3138 |
+
.($node->getAttribute('value') && strpos($node->getAttribute('value'), '<'.'?php') !== false
|
3139 |
+
? '[value=PHP]':'')
|
3140 |
+
.($node->getAttribute('selected')
|
3141 |
+
? '[selected]':'')
|
3142 |
+
.($node->getAttribute('checked')
|
3143 |
+
? '[checked]':'')
|
3144 |
+
;
|
3145 |
+
} else if ($node instanceof DOMTEXT) {
|
3146 |
+
if (trim($node->textContent))
|
3147 |
+
$return[] = 'Text:'.substr(str_replace("\n", ' ', $node->textContent), 0, 15);
|
3148 |
+
} else {
|
3149 |
+
|
3150 |
+
}
|
3151 |
+
}
|
3152 |
+
return $oneNode && isset($return[0])
|
3153 |
+
? $return[0]
|
3154 |
+
: $return;
|
3155 |
+
}
|
3156 |
+
/**
|
3157 |
+
* Dump htmlOuter and preserve chain. Usefull for debugging.
|
3158 |
+
*
|
3159 |
+
* @return phpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery
|
3160 |
+
*
|
3161 |
+
*/
|
3162 |
+
public function dump() {
|
3163 |
+
print 'DUMP #'.(phpQuery::$dumpCount++).' ';
|
3164 |
+
$debug = phpQuery::$debug;
|
3165 |
+
phpQuery::$debug = false;
|
3166 |
+
// print __FILE__.':'.__LINE__."\n";
|
3167 |
+
var_dump($this->htmlOuter());
|
3168 |
+
return $this;
|
3169 |
+
}
|
3170 |
+
public function dumpWhois() {
|
3171 |
+
print 'DUMP #'.(phpQuery::$dumpCount++).' ';
|
3172 |
+
$debug = phpQuery::$debug;
|
3173 |
+
phpQuery::$debug = false;
|
3174 |
+
// print __FILE__.':'.__LINE__."\n";
|
3175 |
+
var_dump('whois', $this->whois());
|
3176 |
+
phpQuery::$debug = $debug;
|
3177 |
+
return $this;
|
3178 |
+
}
|
3179 |
+
public function dumpLength() {
|
3180 |
+
print 'DUMP #'.(phpQuery::$dumpCount++).' ';
|
3181 |
+
$debug = phpQuery::$debug;
|
3182 |
+
phpQuery::$debug = false;
|
3183 |
+
// print __FILE__.':'.__LINE__."\n";
|
3184 |
+
var_dump('length', $this->length());
|
3185 |
+
phpQuery::$debug = $debug;
|
3186 |
+
return $this;
|
3187 |
+
}
|
3188 |
+
public function dumpTree($html = true, $title = true) {
|
3189 |
+
$output = $title
|
3190 |
+
? 'DUMP #'.(phpQuery::$dumpCount++)." \n" : '';
|
3191 |
+
$debug = phpQuery::$debug;
|
3192 |
+
phpQuery::$debug = false;
|
3193 |
+
foreach($this->stack() as $node)
|
3194 |
+
$output .= $this->__dumpTree($node);
|
3195 |
+
phpQuery::$debug = $debug;
|
3196 |
+
print $html
|
3197 |
+
? nl2br(str_replace(' ', ' ', $output))
|
3198 |
+
: $output;
|
3199 |
+
return $this;
|
3200 |
+
}
|
3201 |
+
private function __dumpTree($node, $intend = 0) {
|
3202 |
+
$whois = $this->whois($node);
|
3203 |
+
$return = '';
|
3204 |
+
if ($whois)
|
3205 |
+
$return .= str_repeat(' - ', $intend).$whois."\n";
|
3206 |
+
if (isset($node->childNodes))
|
3207 |
+
foreach($node->childNodes as $chNode)
|
3208 |
+
$return .= $this->__dumpTree($chNode, $intend+1);
|
3209 |
+
return $return;
|
3210 |
+
}
|
3211 |
+
/**
|
3212 |
+
* Dump htmlOuter and stop script execution. Usefull for debugging.
|
3213 |
+
*
|
3214 |
+
*/
|
3215 |
+
public function dumpDie() {
|
3216 |
+
print __FILE__.':'.__LINE__;
|
3217 |
+
var_dump($this->htmlOuter());
|
3218 |
+
die();
|
3219 |
+
}
|
3220 |
+
}
|
plugin-updater/.gitkeep
ADDED
File without changes
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: gantry
|
|
3 |
Author URI: http://gantry.org
|
4 |
Tags: gantry, framework, template, theme, widgets, flexible, extensible, configurable, 960px, grid, columns, powerful, buddypress
|
5 |
Requires at least: 3.2
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 4.1.
|
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 |
|
@@ -89,6 +89,10 @@ Once you downloaded and installed Gantry 4 Framework plugin, please download als
|
|
89 |
|
90 |
== Changelog ==
|
91 |
|
|
|
|
|
|
|
|
|
92 |
= 4.1.14 =
|
93 |
* Fixed JS errors caused by YOAST SEO on Gantry 4 Theme Settings page making it unusable.
|
94 |
* Added an Gizmo option to enable/disable YOAST SEO JS on Widgets page in order to make the Gantry 4 MooTools scripts usable. You need to copy "yoastwidgets" fields from Gantry 4 default themes templateDetails.xml to your own theme to be able to enable and disable this functionality.
|
@@ -445,6 +449,9 @@ Once you downloaded and installed Gantry 4 Framework plugin, please download als
|
|
445 |
|
446 |
== Upgrade Notice ==
|
447 |
|
|
|
|
|
|
|
448 |
= 4.1.14 =
|
449 |
Please remember to create a full site backup (files + database) before performing update.
|
450 |
|
3 |
Author URI: http://gantry.org
|
4 |
Tags: gantry, framework, template, theme, widgets, flexible, extensible, configurable, 960px, grid, columns, powerful, buddypress
|
5 |
Requires at least: 3.2
|
6 |
+
Tested up to: 4.9.6
|
7 |
+
Stable tag: 4.1.15
|
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 |
|
89 |
|
90 |
== Changelog ==
|
91 |
|
92 |
+
= 4.1.15 =
|
93 |
+
* Various PHP 7.2 fixes
|
94 |
+
* Other minor fixes and improvements
|
95 |
+
|
96 |
= 4.1.14 =
|
97 |
* Fixed JS errors caused by YOAST SEO on Gantry 4 Theme Settings page making it unusable.
|
98 |
* Added an Gizmo option to enable/disable YOAST SEO JS on Widgets page in order to make the Gantry 4 MooTools scripts usable. You need to copy "yoastwidgets" fields from Gantry 4 default themes templateDetails.xml to your own theme to be able to enable and disable this functionality.
|
449 |
|
450 |
== Upgrade Notice ==
|
451 |
|
452 |
+
= 4.1.15 =
|
453 |
+
Please remember to create a full site backup (files + database) before performing update.
|
454 |
+
|
455 |
= 4.1.14 =
|
456 |
Please remember to create a full site backup (files + database) before performing update.
|
457 |
|
tmpl/index-iphone.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: index-iphone.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: index-iphone.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/archives.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: archives.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Archives Widget.
|
2 |
/**
|
3 |
* @version $Id: archives.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Archives Widget.
|
widgets/breadcrumbs.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version 4.1.
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined( 'GANTRY_VERSION' ) or die();
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version 4.1.15 June 14, 2018
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
defined( 'GANTRY_VERSION' ) or die();
|
widgets/categories.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: categories.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Categories Widget.
|
2 |
/**
|
3 |
* @version $Id: categories.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Categories Widget.
|
widgets/copyright.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: copyright.php 60342 2014-01-03 17:12:22Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: copyright.php 60342 2014-01-03 17:12:22Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/date.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: date.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: date.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/divider.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: divider.php 61614 2015-12-09 11:12:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: divider.php 61614 2015-12-09 11:12:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/fontsizer.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: fontsizer.php 61614 2015-12-09 11:12:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: fontsizer.php 61614 2015-12-09 11:12:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/admin/RokMenuWalkerNavMenuEdit.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuWalkerNavMenuEdit.php 60346 2014-01-03 22:17:55Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Based on Wordpress core code
|
2 |
/**
|
3 |
* @version $Id: RokMenuWalkerNavMenuEdit.php 60346 2014-01-03 22:17:55Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Based on Wordpress core code
|
widgets/gantrymenu/admin/fields/themelist.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: themelist.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: themelist.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
widgets/gantrymenu/css/widget_admin.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/**
|
2 |
* @version $Id: widget_admin.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*
|
7 |
*/
|
1 |
/**
|
2 |
* @version $Id: widget_admin.css 58595 2012-12-11 19:59:45Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*
|
7 |
*/
|
widgets/gantrymenu/libs/GantryMenu.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: GantryMenu.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: GantryMenu.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/common/RokBrowserCheck.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokBrowserCheck.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
2 |
/**
|
3 |
* @version $Id: RokBrowserCheck.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
*/
|
widgets/gantrymenu/libs/common/includes.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: includes.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: includes.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/includes.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: includes.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: includes.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/AbstractRokMenuFormatter.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: AbstractRokMenuFormatter.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: AbstractRokMenuFormatter.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/AbstractRokMenuLayout.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: AbstractRokMenuLayout.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: AbstractRokMenuLayout.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/AbstractRokMenuProvider.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: AbstractRokMenuProvider.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: AbstractRokMenuProvider.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/AbstractRokMenuTheme.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: AbstractRokMenuTheme.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: AbstractRokMenuTheme.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenu.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenu.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenu.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuDefaultRenderer.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuDefaultRenderer.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenuDefaultRenderer.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuFormatter.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuFormatter.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenuFormatter.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuGreaterThenLevelFilter.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuGreaterThenLevelFilter.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenuGreaterThenLevelFilter.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuHeader.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuHeader.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenuHeader.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuIdFilter.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuIdFilter.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenuIdFilter.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuIterator.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuIterator.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenuIterator.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuLayout.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuLayout.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenuLayout.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuNode.php
CHANGED
@@ -2,7 +2,7 @@
|
|
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 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
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 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuNodeBase.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuNodeBase.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenuNodeBase.php 59361 2013-03-13 23:10:27Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuNodeTree.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuNodeTree.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenuNodeTree.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuNotOnActiveTreeFilter.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuNotOnActiveTreeFilter.php 60342 2014-01-03 17:12:22Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenuNotOnActiveTreeFilter.php 60342 2014-01-03 17:12:22Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuProvider.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuProvider.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenuProvider.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuRenderer.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuRenderer.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenuRenderer.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/RokMenuTheme.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: RokMenuTheme.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: RokMenuTheme.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/librokmenu/includes.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: includes.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: includes.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/providers/GantryMenuProviderWordpress.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: GantryMenuProviderWordpress.php 60817 2014-05-11 11:31:40Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: GantryMenuProviderWordpress.php 60817 2014-05-11 11:31:40Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/libs/renderers/GantryMenuRendererWordpress.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: GantryMenuRendererWordpress.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: GantryMenuRendererWordpress.php 58623 2012-12-15 22:01:32Z btowles $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/gantrymenu/themes/default/js/responsive-selectbox.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/*!
|
2 |
* @version $Id: responsive-selectbox.js 8885 2013-03-28 17:38:51Z djamil $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/*!
|
2 |
* @version $Id: responsive-selectbox.js 8885 2013-03-28 17:38:51Z djamil $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
widgets/gantrymenu/themes/default/js/responsive.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/*!
|
2 |
* @version $Id: responsive.js 4586 2012-10-27 01:50:24Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/*!
|
2 |
* @version $Id: responsive.js 4586 2012-10-27 01:50:24Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
widgets/gantrymenu/themes/default/js/rokmediaqueries.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/*!
|
2 |
* @version $Id: rokmediaqueries.js 4586 2012-10-27 01:50:24Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/*!
|
2 |
* @version $Id: rokmediaqueries.js 4586 2012-10-27 01:50:24Z btowles $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
widgets/gantrymenu/themes/default/js/sidemenu.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/*!
|
2 |
* @version $Id: sidemenu.js 14307 2013-10-08 15:44:26Z djamil $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
-
* @copyright Copyright (C) 2007 -
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
1 |
/*!
|
2 |
* @version $Id: sidemenu.js 14307 2013-10-08 15:44:26Z djamil $
|
3 |
* @author RocketTheme http://www.rockettheme.com
|
4 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
5 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
6 |
*/
|
7 |
|
widgets/iphonemenu.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: iphonemenu.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: iphonemenu.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/links.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: links.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Links Widget.
|
2 |
/**
|
3 |
* @version $Id: links.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Links Widget.
|
widgets/loginbutton.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version 4.1.
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version 4.1.15 June 14, 2018
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/loginform.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* @version 4.1.
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* @version 4.1.15 June 14, 2018
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/logo.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: logo.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: logo.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/menu.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: menu.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: menu.php 61659 2016-03-08 17:22:12Z matias $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/meta.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: meta.php 61614 2015-12-09 11:12:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Meta Widget.
|
2 |
/**
|
3 |
* @version $Id: meta.php 61614 2015-12-09 11:12:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Meta Widget.
|
widgets/overridesmap.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: overridesmap.php 61614 2015-12-09 11:12:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: overridesmap.php 61614 2015-12-09 11:12:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/pages.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: pages.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Pages Widget.
|
2 |
/**
|
3 |
* @version $Id: pages.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Pages Widget.
|
widgets/recentcomments.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: recentcomments.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Recent Comments Widget.
|
2 |
/**
|
3 |
* @version $Id: recentcomments.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Recent Comments Widget.
|
widgets/recentposts.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: recentposts.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Recent Posts Widget.
|
2 |
/**
|
3 |
* @version $Id: recentposts.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*
|
8 |
* Widget based on the WordPress core Recent Posts Widget.
|
widgets/resetsettings.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: resetsettings.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: resetsettings.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/totop.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: totop.php 61614 2015-12-09 11:12:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: totop.php 61614 2015-12-09 11:12:41Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
widgets/viewswitcher.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* @version $Id: viewswitcher.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
-
* @copyright Copyright (C) 2007 -
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|
2 |
/**
|
3 |
* @version $Id: viewswitcher.php 60832 2014-05-12 09:47:23Z jakub $
|
4 |
* @author RocketTheme http://www.rockettheme.com
|
5 |
+
* @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
|
6 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
|
7 |
*/
|
8 |
|