Version Description
- PHP 7.2+ fixes
- Sanitisation on GET functions
Download this release
Release Info
Developer | wipeoutmedia |
Plugin | CSS & JavaScript Toolbox |
Version | 9.0 |
Comparing to | |
See all releases |
Code changes from version 8.4.2 to 9.0
- access.points/ajax.accesspoint.php +0 -0
- access.points/autoupgrade.accesspoint.php +0 -0
- access.points/dashboardmetabox.accesspoint.php +10 -10
- access.points/extensions.accesspoint.php +42 -16
- access.points/installer.accesspoint.php +42 -16
- access.points/main.accesspoint.php +0 -0
- access.points/manage.accesspoint.php +12 -12
- access.points/metabox.accesspoint.php +0 -0
- access.points/packages.accesspoint.php +19 -19
- autoload.inc.php +0 -0
- composer.json +0 -0
- configuration.inc.php +0 -0
- controllers/auto-upgrade.php +0 -0
- controllers/block-ajax.php +0 -0
- controllers/block.php +25 -25
- controllers/blocks-ajax.php +43 -43
- controllers/blocks-backups.php +0 -0
- controllers/blocks-coupling.php +212 -212
- controllers/blocks.php +0 -0
- controllers/code-files.php +11 -11
- controllers/coupling/html/load-footer-style.html.php +0 -0
- controllers/coupling/js/footer-stylesheet-loader.js +0 -0
- controllers/coupling/shortcode/block/block.php +0 -0
- controllers/coupling/shortcode/shortcode.php +0 -0
- controllers/default.php +0 -0
- controllers/installer.php +0 -0
- controllers/metabox.php +43 -20
- controllers/package-file.php +0 -0
- controllers/package.php +0 -0
- controllers/packages.php +0 -0
- controllers/settings.php +0 -0
- controllers/setup.php +0 -0
- controllers/template.php +0 -0
- controllers/templates-lookup.php +0 -0
- controllers/templates-manager.php +0 -0
- css-javascript-toolbox.xml +0 -0
- css-js-toolbox.class.php +0 -0
- css-js-toolbox.php +104 -104
- docs/CJT_V6_User_Manual.pdf +0 -0
- framework/CJTStoreUpdate.class.php +0 -0
- framework/PluggableHelper.abstract.php +0 -0
- framework/ServicesAPI/Exceptions.class.php +0 -0
- framework/ServicesAPI/Module.class.php +0 -0
- framework/ServicesAPI/Services.class.php +0 -0
- framework/ServicesAPI/Store.php +0 -0
- framework/ServicesFW/Ajax.Service.class.php +0 -0
- framework/ServicesFW/Controller.class.php +0 -0
- framework/ServicesFW/Dashboard.Service.class.php +0 -0
- framework/ServicesFW/EntityModel.class.php +0 -0
- framework/ServicesFW/Form.class.php +0 -0
- framework/ServicesFW/HTTPRequestRouter.class.php +0 -0
- framework/ServicesFW/Installer.abstract.php +0 -0
- framework/ServicesFW/Model.abstract.php +0 -0
- framework/ServicesFW/PluginBase.class.php +0 -0
- framework/ServicesFW/PluginBase.interface.php +0 -0
- framework/ServicesFW/Shortcode.service.class.php +0 -0
- framework/ServicesFW/Storage.abstract.php +0 -0
- framework/ServicesFW/View.class.php +0 -0
- framework/ServicesFW/ViewJson.class.php +0 -0
- framework/ServicesFW/ViewTemplates/MessagesList.html +0 -0
- framework/ServicesFW/Wordpress.service.abstract.php +0 -0
- framework/access-points/access-point.class.php +0 -0
- framework/access-points/directory-spider.class.php +0 -0
- framework/access-points/page.class.php +0 -0
- framework/autoload/loader.php +0 -0
- framework/css/error-dialog.css +0 -0
- framework/css/forms.css +0 -0
- framework/css/images/dialog-error.png +0 -0
- framework/css/images/divider.png +0 -0
- framework/css/images/loading.gif +0 -0
- framework/css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- framework/css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- framework/css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- framework/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- framework/css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- framework/css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- framework/css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- framework/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- framework/css/images/ui-icons_222222_256x240.png +0 -0
- framework/css/images/ui-icons_2e83ff_256x240.png +0 -0
- framework/css/images/ui-icons_454545_256x240.png +0 -0
- framework/css/images/ui-icons_888888_256x240.png +0 -0
- framework/css/images/ui-icons_cd0a0a_256x240.png +0 -0
- framework/css/jquery-ui-1.8.21.custom.css +0 -0
- framework/css/toolbox.css +0 -0
- framework/db/mysql/driver/exception/invalidkey.php +0 -0
- framework/db/mysql/queue-driver.inc.php +0 -0
- framework/db/mysql/single-table-simple-view.inc.php +0 -0
- framework/db/mysql/sql-view.inc.php +0 -0
- framework/db/mysql/table.inc.php +0 -0
- framework/db/mysql/xtable.inc.php +0 -0
- framework/developer/developer.php +0 -0
- framework/developer/interface/block/parameters/parameters.php +0 -0
- framework/developer/interface/block/parameters/types/array.php +0 -0
- framework/developer/interface/block/parameters/types/base/abstract.php +0 -0
- framework/developer/interface/block/parameters/types/base/factory.php +0 -0
- framework/developer/interface/block/parameters/types/base/list.php +0 -0
- framework/developer/interface/block/parameters/types/base/scalar.php +0 -0
- framework/developer/interface/block/parameters/types/boolean.php +0 -0
- framework/developer/interface/block/parameters/types/interface/type.php +0 -0
- framework/developer/interface/block/parameters/types/list.php +6 -6
- framework/developer/interface/block/parameters/types/number.php +0 -0
- framework/developer/interface/block/parameters/types/raw.php +0 -0
- framework/developer/interface/block/parameters/types/structure.php +0 -0
- framework/developer/interface/block/parameters/types/text.php +0 -0
- framework/developer/interface/block/shortcode/parameters/base/abstract.php +0 -0
- framework/developer/interface/block/shortcode/parameters/base/list.php +0 -0
- framework/developer/interface/block/shortcode/parameters/base/scalar.php +0 -0
- framework/developer/interface/block/shortcode/parameters/factory.php +0 -0
- framework/developer/interface/block/shortcode/parameters/interface/type.php +0 -0
- framework/developer/interface/block/shortcode/parameters/parameters.php +0 -0
- framework/developer/interface/block/shortcode/parameters/types/array.php +0 -0
- framework/developer/interface/block/shortcode/parameters/types/boolean.php +0 -0
- framework/developer/interface/block/shortcode/parameters/types/list.php +0 -0
- framework/developer/interface/block/shortcode/parameters/types/number.php +0 -0
- framework/developer/interface/block/shortcode/parameters/types/raw.php +0 -0
- framework/developer/interface/block/shortcode/parameters/types/structure.php +0 -0
- framework/developer/interface/block/shortcode/parameters/types/text.php +0 -0
- framework/developer/interface/block/shortcode/segments/segments.php +0 -0
- framework/developer/interface/block/shortcode/shortcode.php +0 -0
- framework/developer/lib/template/template.php +0 -0
- framework/events/definition.class.php +0 -0
- framework/events/events.class.php +57 -57
- framework/events/hookable.class.php +0 -0
- framework/events/hookable.interface.php +0 -0
- framework/events/observers/observer.interface.php +0 -0
- framework/events/observers/observer.observer.php +0 -0
- framework/events/observers/wordpress-hook-action.observer.php +0 -0
- framework/events/observers/wordpress-hook-filter.observer.php +0 -0
- framework/events/observers/wordpress-hook.observer.php +0 -0
- framework/events/subjects/action.subject.php +0 -0
- framework/events/subjects/filter.subject.php +0 -0
- framework/events/subjects/hook.subject.php +0 -0
- framework/events/subjects/subject.interface.php +0 -0
- framework/events/subjects/subject.subject.php +54 -54
- framework/events/wordpress.class.php +16 -16
- framework/exceptions.inc.php +0 -0
- framework/extensions/extensions.class.php +63 -63
- framework/extensions/package/activator.php +0 -0
- framework/extensions/package/blocks.php +0 -0
- framework/extensions/package/extension.php +0 -0
- framework/extensions/package/state/extension.php +0 -0
- framework/extensions/package/state/packages.php +0 -0
- framework/html/component.class.php +0 -0
- framework/html/components/checkbox-list/checkbox-list.class.php +0 -0
- framework/html/components/checkbox-list/public/css/checkbox-list.css +0 -0
- framework/html/components/checkbox-list/tmpl/checkbox-list.html.tmpl +0 -0
- framework/html/dom/element/script.php +0 -0
- framework/html/dom/elementbase.php +0 -0
- framework/html/field.inc.php +0 -0
- framework/html/list.php +0 -0
- framework/index.php +0 -0
- framework/installer/dbfile.class.php +0 -0
- framework/installer/reflection.class.php +0 -0
- framework/js/ace/ChangeLog.txt +0 -0
- framework/js/ace/ace.js +0 -0
- framework/js/ace/ext-searchbox.js +0 -0
- framework/js/ace/ext-settings_menu.js +0 -0
- framework/js/ace/ext-statusbar.js +0 -0
- framework/js/ace/keybinding-emacs.js +0 -0
- framework/js/ace/keybinding-vim.js +0 -0
- framework/js/ace/mode-css.js +0 -0
- framework/js/ace/mode-html.js +0 -0
- framework/js/ace/mode-javascript.js +0 -0
- framework/js/ace/mode-php.js +0 -0
- framework/js/ace/pluggable/pluggable.js +0 -0
- framework/js/ace/worker-css.js +0 -0
- framework/js/ace/worker-javascript.js +0 -0
- framework/js/ace/worker-php.js +0 -0
- framework/js/ajax/cjt-module-server/cjt-module-server.js +0 -0
- framework/js/ajax/cjt-server-queue/cjt-server-queue.js +0 -0
- framework/js/ajax/cjt-server/cjt-server.js +0 -0
- framework/js/ajax/cjt-server/cjt-server.localization.php +0 -0
- framework/js/ajax/scripts-loader/scripts-loader.js +0 -0
- framework/js/ajax/styles-loader/styles-loader.js +0 -0
- framework/js/cookies/jquery.cookies.2.2.0/jquery.cookies.2.2.0.js +0 -0
- framework/js/hash/md5/md5.js +0 -0
- framework/js/installer/installer.js +0 -0
- framework/js/misc/simple-error-dialog/simple-error-dialog.js +0 -0
- framework/js/misc/simple-error-dialog/simple-error-dialog.localization.php +2 -2
- framework/js/ui/jquery.link-progress/jquery.link-progress.js +0 -0
- framework/js/ui/jquery.toolbox/jquery.toolbox.js +0 -0
- framework/js/utilities/utilities.js +0 -0
- framework/js/wordpress/script-localizer/script-localizer.js +0 -0
- framework/mvc/controller-ajax.inc.php +0 -0
- framework/mvc/controller.inc.php +0 -0
- framework/mvc/model.inc.php +0 -0
- framework/mvc/view.inc.php +0 -0
- framework/packages/package.class.php +0 -0
- framework/php/evaluator/evaluator.inc.php +0 -0
- framework/php/includes.class.php +0 -0
- framework/settings/page.inc.php +0 -0
- framework/types/attributes.class.php +0 -0
- framework/version/version.php +0 -0
- framework/view/block/parameter/base/abstract.php +0 -0
- framework/view/block/parameter/base/abstract/template/helpText.phtml +0 -0
- framework/view/block/parameter/base/list.php +0 -0
- framework/view/block/parameter/base/scalar.php +0 -0
- framework/view/block/parameter/grouper/factory.php +0 -0
- framework/view/block/parameter/grouper/tab/index.phtml +0 -0
- framework/view/block/parameter/grouper/tab/public/css/tab.css +0 -0
- framework/view/block/parameter/grouper/tab/tab.php +0 -0
- framework/view/block/parameter/interface/type.php +0 -0
- framework/view/block/parameter/parameters.php +0 -0
- framework/view/block/parameter/renderer/array/array.php +0 -0
- framework/view/block/parameter/renderer/array/index.phtml +0 -0
- framework/view/block/parameter/renderer/checkbox/checkbox.php +0 -0
- framework/view/block/parameter/renderer/checkbox/index.phtml +0 -0
- framework/view/block/parameter/renderer/dropdown/dropdown.php +0 -0
- framework/view/block/parameter/renderer/dropdown/index.phtml +0 -0
- framework/view/block/parameter/renderer/factory.php +0 -0
- framework/view/block/parameter/renderer/imageslist/imageslist.php +0 -0
- framework/view/block/parameter/renderer/imageslist/index.phtml +0 -0
- framework/view/block/parameter/renderer/imageslist/public/css/imageslist.css +0 -0
- framework/view/block/parameter/renderer/imageslist/public/js/imageslist/imageslist.js +0 -0
- framework/view/block/parameter/renderer/imageslist/public/js/imageslist/imageslist.localization.php +2 -2
- framework/view/block/parameter/renderer/input/index.phtml +0 -0
- framework/view/block/parameter/renderer/input/input.php +0 -0
- framework/view/block/parameter/renderer/input/public/css/input.css +0 -0
- framework/view/block/parameter/renderer/list/index.phtml +0 -0
- framework/view/block/parameter/renderer/list/list.php +0 -0
- framework/view/block/parameter/renderer/structure/index.phtml +0 -0
- framework/view/block/parameter/renderer/structure/public/css/structure.css +0 -0
- framework/view/block/parameter/renderer/structure/structure.php +0 -0
- framework/view/block/parameter/renderer/textarea/index.phtml +0 -0
- framework/view/block/parameter/renderer/textarea/textarea.php +0 -0
- framework/wordpress/currentversion.php +0 -0
- framework/wordpress/feed.php +0 -0
- framework/xml/fetchscalars.php +0 -0
- includes/html/incompatible_environment_message.html.php +0 -0
- includes/index.php +0 -0
- includes/installer/installer/db/mysql/structure.sql +0 -0
- includes/installer/installer/includes/templates/wordpress-queue.inc.php +0 -0
- includes/installer/installer/installer.class.php +0 -0
- includes/installer/upgrade/0.2/includes/block.class.php +0 -0
- includes/installer/upgrade/0.2/upgrade.class.php +0 -0
- includes/installer/upgrade/0.3/includes/backup.class.php +0 -0
- includes/installer/upgrade/0.3/includes/block.class.php +0 -0
- includes/installer/upgrade/0.3/upgrade.class.php +0 -0
- includes/installer/upgrade/1.0-CE/db/mysql/structure.sql +0 -0
- includes/installer/upgrade/1.0-CE/upgrade.class.php +0 -0
- includes/installer/upgrade/1.0/db/mysql/structure.sql +0 -0
- includes/installer/upgrade/1.0/upgrade.class.php +0 -0
- includes/installer/upgrade/1.1-CE/db/mysql/structure.sql +0 -0
- includes/installer/upgrade/1.1-CE/upgrade.class.php +0 -0
- includes/installer/upgrade/1.1/db/mysql/structure.sql +0 -0
- includes/installer/upgrade/1.1/upgrade.class.php +0 -0
- includes/installer/upgrade/1.2/db/mysql/structure.sql +0 -0
- includes/installer/upgrade/1.2/upgrade.class.php +0 -0
- includes/installer/upgrade/1.3/db/mysql/structure.sql +0 -0
- includes/installer/upgrade/1.3/upgrade.class.php +0 -0
- includes/installer/upgrade/1.4/db/mysql/structure.sql +0 -0
- includes/installer/upgrade/1.4/upgrade.class.php +0 -0
- includes/installer/upgrade/1.5/upgrade.class.php +0 -0
- includes/installer/upgrade/block.class.php +0 -0
- includes/installer/upgrade/template.class.php +0 -0
- includes/installer/upgrade/upgrade.class.php +0 -0
- includes/templates/templates.class.php +0 -0
- index.php +0 -0
- license.txt +0 -0
- locals/languages/css-javascript-toolbox-en_US.mo +0 -0
- locals/languages/css-javascript-toolbox-en_US.po +3 -3
- locals/strings.inc.php +0 -0
- models/block-templates.php +0 -0
- models/block.php +0 -0
- models/block/assignmentpanel/auxiliary.php +0 -0
- models/block/assignmentpanel/auxiliarybase.php +0 -0
- models/block/assignmentpanel/auxiliarypinned.php +0 -0
- models/block/assignmentpanel/base.php +0 -0
- models/block/assignmentpanel/helpers/auxiliary.php +0 -0
- models/block/assignmentpanel/helpers/hierarchical.php +0 -0
- models/block/assignmentpanel/post.php +0 -0
- models/block/assignmentpanel/postbase.php +0 -0
- models/block/assignmentpanel/postpinned.php +0 -0
- models/block/assignmentpanel/taxonomy.php +0 -0
- models/block/assignmentpanel/taxonomybase.php +0 -0
- models/block/assignmentpanel/taxonomypinned.php +0 -0
- models/block/assignmentpanel/wordpress.php +0 -0
- models/block/parameters/base/parameters.php +0 -0
- models/block/parameters/form/groups.php +0 -0
- models/block/parameters/form/parameter.php +0 -0
- models/block/parameters/form/parameters.php +0 -0
- models/block/parameters/form/value.php +0 -0
- models/block/parameters/parameter.php +0 -0
- models/block/parameters/parameters.php +0 -0
- models/blocks-backups.php +0 -0
- models/blocks.php +0 -0
- models/coupling.php +0 -0
- models/extensions.php +0 -0
- models/fields/template-authors.php +0 -0
- models/fields/template-creation-dates.php +0 -0
- models/fields/template-development-states.php +0 -0
- models/fields/template-last-modified-dates.php +0 -0
- models/fields/template-owners.php +0 -0
- models/fields/template-states.php +0 -0
- models/fields/template-types.php +0 -0
- models/fields/template-versions.php +0 -0
- models/formgroups.php +0 -0
- models/forms.php +0 -0
- models/installer.php +0 -0
- models/metabox.php +0 -0
- models/package-file.php +0 -0
- models/package.php +0 -0
- models/package/block.php +0 -0
- models/package/xml/definition/abstract.php +0 -0
- models/package/xml/definition/frag/frag.php +0 -0
- models/package/xml/definition/frag/frag/block.php +0 -0
- models/package/xml/definition/frag/frag/block/files.php +0 -0
- models/package/xml/definition/frag/frag/block/files/file.php +0 -0
- models/package/xml/definition/frag/frag/block/links.php +0 -0
- models/package/xml/definition/frag/frag/block/links/link.php +0 -0
- models/package/xml/definition/frag/frag/block/links/link/package.php +0 -0
- models/package/xml/definition/frag/frag/block/package.php +0 -0
- models/package/xml/definition/frag/frag/block/params.php +0 -0
- models/package/xml/definition/frag/frag/block/params/form.php +0 -0
- models/package/xml/definition/frag/frag/block/params/form/groups.php +0 -0
- models/package/xml/definition/frag/frag/block/params/form/groups/group.php +0 -0
- models/package/xml/definition/frag/frag/block/params/form/groups/group/xfields.php +0 -0
- models/package/xml/definition/frag/frag/block/params/list.php +0 -0
- models/package/xml/definition/frag/frag/block/params/list/param.php +0 -0
- models/package/xml/definition/frag/frag/block/params/list/param/group.php +0 -0
- models/package/xml/definition/frag/frag/block/params/list/param/group/definition.php +0 -0
- models/package/xml/definition/frag/frag/block/params/list/param/group/definition/type.php +0 -0
- models/package/xml/definition/frag/frag/block/params/list/param/group/rendererParams.php +0 -0
- models/package/xml/definition/frag/frag/block/params/list/param/params.php +0 -0
- models/package/xml/definition/frag/frag/block/params/list/param/typeParams.php +0 -0
- models/package/xml/definition/frag/frag/block/params/list/param/typeparams/param.php +0 -0
- models/package/xml/definition/frag/frag/package.php +0 -0
- models/package/xml/definition/frag/frag/template.php +0 -0
- models/package/xml/definition/frag/frag/template/folders.php +0 -0
- models/package/xml/definition/frag/frag/template/folders/folder.php +0 -0
- models/package/xml/definition/frag/frag/template/package.php +0 -0
- models/package/xml/definition/fragpackage.php +0 -0
- models/package/xml/definition/interface/element.php +0 -0
- models/package/xml/definition/package/package.php +0 -0
- models/package/xml/definition/package/package/block.php +0 -0
- models/package/xml/definition/package/package/block/files.php +0 -0
- models/package/xml/definition/package/package/block/files/file.php +0 -0
- models/package/xml/definition/package/package/block/links.php +0 -0
- models/package/xml/definition/package/package/block/links/link.php +0 -0
- models/package/xml/definition/package/package/block/params.php +0 -0
- models/package/xml/definition/package/package/block/params/form.php +0 -0
- models/package/xml/definition/package/package/block/params/form/groups.php +0 -0
- models/package/xml/definition/package/package/block/params/form/groups/group.php +0 -0
- models/package/xml/definition/package/package/block/params/form/groups/group/xfields.php +0 -0
- models/package/xml/definition/package/package/block/params/list.php +0 -0
- models/package/xml/definition/package/package/block/params/list/param.php +0 -0
- models/package/xml/definition/package/package/block/params/list/param/group.php +0 -0
- models/package/xml/definition/package/package/block/params/list/param/group/definition.php +0 -0
- models/package/xml/definition/package/package/block/params/list/param/group/definition/type.php +0 -0
- models/package/xml/definition/package/package/block/params/list/param/group/rendererParams.php +0 -0
- models/package/xml/definition/package/package/block/params/list/param/params.php +0 -0
- models/package/xml/definition/package/package/block/params/list/param/typeParams.php +0 -0
- models/package/xml/definition/package/package/block/params/list/param/typeparams/param.php +0 -0
- models/package/xml/definition/package/package/objects.php +0 -0
- models/package/xml/definition/package/package/objects/object.php +0 -0
- models/package/xml/definition/package/package/template.php +0 -0
- models/package/xml/definition/package/package/template/folders.php +0 -0
- models/package/xml/definition/package/package/template/folders/folder.php +0 -0
- models/package/xml/definition/packagehelper.php +0 -0
- models/package/xml/factory.php +0 -0
- models/packages.php +0 -0
- models/parameters.php +0 -0
- models/settings.php +0 -0
- models/settings/metabox.php +0 -0
- models/settings/uninstall.php +0 -0
- models/setup.php +33 -33
- models/statistics-metabox.php +0 -0
- models/template.php +32 -32
- models/templates-lookup.php +0 -0
- models/templates-manager.php +0 -0
- models/tinymce-blocks.php +0 -0
- models/uninstall.php +0 -0
- models/xblock.php +0 -0
- readme.txt +37 -41
- tables/author.php +0 -0
- tables/backups.php +0 -0
- tables/block-files.php +0 -0
- tables/block-pins.php +0 -0
- tables/block-template.php +0 -0
- tables/block.php +0 -0
- tables/blocks.php +0 -0
- tables/form-group-xfields.php +0 -0
- tables/form-group.php +0 -0
- tables/form.php +0 -0
- tables/group-parameter.php +0 -0
- tables/package-objects.php +0 -0
- tables/package.php +0 -0
- tables/parameter-typedef.php +0 -0
- tables/parameter-typeparams.php +0 -0
- tables/parameter.php +0 -0
- tables/pins-blocks-view.php +0 -0
- tables/template-revision.php +0 -0
- tables/template.php +0 -0
- vendor/autoload.php +0 -0
- vendor/composer/ClassLoader.php +0 -0
- vendor/composer/autoload_classmap.php +0 -0
- vendor/composer/autoload_namespaces.php +0 -0
- vendor/composer/autoload_psr4.php +0 -0
- vendor/composer/autoload_real.php +0 -0
- views/backups/manager/public/css/backups.css +0 -0
- views/backups/manager/public/js/backups/backups.js +0 -0
- views/backups/manager/public/js/backups/backups.localization.php +0 -0
- views/backups/manager/tmpl/default.html.tmpl +0 -0
- views/backups/manager/tmpl/form.html.tmpl +0 -0
- views/backups/manager/tmpl/list.html.tmpl +0 -0
- views/backups/manager/tmpl/single-backup.html.tmpl +0 -0
- views/backups/manager/view.php +21 -21
- views/blocks/block/public/css/block-wp-lt-3.8.css +0 -0
- views/blocks/block/public/css/block.css +11 -11
- views/blocks/block/public/css/codefile.css +0 -0
- views/blocks/block/public/images/edit-block-name/cancel.png +0 -0
- views/blocks/block/public/images/edit-block-name/save.png +0 -0
- views/blocks/block/public/images/toolbox/active.png +0 -0
- views/blocks/block/public/images/toolbox/cancel-restore.png +0 -0
- views/blocks/block/public/images/toolbox/delete.png +0 -0
- views/blocks/block/public/images/toolbox/edit-name.png +0 -0
- views/blocks/block/public/images/toolbox/editor-languages/css.png +0 -0
- views/blocks/block/public/images/toolbox/editor-languages/html.png +0 -0
- views/blocks/block/public/images/toolbox/editor-languages/javascript.png +0 -0
- views/blocks/block/public/images/toolbox/editor-languages/php.png +0 -0
- views/blocks/block/public/images/toolbox/footer-hook.png +0 -0
- views/blocks/block/public/images/toolbox/header-hook.png +0 -0
- views/blocks/block/public/images/toolbox/inactive.png +0 -0
- views/blocks/block/public/images/toolbox/info.png +0 -0
- views/blocks/block/public/images/toolbox/restore.png +0 -0
- views/blocks/block/public/images/toolbox/save-inactive.png +0 -0
- views/blocks/block/public/images/toolbox/save.gif +0 -0
- views/blocks/block/public/images/toolbox/shortcode.png +0 -0
- views/blocks/block/public/images/toolbox/switch-language.png +0 -0
- views/blocks/block/public/images/toolbox/templates-lookup.png +0 -0
- views/blocks/block/public/js/ajax/ajax.js +0 -0
- views/blocks/block/public/js/block/block.js +0 -0
- views/blocks/block/public/js/blockproperty/blockproperty.js +0 -0
- views/blocks/block/public/js/codefile-manager/codefile-manager.js +0 -0
- views/blocks/block/public/js/codefile-manager/codefile-manager.localization.php +2 -2
- views/blocks/block/public/js/codefile/codefile.js +0 -0
- views/blocks/block/public/js/jquery.block/jquery.block.js +0 -0
- views/blocks/block/public/js/jquery.block/jquery.block.localization.php +2 -2
- views/blocks/block/public/js/optional/revision/revision.js +0 -0
- views/blocks/block/public/js/plugins/dockmodule.js +0 -0
- views/blocks/block/tmpl/codefile/codefile.html.tmpl +0 -0
- views/blocks/block/tmpl/content.html.tmpl +0 -0
- views/blocks/block/tmpl/edit.html.tmpl +0 -0
- views/blocks/block/tmpl/templates/editor-toolbox.html.tmpl +0 -0
- views/blocks/block/tmpl/templates/toolbox.html.tmpl +0 -0
- views/blocks/block/view.php +0 -0
- views/blocks/cjt-block/public/css/block-wp-lt-3.8.css +0 -0
- views/blocks/cjt-block/public/css/block.css +9 -9
- views/blocks/cjt-block/public/images/pages-panel/pagination.png +0 -0
- views/blocks/cjt-block/public/js/block/block.js +0 -0
- views/blocks/cjt-block/public/js/blockproperty/blockproperty.js +0 -0
- views/blocks/cjt-block/public/js/jquery.assignpanel/jquery.assignpanel.js +0 -0
- views/blocks/cjt-block/public/js/jquery.block/jquery.block.js +0 -0
- views/blocks/cjt-block/public/js/jquery.block/jquery.block.localization.php +2 -2
- views/blocks/cjt-block/public/js/optional/pagination.list/pagination.list.js +0 -0
- views/blocks/cjt-block/public/js/optional/revision/revision.js +0 -0
- views/blocks/cjt-block/tmpl/default.html.tmpl +0 -0
- views/blocks/cjt-block/tmpl/new.html.tmpl +0 -0
- views/blocks/cjt-block/tmpl/templates/assign-panel/default.html.tmpl +0 -0
- views/blocks/cjt-block/tmpl/templates/assign-panel/templates/advanced.html.tmpl +0 -0
- views/blocks/cjt-block/tmpl/templates/assign-panel/templates/auxiliarity.html.tmpl +0 -0
- views/blocks/cjt-block/tmpl/templates/assign-panel/templates/custom-posts.html.tmpl +0 -0
- views/blocks/cjt-block/tmpl/templates/assign-panel/templates/inputs-list.html.tmpl +0 -0
- views/blocks/cjt-block/tmpl/templates/assign-panel/templates/objects-list.html.tmpl +0 -0
- views/blocks/cjt-block/tmpl/templates/assign-panel/templates/tab.html.tmpl +0 -0
- views/blocks/cjt-block/view.php +0 -0
- views/blocks/create-metabox/public/css/metabox.css +0 -0
- views/blocks/create-metabox/public/js/metabox/metabox.js +0 -0
- views/blocks/create-metabox/public/js/metabox/metabox.localization.php +2 -2
- views/blocks/create-metabox/tmpl/create.html.tmpl +0 -0
- views/blocks/create-metabox/view.php +0 -0
- views/blocks/info/tmpl/default.html.tmpl +0 -0
- views/blocks/info/view.php +0 -0
- views/blocks/manager/public/css/blocks-wp-lt-3.8.css +0 -0
- views/blocks/manager/public/css/blocks.css +22 -7
- views/blocks/manager/public/images/CJT_Free_Promo_Banner.png +0 -0
- views/blocks/manager/public/images/CSS_JS_Toolbox_Icon.png +0 -0
- views/blocks/manager/public/images/css-js-toolbox-logo.png +0 -0
- views/blocks/manager/public/images/get-packages.png +0 -0
- views/blocks/manager/public/images/index.php +0 -0
- views/blocks/manager/public/images/menu.svg +12 -0
- views/blocks/manager/public/images/toolbox/add-new.png +0 -0
- views/blocks/manager/public/images/toolbox/admin-tools.png +0 -0
- views/blocks/manager/public/images/toolbox/backup.png +0 -0
- views/blocks/manager/public/images/toolbox/cancel-restore.png +0 -0
- views/blocks/manager/public/images/toolbox/restore.png +0 -0
- views/blocks/manager/public/images/toolbox/save-changes-inactive.png +0 -0
- views/blocks/manager/public/images/toolbox/save-changes.png +0 -0
- views/blocks/manager/public/images/toolbox/settings.png +0 -0
- views/blocks/manager/public/images/toolbox/templates-manager.png +0 -0
- views/blocks/manager/public/js/ajax-multioperation/ajax-multioperation.js +0 -0
- views/blocks/manager/public/js/blocks-page/blocks-page.js +0 -0
- views/blocks/manager/public/js/blocks-page/blocks-page.localization.php +2 -2
- views/blocks/manager/public/js/blocks/blocks.js +0 -0
- views/blocks/manager/tmpl/blocks.html.tmpl +19 -9
- views/blocks/manager/tmpl/help/intro.html.tmpl +0 -0
- views/blocks/manager/tmpl/toolbox.html.tmpl +0 -0
- views/blocks/manager/view.php +0 -0
- views/blocks/metabox/public/css/metabox.css +0 -0
- views/blocks/metabox/public/images/editor-toolbox/preview.png +0 -0
- views/blocks/metabox/public/js/block/block.js +0 -0
- views/blocks/metabox/public/js/jquery.block/jquery.block.js +0 -0
- views/blocks/metabox/public/js/jquery.block/jquery.block.localization.php +2 -2
- views/blocks/metabox/public/js/metabox/metabox.js +0 -0
- views/blocks/metabox/public/js/metabox/metabox.localization.php +2 -2
- views/blocks/metabox/public/js/optional/revision/revision.js +0 -0
- views/blocks/metabox/tmpl/metabox.html.tmpl +0 -0
- views/blocks/metabox/view.php +0 -0
- views/blocks/new/public/css/add-new-block.css +0 -0
- views/blocks/new/public/js/add-new-block/add-new-block.js +0 -0
- views/blocks/new/public/js/add-new-block/add-new-block.localization.php +2 -2
- views/blocks/new/tmpl/default.html.tmpl +0 -0
- views/blocks/new/view.php +12 -12
- views/blocks/revisions/public/js/revisions/revisions.js +0 -0
- views/blocks/revisions/tmpl/default.html.tmpl +0 -0
- views/blocks/revisions/view.php +12 -12
- views/dashboard/metabox/statistics/public/css/default.css +0 -0
- views/dashboard/metabox/statistics/public/js/default/default.js +0 -0
- views/dashboard/metabox/statistics/tmpl/default.html.tmpl +0 -0
- views/dashboard/metabox/statistics/view.php +0 -0
- views/extensions/plugins-list/public/css/extensions.css +0 -0
- views/extensions/plugins-list/public/css/plugins.css +0 -0
- views/extensions/plugins-list/public/images/extensions/icon32.png +0 -0
- views/extensions/plugins-list/public/js/default/default.js +0 -0
- views/extensions/plugins-list/public/js/default/default.localization.php +2 -2
- views/extensions/plugins-list/public/js/extensions/extensions.js +0 -0
- views/extensions/plugins-list/public/js/extensions/extensions.localization.php +2 -2
- views/extensions/plugins-list/public/js/plugins/plugins.js +0 -0
- views/extensions/plugins-list/public/js/plugins/plugins.localization.php +2 -2
- views/extensions/plugins-list/tmpl/default.html.tmpl +0 -0
- views/extensions/plugins-list/tmpl/default_setup_action.html.tmpl +0 -0
- views/extensions/plugins-list/view.php +23 -23
- views/installer/install/public/css/default.css +0 -0
- views/installer/install/public/images/error.png +0 -0
- views/installer/install/public/images/installed.png +0 -0
- views/installer/install/public/images/progress.gif +0 -0
- views/installer/install/public/js/default/default.js +0 -0
- views/installer/install/public/js/default/default.localization.php +6 -6
- views/installer/install/tmpl/default.html.tmpl +0 -0
- views/installer/install/tmpl/default_operation.html.tmpl +0 -0
- views/installer/install/tmpl/default_operations_list.html.tmpl +0 -0
- views/installer/install/tmpl/upgrade.html.tmpl +0 -0
- views/installer/install/tmpl/upgrades/02.operations +0 -0
- views/installer/install/tmpl/upgrades/03.operations +0 -0
- views/installer/install/tmpl/upgrades/10.operations +0 -0
- views/installer/install/tmpl/upgrades/10ce.operations +0 -0
- views/installer/install/tmpl/upgrades/11.operations +0 -0
- views/installer/install/tmpl/upgrades/11ce.operations +0 -0
- views/installer/install/tmpl/upgrades/12.operations +0 -0
- views/installer/install/tmpl/upgrades/13.operations +0 -0
- views/installer/install/tmpl/upgrades/14.operations +0 -0
- views/installer/install/tmpl/upgrades/15.operations +0 -0
- views/installer/install/tmpl/upgrades/upgrade.html.tmpl +0 -0
- views/installer/install/view.php +0 -0
- views/installer/notice/public/js/default/default.js +0 -0
- views/installer/notice/public/js/default/default.localization.php +2 -2
- views/installer/notice/tmpl/default.html.tmpl +2 -2
- views/installer/notice/view.php +0 -0
- views/packages/install/public/css/install.css +0 -0
- views/packages/install/public/js/install/install.js +0 -0
- views/packages/install/public/js/install/install.localization.php +2 -2
- views/packages/install/tmpl/default.html.tmpl +0 -0
- views/packages/install/view.php +18 -18
- views/packages/manager/helpers/wp-list-table.inc.php +0 -0
- views/packages/manager/public/css/default.css +0 -0
- views/packages/manager/public/js/manager/manager.js +0 -0
- views/packages/manager/public/js/manager/manager.localization.php +2 -2
- views/packages/manager/tmpl/default.html.tmpl +0 -0
- views/packages/manager/view.php +0 -0
- views/packages/raw-file/tmpl/default.html.tmpl +0 -0
- views/packages/raw-file/view.php +0 -0
- views/settings/manager/public/css/default.css +0 -0
- views/settings/manager/public/js/settings/settings.js +0 -0
- views/settings/manager/tmpl/pages/metabox.html.tmpl +0 -0
- views/settings/manager/tmpl/pages/uninstall.html.tmpl +0 -0
- views/settings/manager/tmpl/settings.html.tmpl +0 -0
- views/settings/manager/view.php +0 -0
- views/setup/activation-form/public/css/default.css +0 -0
- views/setup/activation-form/public/images/activate.png +0 -0
- views/setup/activation-form/public/images/deactivate.png +0 -0
- views/setup/activation-form/public/images/error.png +0 -0
- views/setup/activation-form/public/images/invalid.png +0 -0
- views/setup/activation-form/public/images/reset.png +0 -0
- views/setup/activation-form/public/images/valid.png +0 -0
- views/setup/activation-form/public/js/default/default.js +0 -0
- views/setup/activation-form/public/js/default/default.localization.php +8 -8
- views/setup/activation-form/tmpl/default.html.tmpl +2 -2
- views/setup/activation-form/view.php +0 -0
- views/setup/setup/public/js/default/default.js +0 -0
- views/setup/setup/tmpl/default.html.tmpl +0 -0
- views/setup/setup/view.php +0 -0
- views/templates/info/tmpl/default.html.tmpl +0 -0
- views/templates/info/view.php +0 -0
- views/templates/lookup/public/css/lookup.css +3 -3
- views/templates/lookup/public/js/lookup/lookup.js +0 -0
- views/templates/lookup/public/js/lookup/lookup.localization.php +2 -2
- views/templates/lookup/tmpl/default.html.tmpl +24 -8
- views/templates/lookup/view.php +0 -0
- views/templates/manager/helpers/wp-list-table.inc.php +0 -0
- views/templates/manager/public/css/default.css +0 -0
- views/templates/manager/public/js/manager/manager.js +0 -0
- views/templates/manager/public/js/manager/manager.localization.php +2 -2
- views/templates/manager/tmpl/default.html.tmpl +0 -0
- views/templates/manager/view.php +0 -0
- views/templates/template/public/css/default.css +0 -0
- views/templates/template/public/js/template/template.js +0 -0
- views/templates/template/public/js/template/template.localization.php +2 -2
- views/templates/template/tmpl/default.html.tmpl +0 -0
- views/templates/template/view.php +17 -17
- views/uploader/single/public/css/uploader.css +0 -0
- views/uploader/single/public/js/uploader/uploader.js +0 -0
- views/uploader/single/tmpl/default.html.tmpl +0 -0
- views/uploader/single/view.php +13 -13
access.points/ajax.accesspoint.php
CHANGED
File without changes
|
access.points/autoupgrade.accesspoint.php
CHANGED
File without changes
|
access.points/dashboardmetabox.accesspoint.php
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
class CJTDashboardMetaboxAccessPoint extends CJTAccessPoint {
|
13 |
-
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
-
*
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
// Initialize Access Point base!
|
@@ -24,25 +24,25 @@ class CJTDashboardMetaboxAccessPoint extends CJTAccessPoint {
|
|
24 |
|
25 |
/**
|
26 |
* put your comment there...
|
27 |
-
*
|
28 |
*/
|
29 |
public function createMetabox() {
|
30 |
if (CJTPlugin::getInstance()->isInstalled()) {
|
31 |
-
wp_add_dashboard_widget('cjt-statistics', cssJSToolbox::getText('CSS &
|
32 |
}
|
33 |
}
|
34 |
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
-
*
|
38 |
*/
|
39 |
protected function doListen() {
|
40 |
add_action('wp_dashboard_setup', array(&$this, 'createMetabox'), 10, 0);
|
41 |
}
|
42 |
-
|
43 |
/**
|
44 |
* put your comment there...
|
45 |
-
*
|
46 |
*/
|
47 |
public function route($loadView = false, $request = null) {
|
48 |
// Load Auto Upgrade controller!
|
@@ -53,5 +53,5 @@ class CJTDashboardMetaboxAccessPoint extends CJTAccessPoint {
|
|
53 |
// fire action to enable automatic upgrade!
|
54 |
->_doAction();
|
55 |
}
|
56 |
-
|
57 |
} // End class.
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
class CJTDashboardMetaboxAccessPoint extends CJTAccessPoint {
|
13 |
+
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
+
*
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
// Initialize Access Point base!
|
24 |
|
25 |
/**
|
26 |
* put your comment there...
|
27 |
+
*
|
28 |
*/
|
29 |
public function createMetabox() {
|
30 |
if (CJTPlugin::getInstance()->isInstalled()) {
|
31 |
+
wp_add_dashboard_widget('cjt-statistics', cssJSToolbox::getText('CSS & JavaScript Toolbox News'), array($this, 'route'));
|
32 |
}
|
33 |
}
|
34 |
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
+
*
|
38 |
*/
|
39 |
protected function doListen() {
|
40 |
add_action('wp_dashboard_setup', array(&$this, 'createMetabox'), 10, 0);
|
41 |
}
|
42 |
+
|
43 |
/**
|
44 |
* put your comment there...
|
45 |
+
*
|
46 |
*/
|
47 |
public function route($loadView = false, $request = null) {
|
48 |
// Load Auto Upgrade controller!
|
53 |
// fire action to enable automatic upgrade!
|
54 |
->_doAction();
|
55 |
}
|
56 |
+
|
57 |
} // End class.
|
access.points/extensions.accesspoint.php
CHANGED
@@ -1,29 +1,29 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
class CJTExtensionsAccessPoint extends CJTAccessPoint {
|
13 |
-
|
14 |
/**
|
15 |
-
*
|
16 |
*/
|
17 |
const MENU_POSITION_INDEX = 2;
|
18 |
-
|
19 |
/**
|
20 |
-
*
|
21 |
*/
|
22 |
const PLUGINS_PAGE_SEARCH_TERM = 'css-javascript-toolbox';
|
23 |
-
|
24 |
/**
|
25 |
* put your comment there...
|
26 |
-
*
|
27 |
*/
|
28 |
public function __construct() {
|
29 |
// Initialize Access Point base!
|
@@ -34,7 +34,7 @@ class CJTExtensionsAccessPoint extends CJTAccessPoint {
|
|
34 |
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
-
*
|
38 |
*/
|
39 |
protected function doListen() {
|
40 |
// Only if permitted!
|
@@ -43,23 +43,49 @@ class CJTExtensionsAccessPoint extends CJTAccessPoint {
|
|
43 |
add_action('admin_menu', array(&$this, 'menu'), 13);
|
44 |
}
|
45 |
}
|
46 |
-
|
47 |
/**
|
48 |
* put your comment there...
|
49 |
-
*
|
50 |
*/
|
51 |
public function menu() {
|
52 |
// Extensions page.
|
53 |
-
add_submenu_page(CJTPlugin::PLUGIN_REQUEST_ID, null, cssJSToolbox::getText('Extensions'), 'administrator', null);
|
54 |
// Hack Extensions menu item to point to Plugins page!
|
55 |
-
$GLOBALS['submenu'][CJTPlugin::PLUGIN_REQUEST_ID][self::MENU_POSITION_INDEX][2] = admin_url('plugins.php?s=' . self::PLUGINS_PAGE_SEARCH_TERM);
|
56 |
// When plugins page loaded!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
add_action('load-plugins.php', array($this, 'route'), 10, 0);
|
58 |
}
|
59 |
-
|
60 |
/**
|
61 |
* put your comment there...
|
62 |
-
*
|
63 |
*/
|
64 |
public function route($loadView = null, $request = array('view' => 'extensions/plugins-list')) {
|
65 |
// Set as connected object!
|
@@ -71,7 +97,7 @@ class CJTExtensionsAccessPoint extends CJTAccessPoint {
|
|
71 |
// Dispatch the call!
|
72 |
->_doAction();
|
73 |
}
|
74 |
-
|
75 |
} // End class.
|
76 |
|
77 |
// Hookable!
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
class CJTExtensionsAccessPoint extends CJTAccessPoint {
|
13 |
+
|
14 |
/**
|
15 |
+
*
|
16 |
*/
|
17 |
const MENU_POSITION_INDEX = 2;
|
18 |
+
|
19 |
/**
|
20 |
+
*
|
21 |
*/
|
22 |
const PLUGINS_PAGE_SEARCH_TERM = 'css-javascript-toolbox';
|
23 |
+
|
24 |
/**
|
25 |
* put your comment there...
|
26 |
+
*
|
27 |
*/
|
28 |
public function __construct() {
|
29 |
// Initialize Access Point base!
|
34 |
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
+
*
|
38 |
*/
|
39 |
protected function doListen() {
|
40 |
// Only if permitted!
|
43 |
add_action('admin_menu', array(&$this, 'menu'), 13);
|
44 |
}
|
45 |
}
|
46 |
+
|
47 |
/**
|
48 |
* put your comment there...
|
49 |
+
*
|
50 |
*/
|
51 |
public function menu() {
|
52 |
// Extensions page.
|
53 |
+
// add_submenu_page(CJTPlugin::PLUGIN_REQUEST_ID, null, cssJSToolbox::getText('Extensions'), 'administrator', null);
|
54 |
// Hack Extensions menu item to point to Plugins page!
|
55 |
+
// $GLOBALS['submenu'][CJTPlugin::PLUGIN_REQUEST_ID][self::MENU_POSITION_INDEX][2] = admin_url('plugins.php?s=' . self::PLUGINS_PAGE_SEARCH_TERM);
|
56 |
// When plugins page loaded!
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Need this to fix the menu issue with CJT PLUS 8.4 or lower.
|
60 |
+
*
|
61 |
+
*/
|
62 |
+
if ( class_exists( 'CJTPlus' ) ) :
|
63 |
+
$reflector = new \ReflectionClass( 'CJTPlus' );
|
64 |
+
$CJTPlusVersion = get_plugin_data( str_replace( 'plus.class', 'plus', $reflector->getFileName() ) )['Version'];
|
65 |
+
|
66 |
+
if ( version_compare( $CJTPlusVersion, '8.4', '<=' ) ) {
|
67 |
+
global $menu, $submenu;
|
68 |
+
|
69 |
+
# Find CJT Menu and Sub Menu, ADD PLUS to the title
|
70 |
+
foreach( $menu as & $menuItem )
|
71 |
+
{
|
72 |
+
|
73 |
+
if ( $menuItem[ 2 ] == 'cjtoolbox' )
|
74 |
+
{
|
75 |
+
$submenu[ 'cjtoolbox' ][ 0 ] [ 0 ] = $menuItem[ 0 ];
|
76 |
+
$submenu[ 'cjtoolbox' ][ 0 ] [ 1 ] = 'administrator';
|
77 |
+
$submenu[ 'cjtoolbox' ][ 0 ] [ 2 ] = 'cjtoolbox';
|
78 |
+
}
|
79 |
+
}
|
80 |
+
}
|
81 |
+
endif;
|
82 |
+
|
83 |
add_action('load-plugins.php', array($this, 'route'), 10, 0);
|
84 |
}
|
85 |
+
|
86 |
/**
|
87 |
* put your comment there...
|
88 |
+
*
|
89 |
*/
|
90 |
public function route($loadView = null, $request = array('view' => 'extensions/plugins-list')) {
|
91 |
// Set as connected object!
|
97 |
// Dispatch the call!
|
98 |
->_doAction();
|
99 |
}
|
100 |
+
|
101 |
} // End class.
|
102 |
|
103 |
// Hookable!
|
access.points/installer.accesspoint.php
CHANGED
@@ -1,26 +1,26 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
class CJTInstallerAccessPoint extends CJTAccessPoint {
|
13 |
-
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
-
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
protected $stopNotices = false;
|
20 |
-
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
-
*
|
24 |
*/
|
25 |
public function __construct() {
|
26 |
// Initialize parent.
|
@@ -30,18 +30,44 @@ class CJTInstallerAccessPoint extends CJTAccessPoint {
|
|
30 |
}
|
31 |
/**
|
32 |
* put your comment there...
|
33 |
-
*
|
34 |
*/
|
35 |
protected function doListen() {
|
36 |
// If not installed and not in manage page display admin notice!
|
37 |
if (!CJTPlugin::getInstance()->isInstalled() && $this->hasAccess()) {
|
38 |
add_action('admin_notices', array(&$this, 'notInstalledAdminNotice'));
|
39 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
/**
|
43 |
* put your comment there...
|
44 |
-
*
|
45 |
*/
|
46 |
public function installationPage() {
|
47 |
if ($this->hasAccess()) {
|
@@ -53,13 +79,13 @@ class CJTInstallerAccessPoint extends CJTAccessPoint {
|
|
53 |
->setAction('install');
|
54 |
}
|
55 |
}
|
56 |
-
|
57 |
/**
|
58 |
* put your comment there...
|
59 |
-
*
|
60 |
*/
|
61 |
public function notInstalledAdminNotice() {
|
62 |
-
// Show Not installed admin notice only
|
63 |
// if there is no access point processed/connected the request
|
64 |
if (!$this->stopNotices) {
|
65 |
// Set MVC request parameters.
|
@@ -70,16 +96,16 @@ class CJTInstallerAccessPoint extends CJTAccessPoint {
|
|
70 |
->_doAction();
|
71 |
}
|
72 |
}
|
73 |
-
|
74 |
/**
|
75 |
* put your comment there...
|
76 |
-
*
|
77 |
*/
|
78 |
public function stopNotices() {
|
79 |
// Do not show admin notcies!
|
80 |
-
$this->stopNotices = true;
|
81 |
}
|
82 |
-
|
83 |
} // End class.
|
84 |
|
85 |
// Hookable!
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
class CJTInstallerAccessPoint extends CJTAccessPoint {
|
13 |
+
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
+
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
protected $stopNotices = false;
|
20 |
+
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
+
*
|
24 |
*/
|
25 |
public function __construct() {
|
26 |
// Initialize parent.
|
30 |
}
|
31 |
/**
|
32 |
* put your comment there...
|
33 |
+
*
|
34 |
*/
|
35 |
protected function doListen() {
|
36 |
// If not installed and not in manage page display admin notice!
|
37 |
if (!CJTPlugin::getInstance()->isInstalled() && $this->hasAccess()) {
|
38 |
add_action('admin_notices', array(&$this, 'notInstalledAdminNotice'));
|
39 |
}
|
40 |
+
|
41 |
+
if ( class_exists( 'CJTPlus' ) && $this->isOldCJTPlus()) add_action( 'admin_notices', [ $this, '_oldCJTPlusDetected' ] );
|
42 |
+
}
|
43 |
+
|
44 |
+
protected function isOldCJTPlus()
|
45 |
+
{
|
46 |
+
if ( ! function_exists( 'get_plugin_data' ) ) require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
|
47 |
+
|
48 |
+
$reflector = new \ReflectionClass( 'CJTPlus' );
|
49 |
+
$CJTPlusVersion = get_plugin_data( str_replace( 'plus.class', 'plus', $reflector->getFileName() ) )['Version'];
|
50 |
+
|
51 |
+
if ( version_compare( $CJTPlusVersion, '8.4', '<=' ) ) return true;
|
52 |
+
return false;
|
53 |
}
|
54 |
+
|
55 |
+
public function _oldCJTPlusDetected()
|
56 |
+
{
|
57 |
+
$class = 'notice notice-error';
|
58 |
+
$message = __( 'You are currently using CJT PLUS version 8.4 or under. Unfortunately, this version is not optimized for the new Gutenberg Editor.
|
59 |
+
<br>
|
60 |
+
<br>
|
61 |
+
Please make sure you have added your license key and update CJT PLUS with the latest version. If your license has expired, please click to: <a target="_blank" href="https://css-javascript-toolbox.com/pricing">purchase a new subscription</a>.
|
62 |
+
<br>
|
63 |
+
If you wish to continue using your current version, it may be best to roll back to: <a target="_blank" href="https://downloads.wordpress.org/plugin/css-javascript-toolbox.8.4.2.zip">CJT Free - version 8.4.2</a>' );
|
64 |
+
|
65 |
+
printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), $message );
|
66 |
+
}
|
67 |
+
|
68 |
/**
|
69 |
* put your comment there...
|
70 |
+
*
|
71 |
*/
|
72 |
public function installationPage() {
|
73 |
if ($this->hasAccess()) {
|
79 |
->setAction('install');
|
80 |
}
|
81 |
}
|
82 |
+
|
83 |
/**
|
84 |
* put your comment there...
|
85 |
+
*
|
86 |
*/
|
87 |
public function notInstalledAdminNotice() {
|
88 |
+
// Show Not installed admin notice only
|
89 |
// if there is no access point processed/connected the request
|
90 |
if (!$this->stopNotices) {
|
91 |
// Set MVC request parameters.
|
96 |
->_doAction();
|
97 |
}
|
98 |
}
|
99 |
+
|
100 |
/**
|
101 |
* put your comment there...
|
102 |
+
*
|
103 |
*/
|
104 |
public function stopNotices() {
|
105 |
// Do not show admin notcies!
|
106 |
+
$this->stopNotices = true;
|
107 |
}
|
108 |
+
|
109 |
} // End class.
|
110 |
|
111 |
// Hookable!
|
access.points/main.accesspoint.php
CHANGED
File without changes
|
access.points/manage.accesspoint.php
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
class CJTManageAccessPoint extends CJTPageAccessPoint {
|
13 |
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
-
*
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
// Initialize Access Point base!
|
@@ -24,7 +24,7 @@ class CJTManageAccessPoint extends CJTPageAccessPoint {
|
|
24 |
|
25 |
/**
|
26 |
* put your comment there...
|
27 |
-
*
|
28 |
*/
|
29 |
protected function doListen() {
|
30 |
// Only if permitted!
|
@@ -33,25 +33,25 @@ class CJTManageAccessPoint extends CJTPageAccessPoint {
|
|
33 |
add_action('admin_menu', array(&$this, 'menu'));
|
34 |
}
|
35 |
}
|
36 |
-
|
37 |
/**
|
38 |
* put your comment there...
|
39 |
-
*
|
40 |
*/
|
41 |
public function menu() {
|
42 |
// Blocks Manager page! The only Wordpress menu item we've.
|
43 |
$pageHookId= add_menu_page(
|
44 |
-
cssJSToolbox::getText('CSS &
|
45 |
-
cssJSToolbox::getText('CSS &
|
46 |
-
'administrator',
|
47 |
-
CJTPlugin::PLUGIN_REQUEST_ID,
|
48 |
array(&$this->controller, '_doAction'),
|
49 |
-
CJTOOLBOX_VIEWS_URL . '/blocks/manager/public/images/menu.
|
50 |
);
|
51 |
// Process request if installed!
|
52 |
add_action("load-{$pageHookId}", array($this, 'getPage'));
|
53 |
}
|
54 |
-
|
55 |
} // End class.
|
56 |
|
57 |
// Hookable!
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
class CJTManageAccessPoint extends CJTPageAccessPoint {
|
13 |
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
+
*
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
// Initialize Access Point base!
|
24 |
|
25 |
/**
|
26 |
* put your comment there...
|
27 |
+
*
|
28 |
*/
|
29 |
protected function doListen() {
|
30 |
// Only if permitted!
|
33 |
add_action('admin_menu', array(&$this, 'menu'));
|
34 |
}
|
35 |
}
|
36 |
+
|
37 |
/**
|
38 |
* put your comment there...
|
39 |
+
*
|
40 |
*/
|
41 |
public function menu() {
|
42 |
// Blocks Manager page! The only Wordpress menu item we've.
|
43 |
$pageHookId= add_menu_page(
|
44 |
+
cssJSToolbox::getText('CSS & JavaScript Toolbox'),
|
45 |
+
cssJSToolbox::getText('CSS & JavaScript Toolbox'),
|
46 |
+
'administrator',
|
47 |
+
CJTPlugin::PLUGIN_REQUEST_ID,
|
48 |
array(&$this->controller, '_doAction'),
|
49 |
+
CJTOOLBOX_VIEWS_URL . '/blocks/manager/public/images/menu.svg'
|
50 |
);
|
51 |
// Process request if installed!
|
52 |
add_action("load-{$pageHookId}", array($this, 'getPage'));
|
53 |
}
|
54 |
+
|
55 |
} // End class.
|
56 |
|
57 |
// Hookable!
|
access.points/metabox.accesspoint.php
CHANGED
File without changes
|
access.points/packages.accesspoint.php
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
class CJTPackagesAccessPoint extends CJTPageAccessPoint {
|
13 |
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
-
*
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
// Initialize Access Point base!
|
@@ -24,7 +24,7 @@ class CJTPackagesAccessPoint extends CJTPageAccessPoint {
|
|
24 |
|
25 |
/**
|
26 |
* put your comment there...
|
27 |
-
*
|
28 |
*/
|
29 |
protected function doListen() {
|
30 |
// Only if permitted!
|
@@ -33,28 +33,28 @@ class CJTPackagesAccessPoint extends CJTPageAccessPoint {
|
|
33 |
add_action('admin_menu', array(&$this, 'menu'), 11);
|
34 |
}
|
35 |
}
|
36 |
-
|
37 |
/**
|
38 |
* put your comment there...
|
39 |
-
*
|
40 |
*/
|
41 |
public function menu() {
|
42 |
// Setup Page.
|
43 |
-
$pageHookId = add_submenu_page(
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
);
|
51 |
-
// Process when its installed!!
|
52 |
-
add_action("load-{$pageHookId}", array($this, 'getPage'));
|
53 |
}
|
54 |
-
|
55 |
/**
|
56 |
* put your comment there...
|
57 |
-
*
|
58 |
*/
|
59 |
public function route($loadView = null, $request = array('view' => 'packages/manager')) {
|
60 |
// Load package manager view through the default controller.
|
@@ -64,7 +64,7 @@ class CJTPackagesAccessPoint extends CJTPageAccessPoint {
|
|
64 |
// Fire 'display' action.
|
65 |
->setAction('display');
|
66 |
}
|
67 |
-
|
68 |
} // End class.
|
69 |
|
70 |
// Hookable!
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
class CJTPackagesAccessPoint extends CJTPageAccessPoint {
|
13 |
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
+
*
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
// Initialize Access Point base!
|
24 |
|
25 |
/**
|
26 |
* put your comment there...
|
27 |
+
*
|
28 |
*/
|
29 |
protected function doListen() {
|
30 |
// Only if permitted!
|
33 |
add_action('admin_menu', array(&$this, 'menu'), 11);
|
34 |
}
|
35 |
}
|
36 |
+
|
37 |
/**
|
38 |
* put your comment there...
|
39 |
+
*
|
40 |
*/
|
41 |
public function menu() {
|
42 |
// Setup Page.
|
43 |
+
// $pageHookId = add_submenu_page(
|
44 |
+
// CJTPlugin::PLUGIN_REQUEST_ID,
|
45 |
+
// cssJSToolbox::getText('CJT Manage - Packages'),
|
46 |
+
// cssJSToolbox::getText('Packages'),
|
47 |
+
// 'administrator',
|
48 |
+
// CJTPlugin::PLUGIN_REQUEST_ID . '-packages',
|
49 |
+
// array(&$this->controller, '_doAction')
|
50 |
+
// );
|
51 |
+
// // Process when its installed!!
|
52 |
+
// add_action("load-{$pageHookId}", array($this, 'getPage'));
|
53 |
}
|
54 |
+
|
55 |
/**
|
56 |
* put your comment there...
|
57 |
+
*
|
58 |
*/
|
59 |
public function route($loadView = null, $request = array('view' => 'packages/manager')) {
|
60 |
// Load package manager view through the default controller.
|
64 |
// Fire 'display' action.
|
65 |
->setAction('display');
|
66 |
}
|
67 |
+
|
68 |
} // End class.
|
69 |
|
70 |
// Hookable!
|
autoload.inc.php
CHANGED
File without changes
|
composer.json
CHANGED
File without changes
|
configuration.inc.php
CHANGED
File without changes
|
controllers/auto-upgrade.php
CHANGED
File without changes
|
controllers/block-ajax.php
CHANGED
File without changes
|
controllers/block.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
@@ -12,7 +12,7 @@ cssJSToolbox::import('framework:mvc:controller-ajax.inc.php');
|
|
12 |
/**
|
13 |
* This class should replace any other controllers that
|
14 |
* has methods for interacting with a single Block (e.g block-ajax!)
|
15 |
-
*
|
16 |
* All single Block actions (e.g edit, new and save) should be placed/moved here
|
17 |
* in the future!
|
18 |
*/
|
@@ -20,14 +20,14 @@ class CJTBlockController extends CJTAjaxController {
|
|
20 |
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
-
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
protected $controllerInfo = array('model' => 'x-block', 'model_file' => 'xblock');
|
27 |
-
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
-
*
|
31 |
*/
|
32 |
public function __construct() {
|
33 |
parent::__construct();
|
@@ -38,16 +38,16 @@ class CJTBlockController extends CJTAjaxController {
|
|
38 |
$this->registryAction('getCode');
|
39 |
$this->registryAction('downloadCodeFile');
|
40 |
}
|
41 |
-
|
42 |
/**
|
43 |
* put your comment there...
|
44 |
-
*
|
45 |
*/
|
46 |
public function downloadCodeFileAction() {
|
47 |
// BlockId, currentActiveFile.
|
48 |
-
$blockId = $_GET['blockId'];
|
49 |
-
$fileId = $_GET['fileId'];
|
50 |
-
$returnAs = $_GET['returnAs'];
|
51 |
// Get current File Code.
|
52 |
$tblCodeFile = new CJTBlockFilesTable(cssJSToolbox::getInstance()->getDBDriver());
|
53 |
$codeFile = $tblCodeFile->set('id', $fileId)
|
@@ -77,7 +77,7 @@ class CJTBlockController extends CJTAjaxController {
|
|
77 |
|
78 |
/**
|
79 |
* Query single block based on the provided criteria!
|
80 |
-
*
|
81 |
*/
|
82 |
public function getBlockByAction() {
|
83 |
// Initialize.
|
@@ -88,33 +88,33 @@ class CJTBlockController extends CJTAjaxController {
|
|
88 |
// Query Block.
|
89 |
$this->response = array_intersect_key((array) $this->model->getBlockBy(), $returns);
|
90 |
}
|
91 |
-
|
92 |
/**
|
93 |
* Get assigment panel objects page.
|
94 |
-
*
|
95 |
*/
|
96 |
public function getAPOPAction() {
|
97 |
// Read inputs.
|
98 |
$iPerPage = (int) $_GET['iPerPage'];
|
99 |
$blockId = (int) $_GET['block'];
|
100 |
-
$oTypeParams = $_GET['typeParams'];
|
101 |
-
$offset = $_GET['index'];
|
102 |
$assignedOnly = ($_GET['assignedOnly'] == 'false') ? false : true;
|
103 |
$initialize = ($_GET['initialize'] == 'false') ? false : true;
|
104 |
// Get the corresponding type object
|
105 |
// for handling the request.
|
106 |
-
$typeName = $oTypeParams['targetType'];
|
107 |
/**
|
108 |
* put your comment there...
|
109 |
-
*
|
110 |
* @var CJT_Models_Block_Assignmentpanel_Base
|
111 |
*/
|
112 |
$typeObject = CJT_Models_Block_Assignmentpanel_Base
|
113 |
-
::getInstance($assignedOnly,
|
114 |
$typeName,
|
115 |
-
$offset,
|
116 |
-
$iPerPage,
|
117 |
-
$blockId,
|
118 |
$oTypeParams);
|
119 |
// Fetch next page.
|
120 |
$items = $typeObject->getItems();
|
@@ -124,18 +124,18 @@ class CJTBlockController extends CJTAjaxController {
|
|
124 |
// Return count only when the list is activated for
|
125 |
// the first time.
|
126 |
if ($initialize) {
|
127 |
-
$this->response['total'] = $typeObject->getTotalCount();
|
128 |
}
|
129 |
}
|
130 |
-
|
131 |
/**
|
132 |
* put your comment there...
|
133 |
-
*
|
134 |
* @deprecated this is just a redirect to the CJTBlockContoller::getAction().
|
135 |
*/
|
136 |
protected function loadUrlAction() {
|
137 |
// Read inputs.
|
138 |
-
$url = $_GET['url'];
|
139 |
// Read URL.
|
140 |
$response = wp_remote_get($url);
|
141 |
if ($error = $response instanceof WP_Error) {
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
12 |
/**
|
13 |
* This class should replace any other controllers that
|
14 |
* has methods for interacting with a single Block (e.g block-ajax!)
|
15 |
+
*
|
16 |
* All single Block actions (e.g edit, new and save) should be placed/moved here
|
17 |
* in the future!
|
18 |
*/
|
20 |
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
+
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
protected $controllerInfo = array('model' => 'x-block', 'model_file' => 'xblock');
|
27 |
+
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
+
*
|
31 |
*/
|
32 |
public function __construct() {
|
33 |
parent::__construct();
|
38 |
$this->registryAction('getCode');
|
39 |
$this->registryAction('downloadCodeFile');
|
40 |
}
|
41 |
+
|
42 |
/**
|
43 |
* put your comment there...
|
44 |
+
*
|
45 |
*/
|
46 |
public function downloadCodeFileAction() {
|
47 |
// BlockId, currentActiveFile.
|
48 |
+
$blockId = sanitize_text_field( $_GET['blockId'] );
|
49 |
+
$fileId = sanitize_text_field( $_GET['fileId'] );
|
50 |
+
$returnAs = sanitize_text_field( $_GET['returnAs'] );
|
51 |
// Get current File Code.
|
52 |
$tblCodeFile = new CJTBlockFilesTable(cssJSToolbox::getInstance()->getDBDriver());
|
53 |
$codeFile = $tblCodeFile->set('id', $fileId)
|
77 |
|
78 |
/**
|
79 |
* Query single block based on the provided criteria!
|
80 |
+
*
|
81 |
*/
|
82 |
public function getBlockByAction() {
|
83 |
// Initialize.
|
88 |
// Query Block.
|
89 |
$this->response = array_intersect_key((array) $this->model->getBlockBy(), $returns);
|
90 |
}
|
91 |
+
|
92 |
/**
|
93 |
* Get assigment panel objects page.
|
94 |
+
*
|
95 |
*/
|
96 |
public function getAPOPAction() {
|
97 |
// Read inputs.
|
98 |
$iPerPage = (int) $_GET['iPerPage'];
|
99 |
$blockId = (int) $_GET['block'];
|
100 |
+
$oTypeParams = (array) $_GET['typeParams'];
|
101 |
+
$offset = (int) $_GET['index'];
|
102 |
$assignedOnly = ($_GET['assignedOnly'] == 'false') ? false : true;
|
103 |
$initialize = ($_GET['initialize'] == 'false') ? false : true;
|
104 |
// Get the corresponding type object
|
105 |
// for handling the request.
|
106 |
+
$typeName = (string) $oTypeParams['targetType'];
|
107 |
/**
|
108 |
* put your comment there...
|
109 |
+
*
|
110 |
* @var CJT_Models_Block_Assignmentpanel_Base
|
111 |
*/
|
112 |
$typeObject = CJT_Models_Block_Assignmentpanel_Base
|
113 |
+
::getInstance($assignedOnly,
|
114 |
$typeName,
|
115 |
+
$offset,
|
116 |
+
$iPerPage,
|
117 |
+
$blockId,
|
118 |
$oTypeParams);
|
119 |
// Fetch next page.
|
120 |
$items = $typeObject->getItems();
|
124 |
// Return count only when the list is activated for
|
125 |
// the first time.
|
126 |
if ($initialize) {
|
127 |
+
$this->response['total'] = $typeObject->getTotalCount();
|
128 |
}
|
129 |
}
|
130 |
+
|
131 |
/**
|
132 |
* put your comment there...
|
133 |
+
*
|
134 |
* @deprecated this is just a redirect to the CJTBlockContoller::getAction().
|
135 |
*/
|
136 |
protected function loadUrlAction() {
|
137 |
// Read inputs.
|
138 |
+
$url = (string) $_GET['url'];
|
139 |
// Read URL.
|
140 |
$response = wp_remote_get($url);
|
141 |
if ($error = $response instanceof WP_Error) {
|
controllers/blocks-ajax.php
CHANGED
@@ -11,11 +11,11 @@ cssJSToolbox::import('framework:mvc:controller-ajax.inc.php');
|
|
11 |
|
12 |
/**
|
13 |
* Serve blocks page Ajax requests.
|
14 |
-
*
|
15 |
* The Actions resident here is global for only the blocks page, its not
|
16 |
* for a specific/single block. You can find single block
|
17 |
* actions in block-ajax.php file.
|
18 |
-
*
|
19 |
* @deprecated DONT ADD MORE ACTIONS HERE!
|
20 |
* @author Ahmed Said
|
21 |
* @version 6
|
@@ -24,14 +24,14 @@ class CJTBlocksAjaxController extends CJTAjaxController {
|
|
24 |
|
25 |
/**
|
26 |
* put your comment there...
|
27 |
-
*
|
28 |
* @var mixed
|
29 |
*/
|
30 |
protected $controllerInfo = array('model' => 'blocks');
|
31 |
-
|
32 |
/**
|
33 |
* Initialize controller object.
|
34 |
-
*
|
35 |
* @see CJTController for more details
|
36 |
* @return void
|
37 |
*/
|
@@ -44,23 +44,23 @@ class CJTBlocksAjaxController extends CJTAjaxController {
|
|
44 |
$this->registryAction('saveOrder');
|
45 |
$this->registryAction('loadBlock');
|
46 |
}
|
47 |
-
|
48 |
/**
|
49 |
* Create new block.
|
50 |
-
*
|
51 |
* Once this method is called a new block is saved into
|
52 |
* the database.
|
53 |
-
*
|
54 |
* Call this method using GET method with the following parameters.
|
55 |
* - array ids Ids for all the available blocks.
|
56 |
* - [name] string Block name.
|
57 |
* - [state] string Block state.
|
58 |
* - [location] string Block hook location.
|
59 |
-
*
|
60 |
* Response body is array with the following elements.
|
61 |
* - integer id New block id.
|
62 |
* - string view Block HTML code.
|
63 |
-
*
|
64 |
* @return void
|
65 |
*/
|
66 |
public function createBlockAction($blockId = null, $blockType = null, $pinPoint = null, $viewName = null) {
|
@@ -100,7 +100,7 @@ class CJTBlocksAjaxController extends CJTAjaxController {
|
|
100 |
$blocksModel->save();
|
101 |
// Read newly added block from database.
|
102 |
$newBlockData = $blocksModel->getBlock($blockId, array('returnCodeFile' => true));
|
103 |
-
|
104 |
if ($newBlockData === null) {
|
105 |
throw new Exception('Could not add new block!!!');
|
106 |
}
|
@@ -113,23 +113,23 @@ class CJTBlocksAjaxController extends CJTAjaxController {
|
|
113 |
$blockView->setBlock($block);
|
114 |
$response['view'] = $blockView->getTemplate('new');
|
115 |
}
|
116 |
-
$response['id'] = $blockId;
|
117 |
// Set response object.
|
118 |
-
$this->response = $response;
|
119 |
}
|
120 |
}
|
121 |
-
|
122 |
/**
|
123 |
* Get view content through ajax request.
|
124 |
-
*
|
125 |
* The method is useful for requesting Popup forms through ajax (e.g ThickBox).
|
126 |
* You can request any view specified in the $allowedViews array.
|
127 |
-
*
|
128 |
* Call this method using GET method with the following parameters.
|
129 |
* - viewName string Name of the view.
|
130 |
-
*
|
131 |
* Response body is the view content string.
|
132 |
-
*
|
133 |
* @return void
|
134 |
*/
|
135 |
public function getViewAction() {
|
@@ -168,7 +168,7 @@ class CJTBlocksAjaxController extends CJTAjaxController {
|
|
168 |
|
169 |
/**
|
170 |
* put your comment there...
|
171 |
-
*
|
172 |
*/
|
173 |
public function loadBlockAction() {
|
174 |
// Block Id.
|
@@ -180,68 +180,68 @@ class CJTBlocksAjaxController extends CJTAjaxController {
|
|
180 |
$view->getTemplate('default');
|
181 |
$this->response = $view->structuredContent;
|
182 |
}
|
183 |
-
|
184 |
/**
|
185 |
* put your comment there...
|
186 |
-
*
|
187 |
*/
|
188 |
-
public function saveBlocksAction()
|
189 |
{
|
190 |
$response = array();
|
191 |
-
|
192 |
// Blocks are sent ins single array list.
|
193 |
$blocksToSave = filter_input( INPUT_POST, 'blocks', FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY );
|
194 |
$calculatePinPoint = ( bool ) filter_input( INPUT_POST, 'calculatePinPoint', FILTER_SANITIZE_NUMBER_INT );
|
195 |
$createRevision = ( bool ) filter_input( INPUT_POST, 'createRevision', FILTER_SANITIZE_NUMBER_INT );
|
196 |
-
|
197 |
-
// For any reason that cause Client/
|
198 |
// make sure we're save.
|
199 |
-
if ( is_array( $blocksToSave ) && ! empty( $blocksToSave ) )
|
200 |
{
|
201 |
-
|
202 |
-
foreach ( $blocksToSave as $id => $postedblockPartialData )
|
203 |
{
|
204 |
// Push block id into block data.
|
205 |
$blockData = ( object ) $postedblockPartialData;
|
206 |
$blockData->id = $id;
|
207 |
-
|
208 |
// Recalculate pinPoint field value.
|
209 |
! $calculatePinPoint or ( CJTBlockModel::arrangePins( $blockData ) && CJTBlockModel::calculateBlockPinPoint( $blockData ) );
|
210 |
-
|
211 |
// Create block revision.
|
212 |
! $createRevision or $this->model->addRevision( $id, $blockData->activeFileId );
|
213 |
-
|
214 |
// Set lastModified field to current time.
|
215 |
$blockData->lastModified = current_time( 'mysql' );
|
216 |
-
|
217 |
// Update database.
|
218 |
$this->model->update( $blockData, $calculatePinPoint );
|
219 |
$this->model->save();
|
220 |
-
|
221 |
// Send the changes properties back to client.
|
222 |
-
foreach ( $postedblockPartialData as $property => $value )
|
223 |
{
|
224 |
$response[ $id ][ $property ][ 'value' ] = $value;
|
225 |
}
|
226 |
-
|
227 |
}
|
228 |
-
|
229 |
}
|
230 |
-
|
231 |
// Delete other blocks.
|
232 |
empty( $_POST[ 'deletedBlocks' ] ) or $this->model->delete( $_POST[ 'deletedBlocks' ] );
|
233 |
-
|
234 |
// Save changes.
|
235 |
$this->model->save();
|
236 |
-
|
237 |
// Set response.
|
238 |
$this->response = $response;
|
239 |
-
|
240 |
}
|
241 |
-
|
242 |
/**
|
243 |
* put your comment there...
|
244 |
-
*
|
245 |
*/
|
246 |
public function saveOrderAction() {
|
247 |
// Read order.
|
@@ -250,5 +250,5 @@ class CJTBlocksAjaxController extends CJTAjaxController {
|
|
250 |
$this->model->setOrder($order);
|
251 |
$this->response = array('order' => $order, 'state' => 'saved');
|
252 |
}
|
253 |
-
|
254 |
} // End class.
|
11 |
|
12 |
/**
|
13 |
* Serve blocks page Ajax requests.
|
14 |
+
*
|
15 |
* The Actions resident here is global for only the blocks page, its not
|
16 |
* for a specific/single block. You can find single block
|
17 |
* actions in block-ajax.php file.
|
18 |
+
*
|
19 |
* @deprecated DONT ADD MORE ACTIONS HERE!
|
20 |
* @author Ahmed Said
|
21 |
* @version 6
|
24 |
|
25 |
/**
|
26 |
* put your comment there...
|
27 |
+
*
|
28 |
* @var mixed
|
29 |
*/
|
30 |
protected $controllerInfo = array('model' => 'blocks');
|
31 |
+
|
32 |
/**
|
33 |
* Initialize controller object.
|
34 |
+
*
|
35 |
* @see CJTController for more details
|
36 |
* @return void
|
37 |
*/
|
44 |
$this->registryAction('saveOrder');
|
45 |
$this->registryAction('loadBlock');
|
46 |
}
|
47 |
+
|
48 |
/**
|
49 |
* Create new block.
|
50 |
+
*
|
51 |
* Once this method is called a new block is saved into
|
52 |
* the database.
|
53 |
+
*
|
54 |
* Call this method using GET method with the following parameters.
|
55 |
* - array ids Ids for all the available blocks.
|
56 |
* - [name] string Block name.
|
57 |
* - [state] string Block state.
|
58 |
* - [location] string Block hook location.
|
59 |
+
*
|
60 |
* Response body is array with the following elements.
|
61 |
* - integer id New block id.
|
62 |
* - string view Block HTML code.
|
63 |
+
*
|
64 |
* @return void
|
65 |
*/
|
66 |
public function createBlockAction($blockId = null, $blockType = null, $pinPoint = null, $viewName = null) {
|
100 |
$blocksModel->save();
|
101 |
// Read newly added block from database.
|
102 |
$newBlockData = $blocksModel->getBlock($blockId, array('returnCodeFile' => true));
|
103 |
+
|
104 |
if ($newBlockData === null) {
|
105 |
throw new Exception('Could not add new block!!!');
|
106 |
}
|
113 |
$blockView->setBlock($block);
|
114 |
$response['view'] = $blockView->getTemplate('new');
|
115 |
}
|
116 |
+
$response['id'] = $blockId;
|
117 |
// Set response object.
|
118 |
+
$this->response = $response;
|
119 |
}
|
120 |
}
|
121 |
+
|
122 |
/**
|
123 |
* Get view content through ajax request.
|
124 |
+
*
|
125 |
* The method is useful for requesting Popup forms through ajax (e.g ThickBox).
|
126 |
* You can request any view specified in the $allowedViews array.
|
127 |
+
*
|
128 |
* Call this method using GET method with the following parameters.
|
129 |
* - viewName string Name of the view.
|
130 |
+
*
|
131 |
* Response body is the view content string.
|
132 |
+
*
|
133 |
* @return void
|
134 |
*/
|
135 |
public function getViewAction() {
|
168 |
|
169 |
/**
|
170 |
* put your comment there...
|
171 |
+
*
|
172 |
*/
|
173 |
public function loadBlockAction() {
|
174 |
// Block Id.
|
180 |
$view->getTemplate('default');
|
181 |
$this->response = $view->structuredContent;
|
182 |
}
|
183 |
+
|
184 |
/**
|
185 |
* put your comment there...
|
186 |
+
*
|
187 |
*/
|
188 |
+
public function saveBlocksAction()
|
189 |
{
|
190 |
$response = array();
|
191 |
+
|
192 |
// Blocks are sent ins single array list.
|
193 |
$blocksToSave = filter_input( INPUT_POST, 'blocks', FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY );
|
194 |
$calculatePinPoint = ( bool ) filter_input( INPUT_POST, 'calculatePinPoint', FILTER_SANITIZE_NUMBER_INT );
|
195 |
$createRevision = ( bool ) filter_input( INPUT_POST, 'createRevision', FILTER_SANITIZE_NUMBER_INT );
|
196 |
+
|
197 |
+
// For any reason that cause Client/JavaScript to send empty blocks,
|
198 |
// make sure we're save.
|
199 |
+
if ( is_array( $blocksToSave ) && ! empty( $blocksToSave ) )
|
200 |
{
|
201 |
+
|
202 |
+
foreach ( $blocksToSave as $id => $postedblockPartialData )
|
203 |
{
|
204 |
// Push block id into block data.
|
205 |
$blockData = ( object ) $postedblockPartialData;
|
206 |
$blockData->id = $id;
|
207 |
+
|
208 |
// Recalculate pinPoint field value.
|
209 |
! $calculatePinPoint or ( CJTBlockModel::arrangePins( $blockData ) && CJTBlockModel::calculateBlockPinPoint( $blockData ) );
|
210 |
+
|
211 |
// Create block revision.
|
212 |
! $createRevision or $this->model->addRevision( $id, $blockData->activeFileId );
|
213 |
+
|
214 |
// Set lastModified field to current time.
|
215 |
$blockData->lastModified = current_time( 'mysql' );
|
216 |
+
|
217 |
// Update database.
|
218 |
$this->model->update( $blockData, $calculatePinPoint );
|
219 |
$this->model->save();
|
220 |
+
|
221 |
// Send the changes properties back to client.
|
222 |
+
foreach ( $postedblockPartialData as $property => $value )
|
223 |
{
|
224 |
$response[ $id ][ $property ][ 'value' ] = $value;
|
225 |
}
|
226 |
+
|
227 |
}
|
228 |
+
|
229 |
}
|
230 |
+
|
231 |
// Delete other blocks.
|
232 |
empty( $_POST[ 'deletedBlocks' ] ) or $this->model->delete( $_POST[ 'deletedBlocks' ] );
|
233 |
+
|
234 |
// Save changes.
|
235 |
$this->model->save();
|
236 |
+
|
237 |
// Set response.
|
238 |
$this->response = $response;
|
239 |
+
|
240 |
}
|
241 |
+
|
242 |
/**
|
243 |
* put your comment there...
|
244 |
+
*
|
245 |
*/
|
246 |
public function saveOrderAction() {
|
247 |
// Read order.
|
250 |
$this->model->setOrder($order);
|
251 |
$this->response = array('order' => $order, 'state' => 'saved');
|
252 |
}
|
253 |
+
|
254 |
} // End class.
|
controllers/blocks-backups.php
CHANGED
File without changes
|
controllers/blocks-coupling.php
CHANGED
@@ -2,232 +2,232 @@
|
|
2 |
/**
|
3 |
* @version $ Id; blocks-coupling.php 21-03-2012 03:22:10 Ahmed Said $
|
4 |
*/
|
5 |
-
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
* Applying Code blocks for the curren request.
|
11 |
-
*
|
12 |
* This controller is always loaded.
|
13 |
-
*
|
14 |
* The class resposibility is to output the code blocks
|
15 |
* tha associated with current request.
|
16 |
-
*
|
17 |
* @author Ahmed Said
|
18 |
* @version 6
|
19 |
*/
|
20 |
class CJTBlocksCouplingController extends CJTController {
|
21 |
-
|
22 |
/**
|
23 |
* put your comment there...
|
24 |
-
*
|
25 |
* @var mixed
|
26 |
*/
|
27 |
protected $blocks = array(
|
28 |
'code' => array('header' => '', 'footer' => ''),
|
29 |
'scripts' => array('header' => array(), 'footer' => array()),
|
30 |
);
|
31 |
-
|
32 |
/**
|
33 |
* put your comment there...
|
34 |
-
*
|
35 |
* @var mixed
|
36 |
*/
|
37 |
protected $controllerInfo = array('model' => 'coupling');
|
38 |
-
|
39 |
/**
|
40 |
* put your comment there...
|
41 |
-
*
|
42 |
* @var mixed
|
43 |
*/
|
44 |
protected $filters = null;
|
45 |
-
|
46 |
/**
|
47 |
* put your comment there...
|
48 |
-
*
|
49 |
* @var mixed
|
50 |
*/
|
51 |
protected static $instance = null;
|
52 |
-
|
53 |
/**
|
54 |
* put your comment there...
|
55 |
-
*
|
56 |
* @var mixed
|
57 |
*/
|
58 |
private $onActionIds = array();
|
59 |
-
|
60 |
/**
|
61 |
* put your comment there...
|
62 |
-
*
|
63 |
* @var mixed
|
64 |
*/
|
65 |
protected $onassigncouplingcallback = array('parameters' => array('callback'));
|
66 |
|
67 |
/**
|
68 |
* put your comment there...
|
69 |
-
*
|
70 |
* @var mixed
|
71 |
*/
|
72 |
protected $onappendcode = array('parameters' => array('code'));
|
73 |
-
|
74 |
/**
|
75 |
* put your comment there...
|
76 |
-
*
|
77 |
* @var mixed
|
78 |
*/
|
79 |
protected $onblockmatched = array('parameters' => array('block'));
|
80 |
-
|
81 |
/**
|
82 |
* put your comment there...
|
83 |
-
*
|
84 |
* @var mixed
|
85 |
*/
|
86 |
protected $oncancelmatching = array('parameters' => array('matched'));
|
87 |
-
|
88 |
/**
|
89 |
* put your comment there...
|
90 |
-
*
|
91 |
* @var mixed
|
92 |
*/
|
93 |
protected $ondefaultfilters = array('parameters' => array('filters'));
|
94 |
-
|
95 |
/**
|
96 |
* put your comment there...
|
97 |
-
*
|
98 |
* @var mixed
|
99 |
*/
|
100 |
protected $ondo = array('parameters' => array('data', 'method', 'condition'));
|
101 |
-
|
102 |
/**
|
103 |
* put your comment there...
|
104 |
-
*
|
105 |
* @var mixed
|
106 |
*/
|
107 |
protected $onblocksorder = array('parameters' => array('order'));
|
108 |
|
109 |
/**
|
110 |
* put your comment there...
|
111 |
-
*
|
112 |
* @var mixed
|
113 |
*/
|
114 |
protected $onevalcodeblock = array( 'parameters' => array( 'keep', 'block' ) );
|
115 |
-
|
116 |
/**
|
117 |
* put your comment there...
|
118 |
-
*
|
119 |
* @var mixed
|
120 |
*/
|
121 |
protected $ongetblocks = array('parameters' => array('blocks'));
|
122 |
|
123 |
/**
|
124 |
* put your comment there...
|
125 |
-
*
|
126 |
* @var mixed
|
127 |
*/
|
128 |
protected $ongetcache = array('parameters' => array('cache'));
|
129 |
|
130 |
/**
|
131 |
* put your comment there...
|
132 |
-
*
|
133 |
* @var mixed
|
134 |
*/
|
135 |
protected $ongetfilters = array('parameters' => array('filters'));
|
136 |
-
|
137 |
/**
|
138 |
* put your comment there...
|
139 |
-
*
|
140 |
* @var mixed
|
141 |
*/
|
142 |
protected $onlinkedtemplates = array('parameters' => array('templates'));
|
143 |
-
|
144 |
/**
|
145 |
* put your comment there...
|
146 |
-
*
|
147 |
* @var mixed
|
148 |
*/
|
149 |
protected $onlinkscripts = array('parameters' => array('templates'));
|
150 |
|
151 |
/**
|
152 |
* put your comment there...
|
153 |
-
*
|
154 |
* @var mixed
|
155 |
*/
|
156 |
protected $onlinkstyles = array('parameters' => array('templates'));
|
157 |
-
|
158 |
/**
|
159 |
* put your comment there...
|
160 |
-
*
|
161 |
* @var mixed
|
162 |
*/
|
163 |
protected $onlinktemplate = array('parameters' => array('template'));
|
164 |
-
|
165 |
/**
|
166 |
* put your comment there...
|
167 |
-
*
|
168 |
* @var mixed
|
169 |
*/
|
170 |
protected $onmatchingurls = array('parameters' => array('urls'));
|
171 |
|
172 |
/**
|
173 |
* put your comment there...
|
174 |
-
*
|
175 |
* @var mixed
|
176 |
*/
|
177 |
protected $onnoblocks = array('hookType' => CJTWordpressEvents::HOOK_ACTION);
|
178 |
|
179 |
/**
|
180 |
* put your comment there...
|
181 |
-
*
|
182 |
* @var mixed
|
183 |
*/
|
184 |
protected $onoutput = array('parameters' => array('code', 'location'));
|
185 |
-
|
186 |
/**
|
187 |
* put your comment there...
|
188 |
-
*
|
189 |
* @var mixed
|
190 |
*/
|
191 |
protected $onprocess = array('hookType' => CJTWordpressEvents::HOOK_ACTION);
|
192 |
|
193 |
/**
|
194 |
* put your comment there...
|
195 |
-
*
|
196 |
* @var mixed
|
197 |
*/
|
198 |
protected $onprocessblock = array('parameters' => array('block'));
|
199 |
-
|
200 |
/**
|
201 |
* put your comment there...
|
202 |
-
*
|
203 |
* @var mixed
|
204 |
*/
|
205 |
protected $onqueuecss = array('parameters' => array('style'));
|
206 |
-
|
207 |
/**
|
208 |
* put your comment there...
|
209 |
-
*
|
210 |
* @var mixed
|
211 |
*/
|
212 |
protected $onqueuejavascript = array('parameters' => array('script'));
|
213 |
-
|
214 |
/**
|
215 |
* put your comment there...
|
216 |
-
*
|
217 |
* @var mixed
|
218 |
*/
|
219 |
protected $onsetfilters = array('parameters' => array('filters'));
|
220 |
-
|
221 |
/**
|
222 |
* put your comment there...
|
223 |
-
*
|
224 |
* @var mixed
|
225 |
*/
|
226 |
protected $templates = array();
|
227 |
-
|
228 |
/**
|
229 |
* Initialize controller object.
|
230 |
-
*
|
231 |
* @see CJTController for more details
|
232 |
* @return void
|
233 |
*/
|
@@ -252,16 +252,16 @@ class CJTBlocksCouplingController extends CJTController {
|
|
252 |
// Add Shortcode callbacks.
|
253 |
add_shortcode('cjtoolbox', array(&$this, 'shortcode'));
|
254 |
}
|
255 |
-
|
256 |
/**
|
257 |
* put your comment there...
|
258 |
-
*
|
259 |
* @param mixed $id
|
260 |
*/
|
261 |
public function addOnActionIds($id) {
|
262 |
// Add ID is not exists.
|
263 |
if (!in_array($id, $this->onActionIds)) {
|
264 |
-
$this->onActionIds[] = $id;
|
265 |
}
|
266 |
// Chaining.
|
267 |
return $this;
|
@@ -269,82 +269,82 @@ class CJTBlocksCouplingController extends CJTController {
|
|
269 |
|
270 |
/**
|
271 |
* put your comment there...
|
272 |
-
*
|
273 |
*/
|
274 |
-
public function getBlocks()
|
275 |
{
|
276 |
// Set request view filters used for querying database.
|
277 |
$this->setRequestFilters();
|
278 |
-
|
279 |
// Get blocks order. NOTE: This is all blocks order not only the queried/target blocks.
|
280 |
$blocksOrder = array();
|
281 |
$metaBoxesOrder = $this->onblocksorder( $this->model->getOrder() );
|
282 |
-
|
283 |
// Get ORDER-INDEX <TO> BLOCK-ID mapping.
|
284 |
preg_match_all( '/cjtoolbox-(\d+)/', $metaBoxesOrder[ 'normal' ], $blocksOrder, PREG_SET_ORDER );
|
285 |
-
|
286 |
/**
|
287 |
* append more to orders produced by CJTBlocksCouplingController::setRequestFilter().
|
288 |
* More to orders may allow other blocks to bein the output (e.g metaboxe blocks).
|
289 |
*/
|
290 |
$blocksOrder = array_merge( $blocksOrder, $this->getFilters()->moreToOrder );
|
291 |
-
|
292 |
// Prepare request URL to match against Links & Expressions.
|
293 |
$linksRequestURL = self::getRequestURL();
|
294 |
$expressionsRequestURL = "{$linksRequestURL}?{$_SERVER['QUERY_STRING']}";
|
295 |
-
|
296 |
extract( $this->onmatchingurls( compact( 'linksRequestURL', 'expressionsRequestURL' ) ) );
|
297 |
-
|
298 |
// Get all blocks including (Links & Expressions Blocks).
|
299 |
$blocks = $this->ongetblocks(
|
300 |
-
|
301 |
$this->model->getPinsBlocks(
|
302 |
-
|
303 |
-
CJTBlockModel::PINS_LINK_EXPRESSION,
|
304 |
-
|
305 |
-
$this->getFilters()->pinPoint,
|
306 |
-
|
307 |
$this->getFilters()->customPins,
|
308 |
-
|
309 |
$this->getFilters()
|
310 |
-
|
311 |
-
)
|
312 |
-
|
313 |
);
|
314 |
-
|
315 |
-
|
316 |
-
if ( empty( $blocks ) )
|
317 |
{
|
318 |
$this->onnoblocks();
|
319 |
-
|
320 |
return false;
|
321 |
-
|
322 |
}
|
323 |
-
|
324 |
// Import related libraries.
|
325 |
cssJSToolbox::import( 'framework:php:evaluator:evaluator.inc.php' );
|
326 |
-
|
327 |
/**
|
328 |
* Iterator over all blocks by using they order.
|
329 |
* For each block get code and scripts.
|
330 |
*/
|
331 |
$this->onprocess();
|
332 |
-
|
333 |
foreach ( $blocksOrder as $blockOrder )
|
334 |
{
|
335 |
$blockId = (int) $blockOrder[1];
|
336 |
-
|
337 |
// As mentioned above. Orders is for all blocks not just those queried from db.
|
338 |
-
if ( isset($blocks[ $blockId ] ) )
|
339 |
{
|
340 |
-
|
341 |
$block = $this->onprocessblock( $blocks[ $blockId ] );
|
342 |
-
|
343 |
/**
|
344 |
* Process Links & Expressions blocks.
|
345 |
* For better performace check only those with links and expressions flags.
|
346 |
*/
|
347 |
-
if ( $block->blocksGroup & CJTBlockModel::PINS_LINK_EXPRESSION )
|
348 |
{
|
349 |
/**
|
350 |
* Initiliaze $matchedLink and $matchedExpression inside IF statment.
|
@@ -353,55 +353,55 @@ class CJTBlocksCouplingController extends CJTController {
|
|
353 |
* Otherwise they'll get the correct value inside each statement.
|
354 |
*/
|
355 |
/// Check if there is a matched link.
|
356 |
-
if ( $matchedLink = ( $block->blocksGroup & CJTBlockModel::PINS_LINKS ) )
|
357 |
{
|
358 |
$links = explode( "\n", trim( $block->links ) );
|
359 |
$matchedLink = in_array( $linksRequestURL, $links );
|
360 |
}
|
361 |
-
|
362 |
/// Check if there is a matched expression.
|
363 |
-
if ( $matchedExpression = ( $block->blocksGroup & CJTBlockModel::PINS_EXPRESSIONS ) )
|
364 |
{
|
365 |
$expressions = explode("\n", $block->expressions);
|
366 |
-
|
367 |
-
foreach ( $expressions as $expression )
|
368 |
{
|
369 |
/// @TODO: Matches may be used later to evaulate variables inside code block.
|
370 |
-
if( $matchedExpression = @ preg_match( "/{$expression}/", $expressionsRequestURL ) )
|
371 |
{
|
372 |
break;
|
373 |
}
|
374 |
-
|
375 |
}
|
376 |
-
|
377 |
}
|
378 |
-
|
379 |
/**
|
380 |
* Exclude Links & Expressions Blocks that doesn't has a match.
|
381 |
* If there is no matched link or expression then exclude block.
|
382 |
*/
|
383 |
-
if ( $this->oncancelmatching( ! ( $matchedExpression || $matchedLink ) ) )
|
384 |
{
|
385 |
continue;
|
386 |
}
|
387 |
-
|
388 |
}
|
389 |
// Allow extensions to control to prevent block from being in the output
|
390 |
-
if ( $block = $this->onblockmatched( $block ) )
|
391 |
{
|
392 |
// Retrieve block code-files.
|
393 |
$block->code = $this->model->getBlockCode( $block->id );
|
394 |
-
|
395 |
// Import Executable (PHP and HTML) templates.
|
396 |
$block->code = $block->code . $this->model->getExecTemplatesCode( $block->id );
|
397 |
-
|
398 |
// For every location store blocks code into single string
|
399 |
-
|
400 |
if ( ! $evaluatedCode = $this->onevalcodeblock( false, $block ) )
|
401 |
{
|
402 |
-
$evaluatedCode = CJTPHPCodeEvaluator::getInstance( $block )->exec()->getOutput();
|
403 |
}
|
404 |
-
|
405 |
/** @todo Include Debuging info only if we're in debuging mode! */
|
406 |
if ( 1 ) {
|
407 |
// CODE UPDATED BY RBJ -- START
|
@@ -417,54 +417,54 @@ class CJTBlocksCouplingController extends CJTController {
|
|
417 |
endif;
|
418 |
// CODE UPDATED BY RBJ -- END
|
419 |
}
|
420 |
-
|
421 |
$this->blocks[ 'code' ][ $block->location ] .= $this->onappendcode( $evaluatedCode );
|
422 |
-
|
423 |
// Store all used Ids in the CORRECT ORDER.
|
424 |
$this->addOnActionIds( $blockId );
|
425 |
}
|
426 |
-
|
427 |
}
|
428 |
-
|
429 |
}
|
430 |
-
|
431 |
-
$templates = $this->onActionIds ?
|
432 |
-
$this->model->getLinkedTemplates( $this->onActionIds ) :
|
433 |
array();
|
434 |
-
|
435 |
// Classisfy as we process Scripts and Styles separatly (different hooks!).
|
436 |
-
foreach ( $this->onlinkedtemplates( $templates ) as $id => $template )
|
437 |
{
|
438 |
// Filer template!
|
439 |
extract( $this->onlinktemplate( compact( 'template', 'id' ) ) );
|
440 |
-
|
441 |
$this->templates[ $template->type ][ $id ] = $template;
|
442 |
}
|
443 |
-
|
444 |
-
|
445 |
return true;
|
446 |
}
|
447 |
-
|
448 |
/**
|
449 |
* put your comment there...
|
450 |
-
*
|
451 |
*/
|
452 |
public function getCached() {
|
453 |
// Cache is not implemented yet might be supported by extenal Extensions!
|
454 |
return $this->ongetcache(false);
|
455 |
}
|
456 |
-
|
457 |
/**
|
458 |
* put your comment there...
|
459 |
-
*
|
460 |
*/
|
461 |
public function getFilters() {
|
462 |
-
return $this->ongetfilters($this->filters);
|
463 |
}
|
464 |
|
465 |
/**
|
466 |
* put your comment there...
|
467 |
-
*
|
468 |
*/
|
469 |
public function getOnActionIds() {
|
470 |
return $this->onActionIds;
|
@@ -472,7 +472,7 @@ class CJTBlocksCouplingController extends CJTController {
|
|
472 |
|
473 |
/**
|
474 |
* put your comment there...
|
475 |
-
*
|
476 |
*/
|
477 |
public static function getRequestURL() {
|
478 |
// URL Protocol.
|
@@ -486,18 +486,18 @@ class CJTBlocksCouplingController extends CJTController {
|
|
486 |
$url = "{$protocol}{$host}{$port}{$requestURI}";
|
487 |
return $url;
|
488 |
}
|
489 |
-
|
490 |
/**
|
491 |
* put your comment there...
|
492 |
-
*
|
493 |
*/
|
494 |
public function hasOnActionIds() {
|
495 |
return !empty($this->onActionIds);
|
496 |
}
|
497 |
-
|
498 |
/**
|
499 |
* put your comment there...
|
500 |
-
*
|
501 |
*/
|
502 |
public function initCoupling() {
|
503 |
// For some reasons wp action is fired twice.
|
@@ -528,10 +528,10 @@ class CJTBlocksCouplingController extends CJTController {
|
|
528 |
remove_action('wp', array(&$this, 'initCoupling'));
|
529 |
remove_action('admin_init', array(&$this, 'initCoupling'));
|
530 |
}
|
531 |
-
|
532 |
/**
|
533 |
* put your comment there...
|
534 |
-
*
|
535 |
*/
|
536 |
public function linkFooterStyleSheets() {
|
537 |
// Initialize.
|
@@ -557,7 +557,7 @@ class CJTBlocksCouplingController extends CJTController {
|
|
557 |
wp_enqueue_script('jquery');
|
558 |
// Enqueue footer style sheet loader.
|
559 |
wp_enqueue_script('cjt-coupling-footer-css-loader', cssJSToolbox::getURI('controllers:coupling:js:footer-stylesheet-loader.js'));
|
560 |
-
// Output
|
561 |
$jsStyleSheetsList = json_encode($styles);
|
562 |
require cssJSToolbox::resolvePath('controllers:coupling:html:load-footer-style.html.php');
|
563 |
}
|
@@ -565,7 +565,7 @@ class CJTBlocksCouplingController extends CJTController {
|
|
565 |
|
566 |
/**
|
567 |
* put your comment there...
|
568 |
-
*
|
569 |
*/
|
570 |
public function linkTemplates() {
|
571 |
$currentFilter = current_filter();
|
@@ -591,10 +591,10 @@ class CJTBlocksCouplingController extends CJTController {
|
|
591 |
$queue->enqueue($template->queueName);
|
592 |
}
|
593 |
}
|
594 |
-
|
595 |
/**
|
596 |
* put your comment there...
|
597 |
-
*
|
598 |
*/
|
599 |
public function outputBlocks() {
|
600 |
// Derived location name from wordpress filter name.
|
@@ -609,106 +609,106 @@ class CJTBlocksCouplingController extends CJTController {
|
|
609 |
$location = $locationsMap[$location];
|
610 |
echo $this->onoutput($this->blocks['code'][$location], $location);
|
611 |
}
|
612 |
-
|
613 |
/**
|
614 |
* put your comment there...
|
615 |
-
*
|
616 |
*/
|
617 |
-
protected function setRequestFilters()
|
618 |
{
|
619 |
// Get request blocks.
|
620 |
$filters = $this->ondefaultfilters( ( object ) array
|
621 |
(
|
622 |
-
|
623 |
'pinPoint' => 0x00000000,
|
624 |
-
|
625 |
'customPins' => array(),
|
626 |
-
|
627 |
'moreToOrder' => array(),
|
628 |
-
|
629 |
'currentObject' => null,
|
630 |
-
|
631 |
'currentCustomPin' => 0,
|
632 |
-
|
633 |
'params' => array(),
|
634 |
-
|
635 |
) );
|
636 |
-
|
637 |
-
if ( is_admin() )
|
638 |
{
|
639 |
// Include all backend blocks.
|
640 |
$filters->pinPoint |= CJTBlockModel::PINS_BACKEND;
|
641 |
}
|
642 |
-
else
|
643 |
{
|
644 |
$filters->pinPoint |= CJTBlockModel::PINS_FRONTEND;
|
645 |
-
|
646 |
// Pages.
|
647 |
-
if ( is_page() )
|
648 |
{
|
649 |
// Blocks with ALL PAGES selected.
|
650 |
$filters->pinPoint |= CJTBlockModel::PINS_PAGES_ALL_PAGES;
|
651 |
-
|
652 |
$filters->currentObject = $GLOBALS[ 'post' ];
|
653 |
-
$filters->currentCustomPin = CJTBlockModel::PINS_PAGES_CUSTOM_PAGE;
|
654 |
-
|
655 |
// Blocks with PAGE-ID selected.
|
656 |
$filters->customPins[ ] = array
|
657 |
(
|
658 |
'pin' => 'pages',
|
659 |
-
|
660 |
'pins' => array( $filters->currentObject->ID ),
|
661 |
-
|
662 |
'flag' => CJTBlockModel::PINS_PAGES_CUSTOM_PAGE,
|
663 |
-
|
664 |
);
|
665 |
-
|
666 |
// Blocks with FRONT-PAGE selected.
|
667 |
-
if ( is_front_page() )
|
668 |
{
|
669 |
$filters->pinPoint |= CJTBlockModel::PINS_PAGES_FRONT_PAGE;
|
670 |
}
|
671 |
-
|
672 |
/**
|
673 |
* In order for metabox block to get in the output we need
|
674 |
* to add metabox order for it.
|
675 |
* @see CJTBlocksCouplingController::getBlocks.
|
676 |
*/
|
677 |
$metabox = CJTModel::create( 'metabox', array( $filters->currentObject->ID ) );
|
678 |
-
|
679 |
$filters->moreToOrder[ ][ 1 ] = $metabox->getMetaboxId();
|
680 |
-
|
681 |
} // End is_page()
|
682 |
-
|
683 |
-
else if ( is_attachment() )
|
684 |
{
|
685 |
$filters->pinPoint |= CJTBlockModel::PINS_ATTACHMENT;
|
686 |
}
|
687 |
// Posts.
|
688 |
-
else if ( is_single() )
|
689 |
{
|
690 |
// Blocks with ALL POSTS & ALL CATEGORIES selected.
|
691 |
$filters->pinPoint |= CJTBlockModel::PINS_POSTS_ALL_POSTS | CJTBlockModel::PINS_CATEGORIES_ALL_CATEGORIES;
|
692 |
-
|
693 |
$filters->currentObject = $GLOBALS[ 'post' ];
|
694 |
$filters->currentCustomPin = CJTBlockModel::PINS_POSTS_CUSTOM_POST;
|
695 |
-
|
696 |
// Blocks with POST-ID selected.
|
697 |
-
|
698 |
$filters->customPins[ ] = array
|
699 |
(
|
700 |
-
|
701 |
'pin' => 'posts',
|
702 |
-
|
703 |
'pins' => array( $filters->currentObject->ID ),
|
704 |
-
|
705 |
'flag' => CJTBlockModel::PINS_POSTS_CUSTOM_POST,
|
706 |
-
|
707 |
);
|
708 |
-
|
709 |
-
// Include POST PARENT CATRGORIES blocks.
|
710 |
$parentCategoriesIds = wp_get_post_categories( $filters->currentObject->ID, array( 'fields' => 'ids' ) );
|
711 |
-
|
712 |
/**
|
713 |
* Custom-Posts just added "ON THE RUN/FLY"
|
714 |
* Need simple fix by confirming that the post is belong to
|
@@ -716,72 +716,72 @@ class CJTBlocksCouplingController extends CJTController {
|
|
716 |
* Custom posts NOW unlike Posts, it doesn't inherit parent
|
717 |
* taxonomis Code Blocks!!
|
718 |
*/
|
719 |
-
if ( ! empty( $parentCategoriesIds ) )
|
720 |
{
|
721 |
-
|
722 |
$filters->params[ 'hasCategories' ] = true;
|
723 |
$filters->params[ 'parentCategories' ] = $parentCategoriesIds;
|
724 |
-
|
725 |
$filters->customPins[ ] = array
|
726 |
(
|
727 |
-
|
728 |
'pin' => 'categories',
|
729 |
-
|
730 |
'pins' => $parentCategoriesIds,
|
731 |
-
|
732 |
'flag' => CJTBlockModel::PINS_CATEGORIES_CUSTOM_CATEGORY,
|
733 |
-
|
734 |
);
|
735 |
-
|
736 |
}
|
737 |
-
|
738 |
/**
|
739 |
* In order for metabox block to get in the output we need
|
740 |
* to add metabox order for it.
|
741 |
* @see CJTBlocksCouplingController::getBlocks.
|
742 |
*/
|
743 |
$metabox = CJTModel::create( 'metabox', array( $filters->currentObject->ID ) );
|
744 |
-
|
745 |
$filters->moreToOrder[][ 1 ] = $metabox->getMetaboxId();
|
746 |
-
|
747 |
-
/**
|
748 |
* @TODO check for recent posts Based on user configuration.
|
749 |
* Recent posts should be detcted by comparing
|
750 |
* user condifguration with post date.
|
751 |
*/
|
752 |
if ( 0 ) {
|
753 |
-
|
754 |
}
|
755 |
} // End is_single()
|
756 |
-
|
757 |
// Categories.
|
758 |
-
else if( is_category() )
|
759 |
{
|
760 |
// Blocks with ALL CATEGORIES selected.
|
761 |
$filters->pinPoint |= CJTBlockModel::PINS_CATEGORIES_ALL_CATEGORIES;
|
762 |
-
|
763 |
$filters->currentObject = get_queried_object();
|
764 |
$filters->currentCustomPin = CJTBlockModel::PINS_CATEGORIES_CUSTOM_CATEGORY;
|
765 |
-
|
766 |
// Blocks with CATEGORY-ID selected.
|
767 |
$filters->customPins[] = array
|
768 |
(
|
769 |
'pin' => 'categories',
|
770 |
-
|
771 |
'pins' => array( $filters->currentObject->term_id ),
|
772 |
-
|
773 |
'flag' => CJTBlockModel::PINS_CATEGORIES_CUSTOM_CATEGORY,
|
774 |
-
|
775 |
);
|
776 |
-
|
777 |
} // End is_category()
|
778 |
-
|
779 |
// Blocks with BLOG-INDEX selected.
|
780 |
else if ( is_home() )
|
781 |
{
|
782 |
$filters->pinPoint |= CJTBlockModel::PINS_POSTS_BLOG_INDEX;
|
783 |
}
|
784 |
-
else if ( is_search() )
|
785 |
{
|
786 |
$filters->pinPoint |= CJTBlockModel::PINS_SEARCH;
|
787 |
}
|
@@ -789,35 +789,35 @@ class CJTBlocksCouplingController extends CJTController {
|
|
789 |
{
|
790 |
$filters->pinPoint |= CJTBlockModel::PINS_TAG;
|
791 |
}
|
792 |
-
else if ( is_author() )
|
793 |
{
|
794 |
$filters->pinPoint |= CJTBlockModel::PINS_AUTHOR;
|
795 |
}
|
796 |
-
else if ( is_archive() )
|
797 |
{
|
798 |
$filters->pinPoint |= CJTBlockModel::PINS_ARCHIVE;
|
799 |
}
|
800 |
-
else if ( is_404() )
|
801 |
{
|
802 |
$filters->pinPoint |= CJTBlockModel::PINS_404_ERROR;
|
803 |
}
|
804 |
-
|
805 |
}
|
806 |
-
|
807 |
$this->filters = $this->onsetfilters( $filters );
|
808 |
-
|
809 |
}
|
810 |
-
|
811 |
/**
|
812 |
* Wordpress do shortcode callback for
|
813 |
-
* CJT Shortcodes ([cjtoolbox ....])!
|
814 |
-
*
|
815 |
* This method role is to load the shortcode routines
|
816 |
* in order to handle the request.
|
817 |
-
*
|
818 |
* It doesn't do anything except deferring the shortcode
|
819 |
* codes from loaded until shortcode is really used!
|
820 |
-
*
|
821 |
* @param mixed $attributes
|
822 |
*/
|
823 |
public function shortcode($attributes, $content) {
|
@@ -827,15 +827,15 @@ class CJTBlocksCouplingController extends CJTController {
|
|
827 |
// Return Shortcode replacement!
|
828 |
return ((string) $shortcode);
|
829 |
}
|
830 |
-
|
831 |
/**
|
832 |
* put your comment there...
|
833 |
-
*
|
834 |
*/
|
835 |
public static function & theInstance() {
|
836 |
return self::$instance;
|
837 |
}
|
838 |
-
|
839 |
} // End class.
|
840 |
|
841 |
// Hookable!
|
2 |
/**
|
3 |
* @version $ Id; blocks-coupling.php 21-03-2012 03:22:10 Ahmed Said $
|
4 |
*/
|
5 |
+
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
* Applying Code blocks for the curren request.
|
11 |
+
*
|
12 |
* This controller is always loaded.
|
13 |
+
*
|
14 |
* The class resposibility is to output the code blocks
|
15 |
* tha associated with current request.
|
16 |
+
*
|
17 |
* @author Ahmed Said
|
18 |
* @version 6
|
19 |
*/
|
20 |
class CJTBlocksCouplingController extends CJTController {
|
21 |
+
|
22 |
/**
|
23 |
* put your comment there...
|
24 |
+
*
|
25 |
* @var mixed
|
26 |
*/
|
27 |
protected $blocks = array(
|
28 |
'code' => array('header' => '', 'footer' => ''),
|
29 |
'scripts' => array('header' => array(), 'footer' => array()),
|
30 |
);
|
31 |
+
|
32 |
/**
|
33 |
* put your comment there...
|
34 |
+
*
|
35 |
* @var mixed
|
36 |
*/
|
37 |
protected $controllerInfo = array('model' => 'coupling');
|
38 |
+
|
39 |
/**
|
40 |
* put your comment there...
|
41 |
+
*
|
42 |
* @var mixed
|
43 |
*/
|
44 |
protected $filters = null;
|
45 |
+
|
46 |
/**
|
47 |
* put your comment there...
|
48 |
+
*
|
49 |
* @var mixed
|
50 |
*/
|
51 |
protected static $instance = null;
|
52 |
+
|
53 |
/**
|
54 |
* put your comment there...
|
55 |
+
*
|
56 |
* @var mixed
|
57 |
*/
|
58 |
private $onActionIds = array();
|
59 |
+
|
60 |
/**
|
61 |
* put your comment there...
|
62 |
+
*
|
63 |
* @var mixed
|
64 |
*/
|
65 |
protected $onassigncouplingcallback = array('parameters' => array('callback'));
|
66 |
|
67 |
/**
|
68 |
* put your comment there...
|
69 |
+
*
|
70 |
* @var mixed
|
71 |
*/
|
72 |
protected $onappendcode = array('parameters' => array('code'));
|
73 |
+
|
74 |
/**
|
75 |
* put your comment there...
|
76 |
+
*
|
77 |
* @var mixed
|
78 |
*/
|
79 |
protected $onblockmatched = array('parameters' => array('block'));
|
80 |
+
|
81 |
/**
|
82 |
* put your comment there...
|
83 |
+
*
|
84 |
* @var mixed
|
85 |
*/
|
86 |
protected $oncancelmatching = array('parameters' => array('matched'));
|
87 |
+
|
88 |
/**
|
89 |
* put your comment there...
|
90 |
+
*
|
91 |
* @var mixed
|
92 |
*/
|
93 |
protected $ondefaultfilters = array('parameters' => array('filters'));
|
94 |
+
|
95 |
/**
|
96 |
* put your comment there...
|
97 |
+
*
|
98 |
* @var mixed
|
99 |
*/
|
100 |
protected $ondo = array('parameters' => array('data', 'method', 'condition'));
|
101 |
+
|
102 |
/**
|
103 |
* put your comment there...
|
104 |
+
*
|
105 |
* @var mixed
|
106 |
*/
|
107 |
protected $onblocksorder = array('parameters' => array('order'));
|
108 |
|
109 |
/**
|
110 |
* put your comment there...
|
111 |
+
*
|
112 |
* @var mixed
|
113 |
*/
|
114 |
protected $onevalcodeblock = array( 'parameters' => array( 'keep', 'block' ) );
|
115 |
+
|
116 |
/**
|
117 |
* put your comment there...
|
118 |
+
*
|
119 |
* @var mixed
|
120 |
*/
|
121 |
protected $ongetblocks = array('parameters' => array('blocks'));
|
122 |
|
123 |
/**
|
124 |
* put your comment there...
|
125 |
+
*
|
126 |
* @var mixed
|
127 |
*/
|
128 |
protected $ongetcache = array('parameters' => array('cache'));
|
129 |
|
130 |
/**
|
131 |
* put your comment there...
|
132 |
+
*
|
133 |
* @var mixed
|
134 |
*/
|
135 |
protected $ongetfilters = array('parameters' => array('filters'));
|
136 |
+
|
137 |
/**
|
138 |
* put your comment there...
|
139 |
+
*
|
140 |
* @var mixed
|
141 |
*/
|
142 |
protected $onlinkedtemplates = array('parameters' => array('templates'));
|
143 |
+
|
144 |
/**
|
145 |
* put your comment there...
|
146 |
+
*
|
147 |
* @var mixed
|
148 |
*/
|
149 |
protected $onlinkscripts = array('parameters' => array('templates'));
|
150 |
|
151 |
/**
|
152 |
* put your comment there...
|
153 |
+
*
|
154 |
* @var mixed
|
155 |
*/
|
156 |
protected $onlinkstyles = array('parameters' => array('templates'));
|
157 |
+
|
158 |
/**
|
159 |
* put your comment there...
|
160 |
+
*
|
161 |
* @var mixed
|
162 |
*/
|
163 |
protected $onlinktemplate = array('parameters' => array('template'));
|
164 |
+
|
165 |
/**
|
166 |
* put your comment there...
|
167 |
+
*
|
168 |
* @var mixed
|
169 |
*/
|
170 |
protected $onmatchingurls = array('parameters' => array('urls'));
|
171 |
|
172 |
/**
|
173 |
* put your comment there...
|
174 |
+
*
|
175 |
* @var mixed
|
176 |
*/
|
177 |
protected $onnoblocks = array('hookType' => CJTWordpressEvents::HOOK_ACTION);
|
178 |
|
179 |
/**
|
180 |
* put your comment there...
|
181 |
+
*
|
182 |
* @var mixed
|
183 |
*/
|
184 |
protected $onoutput = array('parameters' => array('code', 'location'));
|
185 |
+
|
186 |
/**
|
187 |
* put your comment there...
|
188 |
+
*
|
189 |
* @var mixed
|
190 |
*/
|
191 |
protected $onprocess = array('hookType' => CJTWordpressEvents::HOOK_ACTION);
|
192 |
|
193 |
/**
|
194 |
* put your comment there...
|
195 |
+
*
|
196 |
* @var mixed
|
197 |
*/
|
198 |
protected $onprocessblock = array('parameters' => array('block'));
|
199 |
+
|
200 |
/**
|
201 |
* put your comment there...
|
202 |
+
*
|
203 |
* @var mixed
|
204 |
*/
|
205 |
protected $onqueuecss = array('parameters' => array('style'));
|
206 |
+
|
207 |
/**
|
208 |
* put your comment there...
|
209 |
+
*
|
210 |
* @var mixed
|
211 |
*/
|
212 |
protected $onqueuejavascript = array('parameters' => array('script'));
|
213 |
+
|
214 |
/**
|
215 |
* put your comment there...
|
216 |
+
*
|
217 |
* @var mixed
|
218 |
*/
|
219 |
protected $onsetfilters = array('parameters' => array('filters'));
|
220 |
+
|
221 |
/**
|
222 |
* put your comment there...
|
223 |
+
*
|
224 |
* @var mixed
|
225 |
*/
|
226 |
protected $templates = array();
|
227 |
+
|
228 |
/**
|
229 |
* Initialize controller object.
|
230 |
+
*
|
231 |
* @see CJTController for more details
|
232 |
* @return void
|
233 |
*/
|
252 |
// Add Shortcode callbacks.
|
253 |
add_shortcode('cjtoolbox', array(&$this, 'shortcode'));
|
254 |
}
|
255 |
+
|
256 |
/**
|
257 |
* put your comment there...
|
258 |
+
*
|
259 |
* @param mixed $id
|
260 |
*/
|
261 |
public function addOnActionIds($id) {
|
262 |
// Add ID is not exists.
|
263 |
if (!in_array($id, $this->onActionIds)) {
|
264 |
+
$this->onActionIds[] = $id;
|
265 |
}
|
266 |
// Chaining.
|
267 |
return $this;
|
269 |
|
270 |
/**
|
271 |
* put your comment there...
|
272 |
+
*
|
273 |
*/
|
274 |
+
public function getBlocks()
|
275 |
{
|
276 |
// Set request view filters used for querying database.
|
277 |
$this->setRequestFilters();
|
278 |
+
|
279 |
// Get blocks order. NOTE: This is all blocks order not only the queried/target blocks.
|
280 |
$blocksOrder = array();
|
281 |
$metaBoxesOrder = $this->onblocksorder( $this->model->getOrder() );
|
282 |
+
|
283 |
// Get ORDER-INDEX <TO> BLOCK-ID mapping.
|
284 |
preg_match_all( '/cjtoolbox-(\d+)/', $metaBoxesOrder[ 'normal' ], $blocksOrder, PREG_SET_ORDER );
|
285 |
+
|
286 |
/**
|
287 |
* append more to orders produced by CJTBlocksCouplingController::setRequestFilter().
|
288 |
* More to orders may allow other blocks to bein the output (e.g metaboxe blocks).
|
289 |
*/
|
290 |
$blocksOrder = array_merge( $blocksOrder, $this->getFilters()->moreToOrder );
|
291 |
+
|
292 |
// Prepare request URL to match against Links & Expressions.
|
293 |
$linksRequestURL = self::getRequestURL();
|
294 |
$expressionsRequestURL = "{$linksRequestURL}?{$_SERVER['QUERY_STRING']}";
|
295 |
+
|
296 |
extract( $this->onmatchingurls( compact( 'linksRequestURL', 'expressionsRequestURL' ) ) );
|
297 |
+
|
298 |
// Get all blocks including (Links & Expressions Blocks).
|
299 |
$blocks = $this->ongetblocks(
|
300 |
+
|
301 |
$this->model->getPinsBlocks(
|
302 |
+
|
303 |
+
CJTBlockModel::PINS_LINK_EXPRESSION,
|
304 |
+
|
305 |
+
$this->getFilters()->pinPoint,
|
306 |
+
|
307 |
$this->getFilters()->customPins,
|
308 |
+
|
309 |
$this->getFilters()
|
310 |
+
|
311 |
+
)
|
312 |
+
|
313 |
);
|
314 |
+
|
315 |
+
|
316 |
+
if ( empty( $blocks ) )
|
317 |
{
|
318 |
$this->onnoblocks();
|
319 |
+
|
320 |
return false;
|
321 |
+
|
322 |
}
|
323 |
+
|
324 |
// Import related libraries.
|
325 |
cssJSToolbox::import( 'framework:php:evaluator:evaluator.inc.php' );
|
326 |
+
|
327 |
/**
|
328 |
* Iterator over all blocks by using they order.
|
329 |
* For each block get code and scripts.
|
330 |
*/
|
331 |
$this->onprocess();
|
332 |
+
|
333 |
foreach ( $blocksOrder as $blockOrder )
|
334 |
{
|
335 |
$blockId = (int) $blockOrder[1];
|
336 |
+
|
337 |
// As mentioned above. Orders is for all blocks not just those queried from db.
|
338 |
+
if ( isset($blocks[ $blockId ] ) )
|
339 |
{
|
340 |
+
|
341 |
$block = $this->onprocessblock( $blocks[ $blockId ] );
|
342 |
+
|
343 |
/**
|
344 |
* Process Links & Expressions blocks.
|
345 |
* For better performace check only those with links and expressions flags.
|
346 |
*/
|
347 |
+
if ( $block->blocksGroup & CJTBlockModel::PINS_LINK_EXPRESSION )
|
348 |
{
|
349 |
/**
|
350 |
* Initiliaze $matchedLink and $matchedExpression inside IF statment.
|
353 |
* Otherwise they'll get the correct value inside each statement.
|
354 |
*/
|
355 |
/// Check if there is a matched link.
|
356 |
+
if ( $matchedLink = ( $block->blocksGroup & CJTBlockModel::PINS_LINKS ) )
|
357 |
{
|
358 |
$links = explode( "\n", trim( $block->links ) );
|
359 |
$matchedLink = in_array( $linksRequestURL, $links );
|
360 |
}
|
361 |
+
|
362 |
/// Check if there is a matched expression.
|
363 |
+
if ( $matchedExpression = ( $block->blocksGroup & CJTBlockModel::PINS_EXPRESSIONS ) )
|
364 |
{
|
365 |
$expressions = explode("\n", $block->expressions);
|
366 |
+
|
367 |
+
foreach ( $expressions as $expression )
|
368 |
{
|
369 |
/// @TODO: Matches may be used later to evaulate variables inside code block.
|
370 |
+
if( $matchedExpression = @ preg_match( "/{$expression}/", $expressionsRequestURL ) )
|
371 |
{
|
372 |
break;
|
373 |
}
|
374 |
+
|
375 |
}
|
376 |
+
|
377 |
}
|
378 |
+
|
379 |
/**
|
380 |
* Exclude Links & Expressions Blocks that doesn't has a match.
|
381 |
* If there is no matched link or expression then exclude block.
|
382 |
*/
|
383 |
+
if ( $this->oncancelmatching( ! ( $matchedExpression || $matchedLink ) ) )
|
384 |
{
|
385 |
continue;
|
386 |
}
|
387 |
+
|
388 |
}
|
389 |
// Allow extensions to control to prevent block from being in the output
|
390 |
+
if ( $block = $this->onblockmatched( $block ) )
|
391 |
{
|
392 |
// Retrieve block code-files.
|
393 |
$block->code = $this->model->getBlockCode( $block->id );
|
394 |
+
|
395 |
// Import Executable (PHP and HTML) templates.
|
396 |
$block->code = $block->code . $this->model->getExecTemplatesCode( $block->id );
|
397 |
+
|
398 |
// For every location store blocks code into single string
|
399 |
+
|
400 |
if ( ! $evaluatedCode = $this->onevalcodeblock( false, $block ) )
|
401 |
{
|
402 |
+
$evaluatedCode = CJTPHPCodeEvaluator::getInstance( $block )->exec()->getOutput();
|
403 |
}
|
404 |
+
|
405 |
/** @todo Include Debuging info only if we're in debuging mode! */
|
406 |
if ( 1 ) {
|
407 |
// CODE UPDATED BY RBJ -- START
|
417 |
endif;
|
418 |
// CODE UPDATED BY RBJ -- END
|
419 |
}
|
420 |
+
|
421 |
$this->blocks[ 'code' ][ $block->location ] .= $this->onappendcode( $evaluatedCode );
|
422 |
+
|
423 |
// Store all used Ids in the CORRECT ORDER.
|
424 |
$this->addOnActionIds( $blockId );
|
425 |
}
|
426 |
+
|
427 |
}
|
428 |
+
|
429 |
}
|
430 |
+
|
431 |
+
$templates = $this->onActionIds ?
|
432 |
+
$this->model->getLinkedTemplates( $this->onActionIds ) :
|
433 |
array();
|
434 |
+
|
435 |
// Classisfy as we process Scripts and Styles separatly (different hooks!).
|
436 |
+
foreach ( $this->onlinkedtemplates( $templates ) as $id => $template )
|
437 |
{
|
438 |
// Filer template!
|
439 |
extract( $this->onlinktemplate( compact( 'template', 'id' ) ) );
|
440 |
+
|
441 |
$this->templates[ $template->type ][ $id ] = $template;
|
442 |
}
|
443 |
+
|
444 |
+
|
445 |
return true;
|
446 |
}
|
447 |
+
|
448 |
/**
|
449 |
* put your comment there...
|
450 |
+
*
|
451 |
*/
|
452 |
public function getCached() {
|
453 |
// Cache is not implemented yet might be supported by extenal Extensions!
|
454 |
return $this->ongetcache(false);
|
455 |
}
|
456 |
+
|
457 |
/**
|
458 |
* put your comment there...
|
459 |
+
*
|
460 |
*/
|
461 |
public function getFilters() {
|
462 |
+
return $this->ongetfilters($this->filters);
|
463 |
}
|
464 |
|
465 |
/**
|
466 |
* put your comment there...
|
467 |
+
*
|
468 |
*/
|
469 |
public function getOnActionIds() {
|
470 |
return $this->onActionIds;
|
472 |
|
473 |
/**
|
474 |
* put your comment there...
|
475 |
+
*
|
476 |
*/
|
477 |
public static function getRequestURL() {
|
478 |
// URL Protocol.
|
486 |
$url = "{$protocol}{$host}{$port}{$requestURI}";
|
487 |
return $url;
|
488 |
}
|
489 |
+
|
490 |
/**
|
491 |
* put your comment there...
|
492 |
+
*
|
493 |
*/
|
494 |
public function hasOnActionIds() {
|
495 |
return !empty($this->onActionIds);
|
496 |
}
|
497 |
+
|
498 |
/**
|
499 |
* put your comment there...
|
500 |
+
*
|
501 |
*/
|
502 |
public function initCoupling() {
|
503 |
// For some reasons wp action is fired twice.
|
528 |
remove_action('wp', array(&$this, 'initCoupling'));
|
529 |
remove_action('admin_init', array(&$this, 'initCoupling'));
|
530 |
}
|
531 |
+
|
532 |
/**
|
533 |
* put your comment there...
|
534 |
+
*
|
535 |
*/
|
536 |
public function linkFooterStyleSheets() {
|
537 |
// Initialize.
|
557 |
wp_enqueue_script('jquery');
|
558 |
// Enqueue footer style sheet loader.
|
559 |
wp_enqueue_script('cjt-coupling-footer-css-loader', cssJSToolbox::getURI('controllers:coupling:js:footer-stylesheet-loader.js'));
|
560 |
+
// Output JavaScript array to be filled with the styles!
|
561 |
$jsStyleSheetsList = json_encode($styles);
|
562 |
require cssJSToolbox::resolvePath('controllers:coupling:html:load-footer-style.html.php');
|
563 |
}
|
565 |
|
566 |
/**
|
567 |
* put your comment there...
|
568 |
+
*
|
569 |
*/
|
570 |
public function linkTemplates() {
|
571 |
$currentFilter = current_filter();
|
591 |
$queue->enqueue($template->queueName);
|
592 |
}
|
593 |
}
|
594 |
+
|
595 |
/**
|
596 |
* put your comment there...
|
597 |
+
*
|
598 |
*/
|
599 |
public function outputBlocks() {
|
600 |
// Derived location name from wordpress filter name.
|
609 |
$location = $locationsMap[$location];
|
610 |
echo $this->onoutput($this->blocks['code'][$location], $location);
|
611 |
}
|
612 |
+
|
613 |
/**
|
614 |
* put your comment there...
|
615 |
+
*
|
616 |
*/
|
617 |
+
protected function setRequestFilters()
|
618 |
{
|
619 |
// Get request blocks.
|
620 |
$filters = $this->ondefaultfilters( ( object ) array
|
621 |
(
|
622 |
+
|
623 |
'pinPoint' => 0x00000000,
|
624 |
+
|
625 |
'customPins' => array(),
|
626 |
+
|
627 |
'moreToOrder' => array(),
|
628 |
+
|
629 |
'currentObject' => null,
|
630 |
+
|
631 |
'currentCustomPin' => 0,
|
632 |
+
|
633 |
'params' => array(),
|
634 |
+
|
635 |
) );
|
636 |
+
|
637 |
+
if ( is_admin() )
|
638 |
{
|
639 |
// Include all backend blocks.
|
640 |
$filters->pinPoint |= CJTBlockModel::PINS_BACKEND;
|
641 |
}
|
642 |
+
else
|
643 |
{
|
644 |
$filters->pinPoint |= CJTBlockModel::PINS_FRONTEND;
|
645 |
+
|
646 |
// Pages.
|
647 |
+
if ( is_page() )
|
648 |
{
|
649 |
// Blocks with ALL PAGES selected.
|
650 |
$filters->pinPoint |= CJTBlockModel::PINS_PAGES_ALL_PAGES;
|
651 |
+
|
652 |
$filters->currentObject = $GLOBALS[ 'post' ];
|
653 |
+
$filters->currentCustomPin = CJTBlockModel::PINS_PAGES_CUSTOM_PAGE;
|
654 |
+
|
655 |
// Blocks with PAGE-ID selected.
|
656 |
$filters->customPins[ ] = array
|
657 |
(
|
658 |
'pin' => 'pages',
|
659 |
+
|
660 |
'pins' => array( $filters->currentObject->ID ),
|
661 |
+
|
662 |
'flag' => CJTBlockModel::PINS_PAGES_CUSTOM_PAGE,
|
663 |
+
|
664 |
);
|
665 |
+
|
666 |
// Blocks with FRONT-PAGE selected.
|
667 |
+
if ( is_front_page() )
|
668 |
{
|
669 |
$filters->pinPoint |= CJTBlockModel::PINS_PAGES_FRONT_PAGE;
|
670 |
}
|
671 |
+
|
672 |
/**
|
673 |
* In order for metabox block to get in the output we need
|
674 |
* to add metabox order for it.
|
675 |
* @see CJTBlocksCouplingController::getBlocks.
|
676 |
*/
|
677 |
$metabox = CJTModel::create( 'metabox', array( $filters->currentObject->ID ) );
|
678 |
+
|
679 |
$filters->moreToOrder[ ][ 1 ] = $metabox->getMetaboxId();
|
680 |
+
|
681 |
} // End is_page()
|
682 |
+
|
683 |
+
else if ( is_attachment() )
|
684 |
{
|
685 |
$filters->pinPoint |= CJTBlockModel::PINS_ATTACHMENT;
|
686 |
}
|
687 |
// Posts.
|
688 |
+
else if ( is_single() )
|
689 |
{
|
690 |
// Blocks with ALL POSTS & ALL CATEGORIES selected.
|
691 |
$filters->pinPoint |= CJTBlockModel::PINS_POSTS_ALL_POSTS | CJTBlockModel::PINS_CATEGORIES_ALL_CATEGORIES;
|
692 |
+
|
693 |
$filters->currentObject = $GLOBALS[ 'post' ];
|
694 |
$filters->currentCustomPin = CJTBlockModel::PINS_POSTS_CUSTOM_POST;
|
695 |
+
|
696 |
// Blocks with POST-ID selected.
|
697 |
+
|
698 |
$filters->customPins[ ] = array
|
699 |
(
|
700 |
+
|
701 |
'pin' => 'posts',
|
702 |
+
|
703 |
'pins' => array( $filters->currentObject->ID ),
|
704 |
+
|
705 |
'flag' => CJTBlockModel::PINS_POSTS_CUSTOM_POST,
|
706 |
+
|
707 |
);
|
708 |
+
|
709 |
+
// Include POST PARENT CATRGORIES blocks.
|
710 |
$parentCategoriesIds = wp_get_post_categories( $filters->currentObject->ID, array( 'fields' => 'ids' ) );
|
711 |
+
|
712 |
/**
|
713 |
* Custom-Posts just added "ON THE RUN/FLY"
|
714 |
* Need simple fix by confirming that the post is belong to
|
716 |
* Custom posts NOW unlike Posts, it doesn't inherit parent
|
717 |
* taxonomis Code Blocks!!
|
718 |
*/
|
719 |
+
if ( ! empty( $parentCategoriesIds ) )
|
720 |
{
|
721 |
+
|
722 |
$filters->params[ 'hasCategories' ] = true;
|
723 |
$filters->params[ 'parentCategories' ] = $parentCategoriesIds;
|
724 |
+
|
725 |
$filters->customPins[ ] = array
|
726 |
(
|
727 |
+
|
728 |
'pin' => 'categories',
|
729 |
+
|
730 |
'pins' => $parentCategoriesIds,
|
731 |
+
|
732 |
'flag' => CJTBlockModel::PINS_CATEGORIES_CUSTOM_CATEGORY,
|
733 |
+
|
734 |
);
|
735 |
+
|
736 |
}
|
737 |
+
|
738 |
/**
|
739 |
* In order for metabox block to get in the output we need
|
740 |
* to add metabox order for it.
|
741 |
* @see CJTBlocksCouplingController::getBlocks.
|
742 |
*/
|
743 |
$metabox = CJTModel::create( 'metabox', array( $filters->currentObject->ID ) );
|
744 |
+
|
745 |
$filters->moreToOrder[][ 1 ] = $metabox->getMetaboxId();
|
746 |
+
|
747 |
+
/**
|
748 |
* @TODO check for recent posts Based on user configuration.
|
749 |
* Recent posts should be detcted by comparing
|
750 |
* user condifguration with post date.
|
751 |
*/
|
752 |
if ( 0 ) {
|
753 |
+
|
754 |
}
|
755 |
} // End is_single()
|
756 |
+
|
757 |
// Categories.
|
758 |
+
else if( is_category() )
|
759 |
{
|
760 |
// Blocks with ALL CATEGORIES selected.
|
761 |
$filters->pinPoint |= CJTBlockModel::PINS_CATEGORIES_ALL_CATEGORIES;
|
762 |
+
|
763 |
$filters->currentObject = get_queried_object();
|
764 |
$filters->currentCustomPin = CJTBlockModel::PINS_CATEGORIES_CUSTOM_CATEGORY;
|
765 |
+
|
766 |
// Blocks with CATEGORY-ID selected.
|
767 |
$filters->customPins[] = array
|
768 |
(
|
769 |
'pin' => 'categories',
|
770 |
+
|
771 |
'pins' => array( $filters->currentObject->term_id ),
|
772 |
+
|
773 |
'flag' => CJTBlockModel::PINS_CATEGORIES_CUSTOM_CATEGORY,
|
774 |
+
|
775 |
);
|
776 |
+
|
777 |
} // End is_category()
|
778 |
+
|
779 |
// Blocks with BLOG-INDEX selected.
|
780 |
else if ( is_home() )
|
781 |
{
|
782 |
$filters->pinPoint |= CJTBlockModel::PINS_POSTS_BLOG_INDEX;
|
783 |
}
|
784 |
+
else if ( is_search() )
|
785 |
{
|
786 |
$filters->pinPoint |= CJTBlockModel::PINS_SEARCH;
|
787 |
}
|
789 |
{
|
790 |
$filters->pinPoint |= CJTBlockModel::PINS_TAG;
|
791 |
}
|
792 |
+
else if ( is_author() )
|
793 |
{
|
794 |
$filters->pinPoint |= CJTBlockModel::PINS_AUTHOR;
|
795 |
}
|
796 |
+
else if ( is_archive() )
|
797 |
{
|
798 |
$filters->pinPoint |= CJTBlockModel::PINS_ARCHIVE;
|
799 |
}
|
800 |
+
else if ( is_404() )
|
801 |
{
|
802 |
$filters->pinPoint |= CJTBlockModel::PINS_404_ERROR;
|
803 |
}
|
804 |
+
|
805 |
}
|
806 |
+
|
807 |
$this->filters = $this->onsetfilters( $filters );
|
808 |
+
|
809 |
}
|
810 |
+
|
811 |
/**
|
812 |
* Wordpress do shortcode callback for
|
813 |
+
* CJT Shortcodes ([cjtoolbox ....])!
|
814 |
+
*
|
815 |
* This method role is to load the shortcode routines
|
816 |
* in order to handle the request.
|
817 |
+
*
|
818 |
* It doesn't do anything except deferring the shortcode
|
819 |
* codes from loaded until shortcode is really used!
|
820 |
+
*
|
821 |
* @param mixed $attributes
|
822 |
*/
|
823 |
public function shortcode($attributes, $content) {
|
827 |
// Return Shortcode replacement!
|
828 |
return ((string) $shortcode);
|
829 |
}
|
830 |
+
|
831 |
/**
|
832 |
* put your comment there...
|
833 |
+
*
|
834 |
*/
|
835 |
public static function & theInstance() {
|
836 |
return self::$instance;
|
837 |
}
|
838 |
+
|
839 |
} // End class.
|
840 |
|
841 |
// Hookable!
|
controllers/blocks.php
CHANGED
File without changes
|
controllers/code-files.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
@@ -12,7 +12,7 @@ cssJSToolbox::import('framework:mvc:controller-ajax.inc.php');
|
|
12 |
/**
|
13 |
* This class should replace any other controllers that
|
14 |
* has methods for interacting with a single Block (e.g block-ajax!)
|
15 |
-
*
|
16 |
* All single Block actions (e.g edit, new and save) should be placed/moved here
|
17 |
* in the future!
|
18 |
*/
|
@@ -20,14 +20,14 @@ class CJTCodeFilesController extends CJTAjaxController {
|
|
20 |
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
-
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
protected $controllerInfo = array();
|
27 |
-
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
-
*
|
31 |
*/
|
32 |
public function __construct() {
|
33 |
parent::__construct();
|
@@ -40,12 +40,12 @@ class CJTCodeFilesController extends CJTAjaxController {
|
|
40 |
|
41 |
/**
|
42 |
* put your comment there...
|
43 |
-
*
|
44 |
*/
|
45 |
public function deleteAction() {
|
46 |
// Block id.
|
47 |
$blockId = (int) $_GET['blockId'];
|
48 |
-
$ids = $_GET['ids'];
|
49 |
// Fetch code Blocks list.
|
50 |
$tblCodeFiles = new CJTBlockFilesTable(cssJSToolbox::getInstance()->getDBDriver());
|
51 |
// Delete all
|
@@ -61,7 +61,7 @@ class CJTCodeFilesController extends CJTAjaxController {
|
|
61 |
|
62 |
/**
|
63 |
* put your comment there...
|
64 |
-
*
|
65 |
*/
|
66 |
public function getListAction() {
|
67 |
// Block id.
|
@@ -86,7 +86,7 @@ class CJTCodeFilesController extends CJTAjaxController {
|
|
86 |
|
87 |
/**
|
88 |
* put your comment there...
|
89 |
-
*
|
90 |
*/
|
91 |
public function saveAction() {
|
92 |
// Block id.
|
@@ -103,10 +103,10 @@ class CJTCodeFilesController extends CJTAjaxController {
|
|
103 |
// Return New CodeFile Data.
|
104 |
$this->response = (array) $tblCodeFiles->getData();
|
105 |
}
|
106 |
-
|
107 |
/**
|
108 |
* put your comment there...
|
109 |
-
*
|
110 |
*/
|
111 |
public function switchAction() {
|
112 |
// Block id.
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
12 |
/**
|
13 |
* This class should replace any other controllers that
|
14 |
* has methods for interacting with a single Block (e.g block-ajax!)
|
15 |
+
*
|
16 |
* All single Block actions (e.g edit, new and save) should be placed/moved here
|
17 |
* in the future!
|
18 |
*/
|
20 |
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
+
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
protected $controllerInfo = array();
|
27 |
+
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
+
*
|
31 |
*/
|
32 |
public function __construct() {
|
33 |
parent::__construct();
|
40 |
|
41 |
/**
|
42 |
* put your comment there...
|
43 |
+
*
|
44 |
*/
|
45 |
public function deleteAction() {
|
46 |
// Block id.
|
47 |
$blockId = (int) $_GET['blockId'];
|
48 |
+
$ids = (array) $_GET['ids'];
|
49 |
// Fetch code Blocks list.
|
50 |
$tblCodeFiles = new CJTBlockFilesTable(cssJSToolbox::getInstance()->getDBDriver());
|
51 |
// Delete all
|
61 |
|
62 |
/**
|
63 |
* put your comment there...
|
64 |
+
*
|
65 |
*/
|
66 |
public function getListAction() {
|
67 |
// Block id.
|
86 |
|
87 |
/**
|
88 |
* put your comment there...
|
89 |
+
*
|
90 |
*/
|
91 |
public function saveAction() {
|
92 |
// Block id.
|
103 |
// Return New CodeFile Data.
|
104 |
$this->response = (array) $tblCodeFiles->getData();
|
105 |
}
|
106 |
+
|
107 |
/**
|
108 |
* put your comment there...
|
109 |
+
*
|
110 |
*/
|
111 |
public function switchAction() {
|
112 |
// Block id.
|
controllers/coupling/html/load-footer-style.html.php
CHANGED
File without changes
|
controllers/coupling/js/footer-stylesheet-loader.js
CHANGED
File without changes
|
controllers/coupling/shortcode/block/block.php
CHANGED
File without changes
|
controllers/coupling/shortcode/shortcode.php
CHANGED
File without changes
|
controllers/default.php
CHANGED
File without changes
|
controllers/installer.php
CHANGED
File without changes
|
controllers/metabox.php
CHANGED
@@ -11,17 +11,17 @@ cssJSToolbox::import('framework:mvc:controller-ajax.inc.php');
|
|
11 |
|
12 |
/**
|
13 |
* Controll Block metabox actions.
|
14 |
-
*
|
15 |
* @version 6.0
|
16 |
* @package CJT
|
17 |
* @subpackage Controllers
|
18 |
* @author Ahmed Said
|
19 |
*/
|
20 |
class CJTMetaboxController extends CJTAjaxController {
|
21 |
-
|
22 |
/**
|
23 |
* Initialize post controller.
|
24 |
-
*
|
25 |
* @return void
|
26 |
*/
|
27 |
public function __construct($_unused_hasView = null, $request = null) {
|
@@ -38,14 +38,37 @@ class CJTMetaboxController extends CJTAjaxController {
|
|
38 |
$this->registryAction('delete');
|
39 |
}
|
40 |
else if ($this->model->doPost()) {
|
|
|
41 |
// Add metabox.
|
42 |
-
|
|
|
43 |
}
|
44 |
}
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
/**
|
47 |
* Create block metabox for specific post object.
|
48 |
-
*
|
49 |
* @param integer Post id.
|
50 |
* @return array New block object consist of block id and new block metabox view content.
|
51 |
*/
|
@@ -65,15 +88,15 @@ class CJTMetaboxController extends CJTAjaxController {
|
|
65 |
$this->view = CJTView::create('blocks/metabox');
|
66 |
$this->view->setBlock(CJTModel::create('blocks')->getBlock($blockId, array('returnCodeFile' => true)));
|
67 |
$this->view->setSecurityToken($this->createSecurityToken());
|
68 |
-
// Send
|
69 |
$this->response['references'] = self::getReferencesQueue();
|
70 |
$this->response['view'] = $this->view->setOption('customizeMetabox', true)->getTemplate('metabox');
|
71 |
}
|
72 |
}
|
73 |
-
|
74 |
/**
|
75 |
* put your comment there...
|
76 |
-
*
|
77 |
*/
|
78 |
public function deleteAction() {
|
79 |
// Get input vars.
|
@@ -92,19 +115,19 @@ class CJTMetaboxController extends CJTAjaxController {
|
|
92 |
// Push vars into the view.
|
93 |
$this->view->setBlock($block);
|
94 |
$this->view->setSecurityToken($this->createSecurityToken());
|
95 |
-
// Send
|
96 |
$this->response['references'] = self::getReferencesQueue();
|
97 |
// create-metabox view content.
|
98 |
$this->response['view'] = $this->view->setOption('customizeMetabox', true)->getTemplate('create');
|
99 |
}
|
100 |
-
|
101 |
/**
|
102 |
* put your comment there...
|
103 |
-
*
|
104 |
*/
|
105 |
protected static function getReferencesQueue() {
|
106 |
$result = array();
|
107 |
-
/**
|
108 |
Get all scripts needed to be loaded for block metabox to work.
|
109 |
--------------------------------------------------------------
|
110 |
* 1. Suppress the output we need the SRC URLs not the HTML tags.
|
@@ -142,16 +165,16 @@ class CJTMetaboxController extends CJTAjaxController {
|
|
142 |
// Return references.
|
143 |
return $result;
|
144 |
}
|
145 |
-
|
146 |
/**
|
147 |
* Select which metabox to load.
|
148 |
-
*
|
149 |
-
* create-metabox view will be loaded if user doesnt
|
150 |
* created a block for current post yet.
|
151 |
-
*
|
152 |
* metabox view will be loaded if there is a block
|
153 |
* already created for current post.
|
154 |
-
*
|
155 |
* Callback for add_meta_boxes action.
|
156 |
*/
|
157 |
public function showMetabox() {
|
@@ -160,7 +183,7 @@ class CJTMetaboxController extends CJTAjaxController {
|
|
160 |
/// Get block id.
|
161 |
$metaboxId = $this->model->reservedMetaboxBlockId();
|
162 |
// User didn't create block for this post yet.
|
163 |
-
// Show create-metabox view.
|
164 |
if (!$this->model->hasBlock()) {
|
165 |
// Set view template name.
|
166 |
$viewName = 'create-metabox';
|
@@ -188,5 +211,5 @@ class CJTMetaboxController extends CJTAjaxController {
|
|
188 |
// Add metabox.
|
189 |
add_meta_box($this->view->getMetaboxId(), $this->view->getMetaboxName(), array(&$this->view, 'display'), $this->model->getPost()->post_type, 'normal');
|
190 |
}
|
191 |
-
|
192 |
} // End class.
|
11 |
|
12 |
/**
|
13 |
* Controll Block metabox actions.
|
14 |
+
*
|
15 |
* @version 6.0
|
16 |
* @package CJT
|
17 |
* @subpackage Controllers
|
18 |
* @author Ahmed Said
|
19 |
*/
|
20 |
class CJTMetaboxController extends CJTAjaxController {
|
21 |
+
|
22 |
/**
|
23 |
* Initialize post controller.
|
24 |
+
*
|
25 |
* @return void
|
26 |
*/
|
27 |
public function __construct($_unused_hasView = null, $request = null) {
|
38 |
$this->registryAction('delete');
|
39 |
}
|
40 |
else if ($this->model->doPost()) {
|
41 |
+
$current_screen = get_current_screen();
|
42 |
// Add metabox.
|
43 |
+
// Hiding metabox for Gutenberg editors.
|
44 |
+
if ( ! $this->hasGutenberg() ) $this->showMetabox();
|
45 |
}
|
46 |
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Check for Gutenberg editor.
|
50 |
+
*
|
51 |
+
* @return boolean
|
52 |
+
*/
|
53 |
+
public function hasGutenberg() {
|
54 |
+
if ( function_exists( 'is_gutenberg_page' ) &&
|
55 |
+
is_gutenberg_page()
|
56 |
+
) {
|
57 |
+
return true;
|
58 |
+
}
|
59 |
+
$current_screen = get_current_screen();
|
60 |
+
if ( method_exists( $current_screen, 'is_block_editor' ) &&
|
61 |
+
$current_screen->is_block_editor()
|
62 |
+
) {
|
63 |
+
// Gutenberg page on 5+.
|
64 |
+
return true;
|
65 |
+
}
|
66 |
+
return false;
|
67 |
+
}
|
68 |
+
|
69 |
/**
|
70 |
* Create block metabox for specific post object.
|
71 |
+
*
|
72 |
* @param integer Post id.
|
73 |
* @return array New block object consist of block id and new block metabox view content.
|
74 |
*/
|
88 |
$this->view = CJTView::create('blocks/metabox');
|
89 |
$this->view->setBlock(CJTModel::create('blocks')->getBlock($blockId, array('returnCodeFile' => true)));
|
90 |
$this->view->setSecurityToken($this->createSecurityToken());
|
91 |
+
// Send JavaScript & CSS files needed for the metabox view to work.
|
92 |
$this->response['references'] = self::getReferencesQueue();
|
93 |
$this->response['view'] = $this->view->setOption('customizeMetabox', true)->getTemplate('metabox');
|
94 |
}
|
95 |
}
|
96 |
+
|
97 |
/**
|
98 |
* put your comment there...
|
99 |
+
*
|
100 |
*/
|
101 |
public function deleteAction() {
|
102 |
// Get input vars.
|
115 |
// Push vars into the view.
|
116 |
$this->view->setBlock($block);
|
117 |
$this->view->setSecurityToken($this->createSecurityToken());
|
118 |
+
// Send JavaScript & CSS files needed for the metabox view to work.
|
119 |
$this->response['references'] = self::getReferencesQueue();
|
120 |
// create-metabox view content.
|
121 |
$this->response['view'] = $this->view->setOption('customizeMetabox', true)->getTemplate('create');
|
122 |
}
|
123 |
+
|
124 |
/**
|
125 |
* put your comment there...
|
126 |
+
*
|
127 |
*/
|
128 |
protected static function getReferencesQueue() {
|
129 |
$result = array();
|
130 |
+
/**
|
131 |
Get all scripts needed to be loaded for block metabox to work.
|
132 |
--------------------------------------------------------------
|
133 |
* 1. Suppress the output we need the SRC URLs not the HTML tags.
|
165 |
// Return references.
|
166 |
return $result;
|
167 |
}
|
168 |
+
|
169 |
/**
|
170 |
* Select which metabox to load.
|
171 |
+
*
|
172 |
+
* create-metabox view will be loaded if user doesnt
|
173 |
* created a block for current post yet.
|
174 |
+
*
|
175 |
* metabox view will be loaded if there is a block
|
176 |
* already created for current post.
|
177 |
+
*
|
178 |
* Callback for add_meta_boxes action.
|
179 |
*/
|
180 |
public function showMetabox() {
|
183 |
/// Get block id.
|
184 |
$metaboxId = $this->model->reservedMetaboxBlockId();
|
185 |
// User didn't create block for this post yet.
|
186 |
+
// Show create-metabox view.
|
187 |
if (!$this->model->hasBlock()) {
|
188 |
// Set view template name.
|
189 |
$viewName = 'create-metabox';
|
211 |
// Add metabox.
|
212 |
add_meta_box($this->view->getMetaboxId(), $this->view->getMetaboxName(), array(&$this->view, 'display'), $this->model->getPost()->post_type, 'normal');
|
213 |
}
|
214 |
+
|
215 |
} // End class.
|
controllers/package-file.php
CHANGED
File without changes
|
controllers/package.php
CHANGED
File without changes
|
controllers/packages.php
CHANGED
File without changes
|
controllers/settings.php
CHANGED
File without changes
|
controllers/setup.php
CHANGED
File without changes
|
controllers/template.php
CHANGED
File without changes
|
controllers/templates-lookup.php
CHANGED
File without changes
|
controllers/templates-manager.php
CHANGED
File without changes
|
css-javascript-toolbox.xml
CHANGED
File without changes
|
css-js-toolbox.class.php
CHANGED
File without changes
|
css-js-toolbox.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: CSS & JavaScript Toolbox
|
4 |
Plugin URI: http://css-javascript-toolbox.com/
|
5 |
Description: Easily add CSS, JavaScript, HTML and PHP code to unique CJT code blocks and assign them anywhere on your website.
|
6 |
-
Version:
|
7 |
Author: Wipeout Media
|
8 |
Author URI: http://css-javascript-toolbox.com
|
9 |
License:
|
@@ -27,7 +27,7 @@ define( 'CJTOOLBOX_PLUGIN_FILE', __FILE__ );
|
|
27 |
define( 'CJTOOLBOX_NAME', plugin_basename( dirname( __FILE__ ) ) );
|
28 |
|
29 |
/** CJT Text Domain used for localize texts */
|
30 |
-
define( 'CJTOOLBOX_TEXT_DOMAIN', CJTOOLBOX_NAME );
|
31 |
|
32 |
/** */
|
33 |
define( 'CJTOOLBOX_LANGUAGES', CJTOOLBOX_NAME . '/locals/languages/' );
|
@@ -36,7 +36,7 @@ define( 'CJTOOLBOX_LANGUAGES', CJTOOLBOX_NAME . '/locals/languages/' );
|
|
36 |
define( 'CJTOOLBOX_PATH', dirname( __FILE__ ) );
|
37 |
|
38 |
/** Dont use!! @deprecated */
|
39 |
-
define( 'CJTOOLBOX_INCLUDE_PATH', CJTOOLBOX_PATH . '/framework' );
|
40 |
|
41 |
/** Access Points path */
|
42 |
define( 'CJTOOLBOX_ACCESS_POINTS', CJTOOLBOX_PATH . '/access.points' );
|
@@ -56,314 +56,314 @@ require_once CJTOOLBOX_FRAMEWORK . '/events/hookable.interface.php';
|
|
56 |
require_once CJTOOLBOX_FRAMEWORK . '/events/hookable.class.php';
|
57 |
|
58 |
// Initialize events engine/system!
|
59 |
-
CJTWordpressEvents::
|
60 |
CJTWordpressEvents::$paths[ 'subjects' ][ 'core' ] = CJTOOLBOX_FRAMEWORK . '/events/subjects';
|
61 |
CJTWordpressEvents::$paths[ 'observers' ][ 'core' ] = CJTOOLBOX_FRAMEWORK . '/events/observers';
|
62 |
|
63 |
/**
|
64 |
* CJT Plugin interface.
|
65 |
-
*
|
66 |
* The CJT Plugin is maximum deferred.
|
67 |
* All functionality here is just to detect if the request should be processed!
|
68 |
-
*
|
69 |
* The main class is located css-js-toolbox.class.php cssJSToolbox class
|
70 |
* The plugin is fully developed using Model-View-Controller design pattern.
|
71 |
-
*
|
72 |
* access.points directory has all the entry points that processed by the Plugin.
|
73 |
-
*
|
74 |
* @package CJT
|
75 |
* @author Ahmed Said
|
76 |
* @version 6
|
77 |
*/
|
78 |
-
class CJTPlugin extends CJTHookableClass
|
79 |
{
|
80 |
|
81 |
/**
|
82 |
-
*
|
83 |
*/
|
84 |
const DB_VERSION = '1.6';
|
85 |
-
|
86 |
/**
|
87 |
* put your comment there...
|
88 |
-
*
|
89 |
* @var mixed
|
90 |
*/
|
91 |
CONST ENV_PHP_MIN_VERSION = '5.3';
|
92 |
-
|
93 |
/**
|
94 |
-
*
|
95 |
*/
|
96 |
const FW_Version = '4.0';
|
97 |
-
|
98 |
/**
|
99 |
-
*
|
100 |
*/
|
101 |
-
const VERSION = '8.
|
102 |
-
|
103 |
/**
|
104 |
-
*
|
105 |
*/
|
106 |
const DB_VERSION_OPTION_NAME = 'cjtoolbox_db_version';
|
107 |
|
108 |
/**
|
109 |
-
*
|
110 |
*/
|
111 |
const PLUGIN_REQUEST_ID = 'cjtoolbox';
|
112 |
-
|
113 |
/**
|
114 |
* put your comment there...
|
115 |
-
*
|
116 |
* @var mixed
|
117 |
*/
|
118 |
protected $accessPoints;
|
119 |
-
|
120 |
/**
|
121 |
* put your comment there...
|
122 |
-
*
|
123 |
* @var mixed
|
124 |
*/
|
125 |
protected $extensions;
|
126 |
-
|
127 |
/**
|
128 |
* put your comment there...
|
129 |
-
*
|
130 |
* @var mixed
|
131 |
*/
|
132 |
protected $installed;
|
133 |
-
|
134 |
/**
|
135 |
* put your comment there...
|
136 |
-
*
|
137 |
* @var CJTPlugin
|
138 |
*/
|
139 |
protected static $instance;
|
140 |
-
|
141 |
/**
|
142 |
* put your comment there...
|
143 |
-
*
|
144 |
* @var mixed
|
145 |
*/
|
146 |
protected $mainAC;
|
147 |
-
|
148 |
/**
|
149 |
* put your comment there...
|
150 |
-
*
|
151 |
* @var mixed
|
152 |
*/
|
153 |
protected $onloaddbversion = array( 'parameters' => array( 'dbVersion' ) );
|
154 |
-
|
155 |
/**
|
156 |
* put your comment there...
|
157 |
-
*
|
158 |
* @var mixed
|
159 |
*/
|
160 |
protected $onimportcontroller = array( 'parameters' => array( 'file' ) );
|
161 |
-
|
162 |
/**
|
163 |
* put your comment there...
|
164 |
-
*
|
165 |
* @var mixed
|
166 |
*/
|
167 |
protected $onimportmodel = array( 'parameters' => array( 'file' ) );
|
168 |
-
|
169 |
/**
|
170 |
* put your comment there...
|
171 |
-
*
|
172 |
* @var mixed
|
173 |
*/
|
174 |
protected $onload = array( 'parameters' => array( 'instance' ) );
|
175 |
-
|
176 |
/**
|
177 |
* put your comment there...
|
178 |
-
*
|
179 |
*/
|
180 |
-
protected function __construct()
|
181 |
{
|
182 |
// Hookable!
|
183 |
parent::__construct();
|
184 |
-
|
185 |
// Allow access points to utilize from CJTPlugin functionality
|
186 |
// even if the call is recursive inside getInstance/construct methods!!!
|
187 |
self::$instance = $this;
|
188 |
-
|
189 |
// Installation version
|
190 |
$dbVersion = $this->onloaddbversion( get_option( self::DB_VERSION_OPTION_NAME ) );
|
191 |
$this->installed = ( ( $dbVersion ) == self::DB_VERSION );
|
192 |
-
|
193 |
// Load plugin and all installed extensions!.
|
194 |
$this->load();
|
195 |
$this->loadExtensions();
|
196 |
-
|
197 |
// Run MAIN access point!
|
198 |
$this->main();
|
199 |
}
|
200 |
-
|
201 |
/**
|
202 |
* put your comment there...
|
203 |
-
*
|
204 |
*/
|
205 |
-
public function & extensions()
|
206 |
{
|
207 |
-
return $this->extensions;
|
208 |
}
|
209 |
-
|
210 |
/**
|
211 |
* put your comment there...
|
212 |
-
*
|
213 |
*/
|
214 |
-
public function getAccessPoint( $name )
|
215 |
{
|
216 |
return $this->accessPoints[ $name ];
|
217 |
}
|
218 |
-
|
219 |
/**
|
220 |
* put your comment there...
|
221 |
-
*
|
222 |
*/
|
223 |
-
public static function getInstance()
|
224 |
{
|
225 |
-
|
226 |
-
if ( ! self::$instance )
|
227 |
{
|
228 |
self::$instance = new CJTPlugin();
|
229 |
}
|
230 |
-
|
231 |
return self::$instance;
|
232 |
}
|
233 |
-
|
234 |
/**
|
235 |
* put your comment there...
|
236 |
-
*
|
237 |
*/
|
238 |
public static function isCompatibleEnvironment()
|
239 |
{
|
240 |
-
|
241 |
if ( version_compare( PHP_VERSION, self::ENV_PHP_MIN_VERSION, '<' ) )
|
242 |
{
|
243 |
-
|
244 |
$importHTMLFileCode = 'require "includes" . DIRECTORY_SEPARATOR . "html" . DIRECTORY_SEPARATOR . "incompatible_environment_message.html.php";';
|
245 |
-
|
246 |
add_action( 'admin_notices', create_function( '', $importHTMLFileCode ) );
|
247 |
-
|
248 |
return false;
|
249 |
}
|
250 |
-
|
251 |
return true;
|
252 |
}
|
253 |
/**
|
254 |
* put your comment there...
|
255 |
-
*
|
256 |
*/
|
257 |
-
public function isInstalled()
|
258 |
{
|
259 |
-
return $this->installed;
|
260 |
}
|
261 |
-
|
262 |
/**
|
263 |
* put your comment there...
|
264 |
-
*
|
265 |
*/
|
266 |
-
public function listen()
|
267 |
{
|
268 |
// For now we've only admin access points! Future versions might has something changed!
|
269 |
-
if ( is_admin() )
|
270 |
{
|
271 |
-
|
272 |
// Import access points core classes.
|
273 |
require_once 'framework/access-points/page.class.php';
|
274 |
require_once 'framework/access-points/directory-spider.class.php';
|
275 |
-
|
276 |
// Get access points!
|
277 |
$accessPoints = CJTAccessPointsDirectorySpider::getInstance( 'CJT', CJTOOLBOX_ACCESS_POINTS );
|
278 |
-
|
279 |
// For every access point create instance and LISTEN to the request!
|
280 |
-
foreach ( $accessPoints as $name => $info )
|
281 |
{
|
282 |
/**
|
283 |
* @var CJTAccessPoint
|
284 |
*/
|
285 |
$this->accessPoints[ $name ] = $point = $accessPoints->point()->listen();
|
286 |
-
|
287 |
// We need to do some work with there is a connected access point.
|
288 |
$point->onconnected = array( & $this, 'onconnected' );
|
289 |
-
|
290 |
}
|
291 |
-
|
292 |
}
|
293 |
-
|
294 |
return $this;
|
295 |
}
|
296 |
-
|
297 |
/**
|
298 |
* put your comment there...
|
299 |
-
*
|
300 |
*/
|
301 |
-
protected function load()
|
302 |
{
|
303 |
// Bootstrap the Plugin!
|
304 |
cssJSToolbox::getInstance();
|
305 |
-
|
306 |
// Load MVC framework core!
|
307 |
require_once $this->onimportmodel( CJTOOLBOX_MVC_FRAMEWOK . '/model.inc.php' );
|
308 |
require_once $this->onimportcontroller( CJTOOLBOX_MVC_FRAMEWOK . '/controller.inc.php' );
|
309 |
-
|
310 |
return $this;
|
311 |
}
|
312 |
-
|
313 |
/**
|
314 |
* put your comment there...
|
315 |
-
*
|
316 |
*/
|
317 |
-
protected function loadExtensions()
|
318 |
{
|
319 |
// Load extensions lib!
|
320 |
require_once 'framework/extensions/extensions.class.php';
|
321 |
-
|
322 |
$this->extensions = new CJTExtensions();
|
323 |
$this->extensions->load();
|
324 |
-
|
325 |
return $this;
|
326 |
}
|
327 |
-
|
328 |
/**
|
329 |
* Run MAIN access point!
|
330 |
-
*
|
331 |
* @return $this
|
332 |
*/
|
333 |
-
protected function main()
|
334 |
{
|
335 |
// Fire laod event
|
336 |
$this->onload( $this );
|
337 |
-
|
338 |
// Access point base class is a dependency!
|
339 |
require_once 'framework/access-points/access-point.class.php';
|
340 |
-
|
341 |
// Run Main Acces Point!
|
342 |
include_once 'access.points/main.accesspoint.php';
|
343 |
-
|
344 |
$this->mainAC = new CJTMainAccessPoint();
|
345 |
$this->mainAC->listen();
|
346 |
}
|
347 |
|
348 |
/**
|
349 |
-
* Called When any In-Listen-State (ILS) Access point is
|
350 |
* connected (called by Wordpress hooking system).
|
351 |
-
*
|
352 |
* @return boolean TRUE.
|
353 |
*/
|
354 |
-
public function onconnected( $observer, $state )
|
355 |
{
|
356 |
-
|
357 |
// In all cases that we'll process the request load the localization file.
|
358 |
load_plugin_textdomain( CJTOOLBOX_TEXT_DOMAIN, false, CJTOOLBOX_LANGUAGES );
|
359 |
-
|
360 |
do_action( CJTPluggableHelper::ACTION_CJT_TEXT_DOMAIN_LOADED );
|
361 |
-
|
362 |
// Always connet the access point!
|
363 |
return $state;
|
364 |
-
|
365 |
}
|
366 |
-
|
367 |
}// End Class
|
368 |
|
369 |
// Dont run if environment (e.g PHP version) is incomaptible
|
3 |
Plugin Name: CSS & JavaScript Toolbox
|
4 |
Plugin URI: http://css-javascript-toolbox.com/
|
5 |
Description: Easily add CSS, JavaScript, HTML and PHP code to unique CJT code blocks and assign them anywhere on your website.
|
6 |
+
Version: 9.0
|
7 |
Author: Wipeout Media
|
8 |
Author URI: http://css-javascript-toolbox.com
|
9 |
License:
|
27 |
define( 'CJTOOLBOX_NAME', plugin_basename( dirname( __FILE__ ) ) );
|
28 |
|
29 |
/** CJT Text Domain used for localize texts */
|
30 |
+
define( 'CJTOOLBOX_TEXT_DOMAIN', CJTOOLBOX_NAME );
|
31 |
|
32 |
/** */
|
33 |
define( 'CJTOOLBOX_LANGUAGES', CJTOOLBOX_NAME . '/locals/languages/' );
|
36 |
define( 'CJTOOLBOX_PATH', dirname( __FILE__ ) );
|
37 |
|
38 |
/** Dont use!! @deprecated */
|
39 |
+
define( 'CJTOOLBOX_INCLUDE_PATH', CJTOOLBOX_PATH . '/framework' );
|
40 |
|
41 |
/** Access Points path */
|
42 |
define( 'CJTOOLBOX_ACCESS_POINTS', CJTOOLBOX_PATH . '/access.points' );
|
56 |
require_once CJTOOLBOX_FRAMEWORK . '/events/hookable.class.php';
|
57 |
|
58 |
// Initialize events engine/system!
|
59 |
+
CJTWordpressEvents::_init( array( 'hookType' => CJTWordpressEvents::HOOK_ACTION ) );
|
60 |
CJTWordpressEvents::$paths[ 'subjects' ][ 'core' ] = CJTOOLBOX_FRAMEWORK . '/events/subjects';
|
61 |
CJTWordpressEvents::$paths[ 'observers' ][ 'core' ] = CJTOOLBOX_FRAMEWORK . '/events/observers';
|
62 |
|
63 |
/**
|
64 |
* CJT Plugin interface.
|
65 |
+
*
|
66 |
* The CJT Plugin is maximum deferred.
|
67 |
* All functionality here is just to detect if the request should be processed!
|
68 |
+
*
|
69 |
* The main class is located css-js-toolbox.class.php cssJSToolbox class
|
70 |
* The plugin is fully developed using Model-View-Controller design pattern.
|
71 |
+
*
|
72 |
* access.points directory has all the entry points that processed by the Plugin.
|
73 |
+
*
|
74 |
* @package CJT
|
75 |
* @author Ahmed Said
|
76 |
* @version 6
|
77 |
*/
|
78 |
+
class CJTPlugin extends CJTHookableClass
|
79 |
{
|
80 |
|
81 |
/**
|
82 |
+
*
|
83 |
*/
|
84 |
const DB_VERSION = '1.6';
|
85 |
+
|
86 |
/**
|
87 |
* put your comment there...
|
88 |
+
*
|
89 |
* @var mixed
|
90 |
*/
|
91 |
CONST ENV_PHP_MIN_VERSION = '5.3';
|
92 |
+
|
93 |
/**
|
94 |
+
*
|
95 |
*/
|
96 |
const FW_Version = '4.0';
|
97 |
+
|
98 |
/**
|
99 |
+
*
|
100 |
*/
|
101 |
+
const VERSION = '8.3.2' ;
|
102 |
+
|
103 |
/**
|
104 |
+
*
|
105 |
*/
|
106 |
const DB_VERSION_OPTION_NAME = 'cjtoolbox_db_version';
|
107 |
|
108 |
/**
|
109 |
+
*
|
110 |
*/
|
111 |
const PLUGIN_REQUEST_ID = 'cjtoolbox';
|
112 |
+
|
113 |
/**
|
114 |
* put your comment there...
|
115 |
+
*
|
116 |
* @var mixed
|
117 |
*/
|
118 |
protected $accessPoints;
|
119 |
+
|
120 |
/**
|
121 |
* put your comment there...
|
122 |
+
*
|
123 |
* @var mixed
|
124 |
*/
|
125 |
protected $extensions;
|
126 |
+
|
127 |
/**
|
128 |
* put your comment there...
|
129 |
+
*
|
130 |
* @var mixed
|
131 |
*/
|
132 |
protected $installed;
|
133 |
+
|
134 |
/**
|
135 |
* put your comment there...
|
136 |
+
*
|
137 |
* @var CJTPlugin
|
138 |
*/
|
139 |
protected static $instance;
|
140 |
+
|
141 |
/**
|
142 |
* put your comment there...
|
143 |
+
*
|
144 |
* @var mixed
|
145 |
*/
|
146 |
protected $mainAC;
|
147 |
+
|
148 |
/**
|
149 |
* put your comment there...
|
150 |
+
*
|
151 |
* @var mixed
|
152 |
*/
|
153 |
protected $onloaddbversion = array( 'parameters' => array( 'dbVersion' ) );
|
154 |
+
|
155 |
/**
|
156 |
* put your comment there...
|
157 |
+
*
|
158 |
* @var mixed
|
159 |
*/
|
160 |
protected $onimportcontroller = array( 'parameters' => array( 'file' ) );
|
161 |
+
|
162 |
/**
|
163 |
* put your comment there...
|
164 |
+
*
|
165 |
* @var mixed
|
166 |
*/
|
167 |
protected $onimportmodel = array( 'parameters' => array( 'file' ) );
|
168 |
+
|
169 |
/**
|
170 |
* put your comment there...
|
171 |
+
*
|
172 |
* @var mixed
|
173 |
*/
|
174 |
protected $onload = array( 'parameters' => array( 'instance' ) );
|
175 |
+
|
176 |
/**
|
177 |
* put your comment there...
|
178 |
+
*
|
179 |
*/
|
180 |
+
protected function __construct()
|
181 |
{
|
182 |
// Hookable!
|
183 |
parent::__construct();
|
184 |
+
|
185 |
// Allow access points to utilize from CJTPlugin functionality
|
186 |
// even if the call is recursive inside getInstance/construct methods!!!
|
187 |
self::$instance = $this;
|
188 |
+
|
189 |
// Installation version
|
190 |
$dbVersion = $this->onloaddbversion( get_option( self::DB_VERSION_OPTION_NAME ) );
|
191 |
$this->installed = ( ( $dbVersion ) == self::DB_VERSION );
|
192 |
+
|
193 |
// Load plugin and all installed extensions!.
|
194 |
$this->load();
|
195 |
$this->loadExtensions();
|
196 |
+
|
197 |
// Run MAIN access point!
|
198 |
$this->main();
|
199 |
}
|
200 |
+
|
201 |
/**
|
202 |
* put your comment there...
|
203 |
+
*
|
204 |
*/
|
205 |
+
public function & extensions()
|
206 |
{
|
207 |
+
return $this->extensions;
|
208 |
}
|
209 |
+
|
210 |
/**
|
211 |
* put your comment there...
|
212 |
+
*
|
213 |
*/
|
214 |
+
public function getAccessPoint( $name )
|
215 |
{
|
216 |
return $this->accessPoints[ $name ];
|
217 |
}
|
218 |
+
|
219 |
/**
|
220 |
* put your comment there...
|
221 |
+
*
|
222 |
*/
|
223 |
+
public static function getInstance()
|
224 |
{
|
225 |
+
|
226 |
+
if ( ! self::$instance )
|
227 |
{
|
228 |
self::$instance = new CJTPlugin();
|
229 |
}
|
230 |
+
|
231 |
return self::$instance;
|
232 |
}
|
233 |
+
|
234 |
/**
|
235 |
* put your comment there...
|
236 |
+
*
|
237 |
*/
|
238 |
public static function isCompatibleEnvironment()
|
239 |
{
|
240 |
+
|
241 |
if ( version_compare( PHP_VERSION, self::ENV_PHP_MIN_VERSION, '<' ) )
|
242 |
{
|
243 |
+
|
244 |
$importHTMLFileCode = 'require "includes" . DIRECTORY_SEPARATOR . "html" . DIRECTORY_SEPARATOR . "incompatible_environment_message.html.php";';
|
245 |
+
|
246 |
add_action( 'admin_notices', create_function( '', $importHTMLFileCode ) );
|
247 |
+
|
248 |
return false;
|
249 |
}
|
250 |
+
|
251 |
return true;
|
252 |
}
|
253 |
/**
|
254 |
* put your comment there...
|
255 |
+
*
|
256 |
*/
|
257 |
+
public function isInstalled()
|
258 |
{
|
259 |
+
return $this->installed;
|
260 |
}
|
261 |
+
|
262 |
/**
|
263 |
* put your comment there...
|
264 |
+
*
|
265 |
*/
|
266 |
+
public function listen()
|
267 |
{
|
268 |
// For now we've only admin access points! Future versions might has something changed!
|
269 |
+
if ( is_admin() )
|
270 |
{
|
271 |
+
|
272 |
// Import access points core classes.
|
273 |
require_once 'framework/access-points/page.class.php';
|
274 |
require_once 'framework/access-points/directory-spider.class.php';
|
275 |
+
|
276 |
// Get access points!
|
277 |
$accessPoints = CJTAccessPointsDirectorySpider::getInstance( 'CJT', CJTOOLBOX_ACCESS_POINTS );
|
278 |
+
|
279 |
// For every access point create instance and LISTEN to the request!
|
280 |
+
foreach ( $accessPoints as $name => $info )
|
281 |
{
|
282 |
/**
|
283 |
* @var CJTAccessPoint
|
284 |
*/
|
285 |
$this->accessPoints[ $name ] = $point = $accessPoints->point()->listen();
|
286 |
+
|
287 |
// We need to do some work with there is a connected access point.
|
288 |
$point->onconnected = array( & $this, 'onconnected' );
|
289 |
+
|
290 |
}
|
291 |
+
|
292 |
}
|
293 |
+
|
294 |
return $this;
|
295 |
}
|
296 |
+
|
297 |
/**
|
298 |
* put your comment there...
|
299 |
+
*
|
300 |
*/
|
301 |
+
protected function load()
|
302 |
{
|
303 |
// Bootstrap the Plugin!
|
304 |
cssJSToolbox::getInstance();
|
305 |
+
|
306 |
// Load MVC framework core!
|
307 |
require_once $this->onimportmodel( CJTOOLBOX_MVC_FRAMEWOK . '/model.inc.php' );
|
308 |
require_once $this->onimportcontroller( CJTOOLBOX_MVC_FRAMEWOK . '/controller.inc.php' );
|
309 |
+
|
310 |
return $this;
|
311 |
}
|
312 |
+
|
313 |
/**
|
314 |
* put your comment there...
|
315 |
+
*
|
316 |
*/
|
317 |
+
protected function loadExtensions()
|
318 |
{
|
319 |
// Load extensions lib!
|
320 |
require_once 'framework/extensions/extensions.class.php';
|
321 |
+
|
322 |
$this->extensions = new CJTExtensions();
|
323 |
$this->extensions->load();
|
324 |
+
|
325 |
return $this;
|
326 |
}
|
327 |
+
|
328 |
/**
|
329 |
* Run MAIN access point!
|
330 |
+
*
|
331 |
* @return $this
|
332 |
*/
|
333 |
+
protected function main()
|
334 |
{
|
335 |
// Fire laod event
|
336 |
$this->onload( $this );
|
337 |
+
|
338 |
// Access point base class is a dependency!
|
339 |
require_once 'framework/access-points/access-point.class.php';
|
340 |
+
|
341 |
// Run Main Acces Point!
|
342 |
include_once 'access.points/main.accesspoint.php';
|
343 |
+
|
344 |
$this->mainAC = new CJTMainAccessPoint();
|
345 |
$this->mainAC->listen();
|
346 |
}
|
347 |
|
348 |
/**
|
349 |
+
* Called When any In-Listen-State (ILS) Access point is
|
350 |
* connected (called by Wordpress hooking system).
|
351 |
+
*
|
352 |
* @return boolean TRUE.
|
353 |
*/
|
354 |
+
public function onconnected( $observer, $state )
|
355 |
{
|
356 |
+
|
357 |
// In all cases that we'll process the request load the localization file.
|
358 |
load_plugin_textdomain( CJTOOLBOX_TEXT_DOMAIN, false, CJTOOLBOX_LANGUAGES );
|
359 |
+
|
360 |
do_action( CJTPluggableHelper::ACTION_CJT_TEXT_DOMAIN_LOADED );
|
361 |
+
|
362 |
// Always connet the access point!
|
363 |
return $state;
|
364 |
+
|
365 |
}
|
366 |
+
|
367 |
}// End Class
|
368 |
|
369 |
// Dont run if environment (e.g PHP version) is incomaptible
|
docs/CJT_V6_User_Manual.pdf
CHANGED
File without changes
|
framework/CJTStoreUpdate.class.php
CHANGED
File without changes
|
framework/PluggableHelper.abstract.php
CHANGED
File without changes
|
framework/ServicesAPI/Exceptions.class.php
CHANGED
File without changes
|
framework/ServicesAPI/Module.class.php
CHANGED
File without changes
|
framework/ServicesAPI/Services.class.php
CHANGED
File without changes
|
framework/ServicesAPI/Store.php
CHANGED
File without changes
|
framework/ServicesFW/Ajax.Service.class.php
CHANGED
File without changes
|
framework/ServicesFW/Controller.class.php
CHANGED
File without changes
|
framework/ServicesFW/Dashboard.Service.class.php
CHANGED
File without changes
|
framework/ServicesFW/EntityModel.class.php
CHANGED
File without changes
|
framework/ServicesFW/Form.class.php
CHANGED
File without changes
|
framework/ServicesFW/HTTPRequestRouter.class.php
CHANGED
File without changes
|
framework/ServicesFW/Installer.abstract.php
CHANGED
File without changes
|
framework/ServicesFW/Model.abstract.php
CHANGED
File without changes
|
framework/ServicesFW/PluginBase.class.php
CHANGED
File without changes
|
framework/ServicesFW/PluginBase.interface.php
CHANGED
File without changes
|
framework/ServicesFW/Shortcode.service.class.php
CHANGED
File without changes
|
framework/ServicesFW/Storage.abstract.php
CHANGED
File without changes
|
framework/ServicesFW/View.class.php
CHANGED
File without changes
|
framework/ServicesFW/ViewJson.class.php
CHANGED
File without changes
|
framework/ServicesFW/ViewTemplates/MessagesList.html
CHANGED
File without changes
|
framework/ServicesFW/Wordpress.service.abstract.php
CHANGED
File without changes
|
framework/access-points/access-point.class.php
CHANGED
File without changes
|
framework/access-points/directory-spider.class.php
CHANGED
File without changes
|
framework/access-points/page.class.php
CHANGED
File without changes
|
framework/autoload/loader.php
CHANGED
File without changes
|
framework/css/error-dialog.css
CHANGED
File without changes
|
framework/css/forms.css
CHANGED
File without changes
|
framework/css/images/dialog-error.png
CHANGED
File without changes
|
framework/css/images/divider.png
CHANGED
File without changes
|
framework/css/images/loading.gif
CHANGED
File without changes
|
framework/css/images/ui-bg_flat_0_aaaaaa_40x100.png
CHANGED
File without changes
|
framework/css/images/ui-bg_flat_75_ffffff_40x100.png
CHANGED
File without changes
|
framework/css/images/ui-bg_glass_55_fbf9ee_1x400.png
CHANGED
File without changes
|
framework/css/images/ui-bg_glass_65_ffffff_1x400.png
CHANGED
File without changes
|
framework/css/images/ui-bg_glass_75_dadada_1x400.png
CHANGED
File without changes
|
framework/css/images/ui-bg_glass_75_e6e6e6_1x400.png
CHANGED
File without changes
|
framework/css/images/ui-bg_glass_95_fef1ec_1x400.png
CHANGED
File without changes
|
framework/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png
CHANGED
File without changes
|
framework/css/images/ui-icons_222222_256x240.png
CHANGED
File without changes
|
framework/css/images/ui-icons_2e83ff_256x240.png
CHANGED
File without changes
|
framework/css/images/ui-icons_454545_256x240.png
CHANGED
File without changes
|
framework/css/images/ui-icons_888888_256x240.png
CHANGED
File without changes
|
framework/css/images/ui-icons_cd0a0a_256x240.png
CHANGED
File without changes
|
framework/css/jquery-ui-1.8.21.custom.css
CHANGED
File without changes
|
framework/css/toolbox.css
CHANGED
File without changes
|
framework/db/mysql/driver/exception/invalidkey.php
CHANGED
File without changes
|
framework/db/mysql/queue-driver.inc.php
CHANGED
File without changes
|
framework/db/mysql/single-table-simple-view.inc.php
CHANGED
File without changes
|
framework/db/mysql/sql-view.inc.php
CHANGED
File without changes
|
framework/db/mysql/table.inc.php
CHANGED
File without changes
|
framework/db/mysql/xtable.inc.php
CHANGED
File without changes
|
framework/developer/developer.php
CHANGED
File without changes
|
framework/developer/interface/block/parameters/parameters.php
CHANGED
File without changes
|
framework/developer/interface/block/parameters/types/array.php
CHANGED
File without changes
|
framework/developer/interface/block/parameters/types/base/abstract.php
CHANGED
File without changes
|
framework/developer/interface/block/parameters/types/base/factory.php
CHANGED
File without changes
|
framework/developer/interface/block/parameters/types/base/list.php
CHANGED
File without changes
|
framework/developer/interface/block/parameters/types/base/scalar.php
CHANGED
File without changes
|
framework/developer/interface/block/parameters/types/boolean.php
CHANGED
File without changes
|
framework/developer/interface/block/parameters/types/interface/type.php
CHANGED
File without changes
|
framework/developer/interface/block/parameters/types/list.php
CHANGED
@@ -1,33 +1,33 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
class CJT_Framework_Developer_Interface_Block_Parameters_Types_List
|
13 |
-
extends CJT_Framework_Developer_Interface_Block_Parameters_Types_Base_List {
|
14 |
|
15 |
/**
|
16 |
* put your comment there...
|
17 |
-
*
|
18 |
*/
|
19 |
public function getValue($useRealNames = null) {
|
20 |
// Get associative array!
|
21 |
$assocArray = parent::getValue($useRealNames);
|
22 |
// As Wordpress Shortcode cannot understand [ and ] brackets
|
23 |
-
// being in the attribute value we need to use
|
24 |
// by casting to object.
|
25 |
return (object) array_values($assocArray);;
|
26 |
}
|
27 |
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
-
*
|
31 |
* @param mixed $value
|
32 |
*/
|
33 |
public function setValue($value) {
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
class CJT_Framework_Developer_Interface_Block_Parameters_Types_List
|
13 |
+
extends CJT_Framework_Developer_Interface_Block_Parameters_Types_Base_List {
|
14 |
|
15 |
/**
|
16 |
* put your comment there...
|
17 |
+
*
|
18 |
*/
|
19 |
public function getValue($useRealNames = null) {
|
20 |
// Get associative array!
|
21 |
$assocArray = parent::getValue($useRealNames);
|
22 |
// As Wordpress Shortcode cannot understand [ and ] brackets
|
23 |
+
// being in the attribute value we need to use JavaScript object instead of array
|
24 |
// by casting to object.
|
25 |
return (object) array_values($assocArray);;
|
26 |
}
|
27 |
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
+
*
|
31 |
* @param mixed $value
|
32 |
*/
|
33 |
public function setValue($value) {
|
framework/developer/interface/block/parameters/types/number.php
CHANGED
File without changes
|
framework/developer/interface/block/parameters/types/raw.php
CHANGED
File without changes
|
framework/developer/interface/block/parameters/types/structure.php
CHANGED
File without changes
|
framework/developer/interface/block/parameters/types/text.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/parameters/base/abstract.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/parameters/base/list.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/parameters/base/scalar.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/parameters/factory.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/parameters/interface/type.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/parameters/parameters.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/parameters/types/array.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/parameters/types/boolean.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/parameters/types/list.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/parameters/types/number.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/parameters/types/raw.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/parameters/types/structure.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/parameters/types/text.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/segments/segments.php
CHANGED
File without changes
|
framework/developer/interface/block/shortcode/shortcode.php
CHANGED
File without changes
|
framework/developer/lib/template/template.php
CHANGED
File without changes
|
framework/events/definition.class.php
CHANGED
File without changes
|
framework/events/events.class.php
CHANGED
@@ -1,86 +1,86 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
/**
|
7 |
-
*
|
8 |
*/
|
9 |
abstract class CJTEvents {
|
10 |
-
|
11 |
/**
|
12 |
* put your comment there...
|
13 |
-
*
|
14 |
* @var mixed
|
15 |
*/
|
16 |
protected static $classes = array();
|
17 |
-
|
18 |
/**
|
19 |
* put your comment there...
|
20 |
-
*
|
21 |
* @var mixed
|
22 |
*/
|
23 |
public static $defaultOptions = array('prefix' => 'on');
|
24 |
-
|
25 |
/**
|
26 |
* put your comment there...
|
27 |
-
*
|
28 |
* @var mixed
|
29 |
*/
|
30 |
public static $definition;
|
31 |
-
|
32 |
/**
|
33 |
* put your comment there...
|
34 |
-
*
|
35 |
* @var mixed
|
36 |
*/
|
37 |
protected $freeStatic;
|
38 |
-
|
39 |
/**
|
40 |
* put your comment there...
|
41 |
-
*
|
42 |
* @var mixed
|
43 |
*/
|
44 |
protected static $live;
|
45 |
-
|
46 |
/**
|
47 |
* put your comment there...
|
48 |
-
*
|
49 |
* @var mixed
|
50 |
*/
|
51 |
private $options = array();
|
52 |
-
|
53 |
/**
|
54 |
* put your comment there...
|
55 |
-
*
|
56 |
* @var mixed
|
57 |
*/
|
58 |
public static $paths = array();
|
59 |
-
|
60 |
/**
|
61 |
* put your comment there...
|
62 |
-
*
|
63 |
* @var mixed
|
64 |
*/
|
65 |
protected $subjects;
|
66 |
-
|
67 |
/**
|
68 |
* put your comment there...
|
69 |
-
*
|
70 |
* @var mixed
|
71 |
*/
|
72 |
private $target;
|
73 |
-
|
74 |
/**
|
75 |
* put your comment there...
|
76 |
-
*
|
77 |
* @var mixed
|
78 |
*/
|
79 |
private $targetClass;
|
80 |
-
|
81 |
/**
|
82 |
* put your comment there...
|
83 |
-
*
|
84 |
* @param mixed $target
|
85 |
* @param mixed $options
|
86 |
* @return CJTEvents
|
@@ -94,13 +94,13 @@ abstract class CJTEvents {
|
|
94 |
// Define class events if not defined yet!
|
95 |
$this->define();
|
96 |
}
|
97 |
-
|
98 |
/**
|
99 |
* put your comment there...
|
100 |
-
*
|
101 |
* @param mixed $options
|
102 |
*/
|
103 |
-
public static function
|
104 |
if (!self::$definition) {
|
105 |
self::$defaultOptions += $options;
|
106 |
// Definition object!
|
@@ -113,7 +113,7 @@ abstract class CJTEvents {
|
|
113 |
|
114 |
/**
|
115 |
* put your comment there...
|
116 |
-
*
|
117 |
* @param mixed $typeName
|
118 |
* @param mixed $observer
|
119 |
* @param mixed $typePrefixed
|
@@ -128,7 +128,7 @@ abstract class CJTEvents {
|
|
128 |
|
129 |
/**
|
130 |
* put your comment there...
|
131 |
-
*
|
132 |
* @param mixed $type
|
133 |
*/
|
134 |
public function createSubject($event) {
|
@@ -151,7 +151,7 @@ abstract class CJTEvents {
|
|
151 |
|
152 |
/**
|
153 |
* put your comment there...
|
154 |
-
*
|
155 |
*/
|
156 |
protected function define() {
|
157 |
$className = $this->targetClass;
|
@@ -166,7 +166,7 @@ abstract class CJTEvents {
|
|
166 |
|
167 |
/**
|
168 |
* put your comment there...
|
169 |
-
*
|
170 |
* @deprecated
|
171 |
*/
|
172 |
private function findEvents() {
|
@@ -185,19 +185,19 @@ abstract class CJTEvents {
|
|
185 |
}
|
186 |
}
|
187 |
}
|
188 |
-
|
189 |
/**
|
190 |
* put your comment there...
|
191 |
-
*
|
192 |
* @param mixed $class
|
193 |
*/
|
194 |
public function getDefinition() {
|
195 |
return self::$definition->get($this->targetClass);
|
196 |
}
|
197 |
-
|
198 |
/**
|
199 |
* put your comment there...
|
200 |
-
*
|
201 |
* @param mixed $type
|
202 |
*/
|
203 |
public function getSubject($type) {
|
@@ -220,13 +220,13 @@ abstract class CJTEvents {
|
|
220 |
foreach ($lives as $live) {
|
221 |
$subject[] = $live['observer'];
|
222 |
}
|
223 |
-
}
|
224 |
return $this->subjects[$type->name];
|
225 |
}
|
226 |
-
|
227 |
/**
|
228 |
* put your comment there...
|
229 |
-
*
|
230 |
* @param mixed $type
|
231 |
* @return CJTWordpressEvents
|
232 |
*/
|
@@ -237,28 +237,28 @@ abstract class CJTEvents {
|
|
237 |
}
|
238 |
return self::$classes[$type->class];
|
239 |
}
|
240 |
-
|
241 |
/**
|
242 |
* put your comment there...
|
243 |
-
*
|
244 |
*/
|
245 |
public function isFreeStatic() {
|
246 |
-
return $this->freeStatic;
|
247 |
}
|
248 |
-
|
249 |
/**
|
250 |
* put your comment there...
|
251 |
-
*
|
252 |
* @param mixed $typeName
|
253 |
* @param mixed $observer
|
254 |
*/
|
255 |
public function off($typeName, $observer) {
|
256 |
-
|
257 |
}
|
258 |
-
|
259 |
/**
|
260 |
* put your comment there...
|
261 |
-
*
|
262 |
* @param mixed $typeName
|
263 |
* @param mixed $observer
|
264 |
*/
|
@@ -269,10 +269,10 @@ abstract class CJTEvents {
|
|
269 |
$on['observer'] = $observer;
|
270 |
self::$live[$type->class][$type->name][] = $on;
|
271 |
}
|
272 |
-
|
273 |
/**
|
274 |
* put your comment there...
|
275 |
-
*
|
276 |
* @param mixed $type
|
277 |
*/
|
278 |
public static function parseEventType($type, $typePrefixed = true) {
|
@@ -300,33 +300,33 @@ abstract class CJTEvents {
|
|
300 |
}
|
301 |
return ((object) $type);
|
302 |
}
|
303 |
-
|
304 |
/**
|
305 |
* put your comment there...
|
306 |
-
*
|
307 |
* @param mixed $type
|
308 |
*/
|
309 |
protected function prepareEventTypeOptions($event) {
|
310 |
-
return $event;
|
311 |
}
|
312 |
-
|
313 |
/**
|
314 |
* put your comment there...
|
315 |
-
*
|
316 |
* @param mixed $type
|
317 |
* @param mixed $params
|
318 |
* @param mixed $typePrefixed
|
319 |
*/
|
320 |
public abstract function trigger($type, $params = array(), $typePrefixed = true);
|
321 |
-
|
322 |
/**
|
323 |
* put your comment there...
|
324 |
-
*
|
325 |
* @param mixed $type
|
326 |
* @param mixed $observer
|
327 |
*/
|
328 |
public function unbind($type, $observer, $typePrefixed = true) {
|
329 |
-
|
330 |
}
|
331 |
-
|
332 |
} // End class.
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
/**
|
7 |
+
*
|
8 |
*/
|
9 |
abstract class CJTEvents {
|
10 |
+
|
11 |
/**
|
12 |
* put your comment there...
|
13 |
+
*
|
14 |
* @var mixed
|
15 |
*/
|
16 |
protected static $classes = array();
|
17 |
+
|
18 |
/**
|
19 |
* put your comment there...
|
20 |
+
*
|
21 |
* @var mixed
|
22 |
*/
|
23 |
public static $defaultOptions = array('prefix' => 'on');
|
24 |
+
|
25 |
/**
|
26 |
* put your comment there...
|
27 |
+
*
|
28 |
* @var mixed
|
29 |
*/
|
30 |
public static $definition;
|
31 |
+
|
32 |
/**
|
33 |
* put your comment there...
|
34 |
+
*
|
35 |
* @var mixed
|
36 |
*/
|
37 |
protected $freeStatic;
|
38 |
+
|
39 |
/**
|
40 |
* put your comment there...
|
41 |
+
*
|
42 |
* @var mixed
|
43 |
*/
|
44 |
protected static $live;
|
45 |
+
|
46 |
/**
|
47 |
* put your comment there...
|
48 |
+
*
|
49 |
* @var mixed
|
50 |
*/
|
51 |
private $options = array();
|
52 |
+
|
53 |
/**
|
54 |
* put your comment there...
|
55 |
+
*
|
56 |
* @var mixed
|
57 |
*/
|
58 |
public static $paths = array();
|
59 |
+
|
60 |
/**
|
61 |
* put your comment there...
|
62 |
+
*
|
63 |
* @var mixed
|
64 |
*/
|
65 |
protected $subjects;
|
66 |
+
|
67 |
/**
|
68 |
* put your comment there...
|
69 |
+
*
|
70 |
* @var mixed
|
71 |
*/
|
72 |
private $target;
|
73 |
+
|
74 |
/**
|
75 |
* put your comment there...
|
76 |
+
*
|
77 |
* @var mixed
|
78 |
*/
|
79 |
private $targetClass;
|
80 |
+
|
81 |
/**
|
82 |
* put your comment there...
|
83 |
+
*
|
84 |
* @param mixed $target
|
85 |
* @param mixed $options
|
86 |
* @return CJTEvents
|
94 |
// Define class events if not defined yet!
|
95 |
$this->define();
|
96 |
}
|
97 |
+
|
98 |
/**
|
99 |
* put your comment there...
|
100 |
+
*
|
101 |
* @param mixed $options
|
102 |
*/
|
103 |
+
public static function _init($options = array()) {
|
104 |
if (!self::$definition) {
|
105 |
self::$defaultOptions += $options;
|
106 |
// Definition object!
|
113 |
|
114 |
/**
|
115 |
* put your comment there...
|
116 |
+
*
|
117 |
* @param mixed $typeName
|
118 |
* @param mixed $observer
|
119 |
* @param mixed $typePrefixed
|
128 |
|
129 |
/**
|
130 |
* put your comment there...
|
131 |
+
*
|
132 |
* @param mixed $type
|
133 |
*/
|
134 |
public function createSubject($event) {
|
151 |
|
152 |
/**
|
153 |
* put your comment there...
|
154 |
+
*
|
155 |
*/
|
156 |
protected function define() {
|
157 |
$className = $this->targetClass;
|
166 |
|
167 |
/**
|
168 |
* put your comment there...
|
169 |
+
*
|
170 |
* @deprecated
|
171 |
*/
|
172 |
private function findEvents() {
|
185 |
}
|
186 |
}
|
187 |
}
|
188 |
+
|
189 |
/**
|
190 |
* put your comment there...
|
191 |
+
*
|
192 |
* @param mixed $class
|
193 |
*/
|
194 |
public function getDefinition() {
|
195 |
return self::$definition->get($this->targetClass);
|
196 |
}
|
197 |
+
|
198 |
/**
|
199 |
* put your comment there...
|
200 |
+
*
|
201 |
* @param mixed $type
|
202 |
*/
|
203 |
public function getSubject($type) {
|
220 |
foreach ($lives as $live) {
|
221 |
$subject[] = $live['observer'];
|
222 |
}
|
223 |
+
}
|
224 |
return $this->subjects[$type->name];
|
225 |
}
|
226 |
+
|
227 |
/**
|
228 |
* put your comment there...
|
229 |
+
*
|
230 |
* @param mixed $type
|
231 |
* @return CJTWordpressEvents
|
232 |
*/
|
237 |
}
|
238 |
return self::$classes[$type->class];
|
239 |
}
|
240 |
+
|
241 |
/**
|
242 |
* put your comment there...
|
243 |
+
*
|
244 |
*/
|
245 |
public function isFreeStatic() {
|
246 |
+
return $this->freeStatic;
|
247 |
}
|
248 |
+
|
249 |
/**
|
250 |
* put your comment there...
|
251 |
+
*
|
252 |
* @param mixed $typeName
|
253 |
* @param mixed $observer
|
254 |
*/
|
255 |
public function off($typeName, $observer) {
|
256 |
+
|
257 |
}
|
258 |
+
|
259 |
/**
|
260 |
* put your comment there...
|
261 |
+
*
|
262 |
* @param mixed $typeName
|
263 |
* @param mixed $observer
|
264 |
*/
|
269 |
$on['observer'] = $observer;
|
270 |
self::$live[$type->class][$type->name][] = $on;
|
271 |
}
|
272 |
+
|
273 |
/**
|
274 |
* put your comment there...
|
275 |
+
*
|
276 |
* @param mixed $type
|
277 |
*/
|
278 |
public static function parseEventType($type, $typePrefixed = true) {
|
300 |
}
|
301 |
return ((object) $type);
|
302 |
}
|
303 |
+
|
304 |
/**
|
305 |
* put your comment there...
|
306 |
+
*
|
307 |
* @param mixed $type
|
308 |
*/
|
309 |
protected function prepareEventTypeOptions($event) {
|
310 |
+
return $event;
|
311 |
}
|
312 |
+
|
313 |
/**
|
314 |
* put your comment there...
|
315 |
+
*
|
316 |
* @param mixed $type
|
317 |
* @param mixed $params
|
318 |
* @param mixed $typePrefixed
|
319 |
*/
|
320 |
public abstract function trigger($type, $params = array(), $typePrefixed = true);
|
321 |
+
|
322 |
/**
|
323 |
* put your comment there...
|
324 |
+
*
|
325 |
* @param mixed $type
|
326 |
* @param mixed $observer
|
327 |
*/
|
328 |
public function unbind($type, $observer, $typePrefixed = true) {
|
329 |
+
|
330 |
}
|
331 |
+
|
332 |
} // End class.
|
framework/events/hookable.class.php
CHANGED
File without changes
|
framework/events/hookable.interface.php
CHANGED
File without changes
|
framework/events/observers/observer.interface.php
CHANGED
File without changes
|
framework/events/observers/observer.observer.php
CHANGED
File without changes
|
framework/events/observers/wordpress-hook-action.observer.php
CHANGED
File without changes
|
framework/events/observers/wordpress-hook-filter.observer.php
CHANGED
File without changes
|
framework/events/observers/wordpress-hook.observer.php
CHANGED
File without changes
|
framework/events/subjects/action.subject.php
CHANGED
File without changes
|
framework/events/subjects/filter.subject.php
CHANGED
File without changes
|
framework/events/subjects/hook.subject.php
CHANGED
File without changes
|
framework/events/subjects/subject.interface.php
CHANGED
File without changes
|
framework/events/subjects/subject.subject.php
CHANGED
@@ -1,78 +1,78 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Import dependencies.
|
7 |
require_once 'subject.interface.php';
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
abstract class CJTEESubject implements CJTEEISubject, Countable, ArrayAccess {
|
13 |
-
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
-
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
protected $definition;
|
20 |
-
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
-
*
|
24 |
* @var CJTIncludes
|
25 |
*/
|
26 |
protected $includes;
|
27 |
-
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
-
*
|
31 |
* @var mixed
|
32 |
*/
|
33 |
protected $name;
|
34 |
-
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
-
*
|
38 |
* @var mixed
|
39 |
*/
|
40 |
protected $observers = array();
|
41 |
-
|
42 |
/**
|
43 |
* put your comment there...
|
44 |
-
*
|
45 |
* @var mixed
|
46 |
*/
|
47 |
protected $result;
|
48 |
-
|
49 |
/**
|
50 |
* put your comment there...
|
51 |
-
*
|
52 |
* @var mixed
|
53 |
*/
|
54 |
protected $target;
|
55 |
-
|
56 |
/**
|
57 |
* put your comment there...
|
58 |
-
*
|
59 |
*/
|
60 |
public function count() {
|
61 |
return count($this->observers);
|
62 |
}
|
63 |
-
|
64 |
/**
|
65 |
* put your comment there...
|
66 |
-
*
|
67 |
* @param mixed $name
|
68 |
*/
|
69 |
public function getDefinition($name) {
|
70 |
-
return isset($this->definition[$name]) ? $this->definition[$name] :
|
71 |
}
|
72 |
-
|
73 |
/**
|
74 |
* put your comment there...
|
75 |
-
*
|
76 |
*/
|
77 |
public static function getInstance($name, $target, $definition, $includes) {
|
78 |
// Instantiate!
|
@@ -82,18 +82,18 @@ abstract class CJTEESubject implements CJTEEISubject, Countable, ArrayAccess {
|
|
82 |
$subject->init($name, $target, $definition, $includes);
|
83 |
return $subject;
|
84 |
}
|
85 |
-
|
86 |
/**
|
87 |
* put your comment there...
|
88 |
-
*
|
89 |
*/
|
90 |
public function getName() {
|
91 |
-
return $this->name;
|
92 |
}
|
93 |
-
|
94 |
/**
|
95 |
* put your comment there...
|
96 |
-
*
|
97 |
* @param mixed $callback
|
98 |
*/
|
99 |
public function getObserver($callback) {
|
@@ -103,26 +103,26 @@ abstract class CJTEESubject implements CJTEEISubject, Countable, ArrayAccess {
|
|
103 |
$observer = call_user_func(array($this->getDefinition('observerClass'), 'getInstance'), $this, $callback);
|
104 |
return $observer;
|
105 |
}
|
106 |
-
|
107 |
/**
|
108 |
* put your comment there...
|
109 |
-
*
|
110 |
*/
|
111 |
public function getResult() {
|
112 |
-
return $this->result;
|
113 |
}
|
114 |
-
|
115 |
/**
|
116 |
* put your comment there...
|
117 |
-
*
|
118 |
*/
|
119 |
public function getTarget() {
|
120 |
-
return $this->target;
|
121 |
}
|
122 |
-
|
123 |
/**
|
124 |
* put your comment there...
|
125 |
-
*
|
126 |
*/
|
127 |
protected function init($name, $target, $definition, $includes) {
|
128 |
$this->name = $name;
|
@@ -131,10 +131,10 @@ abstract class CJTEESubject implements CJTEEISubject, Countable, ArrayAccess {
|
|
131 |
$this->includes = $includes;
|
132 |
return $this;
|
133 |
}
|
134 |
-
|
135 |
/**
|
136 |
* put your comment there...
|
137 |
-
*
|
138 |
* @param mixed $params
|
139 |
*/
|
140 |
protected function initResultArray($params) {
|
@@ -144,34 +144,34 @@ abstract class CJTEESubject implements CJTEEISubject, Countable, ArrayAccess {
|
|
144 |
//--- cancel for now !! array_unshift($this->result['params'], $this, $this->target);
|
145 |
$this->result['return'] = false;
|
146 |
}
|
147 |
-
|
148 |
/**
|
149 |
* put your comment there...
|
150 |
-
*
|
151 |
* @param mixed $callback
|
152 |
*/
|
153 |
public function offsetExists($callback) {
|
154 |
$key = null;
|
155 |
-
|
156 |
// Check existance!
|
157 |
return isset($this->observers[$key]);
|
158 |
}
|
159 |
-
|
160 |
/**
|
161 |
* put your comment there...
|
162 |
-
*
|
163 |
* @param mixed $callback
|
164 |
*/
|
165 |
public function offsetGet($callback) {
|
166 |
$key = null;
|
167 |
-
|
168 |
// Return observer!
|
169 |
return $this->observers[$key];
|
170 |
}
|
171 |
-
|
172 |
/**
|
173 |
* put your comment there...
|
174 |
-
*
|
175 |
* @param mixed $key
|
176 |
* @param mixed $callback
|
177 |
*/
|
@@ -181,10 +181,10 @@ abstract class CJTEESubject implements CJTEEISubject, Countable, ArrayAccess {
|
|
181 |
// Add to observers list!
|
182 |
$this->observers[$key] = $observer;
|
183 |
}
|
184 |
-
|
185 |
/**
|
186 |
* put your comment there...
|
187 |
-
*
|
188 |
* @param mixed $callback
|
189 |
*/
|
190 |
public function offsetUnset($callback) {
|
@@ -193,28 +193,28 @@ abstract class CJTEESubject implements CJTEEISubject, Countable, ArrayAccess {
|
|
193 |
// Just remove from observers list!
|
194 |
unset($this->observers[$key]);
|
195 |
}
|
196 |
-
|
197 |
/**
|
198 |
* put your comment there...
|
199 |
-
*
|
200 |
*/
|
201 |
protected function prepareResultParameters() {
|
202 |
// No changes should happen for the general observer parameters!
|
203 |
return;
|
204 |
}
|
205 |
-
|
206 |
/**
|
207 |
* put your comment there...
|
208 |
-
*
|
209 |
* @param mixed $observer
|
210 |
*/
|
211 |
protected function processFilter($observer) {
|
212 |
return true; // Always call observer!
|
213 |
}
|
214 |
-
|
215 |
/**
|
216 |
* put your comment there...
|
217 |
-
*
|
218 |
*/
|
219 |
public function trigger() {
|
220 |
// Read parameters.
|
@@ -226,12 +226,12 @@ abstract class CJTEESubject implements CJTEEISubject, Countable, ArrayAccess {
|
|
226 |
$this->result['params']['observer'] = $observer;
|
227 |
$this->result['return'] = call_user_func_array(array($observer, 'trigger'), $this->result['params']);
|
228 |
// Prepare parameters based on the previous call result!
|
229 |
-
$this->prepareResultParameters();
|
230 |
}
|
231 |
next($this->observers);
|
232 |
}
|
233 |
// Return last result!
|
234 |
return $this->result['return'];
|
235 |
}
|
236 |
-
|
237 |
} // End class.
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Import dependencies.
|
7 |
require_once 'subject.interface.php';
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
abstract class CJTEESubject implements CJTEEISubject, Countable, ArrayAccess {
|
13 |
+
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
+
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
protected $definition;
|
20 |
+
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
+
*
|
24 |
* @var CJTIncludes
|
25 |
*/
|
26 |
protected $includes;
|
27 |
+
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
+
*
|
31 |
* @var mixed
|
32 |
*/
|
33 |
protected $name;
|
34 |
+
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
+
*
|
38 |
* @var mixed
|
39 |
*/
|
40 |
protected $observers = array();
|
41 |
+
|
42 |
/**
|
43 |
* put your comment there...
|
44 |
+
*
|
45 |
* @var mixed
|
46 |
*/
|
47 |
protected $result;
|
48 |
+
|
49 |
/**
|
50 |
* put your comment there...
|
51 |
+
*
|
52 |
* @var mixed
|
53 |
*/
|
54 |
protected $target;
|
55 |
+
|
56 |
/**
|
57 |
* put your comment there...
|
58 |
+
*
|
59 |
*/
|
60 |
public function count() {
|
61 |
return count($this->observers);
|
62 |
}
|
63 |
+
|
64 |
/**
|
65 |
* put your comment there...
|
66 |
+
*
|
67 |
* @param mixed $name
|
68 |
*/
|
69 |
public function getDefinition($name) {
|
70 |
+
return isset($this->definition[$name]) ? $this->definition[$name] : [];
|
71 |
}
|
72 |
+
|
73 |
/**
|
74 |
* put your comment there...
|
75 |
+
*
|
76 |
*/
|
77 |
public static function getInstance($name, $target, $definition, $includes) {
|
78 |
// Instantiate!
|
82 |
$subject->init($name, $target, $definition, $includes);
|
83 |
return $subject;
|
84 |
}
|
85 |
+
|
86 |
/**
|
87 |
* put your comment there...
|
88 |
+
*
|
89 |
*/
|
90 |
public function getName() {
|
91 |
+
return $this->name;
|
92 |
}
|
93 |
+
|
94 |
/**
|
95 |
* put your comment there...
|
96 |
+
*
|
97 |
* @param mixed $callback
|
98 |
*/
|
99 |
public function getObserver($callback) {
|
103 |
$observer = call_user_func(array($this->getDefinition('observerClass'), 'getInstance'), $this, $callback);
|
104 |
return $observer;
|
105 |
}
|
106 |
+
|
107 |
/**
|
108 |
* put your comment there...
|
109 |
+
*
|
110 |
*/
|
111 |
public function getResult() {
|
112 |
+
return $this->result;
|
113 |
}
|
114 |
+
|
115 |
/**
|
116 |
* put your comment there...
|
117 |
+
*
|
118 |
*/
|
119 |
public function getTarget() {
|
120 |
+
return $this->target;
|
121 |
}
|
122 |
+
|
123 |
/**
|
124 |
* put your comment there...
|
125 |
+
*
|
126 |
*/
|
127 |
protected function init($name, $target, $definition, $includes) {
|
128 |
$this->name = $name;
|
131 |
$this->includes = $includes;
|
132 |
return $this;
|
133 |
}
|
134 |
+
|
135 |
/**
|
136 |
* put your comment there...
|
137 |
+
*
|
138 |
* @param mixed $params
|
139 |
*/
|
140 |
protected function initResultArray($params) {
|
144 |
//--- cancel for now !! array_unshift($this->result['params'], $this, $this->target);
|
145 |
$this->result['return'] = false;
|
146 |
}
|
147 |
+
|
148 |
/**
|
149 |
* put your comment there...
|
150 |
+
*
|
151 |
* @param mixed $callback
|
152 |
*/
|
153 |
public function offsetExists($callback) {
|
154 |
$key = null;
|
155 |
+
|
156 |
// Check existance!
|
157 |
return isset($this->observers[$key]);
|
158 |
}
|
159 |
+
|
160 |
/**
|
161 |
* put your comment there...
|
162 |
+
*
|
163 |
* @param mixed $callback
|
164 |
*/
|
165 |
public function offsetGet($callback) {
|
166 |
$key = null;
|
167 |
+
|
168 |
// Return observer!
|
169 |
return $this->observers[$key];
|
170 |
}
|
171 |
+
|
172 |
/**
|
173 |
* put your comment there...
|
174 |
+
*
|
175 |
* @param mixed $key
|
176 |
* @param mixed $callback
|
177 |
*/
|
181 |
// Add to observers list!
|
182 |
$this->observers[$key] = $observer;
|
183 |
}
|
184 |
+
|
185 |
/**
|
186 |
* put your comment there...
|
187 |
+
*
|
188 |
* @param mixed $callback
|
189 |
*/
|
190 |
public function offsetUnset($callback) {
|
193 |
// Just remove from observers list!
|
194 |
unset($this->observers[$key]);
|
195 |
}
|
196 |
+
|
197 |
/**
|
198 |
* put your comment there...
|
199 |
+
*
|
200 |
*/
|
201 |
protected function prepareResultParameters() {
|
202 |
// No changes should happen for the general observer parameters!
|
203 |
return;
|
204 |
}
|
205 |
+
|
206 |
/**
|
207 |
* put your comment there...
|
208 |
+
*
|
209 |
* @param mixed $observer
|
210 |
*/
|
211 |
protected function processFilter($observer) {
|
212 |
return true; // Always call observer!
|
213 |
}
|
214 |
+
|
215 |
/**
|
216 |
* put your comment there...
|
217 |
+
*
|
218 |
*/
|
219 |
public function trigger() {
|
220 |
// Read parameters.
|
226 |
$this->result['params']['observer'] = $observer;
|
227 |
$this->result['return'] = call_user_func_array(array($observer, 'trigger'), $this->result['params']);
|
228 |
// Prepare parameters based on the previous call result!
|
229 |
+
$this->prepareResultParameters();
|
230 |
}
|
231 |
next($this->observers);
|
232 |
}
|
233 |
// Return last result!
|
234 |
return $this->result['return'];
|
235 |
}
|
236 |
+
|
237 |
} // End class.
|
framework/events/wordpress.class.php
CHANGED
@@ -1,46 +1,46 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
/**
|
7 |
-
*
|
8 |
*/
|
9 |
class CJTWordpressEvents extends CJTEvents {
|
10 |
-
|
11 |
/**
|
12 |
-
*
|
13 |
*/
|
14 |
const HOOK_ACTION = 'action';
|
15 |
|
16 |
/**
|
17 |
-
*
|
18 |
*/
|
19 |
const HOOK_CUSTOM = 'custom';
|
20 |
-
|
21 |
/**
|
22 |
-
*
|
23 |
*/
|
24 |
const HOOK_FILTER = 'filter';
|
25 |
-
|
26 |
/**
|
27 |
* put your comment there...
|
28 |
-
*
|
29 |
* @param mixed $options
|
30 |
*/
|
31 |
-
public static function
|
32 |
// Initialize CJTEvents!
|
33 |
-
parent::
|
34 |
// Extend all Hookable objects with CJTEvents events!
|
35 |
$events = new CJTWordpressEvents(__CLASS__, $options, true);
|
36 |
// Inherits all CJTEvents and CJTWordpressEvents Events to all hookable objects!
|
37 |
self::$definition->addBaseClass(__CLASS__, array('hookType' => self::HOOK_FILTER));
|
38 |
return $events;
|
39 |
}
|
40 |
-
|
41 |
/**
|
42 |
* put your comment there...
|
43 |
-
*
|
44 |
* @param mixed $type
|
45 |
*/
|
46 |
protected function prepareEventTypeOptions($event) {
|
@@ -61,10 +61,10 @@ class CJTWordpressEvents extends CJTEvents {
|
|
61 |
}
|
62 |
return $event;
|
63 |
}
|
64 |
-
|
65 |
/**
|
66 |
* put your comment there...
|
67 |
-
*
|
68 |
* @param mixed $type
|
69 |
* @param mixed $params
|
70 |
*/
|
@@ -80,5 +80,5 @@ class CJTWordpressEvents extends CJTEvents {
|
|
80 |
}
|
81 |
return $result;
|
82 |
}
|
83 |
-
|
84 |
} // End class.
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
/**
|
7 |
+
*
|
8 |
*/
|
9 |
class CJTWordpressEvents extends CJTEvents {
|
10 |
+
|
11 |
/**
|
12 |
+
*
|
13 |
*/
|
14 |
const HOOK_ACTION = 'action';
|
15 |
|
16 |
/**
|
17 |
+
*
|
18 |
*/
|
19 |
const HOOK_CUSTOM = 'custom';
|
20 |
+
|
21 |
/**
|
22 |
+
*
|
23 |
*/
|
24 |
const HOOK_FILTER = 'filter';
|
25 |
+
|
26 |
/**
|
27 |
* put your comment there...
|
28 |
+
*
|
29 |
* @param mixed $options
|
30 |
*/
|
31 |
+
public static function _init($options = array()) {
|
32 |
// Initialize CJTEvents!
|
33 |
+
parent::_init($options);
|
34 |
// Extend all Hookable objects with CJTEvents events!
|
35 |
$events = new CJTWordpressEvents(__CLASS__, $options, true);
|
36 |
// Inherits all CJTEvents and CJTWordpressEvents Events to all hookable objects!
|
37 |
self::$definition->addBaseClass(__CLASS__, array('hookType' => self::HOOK_FILTER));
|
38 |
return $events;
|
39 |
}
|
40 |
+
|
41 |
/**
|
42 |
* put your comment there...
|
43 |
+
*
|
44 |
* @param mixed $type
|
45 |
*/
|
46 |
protected function prepareEventTypeOptions($event) {
|
61 |
}
|
62 |
return $event;
|
63 |
}
|
64 |
+
|
65 |
/**
|
66 |
* put your comment there...
|
67 |
+
*
|
68 |
* @param mixed $type
|
69 |
* @param mixed $params
|
70 |
*/
|
80 |
}
|
81 |
return $result;
|
82 |
}
|
83 |
+
|
84 |
} // End class.
|
framework/exceptions.inc.php
CHANGED
File without changes
|
framework/extensions/extensions.class.php
CHANGED
@@ -1,152 +1,152 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
class CJTExtensions extends CJTHookableClass {
|
13 |
-
|
14 |
/**
|
15 |
-
*
|
16 |
*/
|
17 |
const CACHE_OPTION_NAME = 'cjt_extensions';
|
18 |
-
|
19 |
/**
|
20 |
-
*
|
21 |
*/
|
22 |
const LOAD_METHOD = 'getInvolved';
|
23 |
-
|
24 |
/**
|
25 |
-
*
|
26 |
*/
|
27 |
const PREFIXS = 'cjte-,css-javascript-toolbox-';
|
28 |
-
|
29 |
/**
|
30 |
* put your comment there...
|
31 |
-
*
|
32 |
* @var mixed
|
33 |
*/
|
34 |
protected $defDocs;
|
35 |
-
|
36 |
/**
|
37 |
* put your comment there...
|
38 |
-
*
|
39 |
* @var mixed
|
40 |
*/
|
41 |
protected $extensions;
|
42 |
-
|
43 |
/**
|
44 |
* put your comment there...
|
45 |
-
*
|
46 |
* @var mixed
|
47 |
*/
|
48 |
protected $file2Classmap;
|
49 |
-
|
50 |
/**
|
51 |
* put your comment there...
|
52 |
-
*
|
53 |
* @var mixed
|
54 |
*/
|
55 |
protected $incompatibilies;
|
56 |
-
|
57 |
/**
|
58 |
* put your comment there...
|
59 |
-
*
|
60 |
* @var mixed
|
61 |
*/
|
62 |
protected $loadMethod;
|
63 |
-
|
64 |
/**
|
65 |
* put your comment there...
|
66 |
-
*
|
67 |
* @var mixed
|
68 |
*/
|
69 |
protected $onautoload = array('parameters' => array('file', 'class'));
|
70 |
-
|
71 |
/**
|
72 |
* put your comment there...
|
73 |
-
*
|
74 |
* @var mixed
|
75 |
*/
|
76 |
protected $onbindevent = array('parameters' => array('event', 'callback'));
|
77 |
-
|
78 |
/**
|
79 |
* put your comment there...
|
80 |
-
*
|
81 |
* @var mixed
|
82 |
*/
|
83 |
protected $ondetectextension = array('parameters' => array('extension'));
|
84 |
-
|
85 |
/**
|
86 |
* put your comment there...
|
87 |
-
*
|
88 |
* @var mixed
|
89 |
*/
|
90 |
protected $ongetactiveplugins = array('parameters' => array('plugins'));
|
91 |
-
|
92 |
/**
|
93 |
* put your comment there...
|
94 |
-
*
|
95 |
* @var mixed
|
96 |
*/
|
97 |
protected $onload = array('parameters' => array('params'));
|
98 |
-
|
99 |
/**
|
100 |
* put your comment there...
|
101 |
-
*
|
102 |
* @var mixed
|
103 |
*/
|
104 |
protected $onloadcallback = array('parameters' => array('callback'));
|
105 |
-
|
106 |
/**
|
107 |
* put your comment there...
|
108 |
-
*
|
109 |
* @var mixed
|
110 |
*/
|
111 |
protected $onloaddefinition = array('parameters' => array('definition'));
|
112 |
-
|
113 |
/***
|
114 |
* put your comment there...
|
115 |
-
*
|
116 |
* @var mixed
|
117 |
*/
|
118 |
protected $ontregisterautoload = array('parameters' => array('callback'));
|
119 |
-
|
120 |
/**
|
121 |
* put your comment there...
|
122 |
-
*
|
123 |
* @var mixed
|
124 |
*/
|
125 |
protected $onreloadcacheparameters = array('parameters' => array('params'));
|
126 |
-
|
127 |
/**
|
128 |
* put your comment there...
|
129 |
-
*
|
130 |
* @var mixed
|
131 |
*/
|
132 |
protected $onloaded = array(
|
133 |
'hookType' => CJTWordpressEvents::HOOK_ACTION,
|
134 |
'parameters' => array('class', 'extension', 'definition', 'result')
|
135 |
);
|
136 |
-
|
137 |
/**
|
138 |
* put your comment there...
|
139 |
-
*
|
140 |
* @var mixed
|
141 |
*/
|
142 |
protected $prefix;
|
143 |
-
|
144 |
/**
|
145 |
* put your comment there...
|
146 |
-
*
|
147 |
* @param mixed $className
|
148 |
*/
|
149 |
-
public function
|
150 |
// Load only classed defined on the list!
|
151 |
if (isset($this->extensions[$className])) {
|
152 |
$classFile = $this->onautoload($this->extensions[$className]['runtime']['classFile'], $className);
|
@@ -154,10 +154,10 @@ class CJTExtensions extends CJTHookableClass {
|
|
154 |
require_once $classFile;
|
155 |
}
|
156 |
}
|
157 |
-
|
158 |
/**
|
159 |
* put your comment there...
|
160 |
-
*
|
161 |
* @param mixed $prefix
|
162 |
* @param mixed $loadMethod
|
163 |
* @return CJTExtensions
|
@@ -169,18 +169,18 @@ class CJTExtensions extends CJTHookableClass {
|
|
169 |
$this->prefix = explode( ',', $prefix );
|
170 |
$this->loadMethod = $loadMethod;
|
171 |
}
|
172 |
-
|
173 |
/**
|
174 |
* put your comment there...
|
175 |
-
*
|
176 |
*/
|
177 |
public function __destruct() {
|
178 |
-
spl_autoload_unregister(array($this, '
|
179 |
}
|
180 |
-
|
181 |
/**
|
182 |
* put your comment there...
|
183 |
-
*
|
184 |
* @param mixed $reload
|
185 |
* @return CJTExtensions
|
186 |
*/
|
@@ -203,7 +203,7 @@ class CJTExtensions extends CJTHookableClass {
|
|
203 |
$pluginDir = dirname($file);
|
204 |
$pluginName = basename($pluginDir);
|
205 |
// Any plugin with our prefix is a CJT extension!
|
206 |
-
if ( ( strpos( $pluginName, $this->prefix[0] ) === 0 ) ||
|
207 |
( strpos( $pluginName, $this->prefix[1] ) === 0 ) ) {
|
208 |
// CJT Extsnsion must has the definition XML file!
|
209 |
// First try for Edition-Specific file
|
@@ -241,16 +241,16 @@ class CJTExtensions extends CJTHookableClass {
|
|
241 |
// Chaining
|
242 |
return $this->extensions;
|
243 |
}
|
244 |
-
|
245 |
/**
|
246 |
* put your comment there...
|
247 |
-
*
|
248 |
*/
|
249 |
public function load() {
|
250 |
// Initialize.
|
251 |
$frameworkVersion = new CJT_Framework_Version_Version(CJTPlugin::FW_Version);
|
252 |
// Auto load CJT extensions files when requested.
|
253 |
-
spl_autoload_register($this->ontregisterautoload(array($this, '
|
254 |
// Load all CJT extensions!
|
255 |
foreach ($this->getExtensions() as $class => $extension) {
|
256 |
// Filters!
|
@@ -309,7 +309,7 @@ class CJTExtensions extends CJTHookableClass {
|
|
309 |
}
|
310 |
}
|
311 |
}
|
312 |
-
else { // If manual load specified just
|
313 |
if (class_exists($class)) { // Make sure the class is loaded!
|
314 |
$this->onloaded($class, $extension, $definitionXML, call_user_func($callback));
|
315 |
}
|
@@ -320,10 +320,10 @@ class CJTExtensions extends CJTHookableClass {
|
|
320 |
add_action('admin_notices', array(& $this, 'processIncompatibles'));
|
321 |
}
|
322 |
}
|
323 |
-
|
324 |
/**
|
325 |
* put your comment there...
|
326 |
-
*
|
327 |
* @param mixed $pluginName
|
328 |
*/
|
329 |
public function & getDefDoc($pluginName) {
|
@@ -334,7 +334,7 @@ class CJTExtensions extends CJTHookableClass {
|
|
334 |
// Extension might removed while its license key still in the database
|
335 |
// Make sure the extension still exists
|
336 |
if (file_exists($pluginXMLFile)) {
|
337 |
-
$this->defDocs[$pluginName] = new SimpleXMLElement(file_get_contents($pluginXMLFile));
|
338 |
}
|
339 |
else {
|
340 |
# Return null when extension is absent!
|
@@ -346,15 +346,15 @@ class CJTExtensions extends CJTHookableClass {
|
|
346 |
|
347 |
/**
|
348 |
* put your comment there...
|
349 |
-
*
|
350 |
*/
|
351 |
public function & getFiles2ClassesMap() {
|
352 |
-
return $this->file2Classmap;
|
353 |
}
|
354 |
-
|
355 |
/**
|
356 |
* put your comment there...
|
357 |
-
*
|
358 |
* @TODO: REMOVE HTML-MARKUP. CJT PLUGIN NEVER WRITE MARKUP IMIXED WITH HTML. ITS VERY BAD PROGRAMMING PRACTICE. THIS WILL BE REMOVED NEXT TIME AS WE IN RUSH!!!
|
359 |
*/
|
360 |
public function processIncompatibles() {
|
@@ -366,7 +366,7 @@ class CJTExtensions extends CJTHookableClass {
|
|
366 |
$message = cssJSToolbox::getText('CJT detects incompatible installed extensions, listed below with status message for every extension:');
|
367 |
$list = '';
|
368 |
// For every compatible extension add
|
369 |
-
// an list item with details
|
370 |
// if there is an update available or provide
|
371 |
// a direct link to CJT website if no upgrade is available.
|
372 |
// Upgrade wont be available in case no license key is activated!
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
class CJTExtensions extends CJTHookableClass {
|
13 |
+
|
14 |
/**
|
15 |
+
*
|
16 |
*/
|
17 |
const CACHE_OPTION_NAME = 'cjt_extensions';
|
18 |
+
|
19 |
/**
|
20 |
+
*
|
21 |
*/
|
22 |
const LOAD_METHOD = 'getInvolved';
|
23 |
+
|
24 |
/**
|
25 |
+
*
|
26 |
*/
|
27 |
const PREFIXS = 'cjte-,css-javascript-toolbox-';
|
28 |
+
|
29 |
/**
|
30 |
* put your comment there...
|
31 |
+
*
|
32 |
* @var mixed
|
33 |
*/
|
34 |
protected $defDocs;
|
35 |
+
|
36 |
/**
|
37 |
* put your comment there...
|
38 |
+
*
|
39 |
* @var mixed
|
40 |
*/
|
41 |
protected $extensions;
|
42 |
+
|
43 |
/**
|
44 |
* put your comment there...
|
45 |
+
*
|
46 |
* @var mixed
|
47 |
*/
|
48 |
protected $file2Classmap;
|
49 |
+
|
50 |
/**
|
51 |
* put your comment there...
|
52 |
+
*
|
53 |
* @var mixed
|
54 |
*/
|
55 |
protected $incompatibilies;
|
56 |
+
|
57 |
/**
|
58 |
* put your comment there...
|
59 |
+
*
|
60 |
* @var mixed
|
61 |
*/
|
62 |
protected $loadMethod;
|
63 |
+
|
64 |
/**
|
65 |
* put your comment there...
|
66 |
+
*
|
67 |
* @var mixed
|
68 |
*/
|
69 |
protected $onautoload = array('parameters' => array('file', 'class'));
|
70 |
+
|
71 |
/**
|
72 |
* put your comment there...
|
73 |
+
*
|
74 |
* @var mixed
|
75 |
*/
|
76 |
protected $onbindevent = array('parameters' => array('event', 'callback'));
|
77 |
+
|
78 |
/**
|
79 |
* put your comment there...
|
80 |
+
*
|
81 |
* @var mixed
|
82 |
*/
|
83 |
protected $ondetectextension = array('parameters' => array('extension'));
|
84 |
+
|
85 |
/**
|
86 |
* put your comment there...
|
87 |
+
*
|
88 |
* @var mixed
|
89 |
*/
|
90 |
protected $ongetactiveplugins = array('parameters' => array('plugins'));
|
91 |
+
|
92 |
/**
|
93 |
* put your comment there...
|
94 |
+
*
|
95 |
* @var mixed
|
96 |
*/
|
97 |
protected $onload = array('parameters' => array('params'));
|
98 |
+
|
99 |
/**
|
100 |
* put your comment there...
|
101 |
+
*
|
102 |
* @var mixed
|
103 |
*/
|
104 |
protected $onloadcallback = array('parameters' => array('callback'));
|
105 |
+
|
106 |
/**
|
107 |
* put your comment there...
|
108 |
+
*
|
109 |
* @var mixed
|
110 |
*/
|
111 |
protected $onloaddefinition = array('parameters' => array('definition'));
|
112 |
+
|
113 |
/***
|
114 |
* put your comment there...
|
115 |
+
*
|
116 |
* @var mixed
|
117 |
*/
|
118 |
protected $ontregisterautoload = array('parameters' => array('callback'));
|
119 |
+
|
120 |
/**
|
121 |
* put your comment there...
|
122 |
+
*
|
123 |
* @var mixed
|
124 |
*/
|
125 |
protected $onreloadcacheparameters = array('parameters' => array('params'));
|
126 |
+
|
127 |
/**
|
128 |
* put your comment there...
|
129 |
+
*
|
130 |
* @var mixed
|
131 |
*/
|
132 |
protected $onloaded = array(
|
133 |
'hookType' => CJTWordpressEvents::HOOK_ACTION,
|
134 |
'parameters' => array('class', 'extension', 'definition', 'result')
|
135 |
);
|
136 |
+
|
137 |
/**
|
138 |
* put your comment there...
|
139 |
+
*
|
140 |
* @var mixed
|
141 |
*/
|
142 |
protected $prefix;
|
143 |
+
|
144 |
/**
|
145 |
* put your comment there...
|
146 |
+
*
|
147 |
* @param mixed $className
|
148 |
*/
|
149 |
+
public function _autoload($className) {
|
150 |
// Load only classed defined on the list!
|
151 |
if (isset($this->extensions[$className])) {
|
152 |
$classFile = $this->onautoload($this->extensions[$className]['runtime']['classFile'], $className);
|
154 |
require_once $classFile;
|
155 |
}
|
156 |
}
|
157 |
+
|
158 |
/**
|
159 |
* put your comment there...
|
160 |
+
*
|
161 |
* @param mixed $prefix
|
162 |
* @param mixed $loadMethod
|
163 |
* @return CJTExtensions
|
169 |
$this->prefix = explode( ',', $prefix );
|
170 |
$this->loadMethod = $loadMethod;
|
171 |
}
|
172 |
+
|
173 |
/**
|
174 |
* put your comment there...
|
175 |
+
*
|
176 |
*/
|
177 |
public function __destruct() {
|
178 |
+
spl_autoload_unregister(array($this, '_autoload'));
|
179 |
}
|
180 |
+
|
181 |
/**
|
182 |
* put your comment there...
|
183 |
+
*
|
184 |
* @param mixed $reload
|
185 |
* @return CJTExtensions
|
186 |
*/
|
203 |
$pluginDir = dirname($file);
|
204 |
$pluginName = basename($pluginDir);
|
205 |
// Any plugin with our prefix is a CJT extension!
|
206 |
+
if ( ( strpos( $pluginName, $this->prefix[0] ) === 0 ) ||
|
207 |
( strpos( $pluginName, $this->prefix[1] ) === 0 ) ) {
|
208 |
// CJT Extsnsion must has the definition XML file!
|
209 |
// First try for Edition-Specific file
|
241 |
// Chaining
|
242 |
return $this->extensions;
|
243 |
}
|
244 |
+
|
245 |
/**
|
246 |
* put your comment there...
|
247 |
+
*
|
248 |
*/
|
249 |
public function load() {
|
250 |
// Initialize.
|
251 |
$frameworkVersion = new CJT_Framework_Version_Version(CJTPlugin::FW_Version);
|
252 |
// Auto load CJT extensions files when requested.
|
253 |
+
spl_autoload_register($this->ontregisterautoload(array($this, '_autoload')));
|
254 |
// Load all CJT extensions!
|
255 |
foreach ($this->getExtensions() as $class => $extension) {
|
256 |
// Filters!
|
309 |
}
|
310 |
}
|
311 |
}
|
312 |
+
else { // If manual load specified just
|
313 |
if (class_exists($class)) { // Make sure the class is loaded!
|
314 |
$this->onloaded($class, $extension, $definitionXML, call_user_func($callback));
|
315 |
}
|
320 |
add_action('admin_notices', array(& $this, 'processIncompatibles'));
|
321 |
}
|
322 |
}
|
323 |
+
|
324 |
/**
|
325 |
* put your comment there...
|
326 |
+
*
|
327 |
* @param mixed $pluginName
|
328 |
*/
|
329 |
public function & getDefDoc($pluginName) {
|
334 |
// Extension might removed while its license key still in the database
|
335 |
// Make sure the extension still exists
|
336 |
if (file_exists($pluginXMLFile)) {
|
337 |
+
$this->defDocs[$pluginName] = new SimpleXMLElement(file_get_contents($pluginXMLFile));
|
338 |
}
|
339 |
else {
|
340 |
# Return null when extension is absent!
|
346 |
|
347 |
/**
|
348 |
* put your comment there...
|
349 |
+
*
|
350 |
*/
|
351 |
public function & getFiles2ClassesMap() {
|
352 |
+
return $this->file2Classmap;
|
353 |
}
|
354 |
+
|
355 |
/**
|
356 |
* put your comment there...
|
357 |
+
*
|
358 |
* @TODO: REMOVE HTML-MARKUP. CJT PLUGIN NEVER WRITE MARKUP IMIXED WITH HTML. ITS VERY BAD PROGRAMMING PRACTICE. THIS WILL BE REMOVED NEXT TIME AS WE IN RUSH!!!
|
359 |
*/
|
360 |
public function processIncompatibles() {
|
366 |
$message = cssJSToolbox::getText('CJT detects incompatible installed extensions, listed below with status message for every extension:');
|
367 |
$list = '';
|
368 |
// For every compatible extension add
|
369 |
+
// an list item with details
|
370 |
// if there is an update available or provide
|
371 |
// a direct link to CJT website if no upgrade is available.
|
372 |
// Upgrade wont be available in case no license key is activated!
|
framework/extensions/package/activator.php
CHANGED
File without changes
|
framework/extensions/package/blocks.php
CHANGED
File without changes
|
framework/extensions/package/extension.php
CHANGED
File without changes
|
framework/extensions/package/state/extension.php
CHANGED
File without changes
|
framework/extensions/package/state/packages.php
CHANGED
File without changes
|
framework/html/component.class.php
CHANGED
File without changes
|
framework/html/components/checkbox-list/checkbox-list.class.php
CHANGED
File without changes
|
framework/html/components/checkbox-list/public/css/checkbox-list.css
CHANGED
File without changes
|
framework/html/components/checkbox-list/tmpl/checkbox-list.html.tmpl
CHANGED
File without changes
|
framework/html/dom/element/script.php
CHANGED
File without changes
|
framework/html/dom/elementbase.php
CHANGED
File without changes
|
framework/html/field.inc.php
CHANGED
File without changes
|
framework/html/list.php
CHANGED
File without changes
|
framework/index.php
CHANGED
File without changes
|
framework/installer/dbfile.class.php
CHANGED
File without changes
|
framework/installer/reflection.class.php
CHANGED
File without changes
|
framework/js/ace/ChangeLog.txt
CHANGED
File without changes
|
framework/js/ace/ace.js
CHANGED
File without changes
|
framework/js/ace/ext-searchbox.js
CHANGED
File without changes
|
framework/js/ace/ext-settings_menu.js
CHANGED
File without changes
|
framework/js/ace/ext-statusbar.js
CHANGED
File without changes
|
framework/js/ace/keybinding-emacs.js
CHANGED
File without changes
|
framework/js/ace/keybinding-vim.js
CHANGED
File without changes
|
framework/js/ace/mode-css.js
CHANGED
File without changes
|
framework/js/ace/mode-html.js
CHANGED
File without changes
|
framework/js/ace/mode-javascript.js
CHANGED
File without changes
|
framework/js/ace/mode-php.js
CHANGED
File without changes
|
framework/js/ace/pluggable/pluggable.js
CHANGED
File without changes
|
framework/js/ace/worker-css.js
CHANGED
File without changes
|
framework/js/ace/worker-javascript.js
CHANGED
File without changes
|
framework/js/ace/worker-php.js
CHANGED
File without changes
|
framework/js/ajax/cjt-module-server/cjt-module-server.js
CHANGED
File without changes
|
framework/js/ajax/cjt-server-queue/cjt-server-queue.js
CHANGED
File without changes
|
framework/js/ajax/cjt-server/cjt-server.js
CHANGED
File without changes
|
framework/js/ajax/cjt-server/cjt-server.localization.php
CHANGED
File without changes
|
framework/js/ajax/scripts-loader/scripts-loader.js
CHANGED
File without changes
|
framework/js/ajax/styles-loader/styles-loader.js
CHANGED
File without changes
|
framework/js/cookies/jquery.cookies.2.2.0/jquery.cookies.2.2.0.js
CHANGED
File without changes
|
framework/js/hash/md5/md5.js
CHANGED
File without changes
|
framework/js/installer/installer.js
CHANGED
File without changes
|
framework/js/misc/simple-error-dialog/simple-error-dialog.js
CHANGED
File without changes
|
framework/js/misc/simple-error-dialog/simple-error-dialog.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript $VAR$ variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
framework/js/ui/jquery.link-progress/jquery.link-progress.js
CHANGED
File without changes
|
framework/js/ui/jquery.toolbox/jquery.toolbox.js
CHANGED
File without changes
|
framework/js/utilities/utilities.js
CHANGED
File without changes
|
framework/js/wordpress/script-localizer/script-localizer.js
CHANGED
File without changes
|
framework/mvc/controller-ajax.inc.php
CHANGED
File without changes
|
framework/mvc/controller.inc.php
CHANGED
File without changes
|
framework/mvc/model.inc.php
CHANGED
File without changes
|
framework/mvc/view.inc.php
CHANGED
File without changes
|
framework/packages/package.class.php
CHANGED
File without changes
|
framework/php/evaluator/evaluator.inc.php
CHANGED
File without changes
|
framework/php/includes.class.php
CHANGED
File without changes
|
framework/settings/page.inc.php
CHANGED
File without changes
|
framework/types/attributes.class.php
CHANGED
File without changes
|
framework/version/version.php
CHANGED
File without changes
|
framework/view/block/parameter/base/abstract.php
CHANGED
File without changes
|
framework/view/block/parameter/base/abstract/template/helpText.phtml
CHANGED
File without changes
|
framework/view/block/parameter/base/list.php
CHANGED
File without changes
|
framework/view/block/parameter/base/scalar.php
CHANGED
File without changes
|
framework/view/block/parameter/grouper/factory.php
CHANGED
File without changes
|
framework/view/block/parameter/grouper/tab/index.phtml
CHANGED
File without changes
|
framework/view/block/parameter/grouper/tab/public/css/tab.css
CHANGED
File without changes
|
framework/view/block/parameter/grouper/tab/tab.php
CHANGED
File without changes
|
framework/view/block/parameter/interface/type.php
CHANGED
File without changes
|
framework/view/block/parameter/parameters.php
CHANGED
File without changes
|
framework/view/block/parameter/renderer/array/array.php
CHANGED
File without changes
|
framework/view/block/parameter/renderer/array/index.phtml
CHANGED
File without changes
|
framework/view/block/parameter/renderer/checkbox/checkbox.php
CHANGED
File without changes
|
framework/view/block/parameter/renderer/checkbox/index.phtml
CHANGED
File without changes
|
framework/view/block/parameter/renderer/dropdown/dropdown.php
CHANGED
File without changes
|
framework/view/block/parameter/renderer/dropdown/index.phtml
CHANGED
File without changes
|
framework/view/block/parameter/renderer/factory.php
CHANGED
File without changes
|
framework/view/block/parameter/renderer/imageslist/imageslist.php
CHANGED
File without changes
|
framework/view/block/parameter/renderer/imageslist/index.phtml
CHANGED
File without changes
|
framework/view/block/parameter/renderer/imageslist/public/css/imageslist.css
CHANGED
File without changes
|
framework/view/block/parameter/renderer/imageslist/public/js/imageslist/imageslist.js
CHANGED
File without changes
|
framework/view/block/parameter/renderer/imageslist/public/js/imageslist/imageslist.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript ??? variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
framework/view/block/parameter/renderer/input/index.phtml
CHANGED
File without changes
|
framework/view/block/parameter/renderer/input/input.php
CHANGED
File without changes
|
framework/view/block/parameter/renderer/input/public/css/input.css
CHANGED
File without changes
|
framework/view/block/parameter/renderer/list/index.phtml
CHANGED
File without changes
|
framework/view/block/parameter/renderer/list/list.php
CHANGED
File without changes
|
framework/view/block/parameter/renderer/structure/index.phtml
CHANGED
File without changes
|
framework/view/block/parameter/renderer/structure/public/css/structure.css
CHANGED
File without changes
|
framework/view/block/parameter/renderer/structure/structure.php
CHANGED
File without changes
|
framework/view/block/parameter/renderer/textarea/index.phtml
CHANGED
File without changes
|
framework/view/block/parameter/renderer/textarea/textarea.php
CHANGED
File without changes
|
framework/wordpress/currentversion.php
CHANGED
File without changes
|
framework/wordpress/feed.php
CHANGED
File without changes
|
framework/xml/fetchscalars.php
CHANGED
File without changes
|
includes/html/incompatible_environment_message.html.php
CHANGED
File without changes
|
includes/index.php
CHANGED
File without changes
|
includes/installer/installer/db/mysql/structure.sql
CHANGED
File without changes
|
includes/installer/installer/includes/templates/wordpress-queue.inc.php
CHANGED
File without changes
|
includes/installer/installer/installer.class.php
CHANGED
File without changes
|
includes/installer/upgrade/0.2/includes/block.class.php
CHANGED
File without changes
|
includes/installer/upgrade/0.2/upgrade.class.php
CHANGED
File without changes
|
includes/installer/upgrade/0.3/includes/backup.class.php
CHANGED
File without changes
|
includes/installer/upgrade/0.3/includes/block.class.php
CHANGED
File without changes
|
includes/installer/upgrade/0.3/upgrade.class.php
CHANGED
File without changes
|
includes/installer/upgrade/1.0-CE/db/mysql/structure.sql
CHANGED
File without changes
|
includes/installer/upgrade/1.0-CE/upgrade.class.php
CHANGED
File without changes
|
includes/installer/upgrade/1.0/db/mysql/structure.sql
CHANGED
File without changes
|
includes/installer/upgrade/1.0/upgrade.class.php
CHANGED
File without changes
|
includes/installer/upgrade/1.1-CE/db/mysql/structure.sql
CHANGED
File without changes
|
includes/installer/upgrade/1.1-CE/upgrade.class.php
CHANGED
File without changes
|
includes/installer/upgrade/1.1/db/mysql/structure.sql
CHANGED
File without changes
|
includes/installer/upgrade/1.1/upgrade.class.php
CHANGED
File without changes
|
includes/installer/upgrade/1.2/db/mysql/structure.sql
CHANGED
File without changes
|
includes/installer/upgrade/1.2/upgrade.class.php
CHANGED
File without changes
|
includes/installer/upgrade/1.3/db/mysql/structure.sql
CHANGED
File without changes
|
includes/installer/upgrade/1.3/upgrade.class.php
CHANGED
File without changes
|
includes/installer/upgrade/1.4/db/mysql/structure.sql
CHANGED
File without changes
|
includes/installer/upgrade/1.4/upgrade.class.php
CHANGED
File without changes
|
includes/installer/upgrade/1.5/upgrade.class.php
CHANGED
File without changes
|
includes/installer/upgrade/block.class.php
CHANGED
File without changes
|
includes/installer/upgrade/template.class.php
CHANGED
File without changes
|
includes/installer/upgrade/upgrade.class.php
CHANGED
File without changes
|
includes/templates/templates.class.php
CHANGED
File without changes
|
index.php
CHANGED
File without changes
|
license.txt
CHANGED
File without changes
|
locals/languages/css-javascript-toolbox-en_US.mo
CHANGED
File without changes
|
locals/languages/css-javascript-toolbox-en_US.po
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: CSS &
|
4 |
"POT-Creation-Date: 2015-11-19 20:53+0200\n"
|
5 |
"PO-Revision-Date: 2015-11-19 20:53+0200\n"
|
6 |
"Last-Translator: CJT Team <support@css-javascript-toolbox.com>\n"
|
@@ -18,7 +18,7 @@ msgstr ""
|
|
18 |
#: /access.points/dashboardmetabox.accesspoint.php:31
|
19 |
#: /access.points/manage.accesspoint.php:44
|
20 |
#: /access.points/manage.accesspoint.php:45
|
21 |
-
msgid "CSS &
|
22 |
msgstr ""
|
23 |
|
24 |
#: /access.points/extensions.accesspoint.php:53
|
@@ -180,7 +180,7 @@ msgstr "Revision"
|
|
180 |
#: /locals/strings.inc.php:21
|
181 |
#: /models/fields/template-types.php:21
|
182 |
msgid "javascript"
|
183 |
-
msgstr "
|
184 |
|
185 |
#: /locals/strings.inc.php:22
|
186 |
#: /models/fields/template-types.php:20
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: CSS & JavaScript Toolbox V6\n"
|
4 |
"POT-Creation-Date: 2015-11-19 20:53+0200\n"
|
5 |
"PO-Revision-Date: 2015-11-19 20:53+0200\n"
|
6 |
"Last-Translator: CJT Team <support@css-javascript-toolbox.com>\n"
|
18 |
#: /access.points/dashboardmetabox.accesspoint.php:31
|
19 |
#: /access.points/manage.accesspoint.php:44
|
20 |
#: /access.points/manage.accesspoint.php:45
|
21 |
+
msgid "CSS & JavaScript Toolbox"
|
22 |
msgstr ""
|
23 |
|
24 |
#: /access.points/extensions.accesspoint.php:53
|
180 |
#: /locals/strings.inc.php:21
|
181 |
#: /models/fields/template-types.php:21
|
182 |
msgid "javascript"
|
183 |
+
msgstr "JavaScript"
|
184 |
|
185 |
#: /locals/strings.inc.php:22
|
186 |
#: /models/fields/template-types.php:20
|
locals/strings.inc.php
CHANGED
File without changes
|
models/block-templates.php
CHANGED
File without changes
|
models/block.php
CHANGED
File without changes
|
models/block/assignmentpanel/auxiliary.php
CHANGED
File without changes
|
models/block/assignmentpanel/auxiliarybase.php
CHANGED
File without changes
|
models/block/assignmentpanel/auxiliarypinned.php
CHANGED
File without changes
|
models/block/assignmentpanel/base.php
CHANGED
File without changes
|
models/block/assignmentpanel/helpers/auxiliary.php
CHANGED
File without changes
|
models/block/assignmentpanel/helpers/hierarchical.php
CHANGED
File without changes
|
models/block/assignmentpanel/post.php
CHANGED
File without changes
|
models/block/assignmentpanel/postbase.php
CHANGED
File without changes
|
models/block/assignmentpanel/postpinned.php
CHANGED
File without changes
|
models/block/assignmentpanel/taxonomy.php
CHANGED
File without changes
|
models/block/assignmentpanel/taxonomybase.php
CHANGED
File without changes
|
models/block/assignmentpanel/taxonomypinned.php
CHANGED
File without changes
|
models/block/assignmentpanel/wordpress.php
CHANGED
File without changes
|
models/block/parameters/base/parameters.php
CHANGED
File without changes
|
models/block/parameters/form/groups.php
CHANGED
File without changes
|
models/block/parameters/form/parameter.php
CHANGED
File without changes
|
models/block/parameters/form/parameters.php
CHANGED
File without changes
|
models/block/parameters/form/value.php
CHANGED
File without changes
|
models/block/parameters/parameter.php
CHANGED
File without changes
|
models/block/parameters/parameters.php
CHANGED
File without changes
|
models/blocks-backups.php
CHANGED
File without changes
|
models/blocks.php
CHANGED
File without changes
|
models/coupling.php
CHANGED
File without changes
|
models/extensions.php
CHANGED
File without changes
|
models/fields/template-authors.php
CHANGED
File without changes
|
models/fields/template-creation-dates.php
CHANGED
File without changes
|
models/fields/template-development-states.php
CHANGED
File without changes
|
models/fields/template-last-modified-dates.php
CHANGED
File without changes
|
models/fields/template-owners.php
CHANGED
File without changes
|
models/fields/template-states.php
CHANGED
File without changes
|
models/fields/template-types.php
CHANGED
File without changes
|
models/fields/template-versions.php
CHANGED
File without changes
|
models/formgroups.php
CHANGED
File without changes
|
models/forms.php
CHANGED
File without changes
|
models/installer.php
CHANGED
File without changes
|
models/metabox.php
CHANGED
File without changes
|
models/package-file.php
CHANGED
File without changes
|
models/package.php
CHANGED
File without changes
|
models/package/block.php
CHANGED
File without changes
|
models/package/xml/definition/abstract.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/files.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/files/file.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/links.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/links/link.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/links/link/package.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/package.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params/form.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params/form/groups.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params/form/groups/group.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params/form/groups/group/xfields.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params/list.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params/list/param.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params/list/param/group.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params/list/param/group/definition.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params/list/param/group/definition/type.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params/list/param/group/rendererParams.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params/list/param/params.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params/list/param/typeParams.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/block/params/list/param/typeparams/param.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/package.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/template.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/template/folders.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/template/folders/folder.php
CHANGED
File without changes
|
models/package/xml/definition/frag/frag/template/package.php
CHANGED
File without changes
|
models/package/xml/definition/fragpackage.php
CHANGED
File without changes
|
models/package/xml/definition/interface/element.php
CHANGED
File without changes
|
models/package/xml/definition/package/package.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/files.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/files/file.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/links.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/links/link.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params/form.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params/form/groups.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params/form/groups/group.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params/form/groups/group/xfields.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params/list.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params/list/param.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params/list/param/group.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params/list/param/group/definition.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params/list/param/group/definition/type.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params/list/param/group/rendererParams.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params/list/param/params.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params/list/param/typeParams.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/block/params/list/param/typeparams/param.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/objects.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/objects/object.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/template.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/template/folders.php
CHANGED
File without changes
|
models/package/xml/definition/package/package/template/folders/folder.php
CHANGED
File without changes
|
models/package/xml/definition/packagehelper.php
CHANGED
File without changes
|
models/package/xml/factory.php
CHANGED
File without changes
|
models/packages.php
CHANGED
File without changes
|
models/parameters.php
CHANGED
File without changes
|
models/settings.php
CHANGED
File without changes
|
models/settings/metabox.php
CHANGED
File without changes
|
models/settings/uninstall.php
CHANGED
File without changes
|
models/setup.php
CHANGED
@@ -1,31 +1,31 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
class CJTSetupModel {
|
13 |
-
|
14 |
/**
|
15 |
-
*
|
16 |
*/
|
17 |
const LICENSES_CACHE = 'cache.CJTSetupModel.licenses';
|
18 |
|
19 |
/**
|
20 |
* put your comment there...
|
21 |
-
*
|
22 |
* @var mixed
|
23 |
*/
|
24 |
protected $licenses;
|
25 |
-
|
26 |
/**
|
27 |
* put your comment there...
|
28 |
-
*
|
29 |
*/
|
30 |
public function __construct() {
|
31 |
// Read all cached licenses!
|
@@ -35,10 +35,10 @@ class CJTSetupModel {
|
|
35 |
$this->licenses = array();
|
36 |
}
|
37 |
}
|
38 |
-
|
39 |
/**
|
40 |
* put your comment there...
|
41 |
-
*
|
42 |
* @param mixed $component
|
43 |
* @param mixed $action
|
44 |
* @param mixed $state
|
@@ -57,12 +57,12 @@ class CJTSetupModel {
|
|
57 |
// update local Cache!
|
58 |
$this->licenses = $cache;
|
59 |
// return action name
|
60 |
-
return $action;
|
61 |
}
|
62 |
-
|
63 |
/**
|
64 |
* put your comment there...
|
65 |
-
*
|
66 |
* @param mixed $action
|
67 |
* @param mixed $component
|
68 |
* @param mixed $license
|
@@ -88,36 +88,36 @@ class CJTSetupModel {
|
|
88 |
}
|
89 |
}
|
90 |
catch ( CJTServicesAPICallException $exception ) {
|
91 |
-
// If request error compaitble the response object to be used!
|
92 |
$response = array('license' => 'error', 'component' => $component['name']);
|
93 |
}
|
94 |
return $response;
|
95 |
}
|
96 |
-
|
97 |
/**
|
98 |
* put your comment there...
|
99 |
-
*
|
100 |
*/
|
101 |
public function getCJTComponentData() {
|
102 |
$component = array();
|
103 |
// Set info!
|
104 |
$component['pluginBase'] = CJTOOLBOX_PLUGIN_BASE;
|
105 |
-
$component['title'] = 'CSS &
|
106 |
return $component;
|
107 |
}
|
108 |
-
|
109 |
/**
|
110 |
* put your comment there...
|
111 |
-
*
|
112 |
* @param mixed $component
|
113 |
*/
|
114 |
public function getExtensionProductTypes($component) {
|
115 |
-
# Initialize
|
116 |
$types = array();
|
117 |
# Extension plugin file
|
118 |
$pluginDirName = dirname($component['pluginBase']);
|
119 |
-
$pluginXMLFile = WP_PLUGIN_DIR . DIRECTORY_SEPARATOR .
|
120 |
-
$pluginDirName . DIRECTORY_SEPARATOR .
|
121 |
$pluginDirName . '.xml';
|
122 |
# Use XML
|
123 |
$exDef = new SimpleXMLElement(file_get_contents($pluginXMLFile));
|
@@ -142,16 +142,16 @@ class CJTSetupModel {
|
|
142 |
|
143 |
/**
|
144 |
* put your comment there...
|
145 |
-
*
|
146 |
*/
|
147 |
public function & getLicenses() {
|
148 |
return $this->licenses;
|
149 |
}
|
150 |
-
|
151 |
/**
|
152 |
-
* Get list of all cached licenses that has
|
153 |
* a license key in $state state!
|
154 |
-
*
|
155 |
* @param mixed $state
|
156 |
*/
|
157 |
public function getStatedLicenses($state = 'activate') {
|
@@ -167,20 +167,20 @@ class CJTSetupModel {
|
|
167 |
}
|
168 |
return $statedList;
|
169 |
}
|
170 |
-
|
171 |
/**
|
172 |
* put your comment there...
|
173 |
-
*
|
174 |
* @param mixed $licenseTypes
|
175 |
* @param mixed $compoment
|
176 |
* @param mixed $struct
|
177 |
*/
|
178 |
public function getStateStruct($licenseTypes, $struct = null) {
|
179 |
-
// INit
|
180 |
$state = null;
|
181 |
// Read all licenses from db!
|
182 |
$licensesCache =& $this->getLicenses();
|
183 |
-
// Find license
|
184 |
foreach ($licenseTypes as $type) {
|
185 |
# Get product name to search
|
186 |
$productName = $type['name'];
|
@@ -199,10 +199,10 @@ class CJTSetupModel {
|
|
199 |
}
|
200 |
return $state;
|
201 |
}
|
202 |
-
|
203 |
/**
|
204 |
* put your comment there...
|
205 |
-
*
|
206 |
* @param mixed $state
|
207 |
*/
|
208 |
public function removeCachedLicense($state) {
|
@@ -212,7 +212,7 @@ class CJTSetupModel {
|
|
212 |
$cachedStates =& $this->getLicenses();
|
213 |
// Set return value!
|
214 |
$result = isset($cachedStates[$componentName]) ? 'valid' : 'invalid';
|
215 |
-
// Remove component license even if its not exists, nothing will happen!
|
216 |
unset($cachedStates[$componentName]);
|
217 |
// Update cache list!
|
218 |
update_option(self::LICENSES_CACHE, $cachedStates);
|
@@ -220,5 +220,5 @@ class CJTSetupModel {
|
|
220 |
$this->licenses = $cachedStates;
|
221 |
return $result;
|
222 |
}
|
223 |
-
|
224 |
} // End class.
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
class CJTSetupModel {
|
13 |
+
|
14 |
/**
|
15 |
+
*
|
16 |
*/
|
17 |
const LICENSES_CACHE = 'cache.CJTSetupModel.licenses';
|
18 |
|
19 |
/**
|
20 |
* put your comment there...
|
21 |
+
*
|
22 |
* @var mixed
|
23 |
*/
|
24 |
protected $licenses;
|
25 |
+
|
26 |
/**
|
27 |
* put your comment there...
|
28 |
+
*
|
29 |
*/
|
30 |
public function __construct() {
|
31 |
// Read all cached licenses!
|
35 |
$this->licenses = array();
|
36 |
}
|
37 |
}
|
38 |
+
|
39 |
/**
|
40 |
* put your comment there...
|
41 |
+
*
|
42 |
* @param mixed $component
|
43 |
* @param mixed $action
|
44 |
* @param mixed $state
|
57 |
// update local Cache!
|
58 |
$this->licenses = $cache;
|
59 |
// return action name
|
60 |
+
return $action;
|
61 |
}
|
62 |
+
|
63 |
/**
|
64 |
* put your comment there...
|
65 |
+
*
|
66 |
* @param mixed $action
|
67 |
* @param mixed $component
|
68 |
* @param mixed $license
|
88 |
}
|
89 |
}
|
90 |
catch ( CJTServicesAPICallException $exception ) {
|
91 |
+
// If request error compaitble the response object to be used!
|
92 |
$response = array('license' => 'error', 'component' => $component['name']);
|
93 |
}
|
94 |
return $response;
|
95 |
}
|
96 |
+
|
97 |
/**
|
98 |
* put your comment there...
|
99 |
+
*
|
100 |
*/
|
101 |
public function getCJTComponentData() {
|
102 |
$component = array();
|
103 |
// Set info!
|
104 |
$component['pluginBase'] = CJTOOLBOX_PLUGIN_BASE;
|
105 |
+
$component['title'] = 'CSS & JavaScript Toolbox';
|
106 |
return $component;
|
107 |
}
|
108 |
+
|
109 |
/**
|
110 |
* put your comment there...
|
111 |
+
*
|
112 |
* @param mixed $component
|
113 |
*/
|
114 |
public function getExtensionProductTypes($component) {
|
115 |
+
# Initialize
|
116 |
$types = array();
|
117 |
# Extension plugin file
|
118 |
$pluginDirName = dirname($component['pluginBase']);
|
119 |
+
$pluginXMLFile = WP_PLUGIN_DIR . DIRECTORY_SEPARATOR .
|
120 |
+
$pluginDirName . DIRECTORY_SEPARATOR .
|
121 |
$pluginDirName . '.xml';
|
122 |
# Use XML
|
123 |
$exDef = new SimpleXMLElement(file_get_contents($pluginXMLFile));
|
142 |
|
143 |
/**
|
144 |
* put your comment there...
|
145 |
+
*
|
146 |
*/
|
147 |
public function & getLicenses() {
|
148 |
return $this->licenses;
|
149 |
}
|
150 |
+
|
151 |
/**
|
152 |
+
* Get list of all cached licenses that has
|
153 |
* a license key in $state state!
|
154 |
+
*
|
155 |
* @param mixed $state
|
156 |
*/
|
157 |
public function getStatedLicenses($state = 'activate') {
|
167 |
}
|
168 |
return $statedList;
|
169 |
}
|
170 |
+
|
171 |
/**
|
172 |
* put your comment there...
|
173 |
+
*
|
174 |
* @param mixed $licenseTypes
|
175 |
* @param mixed $compoment
|
176 |
* @param mixed $struct
|
177 |
*/
|
178 |
public function getStateStruct($licenseTypes, $struct = null) {
|
179 |
+
// INit
|
180 |
$state = null;
|
181 |
// Read all licenses from db!
|
182 |
$licensesCache =& $this->getLicenses();
|
183 |
+
// Find license
|
184 |
foreach ($licenseTypes as $type) {
|
185 |
# Get product name to search
|
186 |
$productName = $type['name'];
|
199 |
}
|
200 |
return $state;
|
201 |
}
|
202 |
+
|
203 |
/**
|
204 |
* put your comment there...
|
205 |
+
*
|
206 |
* @param mixed $state
|
207 |
*/
|
208 |
public function removeCachedLicense($state) {
|
212 |
$cachedStates =& $this->getLicenses();
|
213 |
// Set return value!
|
214 |
$result = isset($cachedStates[$componentName]) ? 'valid' : 'invalid';
|
215 |
+
// Remove component license even if its not exists, nothing will happen!
|
216 |
unset($cachedStates[$componentName]);
|
217 |
// Update cache list!
|
218 |
update_option(self::LICENSES_CACHE, $cachedStates);
|
220 |
$this->licenses = $cachedStates;
|
221 |
return $result;
|
222 |
}
|
223 |
+
|
224 |
} // End class.
|
models/statistics-metabox.php
CHANGED
File without changes
|
models/template.php
CHANGED
@@ -1,40 +1,40 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disllow direct access.
|
7 |
defined('ABSPATH') or die('Access denied');
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
class CJTTemplateModel extends CJTHookableClass {
|
13 |
-
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
-
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
public $inputs;
|
20 |
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
-
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
protected $onloadcodefile = array('parameters' => array('code', 'item'));
|
27 |
-
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
-
*
|
31 |
* @var mixed
|
32 |
*/
|
33 |
protected $onqueryitem = array('parameters' => array('query'));
|
34 |
-
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
-
*
|
38 |
* @param mixed $code
|
39 |
*/
|
40 |
public function decryptCode($encodedCode) {
|
@@ -44,10 +44,10 @@ class CJTTemplateModel extends CJTHookableClass {
|
|
44 |
$code = base64_decode($code64);
|
45 |
return $code;
|
46 |
}
|
47 |
-
|
48 |
/**
|
49 |
* put your comment there...
|
50 |
-
*
|
51 |
* @param mixed $code
|
52 |
*/
|
53 |
public function encryptCode($code) {
|
@@ -57,10 +57,10 @@ class CJTTemplateModel extends CJTHookableClass {
|
|
57 |
$encodedCode = "<?php defined(\"ABS_PATH\") or die(\"Access Denied\"); '{$code64}'; ?>";
|
58 |
return $encodedCode;
|
59 |
}
|
60 |
-
|
61 |
/**
|
62 |
* put your comment there...
|
63 |
-
*
|
64 |
* @param mixed $name
|
65 |
*/
|
66 |
public function exists($name) {
|
@@ -71,23 +71,23 @@ class CJTTemplateModel extends CJTHookableClass {
|
|
71 |
return (($existsItem = $this->getTemplateBy()) && property_exists($existsItem, 'id') && $existsItem->id) ?
|
72 |
$existsItem : FALSE;
|
73 |
}
|
74 |
-
|
75 |
/**
|
76 |
* put your comment there...
|
77 |
-
*
|
78 |
*/
|
79 |
public function getItem() {
|
80 |
$tManager = CJTModel::create('templates-manager');
|
81 |
$query = $tManager->getItemsQuery();
|
82 |
-
$query['select'] = 'SELECT t.id,
|
83 |
t.queueName,
|
84 |
-
t.name,
|
85 |
-
t.type,
|
86 |
-
t.description,
|
87 |
-
t.creationDate,
|
88 |
t.keywords,
|
89 |
r.dateCreated lastModified,
|
90 |
-
t.state,
|
91 |
a.name author,
|
92 |
r.changeLog,
|
93 |
r.version,
|
@@ -109,10 +109,10 @@ class CJTTemplateModel extends CJTHookableClass {
|
|
109 |
// Return PHP StdClass object.
|
110 |
return $item;
|
111 |
}
|
112 |
-
|
113 |
/**
|
114 |
* Query Block based on the passed paramaters.
|
115 |
-
*
|
116 |
*/
|
117 |
public function getTemplateBy() {
|
118 |
// import dependencies.
|
@@ -125,7 +125,7 @@ class CJTTemplateModel extends CJTHookableClass {
|
|
125 |
|
126 |
/**
|
127 |
* put your comment there...
|
128 |
-
*
|
129 |
*/
|
130 |
public function save() {
|
131 |
// import libraries.
|
@@ -138,16 +138,16 @@ class CJTTemplateModel extends CJTHookableClass {
|
|
138 |
// Load template data is exists (load), change values (setData).
|
139 |
$template = CJTxTable::getInstance('template');
|
140 |
if ($saveId) {
|
141 |
-
$template->set('id', $saveId)->load();
|
142 |
}
|
143 |
$template->setData($this->inputs['item']['template'])
|
144 |
->setQueueName();
|
145 |
$templateDirName = $template->get('queueName');
|
146 |
-
$templateDir = "
|
147 |
if (!$template->get('id')) { // Add new Template
|
148 |
-
// Search for author for the current local Wordpress user.
|
149 |
// If not created in the Authors table create one! If created get the ID!
|
150 |
-
$author = CJTxTable::getInstance('author', null, "SELECT * FROM #__cjtoolbox_authors
|
151 |
WHERE name = '{$currentUser->user_login}'
|
152 |
AND (attributes & 2);");
|
153 |
// Create Wordpress user in Authors table.
|
@@ -179,9 +179,9 @@ class CJTTemplateModel extends CJTHookableClass {
|
|
179 |
FROM #__cjtoolbox_template_revisions
|
180 |
WHERE templateId = {$template->get('id')}")->revisionNo));
|
181 |
// Checki if there is a previous revision and if there is changes!!
|
182 |
-
$lastRevision = CJTxTable::getInstance('template-revision', null,
|
183 |
-
"SELECT *
|
184 |
-
FROM #__cjtoolbox_template_revisions
|
185 |
WHERE templateId = {$template->get('id')} AND revisionNo = {$lastRevisionNo}"
|
186 |
);
|
187 |
// Only add Revision if it has any field changed!
|
@@ -229,7 +229,7 @@ class CJTTemplateModel extends CJTHookableClass {
|
|
229 |
// Return revision object.
|
230 |
return $revision->getData();
|
231 |
}
|
232 |
-
|
233 |
} // End class.
|
234 |
|
235 |
// Hookable!
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disllow direct access.
|
7 |
defined('ABSPATH') or die('Access denied');
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
class CJTTemplateModel extends CJTHookableClass {
|
13 |
+
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
+
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
public $inputs;
|
20 |
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
+
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
protected $onloadcodefile = array('parameters' => array('code', 'item'));
|
27 |
+
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
+
*
|
31 |
* @var mixed
|
32 |
*/
|
33 |
protected $onqueryitem = array('parameters' => array('query'));
|
34 |
+
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
+
*
|
38 |
* @param mixed $code
|
39 |
*/
|
40 |
public function decryptCode($encodedCode) {
|
44 |
$code = base64_decode($code64);
|
45 |
return $code;
|
46 |
}
|
47 |
+
|
48 |
/**
|
49 |
* put your comment there...
|
50 |
+
*
|
51 |
* @param mixed $code
|
52 |
*/
|
53 |
public function encryptCode($code) {
|
57 |
$encodedCode = "<?php defined(\"ABS_PATH\") or die(\"Access Denied\"); '{$code64}'; ?>";
|
58 |
return $encodedCode;
|
59 |
}
|
60 |
+
|
61 |
/**
|
62 |
* put your comment there...
|
63 |
+
*
|
64 |
* @param mixed $name
|
65 |
*/
|
66 |
public function exists($name) {
|
71 |
return (($existsItem = $this->getTemplateBy()) && property_exists($existsItem, 'id') && $existsItem->id) ?
|
72 |
$existsItem : FALSE;
|
73 |
}
|
74 |
+
|
75 |
/**
|
76 |
* put your comment there...
|
77 |
+
*
|
78 |
*/
|
79 |
public function getItem() {
|
80 |
$tManager = CJTModel::create('templates-manager');
|
81 |
$query = $tManager->getItemsQuery();
|
82 |
+
$query['select'] = 'SELECT t.id,
|
83 |
t.queueName,
|
84 |
+
t.name,
|
85 |
+
t.type,
|
86 |
+
t.description,
|
87 |
+
t.creationDate,
|
88 |
t.keywords,
|
89 |
r.dateCreated lastModified,
|
90 |
+
t.state,
|
91 |
a.name author,
|
92 |
r.changeLog,
|
93 |
r.version,
|
109 |
// Return PHP StdClass object.
|
110 |
return $item;
|
111 |
}
|
112 |
+
|
113 |
/**
|
114 |
* Query Block based on the passed paramaters.
|
115 |
+
*
|
116 |
*/
|
117 |
public function getTemplateBy() {
|
118 |
// import dependencies.
|
125 |
|
126 |
/**
|
127 |
* put your comment there...
|
128 |
+
*
|
129 |
*/
|
130 |
public function save() {
|
131 |
// import libraries.
|
138 |
// Load template data is exists (load), change values (setData).
|
139 |
$template = CJTxTable::getInstance('template');
|
140 |
if ($saveId) {
|
141 |
+
$template->set('id', $saveId)->load();
|
142 |
}
|
143 |
$template->setData($this->inputs['item']['template'])
|
144 |
->setQueueName();
|
145 |
$templateDirName = $template->get('queueName');
|
146 |
+
$templateDir = content_url( "{$fSConfig->contentDir}/{$fSConfig->templatesDir}/{$templateDirName}" );
|
147 |
if (!$template->get('id')) { // Add new Template
|
148 |
+
// Search for author for the current local Wordpress user.
|
149 |
// If not created in the Authors table create one! If created get the ID!
|
150 |
+
$author = CJTxTable::getInstance('author', null, "SELECT * FROM #__cjtoolbox_authors
|
151 |
WHERE name = '{$currentUser->user_login}'
|
152 |
AND (attributes & 2);");
|
153 |
// Create Wordpress user in Authors table.
|
179 |
FROM #__cjtoolbox_template_revisions
|
180 |
WHERE templateId = {$template->get('id')}")->revisionNo));
|
181 |
// Checki if there is a previous revision and if there is changes!!
|
182 |
+
$lastRevision = CJTxTable::getInstance('template-revision', null,
|
183 |
+
"SELECT *
|
184 |
+
FROM #__cjtoolbox_template_revisions
|
185 |
WHERE templateId = {$template->get('id')} AND revisionNo = {$lastRevisionNo}"
|
186 |
);
|
187 |
// Only add Revision if it has any field changed!
|
229 |
// Return revision object.
|
230 |
return $revision->getData();
|
231 |
}
|
232 |
+
|
233 |
} // End class.
|
234 |
|
235 |
// Hookable!
|
models/templates-lookup.php
CHANGED
File without changes
|
models/templates-manager.php
CHANGED
File without changes
|
models/tinymce-blocks.php
CHANGED
File without changes
|
models/uninstall.php
CHANGED
File without changes
|
models/xblock.php
CHANGED
File without changes
|
readme.txt
CHANGED
@@ -1,62 +1,54 @@
|
|
1 |
=== CSS & JavaScript Toolbox ===
|
2 |
Contributors: wipeoutmedia
|
3 |
-
Author URL:
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EWDWF75JHT9Q6
|
5 |
Tags: CSS, JavaScript, PHP, scripts, code
|
6 |
License: GPLv2 or later
|
7 |
-
License URI:
|
8 |
Requires at least: 3.9
|
9 |
Requires PHP: 5.4
|
10 |
-
Tested up to:
|
11 |
-
Stable tag:
|
12 |
|
13 |
-
|
14 |
|
15 |
== Description ==
|
16 |
|
17 |
-
###
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
###
|
25 |
-
* Inject CSS, JS, PHP and HTML code to: Pages, Posts, Custom Posts, Categories, Tags, Auxiliary (e.g. Everywhere, All Posts, Blog Index, etc), URLs, Regex, Inverted Assignments and more
|
26 |
-
* The editor was developed for writing code and will not strip tags
|
27 |
-
* Why create custom plugins? Just add scripts from the web such as CodeCanyon, JSFiddle or GitHub
|
28 |
-
* Easily create and test all of your scripts in one dashboard
|
29 |
-
* Add all your front-end mods without touching core Theme files
|
30 |
-
* Add back-end functionality without touching core WordPress files
|
31 |
-
* No need for FTP. Add your code, click Save, see the change
|
32 |
-
* Add your social, YouTube, Google analytics or advertising code
|
33 |
-
* Streamline your website development whether solo or in a team
|
34 |
-
* Teach yourself to code or teach others to code in the classroom
|
35 |
-
* And... probably a million other uses
|
36 |
|
37 |
-
|
38 |
-
[Click to check out CJT PLUS pricing](http://css-javascript-toolbox.com/pricing) - MEGA SALE ON NOW!!!
|
39 |
|
40 |
-
|
41 |
|
42 |
### Benefits of PLUS ###
|
43 |
-
*
|
|
|
44 |
* Powerful editing environment with stacks of must-have editing tools like auto-formatting and syntax highlighting
|
45 |
* Beautify feature to tidy up your code like a Pro for readability
|
46 |
* Minify feature to compress code for boosting performance
|
47 |
* 32 light and dark editor themes to suits your editing style
|
48 |
* Full-width and Full-screen modes for distraction-free editing
|
49 |
-
* Code Auto Completion feature for auto-completion and insertion of CSS, JS, PHP, and HTML code syntax or snippets
|
50 |
* Revisions system to auto-backup your code blocks on each save
|
51 |
|
52 |
-
[CJT PLUS](
|
53 |
-
|
54 |
-
#### New Feature - CJT Commenting ####
|
55 |
-
We have added START and END comments for each of the four main code block injection types: CJT Assignments, CJT Widgets, CJT Shortcodes, and CJT Metabox code blocks. You can now go into the Page Source and perform a search for these comments to quickly find your code block within the source code. This is a great CJT PLUS feature for debugging!
|
56 |
-
|
57 |
|
58 |
### Sound Good? ###
|
59 |
-
We want you to buy, try, and rely on the premium CJT PLUS extension plugin so we have made the pricing very low. [Learn about the new and improved CJT PLUS](
|
60 |
|
61 |
= How does it work? =
|
62 |
CJT is extremely flexible and versatile. Since it was designed to be easy, adding scripts and styles can be done in as little as two steps:
|
@@ -89,14 +81,14 @@ The CJT code block is the basic unit for writing code and to associate it with s
|
|
89 |
= What is the Assignment Panel? =
|
90 |
The Assignment Panel is a tabs window, which appears on the right side of the code block editor and is used to assign/apply the code block into specific requests.
|
91 |
|
92 |
-
= Can you select more than one item from the Assignment Panel? =
|
93 |
Yes. You can select any number of items you need, there is no limitation regarding this.
|
94 |
|
95 |
= Can you assign multiple blocks to the same items from the Assignment Panel? =
|
96 |
Yes. It's one of the most useful features that CJT supports as it allows you to manage/split your codes into several code blocks, allowing you to override code in a former (or lower ordered) code block.
|
97 |
|
98 |
= What is Pages, Posts, Categories and Custom Posts tabs? =
|
99 |
-
These lists with checkboxes represent all of your WordPress Pages, Posts, Categories and Custom Posts that your entire website contains. It also supports subpages and sub-categories, which you will also find in there.
|
100 |
|
101 |
= What is the Auxiliary tab? =
|
102 |
As there are a number of requests that are not available as normal Wordpress items (e.g. Pages, Posts, etc) but since it's commonly required and most likely be used, you will find them pre-defined in the Auxiliary tab. In the Auxiliary tab you can find pages like: Home, Blog Index, Author, 404 error, Tag, Archive, Entire website, Front-end, Admin backend and much more!
|
@@ -126,7 +118,7 @@ Make sure you have copied and pasted the Page, Post, or Category URL exactly as
|
|
126 |
Hook location feature gives you control over the location of outputting the CSS/JS code. This is useful in case overriding another plugins' CSS is required. Also sometimes its better to put your JS code in the footer to avoid slowing down your page load.
|
127 |
|
128 |
= I received a weird error, what do I do now? =
|
129 |
-
Due to the overwhelming amount of emails we get for users requesting support for our CJT plugins, we cannot provide support for the CJT Free plugin (hosted here on WordPress.org) at this stage unfortunately. If you wish to receive priority support, please visit our CJT website and [purchase a license for any of our products](
|
130 |
|
131 |
== Screenshots ==
|
132 |
1. Add your code, then assign where it goes
|
@@ -143,7 +135,7 @@ Due to the overwhelming amount of emails we get for users requesting support for
|
|
143 |
12. Change Location/Hook batch tools (CJT PLUS ONLY)
|
144 |
13. Delete and Backup Tools
|
145 |
14. Code-Files management within each Code Block (CJT PLUS ONLY)
|
146 |
-
15. Templates Manager form to store all of your Code Templates
|
147 |
16. Templates Lookup form to embed or link Code Templates to Code Blocks
|
148 |
17. Insert Code Block shortcodes via TinyMCE button (CJT PLUS ONLY)
|
149 |
18. Metabox Code Block at the Edit Page/Post level
|
@@ -152,10 +144,14 @@ Due to the overwhelming amount of emails we get for users requesting support for
|
|
152 |
21. See Code Block information at a glance (CJT PLUS ONLY)
|
153 |
|
154 |
== Changelog ==
|
|
|
|
|
|
|
|
|
155 |
= 8.4.2 =
|
156 |
* Fix: Wordpress Vulnerability report
|
157 |
|
158 |
-
= 8.4.1 =
|
159 |
* Fix: CSS & JavaScript Toolbox not showing
|
160 |
|
161 |
= 8.4 =
|
@@ -372,11 +368,11 @@ Fix: Fatal error: 'break' not in the 'loop' or 'switch' context in /path/to/wp-c
|
|
372 |
* Feature: Each block now has an Information metabox (Author, created date, modification date, and Shortcode).
|
373 |
* Enhancement: Create New Code Block dialog with initial properties ‘Name’, ‘State’ and ‘Position'
|
374 |
* Fix: Internal error detection routine for detecting AJAX errors that may have occurred away from users view
|
375 |
-
* Added: CJT User Manual PDF file added to the /docs folder
|
376 |
* Added: New WordPress Dashboard menu item to embrace all CJT plugin pages
|
377 |
* Enhancement: Added separate installer and upgrade pages for both CJT v0.3 and v0.8 to allow watching of the installation processes
|
378 |
* Enhancement: Added an uninstaller to completely erase all CJT data from the system
|
379 |
-
* Compatibility: 100% tested and working with BulletProof Security (BPS) plugin after applying [simple Ajax bypass rule](
|
380 |
|
381 |
= 0.8 =
|
382 |
* Enhancement: Template code can be modified
|
@@ -396,10 +392,10 @@ Fix: Fatal error: 'break' not in the 'loop' or 'switch' context in /path/to/wp-c
|
|
396 |
* Fix: Invalid argument supplied foreach() error
|
397 |
|
398 |
= 0.3 =
|
399 |
-
Launch: This is the very first release of CSS & JavaScript Toolbox
|
400 |
|
401 |
== Credits ==
|
402 |
-
|
403 |
Copyright © 2018, Wipeout Media.
|
404 |
|
405 |
This program is free software; you can redistribute it and/or
|
1 |
=== CSS & JavaScript Toolbox ===
|
2 |
Contributors: wipeoutmedia
|
3 |
+
Author URL: https://css-javascript-toolbox.com
|
4 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EWDWF75JHT9Q6
|
5 |
Tags: CSS, JavaScript, PHP, scripts, code
|
6 |
License: GPLv2 or later
|
7 |
+
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
8 |
Requires at least: 3.9
|
9 |
Requires PHP: 5.4
|
10 |
+
Tested up to: 5.2.2
|
11 |
+
Stable tag: 9.0
|
12 |
|
13 |
+
Add and manage CSS, JavaScript, HTML and PHP code to unique CJT Code Blocks and assign them anywhere on your website. Compatible with the Gutenberg Editor.
|
14 |
|
15 |
== Description ==
|
16 |
|
17 |
+
### Manage your code and scripts in the one dashboard ###
|
18 |
|
19 |
+
Add and manage CSS, JavaScript, HTML and PHP code to unique CJT Code Blocks and assign them anywhere on your website.
|
20 |
|
21 |
+
### WHY CJT? ###
|
22 |
+
* Add CSS, JavaScript, PHP and HTML to Pages, Posts, Custom Posts, Tags, Categories, URLs, Regex and much more
|
23 |
+
* Add front-end styles without modifying your Theme files
|
24 |
+
* Add functionality without the core file hacks or custom plugins
|
25 |
+
* Embed scripts from GitHub, Code Canyon, JSFiddle, etc
|
26 |
+
* Add visitor tracking, advertising and affiliate scripts
|
27 |
+
* Embed social media channels or marketplace store widgets
|
28 |
+
* Streamline your website development - whether solo or in a team
|
29 |
+
* No need for FTP - just add your code, click save, see the change
|
30 |
|
31 |
+
### Purchase CJT PLUS? ###
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
+
The CJT PLUS extension plugin gives you more options, more tools, and more precision. You can now create CJT Gutenberg Code Blocks. 😊
|
|
|
34 |
|
35 |
+
[Click to check out CJT PLUS pricing](https://css-javascript-toolbox.com/pricing) - MEGA SALE ON NOW!!!
|
36 |
|
37 |
### Benefits of PLUS ###
|
38 |
+
* NEW FEATURE - CJT Code Blocks for the Gutenberg Editor. This feature allows you to add a CJT Code Blocks as a Gutenberg block. We have also added the CJT Shortcode embedder in the Classic Editor too.
|
39 |
+
* Inject code via CJT Shortcodes, CJT Metabox code blocks (when Gutenberg is disabled), and CJT Widgets for your sidebar or footer.
|
40 |
* Powerful editing environment with stacks of must-have editing tools like auto-formatting and syntax highlighting
|
41 |
* Beautify feature to tidy up your code like a Pro for readability
|
42 |
* Minify feature to compress code for boosting performance
|
43 |
* 32 light and dark editor themes to suits your editing style
|
44 |
* Full-width and Full-screen modes for distraction-free editing
|
45 |
+
* Code Auto Completion feature for auto-completion and insertion of CSS, JS, PHP, and HTML code syntax or snippets
|
46 |
* Revisions system to auto-backup your code blocks on each save
|
47 |
|
48 |
+
[CJT PLUS](https://css-javascript-toolbox.com/pricing) has been extensively tested with over 100 code blocks and 1000's of Assignments (e.g. Posts, Pages, Categories, etc). It was all made possible using a combination of AJAX scrolling and pagination. Also, CJT PLUS gives you a quick pagination dropdown selector, which is super-handy if your site has hundreds or even thousands of posts.
|
|
|
|
|
|
|
|
|
49 |
|
50 |
### Sound Good? ###
|
51 |
+
We want you to buy, try, and rely on the premium CJT PLUS extension plugin so we have made the pricing very low. [Learn about the new and improved CJT PLUS](https://css-javascript-toolbox.com/).
|
52 |
|
53 |
= How does it work? =
|
54 |
CJT is extremely flexible and versatile. Since it was designed to be easy, adding scripts and styles can be done in as little as two steps:
|
81 |
= What is the Assignment Panel? =
|
82 |
The Assignment Panel is a tabs window, which appears on the right side of the code block editor and is used to assign/apply the code block into specific requests.
|
83 |
|
84 |
+
= Can you select more than one item from the Assignment Panel? =
|
85 |
Yes. You can select any number of items you need, there is no limitation regarding this.
|
86 |
|
87 |
= Can you assign multiple blocks to the same items from the Assignment Panel? =
|
88 |
Yes. It's one of the most useful features that CJT supports as it allows you to manage/split your codes into several code blocks, allowing you to override code in a former (or lower ordered) code block.
|
89 |
|
90 |
= What is Pages, Posts, Categories and Custom Posts tabs? =
|
91 |
+
These lists with checkboxes represent all of your WordPress Pages, Posts, Categories and Custom Posts that your entire website contains. It also supports subpages and sub-categories, which you will also find in there.
|
92 |
|
93 |
= What is the Auxiliary tab? =
|
94 |
As there are a number of requests that are not available as normal Wordpress items (e.g. Pages, Posts, etc) but since it's commonly required and most likely be used, you will find them pre-defined in the Auxiliary tab. In the Auxiliary tab you can find pages like: Home, Blog Index, Author, 404 error, Tag, Archive, Entire website, Front-end, Admin backend and much more!
|
118 |
Hook location feature gives you control over the location of outputting the CSS/JS code. This is useful in case overriding another plugins' CSS is required. Also sometimes its better to put your JS code in the footer to avoid slowing down your page load.
|
119 |
|
120 |
= I received a weird error, what do I do now? =
|
121 |
+
Due to the overwhelming amount of emails we get for users requesting support for our CJT plugins, we cannot provide support for the CJT Free plugin (hosted here on WordPress.org) at this stage unfortunately. If you wish to receive priority support, please visit our CJT website and [purchase a license for any of our products](https://css-javascript-toolbox.com/pricing).
|
122 |
|
123 |
== Screenshots ==
|
124 |
1. Add your code, then assign where it goes
|
135 |
12. Change Location/Hook batch tools (CJT PLUS ONLY)
|
136 |
13. Delete and Backup Tools
|
137 |
14. Code-Files management within each Code Block (CJT PLUS ONLY)
|
138 |
+
15. Templates Manager form to store all of your Code Templates
|
139 |
16. Templates Lookup form to embed or link Code Templates to Code Blocks
|
140 |
17. Insert Code Block shortcodes via TinyMCE button (CJT PLUS ONLY)
|
141 |
18. Metabox Code Block at the Edit Page/Post level
|
144 |
21. See Code Block information at a glance (CJT PLUS ONLY)
|
145 |
|
146 |
== Changelog ==
|
147 |
+
= 9.0 =
|
148 |
+
* PHP 7.2+ fixes
|
149 |
+
* Sanitisation on GET functions
|
150 |
+
|
151 |
= 8.4.2 =
|
152 |
* Fix: Wordpress Vulnerability report
|
153 |
|
154 |
+
= 8.4.1 =
|
155 |
* Fix: CSS & JavaScript Toolbox not showing
|
156 |
|
157 |
= 8.4 =
|
368 |
* Feature: Each block now has an Information metabox (Author, created date, modification date, and Shortcode).
|
369 |
* Enhancement: Create New Code Block dialog with initial properties ‘Name’, ‘State’ and ‘Position'
|
370 |
* Fix: Internal error detection routine for detecting AJAX errors that may have occurred away from users view
|
371 |
+
* Added: CJT User Manual PDF file added to the /docs folder
|
372 |
* Added: New WordPress Dashboard menu item to embrace all CJT plugin pages
|
373 |
* Enhancement: Added separate installer and upgrade pages for both CJT v0.3 and v0.8 to allow watching of the installation processes
|
374 |
* Enhancement: Added an uninstaller to completely erase all CJT data from the system
|
375 |
+
* Compatibility: 100% tested and working with BulletProof Security (BPS) plugin after applying [simple Ajax bypass rule](https://css-javascript-toolbox.com/support/topic/bulletproof-security-ajax-issue-and-resolution-2)
|
376 |
|
377 |
= 0.8 =
|
378 |
* Enhancement: Template code can be modified
|
392 |
* Fix: Invalid argument supplied foreach() error
|
393 |
|
394 |
= 0.3 =
|
395 |
+
* Launch: This is the very first release of CSS & JavaScript Toolbox
|
396 |
|
397 |
== Credits ==
|
398 |
+
|
399 |
Copyright © 2018, Wipeout Media.
|
400 |
|
401 |
This program is free software; you can redistribute it and/or
|
tables/author.php
CHANGED
File without changes
|
tables/backups.php
CHANGED
File without changes
|
tables/block-files.php
CHANGED
File without changes
|
tables/block-pins.php
CHANGED
File without changes
|
tables/block-template.php
CHANGED
File without changes
|
tables/block.php
CHANGED
File without changes
|
tables/blocks.php
CHANGED
File without changes
|
tables/form-group-xfields.php
CHANGED
File without changes
|
tables/form-group.php
CHANGED
File without changes
|
tables/form.php
CHANGED
File without changes
|
tables/group-parameter.php
CHANGED
File without changes
|
tables/package-objects.php
CHANGED
File without changes
|
tables/package.php
CHANGED
File without changes
|
tables/parameter-typedef.php
CHANGED
File without changes
|
tables/parameter-typeparams.php
CHANGED
File without changes
|
tables/parameter.php
CHANGED
File without changes
|
tables/pins-blocks-view.php
CHANGED
File without changes
|
tables/template-revision.php
CHANGED
File without changes
|
tables/template.php
CHANGED
File without changes
|
vendor/autoload.php
CHANGED
File without changes
|
vendor/composer/ClassLoader.php
CHANGED
File without changes
|
vendor/composer/autoload_classmap.php
CHANGED
File without changes
|
vendor/composer/autoload_namespaces.php
CHANGED
File without changes
|
vendor/composer/autoload_psr4.php
CHANGED
File without changes
|
vendor/composer/autoload_real.php
CHANGED
File without changes
|
views/backups/manager/public/css/backups.css
CHANGED
File without changes
|
views/backups/manager/public/js/backups/backups.js
CHANGED
File without changes
|
views/backups/manager/public/js/backups/backups.localization.php
CHANGED
File without changes
|
views/backups/manager/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/backups/manager/tmpl/form.html.tmpl
CHANGED
File without changes
|
views/backups/manager/tmpl/list.html.tmpl
CHANGED
File without changes
|
views/backups/manager/tmpl/single-backup.html.tmpl
CHANGED
File without changes
|
views/backups/manager/view.php
CHANGED
@@ -7,72 +7,72 @@
|
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
-
*
|
12 |
* The method is resposible for selecting the correct template
|
13 |
* and initialize template vars.
|
14 |
-
*
|
15 |
* @author Ahmed Said
|
16 |
* @version 6
|
17 |
*/
|
18 |
class CJTBackupsManagerView extends CJTView {
|
19 |
-
|
20 |
/**
|
21 |
* put your comment there...
|
22 |
-
*
|
23 |
* @var mixed
|
24 |
*/
|
25 |
public $backups = array();
|
26 |
-
|
27 |
/**
|
28 |
* put your comment there...
|
29 |
-
*
|
30 |
* @var mixed
|
31 |
*/
|
32 |
public $controllerName = '';
|
33 |
-
|
34 |
/**
|
35 |
* put your comment there...
|
36 |
-
*
|
37 |
* @var mixed
|
38 |
*/
|
39 |
public $currentBackup = null;
|
40 |
-
|
41 |
/**
|
42 |
* Output Add New Block markups.
|
43 |
-
*
|
44 |
* @return void
|
45 |
*/
|
46 |
public function display() {
|
47 |
echo $this->getTemplate('default');
|
48 |
}
|
49 |
-
|
50 |
/**
|
51 |
-
* Output
|
52 |
-
*
|
53 |
* @return void
|
54 |
*/
|
55 |
public static function enququeScripts() {
|
56 |
-
// Import all required
|
57 |
self::useScripts(__CLASS__,
|
58 |
-
'jquery',
|
59 |
-
'framework:js:ui:{CJT-}jquery.link-progress',
|
60 |
'views:backups:manager:public:js:{CJT-}backups'
|
61 |
);
|
62 |
}
|
63 |
-
|
64 |
/**
|
65 |
* Output CSS files required to Backups view.
|
66 |
-
*
|
67 |
* @return void
|
68 |
*/
|
69 |
public static function enququeStyles() {
|
70 |
self::useStyles(__CLASS__,
|
71 |
-
'framework:css:{CJT-}forms',
|
72 |
'views:backups:manager:public:css:{CJT-}backups'
|
73 |
);
|
74 |
}
|
75 |
-
|
76 |
} // End class.
|
77 |
|
78 |
// Hookable!!
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
+
*
|
12 |
* The method is resposible for selecting the correct template
|
13 |
* and initialize template vars.
|
14 |
+
*
|
15 |
* @author Ahmed Said
|
16 |
* @version 6
|
17 |
*/
|
18 |
class CJTBackupsManagerView extends CJTView {
|
19 |
+
|
20 |
/**
|
21 |
* put your comment there...
|
22 |
+
*
|
23 |
* @var mixed
|
24 |
*/
|
25 |
public $backups = array();
|
26 |
+
|
27 |
/**
|
28 |
* put your comment there...
|
29 |
+
*
|
30 |
* @var mixed
|
31 |
*/
|
32 |
public $controllerName = '';
|
33 |
+
|
34 |
/**
|
35 |
* put your comment there...
|
36 |
+
*
|
37 |
* @var mixed
|
38 |
*/
|
39 |
public $currentBackup = null;
|
40 |
+
|
41 |
/**
|
42 |
* Output Add New Block markups.
|
43 |
+
*
|
44 |
* @return void
|
45 |
*/
|
46 |
public function display() {
|
47 |
echo $this->getTemplate('default');
|
48 |
}
|
49 |
+
|
50 |
/**
|
51 |
+
* Output JavaScript files requirred to Backups view to run.
|
52 |
+
*
|
53 |
* @return void
|
54 |
*/
|
55 |
public static function enququeScripts() {
|
56 |
+
// Import all required JavaScript with localization.
|
57 |
self::useScripts(__CLASS__,
|
58 |
+
'jquery',
|
59 |
+
'framework:js:ui:{CJT-}jquery.link-progress',
|
60 |
'views:backups:manager:public:js:{CJT-}backups'
|
61 |
);
|
62 |
}
|
63 |
+
|
64 |
/**
|
65 |
* Output CSS files required to Backups view.
|
66 |
+
*
|
67 |
* @return void
|
68 |
*/
|
69 |
public static function enququeStyles() {
|
70 |
self::useStyles(__CLASS__,
|
71 |
+
'framework:css:{CJT-}forms',
|
72 |
'views:backups:manager:public:css:{CJT-}backups'
|
73 |
);
|
74 |
}
|
75 |
+
|
76 |
} // End class.
|
77 |
|
78 |
// Hookable!!
|
views/blocks/block/public/css/block-wp-lt-3.8.css
CHANGED
File without changes
|
views/blocks/block/public/css/block.css
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
/*
|
2 |
cjt-block is just a new added class so don't confuse about it
|
3 |
sometimes we need to use it instead of postbox class
|
4 |
like affecting only block box while running as Metabox inside edit post page!
|
@@ -14,9 +14,9 @@
|
|
14 |
.postbox.cjt-block a,
|
15 |
.postbox.cjt-block a:visited {color: #a0a0a0 !important;}
|
16 |
|
17 |
-
.postbox.cjt-block a.active {color: #
|
18 |
|
19 |
-
.postbox.cjt-block a:hover {color: #
|
20 |
|
21 |
.inside {color: #7c7c7c;}
|
22 |
|
@@ -25,7 +25,7 @@
|
|
25 |
display:none;
|
26 |
-moz-border-radius: 6px;
|
27 |
-webkit-border-radius: 6px;
|
28 |
-
border-radius: 6px;
|
29 |
border-color: #cccccc;
|
30 |
}
|
31 |
/* Use 6px radius instead of 3px */
|
@@ -42,8 +42,8 @@
|
|
42 |
#cjtoolbox-admin #poststuff h3, .metabox-holder h3 {padding: 8px 10px;}
|
43 |
/* Editor langauges list */
|
44 |
.editor-langs {
|
45 |
-
position: absolute;
|
46 |
-
z-index: 2;
|
47 |
width: 200px;
|
48 |
overflow: hidden;
|
49 |
margin-top: -2px;
|
@@ -60,11 +60,11 @@
|
|
60 |
width: 114px;
|
61 |
}
|
62 |
/** Toolbox **/
|
63 |
-
.block-toolbox {
|
64 |
height: 30px;
|
65 |
position: absolute;
|
66 |
right: 30px;
|
67 |
-
top: 0px;
|
68 |
}
|
69 |
.block-toolbox .icons-group {
|
70 |
display: inline-block;
|
@@ -152,7 +152,7 @@
|
|
152 |
float: right;
|
153 |
width: 40px;
|
154 |
height: 350px;
|
155 |
-
top: 5px;
|
156 |
margin-left: 10px;
|
157 |
display: none;
|
158 |
}
|
@@ -160,7 +160,7 @@
|
|
160 |
.loading-block{
|
161 |
font-weight: bold;
|
162 |
font-size: 13px;
|
163 |
-
color: brown;
|
164 |
}
|
165 |
|
166 |
/* Edit block name */
|
@@ -263,7 +263,7 @@ body.fullscreen #wpadminbar {display: none;} /** No admin menu */
|
|
263 |
}
|
264 |
|
265 |
div[contains=setMode],
|
266 |
-
div[contains=setOptions],
|
267 |
div[contains=setMode],
|
268 |
div[contains=setTheme]
|
269 |
{display: none}
|
1 |
+
/*
|
2 |
cjt-block is just a new added class so don't confuse about it
|
3 |
sometimes we need to use it instead of postbox class
|
4 |
like affecting only block box while running as Metabox inside edit post page!
|
14 |
.postbox.cjt-block a,
|
15 |
.postbox.cjt-block a:visited {color: #a0a0a0 !important;}
|
16 |
|
17 |
+
.postbox.cjt-block a.active {color: #005DA4 !important;}
|
18 |
|
19 |
+
.postbox.cjt-block a:hover {color: #3f7eaa !important;}
|
20 |
|
21 |
.inside {color: #7c7c7c;}
|
22 |
|
25 |
display:none;
|
26 |
-moz-border-radius: 6px;
|
27 |
-webkit-border-radius: 6px;
|
28 |
+
border-radius: 6px;
|
29 |
border-color: #cccccc;
|
30 |
}
|
31 |
/* Use 6px radius instead of 3px */
|
42 |
#cjtoolbox-admin #poststuff h3, .metabox-holder h3 {padding: 8px 10px;}
|
43 |
/* Editor langauges list */
|
44 |
.editor-langs {
|
45 |
+
position: absolute;
|
46 |
+
z-index: 2;
|
47 |
width: 200px;
|
48 |
overflow: hidden;
|
49 |
margin-top: -2px;
|
60 |
width: 114px;
|
61 |
}
|
62 |
/** Toolbox **/
|
63 |
+
.block-toolbox {
|
64 |
height: 30px;
|
65 |
position: absolute;
|
66 |
right: 30px;
|
67 |
+
top: 0px;
|
68 |
}
|
69 |
.block-toolbox .icons-group {
|
70 |
display: inline-block;
|
152 |
float: right;
|
153 |
width: 40px;
|
154 |
height: 350px;
|
155 |
+
top: 5px;
|
156 |
margin-left: 10px;
|
157 |
display: none;
|
158 |
}
|
160 |
.loading-block{
|
161 |
font-weight: bold;
|
162 |
font-size: 13px;
|
163 |
+
color: brown;
|
164 |
}
|
165 |
|
166 |
/* Edit block name */
|
263 |
}
|
264 |
|
265 |
div[contains=setMode],
|
266 |
+
div[contains=setOptions],
|
267 |
div[contains=setMode],
|
268 |
div[contains=setTheme]
|
269 |
{display: none}
|
views/blocks/block/public/css/codefile.css
CHANGED
File without changes
|
views/blocks/block/public/images/edit-block-name/cancel.png
CHANGED
Binary file
|
views/blocks/block/public/images/edit-block-name/save.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/active.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/cancel-restore.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/delete.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/edit-name.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/editor-languages/css.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/editor-languages/html.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/editor-languages/javascript.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/editor-languages/php.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/footer-hook.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/header-hook.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/inactive.png
CHANGED
File without changes
|
views/blocks/block/public/images/toolbox/info.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/restore.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/save-inactive.png
CHANGED
File without changes
|
views/blocks/block/public/images/toolbox/save.gif
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/shortcode.png
CHANGED
Binary file
|
views/blocks/block/public/images/toolbox/switch-language.png
CHANGED
File without changes
|
views/blocks/block/public/images/toolbox/templates-lookup.png
CHANGED
Binary file
|
views/blocks/block/public/js/ajax/ajax.js
CHANGED
File without changes
|
views/blocks/block/public/js/block/block.js
CHANGED
File without changes
|
views/blocks/block/public/js/blockproperty/blockproperty.js
CHANGED
File without changes
|
views/blocks/block/public/js/codefile-manager/codefile-manager.js
CHANGED
File without changes
|
views/blocks/block/public/js/codefile-manager/codefile-manager.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript cjtJQueryBlockI18N variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/blocks/block/public/js/codefile/codefile.js
CHANGED
File without changes
|
views/blocks/block/public/js/jquery.block/jquery.block.js
CHANGED
File without changes
|
views/blocks/block/public/js/jquery.block/jquery.block.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript cjtJQueryBlockI18N variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/blocks/block/public/js/optional/revision/revision.js
CHANGED
File without changes
|
views/blocks/block/public/js/plugins/dockmodule.js
CHANGED
File without changes
|
views/blocks/block/tmpl/codefile/codefile.html.tmpl
CHANGED
File without changes
|
views/blocks/block/tmpl/content.html.tmpl
CHANGED
File without changes
|
views/blocks/block/tmpl/edit.html.tmpl
CHANGED
File without changes
|
views/blocks/block/tmpl/templates/editor-toolbox.html.tmpl
CHANGED
File without changes
|
views/blocks/block/tmpl/templates/toolbox.html.tmpl
CHANGED
File without changes
|
views/blocks/block/view.php
CHANGED
File without changes
|
views/blocks/cjt-block/public/css/block-wp-lt-3.8.css
CHANGED
File without changes
|
views/blocks/cjt-block/public/css/block.css
CHANGED
@@ -9,9 +9,9 @@
|
|
9 |
|
10 |
.pagelist {
|
11 |
padding:10px;
|
12 |
-
height: 278px;
|
13 |
overflow:auto;
|
14 |
-
border:1px solid #bbb;
|
15 |
margin-bottom: 0px;
|
16 |
margin-top: 8px;
|
17 |
}
|
@@ -63,7 +63,7 @@ a.l_ext { position: relative; top: 3px; background:url(../images/pages-panel/ext
|
|
63 |
}
|
64 |
.info-panel .optional-actions {display: inline-block; height: 100%;}
|
65 |
.info-panel .counter {font-size: 14px; float: right;}
|
66 |
-
.info-panel .counter .info-panel-loaded-count {color: #
|
67 |
.info-panel .optional-actions .pagination-list {
|
68 |
background-image: url('../images/pages-panel/pagination.png');
|
69 |
width: 16px;
|
@@ -80,7 +80,7 @@ a.l_ext { position: relative; top: 3px; background:url(../images/pages-panel/ext
|
|
80 |
width: 61px;
|
81 |
height: 198px !important;
|
82 |
position: absolute;
|
83 |
-
color: #
|
84 |
font-size: 13px;
|
85 |
margin-left: -88px;
|
86 |
margin-top: -182px;
|
@@ -98,7 +98,7 @@ a.acc-header:visited,
|
|
98 |
.custom-posts-container a.custom-post-item-header:visited {
|
99 |
text-decoration: none;
|
100 |
font-family: Helvetica;
|
101 |
-
color: #
|
102 |
font-weight: bold;
|
103 |
}
|
104 |
a.acc-header.ui-accordion-header-active {color: #652200 !important;}
|
@@ -126,7 +126,7 @@ a.acc-header.ui-accordion-header-active {color: #652200 !important;}
|
|
126 |
*/
|
127 |
.advanced-accordion {border: 1px solid #ccc; height: 298px;}
|
128 |
.advanced-accordion .ui-accordion-content {height: 230px; padding: 0px !important; background: none !important; border: none !important}}
|
129 |
-
.advanced-accordion .ui-accordion-header-active {color: #
|
130 |
.advanced-accordion textarea {
|
131 |
height: 210px;
|
132 |
width: 300px;
|
@@ -141,9 +141,9 @@ a.acc-header.ui-accordion-header-active {color: #652200 !important;}
|
|
141 |
}
|
142 |
.advanced-accordion a.acc-header {padding: 7px 4px; background: none !important; border: none !important}
|
143 |
|
144 |
-
.advanced-accordion a.acc-header {color: #
|
145 |
|
146 |
-
.advanced-accordion a.acc-header:hover {color: #
|
147 |
|
148 |
.ui-accordion .ui-accordion-header .ui-icon {background: none !important;}
|
149 |
|
@@ -157,7 +157,7 @@ a.acc-header.ui-accordion-header-active {color: #652200 !important;}
|
|
157 |
* http://docs.jquery.com/UI/Tabs#theming
|
158 |
*/
|
159 |
|
160 |
-
.cjpageblock .ui-tabs .ui-tabs-nav li.ui-tabs-active a {color: #
|
161 |
|
162 |
.cjpageblock .ui-tabs .ui-tabs-nav li.ui-tabs-active a.prog-colored {color: transparent !important;}
|
163 |
|
9 |
|
10 |
.pagelist {
|
11 |
padding:10px;
|
12 |
+
height: 278px;
|
13 |
overflow:auto;
|
14 |
+
border:1px solid #bbb;
|
15 |
margin-bottom: 0px;
|
16 |
margin-top: 8px;
|
17 |
}
|
63 |
}
|
64 |
.info-panel .optional-actions {display: inline-block; height: 100%;}
|
65 |
.info-panel .counter {font-size: 14px; float: right;}
|
66 |
+
.info-panel .counter .info-panel-loaded-count {color: #005DA4;}
|
67 |
.info-panel .optional-actions .pagination-list {
|
68 |
background-image: url('../images/pages-panel/pagination.png');
|
69 |
width: 16px;
|
80 |
width: 61px;
|
81 |
height: 198px !important;
|
82 |
position: absolute;
|
83 |
+
color: #005DA4;
|
84 |
font-size: 13px;
|
85 |
margin-left: -88px;
|
86 |
margin-top: -182px;
|
98 |
.custom-posts-container a.custom-post-item-header:visited {
|
99 |
text-decoration: none;
|
100 |
font-family: Helvetica;
|
101 |
+
color: #005DA4;
|
102 |
font-weight: bold;
|
103 |
}
|
104 |
a.acc-header.ui-accordion-header-active {color: #652200 !important;}
|
126 |
*/
|
127 |
.advanced-accordion {border: 1px solid #ccc; height: 298px;}
|
128 |
.advanced-accordion .ui-accordion-content {height: 230px; padding: 0px !important; background: none !important; border: none !important}}
|
129 |
+
.advanced-accordion .ui-accordion-header-active {color: #005DA4 !important;}
|
130 |
.advanced-accordion textarea {
|
131 |
height: 210px;
|
132 |
width: 300px;
|
141 |
}
|
142 |
.advanced-accordion a.acc-header {padding: 7px 4px; background: none !important; border: none !important}
|
143 |
|
144 |
+
.advanced-accordion a.acc-header {color: #005DA4 !important;}
|
145 |
|
146 |
+
.advanced-accordion a.acc-header:hover {color: #3f7eaa !important;}
|
147 |
|
148 |
.ui-accordion .ui-accordion-header .ui-icon {background: none !important;}
|
149 |
|
157 |
* http://docs.jquery.com/UI/Tabs#theming
|
158 |
*/
|
159 |
|
160 |
+
.cjpageblock .ui-tabs .ui-tabs-nav li.ui-tabs-active a {color: #005DA4 !important; border-color: #005DA4;}
|
161 |
|
162 |
.cjpageblock .ui-tabs .ui-tabs-nav li.ui-tabs-active a.prog-colored {color: transparent !important;}
|
163 |
|
views/blocks/cjt-block/public/images/pages-panel/pagination.png
CHANGED
Binary file
|
views/blocks/cjt-block/public/js/block/block.js
CHANGED
File without changes
|
views/blocks/cjt-block/public/js/blockproperty/blockproperty.js
CHANGED
File without changes
|
views/blocks/cjt-block/public/js/jquery.assignpanel/jquery.assignpanel.js
CHANGED
File without changes
|
views/blocks/cjt-block/public/js/jquery.block/jquery.block.js
CHANGED
File without changes
|
views/blocks/cjt-block/public/js/jquery.block/jquery.block.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript cjtJQueryBlockI18N variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/blocks/cjt-block/public/js/optional/pagination.list/pagination.list.js
CHANGED
File without changes
|
views/blocks/cjt-block/public/js/optional/revision/revision.js
CHANGED
File without changes
|
views/blocks/cjt-block/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/blocks/cjt-block/tmpl/new.html.tmpl
CHANGED
File without changes
|
views/blocks/cjt-block/tmpl/templates/assign-panel/default.html.tmpl
CHANGED
File without changes
|
views/blocks/cjt-block/tmpl/templates/assign-panel/templates/advanced.html.tmpl
CHANGED
File without changes
|
views/blocks/cjt-block/tmpl/templates/assign-panel/templates/auxiliarity.html.tmpl
CHANGED
File without changes
|
views/blocks/cjt-block/tmpl/templates/assign-panel/templates/custom-posts.html.tmpl
CHANGED
File without changes
|
views/blocks/cjt-block/tmpl/templates/assign-panel/templates/inputs-list.html.tmpl
CHANGED
File without changes
|
views/blocks/cjt-block/tmpl/templates/assign-panel/templates/objects-list.html.tmpl
CHANGED
File without changes
|
views/blocks/cjt-block/tmpl/templates/assign-panel/templates/tab.html.tmpl
CHANGED
File without changes
|
views/blocks/cjt-block/view.php
CHANGED
File without changes
|
views/blocks/create-metabox/public/css/metabox.css
CHANGED
File without changes
|
views/blocks/create-metabox/public/js/metabox/metabox.js
CHANGED
File without changes
|
views/blocks/create-metabox/public/js/metabox/metabox.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript cjtMetaboxI18N variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/blocks/create-metabox/tmpl/create.html.tmpl
CHANGED
File without changes
|
views/blocks/create-metabox/view.php
CHANGED
File without changes
|
views/blocks/info/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/blocks/info/view.php
CHANGED
File without changes
|
views/blocks/manager/public/css/blocks-wp-lt-3.8.css
CHANGED
File without changes
|
views/blocks/manager/public/css/blocks.css
CHANGED
@@ -1,10 +1,15 @@
|
|
1 |
-
/** CSS &
|
2 |
/* Wordpress Page */
|
3 |
body{min-width: 700px;}
|
4 |
.wrap { position: relative; }
|
5 |
.cjt-banner-bar .cjt-banner-link a, .cjt-banner-bar a:hover, .cjt-banner-bar a:visited{color: #A5581B;}
|
6 |
-
#cjt-banner-bar-right {
|
7 |
#cjt-banner-bar-right .cjt-banner-link {margin-bottom: 6px; font-size: 14px}
|
|
|
|
|
|
|
|
|
|
|
8 |
span#support-us {position: absolute;top: 15px;left: 370px;font-size: 13px;color: #aaa;font-weight: bold;}
|
9 |
|
10 |
#get-packages-icon {display: inline-block; width: 13px; height: 15px; background-image: url('../images/get-packages.png'); margin-left: 3px;margin-bottom: -4px; margin-right: 5px;}
|
@@ -38,8 +43,8 @@ span#support-us {position: absolute;top: 15px;left: 370px;font-size: 13px;color:
|
|
38 |
padding: 4px 4px 4px 0px !important;
|
39 |
clear: both;
|
40 |
visibility: hidden;
|
41 |
-
border: solid #ccc;
|
42 |
-
border-width: 1px;
|
43 |
-moz-border-radius: 6px;
|
44 |
-webkit-border-radius: 6px;
|
45 |
border-radius: 6px;
|
@@ -68,11 +73,11 @@ span#support-us {position: absolute;top: 15px;left: 370px;font-size: 13px;color:
|
|
68 |
.cjt-toolbox-blocks a.cjttbl-save-changes.cjttbs-disabled {background: url(../images/toolbox/save-changes-inactive.png) no-repeat;}
|
69 |
.cjt-toolbox-blocks a.cjttbl-add-block { background: url(../images/toolbox/add-new.png) no-repeat; }
|
70 |
.cjt-toolbox-blocks a.cjttbl-cancel-restore {
|
71 |
-
background: url(../images/toolbox/cancel-restore.png) no-repeat;
|
72 |
padding-left: 29px !important;
|
73 |
}
|
74 |
-
.cjt-toolbox-blocks a.cjttbl-restore {
|
75 |
-
background: url(../images/toolbox/restore.png) no-repeat;
|
76 |
padding-left: 43px !important;
|
77 |
}
|
78 |
.cjt-toolbox-blocks a.cjttbl-restore.cjttbs-disabled {
|
@@ -96,7 +101,17 @@ cjt-noblocks-intro h2 {font-weight: bold; margin: 4px 0px;}
|
|
96 |
cjt-noblocks-intro h4 {font-weight: bold; font-size: 15px;}
|
97 |
|
98 |
.cjt-main-title.logo {
|
|
|
99 |
background: transparent url('../images/css-js-toolbox-logo.png') no-repeat;
|
100 |
height: 75px;
|
101 |
text-indent: -9999px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
1 |
+
/** CSS & JavaScript Toolkit - blocks page CSS **/
|
2 |
/* Wordpress Page */
|
3 |
body{min-width: 700px;}
|
4 |
.wrap { position: relative; }
|
5 |
.cjt-banner-bar .cjt-banner-link a, .cjt-banner-bar a:hover, .cjt-banner-bar a:visited{color: #A5581B;}
|
6 |
+
#cjt-banner-bar-right {right: 0; position: absolute;top: 2px;}
|
7 |
#cjt-banner-bar-right .cjt-banner-link {margin-bottom: 6px; font-size: 14px}
|
8 |
+
#cjt-banner-bar-center {
|
9 |
+
position: absolute;
|
10 |
+
top: 0px;
|
11 |
+
left: 40%;
|
12 |
+
}
|
13 |
span#support-us {position: absolute;top: 15px;left: 370px;font-size: 13px;color: #aaa;font-weight: bold;}
|
14 |
|
15 |
#get-packages-icon {display: inline-block; width: 13px; height: 15px; background-image: url('../images/get-packages.png'); margin-left: 3px;margin-bottom: -4px; margin-right: 5px;}
|
43 |
padding: 4px 4px 4px 0px !important;
|
44 |
clear: both;
|
45 |
visibility: hidden;
|
46 |
+
border: solid #ccc;
|
47 |
+
border-width: 1px;
|
48 |
-moz-border-radius: 6px;
|
49 |
-webkit-border-radius: 6px;
|
50 |
border-radius: 6px;
|
73 |
.cjt-toolbox-blocks a.cjttbl-save-changes.cjttbs-disabled {background: url(../images/toolbox/save-changes-inactive.png) no-repeat;}
|
74 |
.cjt-toolbox-blocks a.cjttbl-add-block { background: url(../images/toolbox/add-new.png) no-repeat; }
|
75 |
.cjt-toolbox-blocks a.cjttbl-cancel-restore {
|
76 |
+
background: url(../images/toolbox/cancel-restore.png) no-repeat;
|
77 |
padding-left: 29px !important;
|
78 |
}
|
79 |
+
.cjt-toolbox-blocks a.cjttbl-restore {
|
80 |
+
background: url(../images/toolbox/restore.png) no-repeat;
|
81 |
padding-left: 43px !important;
|
82 |
}
|
83 |
.cjt-toolbox-blocks a.cjttbl-restore.cjttbs-disabled {
|
101 |
cjt-noblocks-intro h4 {font-weight: bold; font-size: 15px;}
|
102 |
|
103 |
.cjt-main-title.logo {
|
104 |
+
position: relative;
|
105 |
background: transparent url('../images/css-js-toolbox-logo.png') no-repeat;
|
106 |
height: 75px;
|
107 |
text-indent: -9999px;
|
108 |
+
}
|
109 |
+
|
110 |
+
.cjt-main-title.logo span.cjt-ver {
|
111 |
+
text-indent: 1px;
|
112 |
+
font-size: 14px;
|
113 |
+
display: block;
|
114 |
+
left: 360px;
|
115 |
+
position: absolute;
|
116 |
+
bottom: 17px;
|
117 |
}
|
views/blocks/manager/public/images/CJT_Free_Promo_Banner.png
ADDED
Binary file
|
views/blocks/manager/public/images/CSS_JS_Toolbox_Icon.png
CHANGED
File without changes
|
views/blocks/manager/public/images/css-js-toolbox-logo.png
CHANGED
Binary file
|
views/blocks/manager/public/images/get-packages.png
CHANGED
File without changes
|
views/blocks/manager/public/images/index.php
CHANGED
File without changes
|
views/blocks/manager/public/images/menu.svg
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
|
3 |
+
<g>
|
4 |
+
<title>background</title>
|
5 |
+
<rect fill="none" id="canvas_background" height="402" width="582" y="-1" x="-1"/>
|
6 |
+
</g>
|
7 |
+
<g>
|
8 |
+
<title>Layer 1</title>
|
9 |
+
<path fill="#a0a5aa" id="svg_1" d="m2.34375,2.31641c0,0 -0.78125,0 -0.78125,0.78125l0,5.46875c0,0 0,0.78125 0.78125,0.78125l15.31641,0c0,0 0.78125,0 0.78125,-0.78125l0,-5.46875c0,0 0,-0.78125 -0.78125,-0.78125l-15.31641,0zm0,0"/>
|
10 |
+
<path fill="#a0a5aa" id="svg_2" d="m20.00391,17.00391l0,-5.46875c0,0 0,-0.78125 -0.78125,-0.78125l-8.20703,0l0,1.875c0,0.78125 -0.78125,0.78125 -0.78125,0.78125l-0.46875,0c-0.78125,0 -0.78125,-0.78125 -0.78125,-0.78125l0,-1.875l-8.20313,0c0,0 -0.78125,0 -0.78125,0.78125l0,5.46875c0,0 0,0.78515 0.78125,0.78515l18.44141,0c0,0 0.78125,0 0.78125,-0.78515zm0,0"/>
|
11 |
+
</g>
|
12 |
+
</svg>
|
views/blocks/manager/public/images/toolbox/add-new.png
CHANGED
Binary file
|
views/blocks/manager/public/images/toolbox/admin-tools.png
CHANGED
Binary file
|
views/blocks/manager/public/images/toolbox/backup.png
CHANGED
Binary file
|
views/blocks/manager/public/images/toolbox/cancel-restore.png
CHANGED
Binary file
|
views/blocks/manager/public/images/toolbox/restore.png
CHANGED
Binary file
|
views/blocks/manager/public/images/toolbox/save-changes-inactive.png
CHANGED
File without changes
|
views/blocks/manager/public/images/toolbox/save-changes.png
CHANGED
Binary file
|
views/blocks/manager/public/images/toolbox/settings.png
CHANGED
Binary file
|
views/blocks/manager/public/images/toolbox/templates-manager.png
CHANGED
Binary file
|
views/blocks/manager/public/js/ajax-multioperation/ajax-multioperation.js
CHANGED
File without changes
|
views/blocks/manager/public/js/blocks-page/blocks-page.js
CHANGED
File without changes
|
views/blocks/manager/public/js/blocks-page/blocks-page.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript cjtBlocksPageI18N variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/blocks/manager/public/js/blocks/blocks.js
CHANGED
File without changes
|
views/blocks/manager/tmpl/blocks.html.tmpl
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Diallow direct access.
|
@@ -13,15 +13,25 @@ defined('ABSPATH') or die("Access denied");
|
|
13 |
?>
|
14 |
<?php require CJTOOLBOX_VIEWS_PATH . '/blocks/block/tmpl/codefile/codefile.html.tmpl' ?>
|
15 |
<div id="custom-icon" class="icon32 blocks-icon32"></div>
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
<div id="cjt-banner-bar-right">
|
19 |
-
<?php if (!class_exists('CJTPlusPluginInterface')): ?>
|
20 |
-
<span class="cjt-banner-link">
|
21 |
-
<span><?php echo cssJSToolbox::getText('Upgrade') ?></span>: <a target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/pricing/"><?php echo cssJSToolbox::getText('CJT PLUS') ?></a>
|
22 |
-
</span>
|
23 |
-
|
|
24 |
-
<?php endif; ?>
|
25 |
<span class="cjt-banner-link">
|
26 |
<span><?php echo cssJSToolbox::getText('Learn') ?></span>: <a target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/documentation"><?php echo cssJSToolbox::getText('Online Help') ?></a>
|
27 |
</span>
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Diallow direct access.
|
13 |
?>
|
14 |
<?php require CJTOOLBOX_VIEWS_PATH . '/blocks/block/tmpl/codefile/codefile.html.tmpl' ?>
|
15 |
<div id="custom-icon" class="icon32 blocks-icon32"></div>
|
16 |
+
|
17 |
+
<h2 class="cjt-main-title logo"><?php echo htmlentities( cssJSToolbox::getText('CSS & JavaScript Toolbox') ) ?><?php echo apply_filters( 'cjt_after_main_title', '' ) ?>
|
18 |
+
<?php if ( ! class_exists( 'CJTPlusPluginInterface' ) ) : ?>
|
19 |
+
<span class="cjt-ver">Version: <?php echo get_plugin_data( CJTOOLBOX_PLUGIN_FILE )['Version']; ?></span>
|
20 |
+
<?php else:
|
21 |
+
$reflector = new \ReflectionClass( 'CJTPlus' );
|
22 |
+
$CJTPlusVersion = get_plugin_data( str_replace( 'plus.class', 'plus', $reflector->getFileName() ) )['Version']; ?>
|
23 |
+
<span class="cjt-ver">Version: <?php echo $CJTPlusVersion; ?></span>
|
24 |
+
<?php endif; ?>
|
25 |
+
</h2>
|
26 |
+
|
27 |
+
<?php if ( ! class_exists( 'CJTPlusPluginInterface' ) ) : ?>
|
28 |
+
<div id="cjt-banner-bar-center">
|
29 |
+
<a href="https://css-javascript-toolbox.com/pricing" target="_blank">
|
30 |
+
<img src="<?php echo plugin_dir_url( __FILE__ ); ?>../public/images/CJT_Free_Promo_Banner.png" alt="CJT PLUS"></a>
|
31 |
+
</div>
|
32 |
+
<?php endif; ?>
|
33 |
+
|
34 |
<div id="cjt-banner-bar-right">
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
<span class="cjt-banner-link">
|
36 |
<span><?php echo cssJSToolbox::getText('Learn') ?></span>: <a target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/documentation"><?php echo cssJSToolbox::getText('Online Help') ?></a>
|
37 |
</span>
|
views/blocks/manager/tmpl/help/intro.html.tmpl
CHANGED
File without changes
|
views/blocks/manager/tmpl/toolbox.html.tmpl
CHANGED
File without changes
|
views/blocks/manager/view.php
CHANGED
File without changes
|
views/blocks/metabox/public/css/metabox.css
CHANGED
File without changes
|
views/blocks/metabox/public/images/editor-toolbox/preview.png
CHANGED
File without changes
|
views/blocks/metabox/public/js/block/block.js
CHANGED
File without changes
|
views/blocks/metabox/public/js/jquery.block/jquery.block.js
CHANGED
File without changes
|
views/blocks/metabox/public/js/jquery.block/jquery.block.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
*/
|
11 |
return array(
|
12 |
'previewLinkTitle' => cssJSToolbox::getText('Preview Post/Page in a new window'),
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript CJT_METABOX_BLOCKJqueryBlockI18N variable.
|
9 |
+
*
|
10 |
*/
|
11 |
return array(
|
12 |
'previewLinkTitle' => cssJSToolbox::getText('Preview Post/Page in a new window'),
|
views/blocks/metabox/public/js/metabox/metabox.js
CHANGED
File without changes
|
views/blocks/metabox/public/js/metabox/metabox.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript cjtMetaboxI18N variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/blocks/metabox/public/js/optional/revision/revision.js
CHANGED
File without changes
|
views/blocks/metabox/tmpl/metabox.html.tmpl
CHANGED
File without changes
|
views/blocks/metabox/view.php
CHANGED
File without changes
|
views/blocks/new/public/css/add-new-block.css
CHANGED
File without changes
|
views/blocks/new/public/js/add-new-block/add-new-block.js
CHANGED
File without changes
|
views/blocks/new/public/js/add-new-block/add-new-block.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript $VAR$ variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/blocks/new/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/blocks/new/view.php
CHANGED
@@ -8,25 +8,25 @@ defined('ABSPATH') or die("Access denied");
|
|
8 |
|
9 |
/**
|
10 |
* Get Add-New-Block view markups.
|
11 |
-
*
|
12 |
* The method is resposible for selecting the correct template
|
13 |
* and initialize template vars.
|
14 |
-
*
|
15 |
* @author Ahmed Said
|
16 |
* @version 6
|
17 |
*/
|
18 |
class CJTBlocksNewView extends CJTView {
|
19 |
-
|
20 |
/**
|
21 |
* put your comment there...
|
22 |
-
*
|
23 |
* @var mixed
|
24 |
*/
|
25 |
public $position;
|
26 |
-
|
27 |
/**
|
28 |
* Output Add New Block markups.
|
29 |
-
*
|
30 |
* @return void
|
31 |
*/
|
32 |
public function display() {
|
@@ -39,10 +39,10 @@ class CJTBlocksNewView extends CJTView {
|
|
39 |
}
|
40 |
echo $this->getTemplate('default');
|
41 |
}
|
42 |
-
|
43 |
/**
|
44 |
-
* Output
|
45 |
-
*
|
46 |
* @return void
|
47 |
*/
|
48 |
public static function enququeScripts() {
|
@@ -55,10 +55,10 @@ class CJTBlocksNewView extends CJTView {
|
|
55 |
'views:blocks:new:public:js:{CJT-}add-new-block'
|
56 |
);
|
57 |
}
|
58 |
-
|
59 |
/**
|
60 |
* Output CSS files required to Add-New-Block view.
|
61 |
-
*
|
62 |
* @return void
|
63 |
*/
|
64 |
public static function enququeStyles() {
|
@@ -69,7 +69,7 @@ class CJTBlocksNewView extends CJTView {
|
|
69 |
'framework:css:{CJT-}forms'
|
70 |
);
|
71 |
}
|
72 |
-
|
73 |
} // End class.
|
74 |
|
75 |
// Hookable!!
|
8 |
|
9 |
/**
|
10 |
* Get Add-New-Block view markups.
|
11 |
+
*
|
12 |
* The method is resposible for selecting the correct template
|
13 |
* and initialize template vars.
|
14 |
+
*
|
15 |
* @author Ahmed Said
|
16 |
* @version 6
|
17 |
*/
|
18 |
class CJTBlocksNewView extends CJTView {
|
19 |
+
|
20 |
/**
|
21 |
* put your comment there...
|
22 |
+
*
|
23 |
* @var mixed
|
24 |
*/
|
25 |
public $position;
|
26 |
+
|
27 |
/**
|
28 |
* Output Add New Block markups.
|
29 |
+
*
|
30 |
* @return void
|
31 |
*/
|
32 |
public function display() {
|
39 |
}
|
40 |
echo $this->getTemplate('default');
|
41 |
}
|
42 |
+
|
43 |
/**
|
44 |
+
* Output JavaScript files requirred to Add-New-Block view to run.
|
45 |
+
*
|
46 |
* @return void
|
47 |
*/
|
48 |
public static function enququeScripts() {
|
55 |
'views:blocks:new:public:js:{CJT-}add-new-block'
|
56 |
);
|
57 |
}
|
58 |
+
|
59 |
/**
|
60 |
* Output CSS files required to Add-New-Block view.
|
61 |
+
*
|
62 |
* @return void
|
63 |
*/
|
64 |
public static function enququeStyles() {
|
69 |
'framework:css:{CJT-}forms'
|
70 |
);
|
71 |
}
|
72 |
+
|
73 |
} // End class.
|
74 |
|
75 |
// Hookable!!
|
views/blocks/revisions/public/js/revisions/revisions.js
CHANGED
File without changes
|
views/blocks/revisions/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/blocks/revisions/view.php
CHANGED
@@ -12,24 +12,24 @@ defined('ABSPATH') or die("Access denied");
|
|
12 |
* Blocks view.
|
13 |
*/
|
14 |
class CJTBlocksRevisionsView extends CJTView {
|
15 |
-
|
16 |
/**
|
17 |
* put your comment there...
|
18 |
-
*
|
19 |
* @var mixed
|
20 |
*/
|
21 |
public $blockId = null;
|
22 |
-
|
23 |
/**
|
24 |
* put your comment there...
|
25 |
-
*
|
26 |
* @var mixed
|
27 |
*/
|
28 |
public $revisions = array();
|
29 |
-
|
30 |
/**
|
31 |
-
* Output
|
32 |
-
*
|
33 |
* @return void
|
34 |
*/
|
35 |
public function enququeScripts() {
|
@@ -39,10 +39,10 @@ class CJTBlocksRevisionsView extends CJTView {
|
|
39 |
'views:blocks:revisions:public:js:{CJT-}revisions'
|
40 |
);
|
41 |
}
|
42 |
-
|
43 |
/**
|
44 |
* Output CSS files required to Add-New-Block view.
|
45 |
-
*
|
46 |
* @return void
|
47 |
*/
|
48 |
public function enququeStyles() {
|
@@ -51,16 +51,16 @@ class CJTBlocksRevisionsView extends CJTView {
|
|
51 |
'framework:css:forms'
|
52 |
);
|
53 |
}
|
54 |
-
|
55 |
/**
|
56 |
* put your comment there...
|
57 |
-
*
|
58 |
*/
|
59 |
public function display() {
|
60 |
// Display view.
|
61 |
echo $this->getTemplate('default');
|
62 |
}
|
63 |
-
|
64 |
} // End class.
|
65 |
|
66 |
// Hookable!!
|
12 |
* Blocks view.
|
13 |
*/
|
14 |
class CJTBlocksRevisionsView extends CJTView {
|
15 |
+
|
16 |
/**
|
17 |
* put your comment there...
|
18 |
+
*
|
19 |
* @var mixed
|
20 |
*/
|
21 |
public $blockId = null;
|
22 |
+
|
23 |
/**
|
24 |
* put your comment there...
|
25 |
+
*
|
26 |
* @var mixed
|
27 |
*/
|
28 |
public $revisions = array();
|
29 |
+
|
30 |
/**
|
31 |
+
* Output JavaScript files requirred to Add-New-Block view to run.
|
32 |
+
*
|
33 |
* @return void
|
34 |
*/
|
35 |
public function enququeScripts() {
|
39 |
'views:blocks:revisions:public:js:{CJT-}revisions'
|
40 |
);
|
41 |
}
|
42 |
+
|
43 |
/**
|
44 |
* Output CSS files required to Add-New-Block view.
|
45 |
+
*
|
46 |
* @return void
|
47 |
*/
|
48 |
public function enququeStyles() {
|
51 |
'framework:css:forms'
|
52 |
);
|
53 |
}
|
54 |
+
|
55 |
/**
|
56 |
* put your comment there...
|
57 |
+
*
|
58 |
*/
|
59 |
public function display() {
|
60 |
// Display view.
|
61 |
echo $this->getTemplate('default');
|
62 |
}
|
63 |
+
|
64 |
} // End class.
|
65 |
|
66 |
// Hookable!!
|
views/dashboard/metabox/statistics/public/css/default.css
CHANGED
File without changes
|
views/dashboard/metabox/statistics/public/js/default/default.js
CHANGED
File without changes
|
views/dashboard/metabox/statistics/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/dashboard/metabox/statistics/view.php
CHANGED
File without changes
|
views/extensions/plugins-list/public/css/extensions.css
CHANGED
File without changes
|
views/extensions/plugins-list/public/css/plugins.css
CHANGED
File without changes
|
views/extensions/plugins-list/public/images/extensions/icon32.png
CHANGED
File without changes
|
views/extensions/plugins-list/public/js/default/default.js
CHANGED
File without changes
|
views/extensions/plugins-list/public/js/default/default.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/extensions/plugins-list/public/js/extensions/extensions.js
CHANGED
File without changes
|
views/extensions/plugins-list/public/js/extensions/extensions.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/extensions/plugins-list/public/js/plugins/plugins.js
CHANGED
File without changes
|
views/extensions/plugins-list/public/js/plugins/plugins.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/extensions/plugins-list/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/extensions/plugins-list/tmpl/default_setup_action.html.tmpl
CHANGED
File without changes
|
views/extensions/plugins-list/view.php
CHANGED
@@ -1,40 +1,40 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
class CJTExtensionsPluginsListView extends CJTView {
|
13 |
-
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
-
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
protected $extensions;
|
20 |
-
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
-
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
protected $listTypeName;
|
27 |
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
-
*
|
31 |
* @var mixed
|
32 |
*/
|
33 |
protected $securityToken;
|
34 |
-
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
-
*
|
38 |
* @param mixed $info
|
39 |
* @return CJTInstallerNoticeView
|
40 |
*/
|
@@ -45,14 +45,14 @@ class CJTExtensionsPluginsListView extends CJTView {
|
|
45 |
add_action('admin_print_styles', array(__CLASS__, 'enqueueStyles'));
|
46 |
add_action('admin_print_scripts', array(__CLASS__, 'enqueueScripts'));
|
47 |
}
|
48 |
-
|
49 |
/**
|
50 |
* put your comment there...
|
51 |
-
*
|
52 |
* @param mixed $parent
|
53 |
*/
|
54 |
public function activateExtensionsMenuItem($parent) {
|
55 |
-
// Hack Wordpress menu to select CSS &
|
56 |
// and the Extensions child menu item!
|
57 |
// We just hack get_admin_page_parent() function!
|
58 |
$GLOBALS['typenow'] = CJTPlugin::PLUGIN_REQUEST_ID;
|
@@ -61,10 +61,10 @@ class CJTExtensionsPluginsListView extends CJTView {
|
|
61 |
// We use this filter as (ACTION) not change in the return value!
|
62 |
return $parent;
|
63 |
}
|
64 |
-
|
65 |
/**
|
66 |
* put your comment there...
|
67 |
-
*
|
68 |
* @param mixed $links
|
69 |
*/
|
70 |
public function addExtensionActions($links, $file) {
|
@@ -89,12 +89,12 @@ class CJTExtensionsPluginsListView extends CJTView {
|
|
89 |
$links['license-key'] = $this->getTemplate('default_setup_action', array('component' => $component));
|
90 |
}
|
91 |
}
|
92 |
-
return $links;
|
93 |
}
|
94 |
-
|
95 |
/**
|
96 |
* put your comment there...
|
97 |
-
*
|
98 |
* @param mixed $tpl
|
99 |
*/
|
100 |
public function display($tpl = null) {
|
@@ -114,10 +114,10 @@ class CJTExtensionsPluginsListView extends CJTView {
|
|
114 |
add_filter('plugin_action_links', array(&$this, 'addExtensionActions'), 10 , 2);
|
115 |
|
116 |
}
|
117 |
-
|
118 |
/**
|
119 |
* put your comment there...
|
120 |
-
*
|
121 |
*/
|
122 |
public static function enqueueScripts() {
|
123 |
$listTypeName = CJTModel::getInstance('extensions')->getListTypeName();
|
@@ -131,10 +131,10 @@ class CJTExtensionsPluginsListView extends CJTView {
|
|
131 |
"views:extensions:plugins-list:public:js:{CJTExtensionsPluginsListView-}{$listTypeName}"
|
132 |
);
|
133 |
}
|
134 |
-
|
135 |
/**
|
136 |
* put your comment there...
|
137 |
-
*
|
138 |
*/
|
139 |
public static function enqueueStyles() {
|
140 |
$listTypeName = CJTModel::getInstance('extensions')->getListTypeName();
|
@@ -144,10 +144,10 @@ class CJTExtensionsPluginsListView extends CJTView {
|
|
144 |
"views:extensions:plugins-list:public:css:{CJTExtensionsPluginsListView-}{$listTypeName}"
|
145 |
);
|
146 |
}
|
147 |
-
|
148 |
/**
|
149 |
* put your comment there...
|
150 |
-
*
|
151 |
*/
|
152 |
public function outputCommonMarkups() {
|
153 |
echo $this->getTemplate('default');
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
7 |
defined('ABSPATH') or die("Access denied");
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
class CJTExtensionsPluginsListView extends CJTView {
|
13 |
+
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
+
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
protected $extensions;
|
20 |
+
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
+
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
protected $listTypeName;
|
27 |
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
+
*
|
31 |
* @var mixed
|
32 |
*/
|
33 |
protected $securityToken;
|
34 |
+
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
+
*
|
38 |
* @param mixed $info
|
39 |
* @return CJTInstallerNoticeView
|
40 |
*/
|
45 |
add_action('admin_print_styles', array(__CLASS__, 'enqueueStyles'));
|
46 |
add_action('admin_print_scripts', array(__CLASS__, 'enqueueScripts'));
|
47 |
}
|
48 |
+
|
49 |
/**
|
50 |
* put your comment there...
|
51 |
+
*
|
52 |
* @param mixed $parent
|
53 |
*/
|
54 |
public function activateExtensionsMenuItem($parent) {
|
55 |
+
// Hack Wordpress menu to select CSS & JavaScript root menu item
|
56 |
// and the Extensions child menu item!
|
57 |
// We just hack get_admin_page_parent() function!
|
58 |
$GLOBALS['typenow'] = CJTPlugin::PLUGIN_REQUEST_ID;
|
61 |
// We use this filter as (ACTION) not change in the return value!
|
62 |
return $parent;
|
63 |
}
|
64 |
+
|
65 |
/**
|
66 |
* put your comment there...
|
67 |
+
*
|
68 |
* @param mixed $links
|
69 |
*/
|
70 |
public function addExtensionActions($links, $file) {
|
89 |
$links['license-key'] = $this->getTemplate('default_setup_action', array('component' => $component));
|
90 |
}
|
91 |
}
|
92 |
+
return $links;
|
93 |
}
|
94 |
+
|
95 |
/**
|
96 |
* put your comment there...
|
97 |
+
*
|
98 |
* @param mixed $tpl
|
99 |
*/
|
100 |
public function display($tpl = null) {
|
114 |
add_filter('plugin_action_links', array(&$this, 'addExtensionActions'), 10 , 2);
|
115 |
|
116 |
}
|
117 |
+
|
118 |
/**
|
119 |
* put your comment there...
|
120 |
+
*
|
121 |
*/
|
122 |
public static function enqueueScripts() {
|
123 |
$listTypeName = CJTModel::getInstance('extensions')->getListTypeName();
|
131 |
"views:extensions:plugins-list:public:js:{CJTExtensionsPluginsListView-}{$listTypeName}"
|
132 |
);
|
133 |
}
|
134 |
+
|
135 |
/**
|
136 |
* put your comment there...
|
137 |
+
*
|
138 |
*/
|
139 |
public static function enqueueStyles() {
|
140 |
$listTypeName = CJTModel::getInstance('extensions')->getListTypeName();
|
144 |
"views:extensions:plugins-list:public:css:{CJTExtensionsPluginsListView-}{$listTypeName}"
|
145 |
);
|
146 |
}
|
147 |
+
|
148 |
/**
|
149 |
* put your comment there...
|
150 |
+
*
|
151 |
*/
|
152 |
public function outputCommonMarkups() {
|
153 |
echo $this->getTemplate('default');
|
views/installer/install/public/css/default.css
CHANGED
File without changes
|
views/installer/install/public/images/error.png
CHANGED
File without changes
|
views/installer/install/public/images/installed.png
CHANGED
File without changes
|
views/installer/install/public/images/progress.gif
CHANGED
File without changes
|
views/installer/install/public/js/default/default.js
CHANGED
File without changes
|
views/installer/install/public/js/default/default.localization.php
CHANGED
@@ -5,18 +5,18 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
13 |
|
14 |
'startButtonText' => cssJSToolbox::getText( 'Start' ),
|
15 |
-
|
16 |
'successMessage' => cssJSToolbox::getText( 'Installation Completed ... Click Start button and have fun!!!' ),
|
17 |
-
|
18 |
'confirmMessage' => cssJSToolbox::getText( "The installation process would just take several minutes!\n\nWould you like to start the installation process?" ),
|
19 |
-
|
20 |
'operationInstallFaild' => cssJSToolbox::getText( 'Installation operation %s is failed' ),
|
21 |
-
|
22 |
);
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
13 |
|
14 |
'startButtonText' => cssJSToolbox::getText( 'Start' ),
|
15 |
+
|
16 |
'successMessage' => cssJSToolbox::getText( 'Installation Completed ... Click Start button and have fun!!!' ),
|
17 |
+
|
18 |
'confirmMessage' => cssJSToolbox::getText( "The installation process would just take several minutes!\n\nWould you like to start the installation process?" ),
|
19 |
+
|
20 |
'operationInstallFaild' => cssJSToolbox::getText( 'Installation operation %s is failed' ),
|
21 |
+
|
22 |
);
|
views/installer/install/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/installer/install/tmpl/default_operation.html.tmpl
CHANGED
File without changes
|
views/installer/install/tmpl/default_operations_list.html.tmpl
CHANGED
File without changes
|
views/installer/install/tmpl/upgrade.html.tmpl
CHANGED
File without changes
|
views/installer/install/tmpl/upgrades/02.operations
CHANGED
File without changes
|
views/installer/install/tmpl/upgrades/03.operations
CHANGED
File without changes
|
views/installer/install/tmpl/upgrades/10.operations
CHANGED
File without changes
|
views/installer/install/tmpl/upgrades/10ce.operations
CHANGED
File without changes
|
views/installer/install/tmpl/upgrades/11.operations
CHANGED
File without changes
|
views/installer/install/tmpl/upgrades/11ce.operations
CHANGED
File without changes
|
views/installer/install/tmpl/upgrades/12.operations
CHANGED
File without changes
|
views/installer/install/tmpl/upgrades/13.operations
CHANGED
File without changes
|
views/installer/install/tmpl/upgrades/14.operations
CHANGED
File without changes
|
views/installer/install/tmpl/upgrades/15.operations
CHANGED
File without changes
|
views/installer/install/tmpl/upgrades/upgrade.html.tmpl
CHANGED
File without changes
|
views/installer/install/view.php
CHANGED
File without changes
|
views/installer/notice/public/js/default/default.js
CHANGED
File without changes
|
views/installer/notice/public/js/default/default.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/installer/notice/tmpl/default.html.tmpl
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
@@ -14,7 +14,7 @@ defined('ABSPATH') or die("Access denied");
|
|
14 |
</p>
|
15 |
<p>
|
16 |
<?php echo cssJSToolbox::getText('Please or you can go to the installation page directly through the') ?>
|
17 |
-
<a href="<?php echo admin_url('admin.php?page=cjtoolbox') ?>"><?php echo cssJSToolbox::getText('CSS &
|
18 |
</p>
|
19 |
<a class="dismiss" href="#"><?php echo cssJSToolbox::getText('Dismiss') ?></a>
|
20 |
</div>
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
14 |
</p>
|
15 |
<p>
|
16 |
<?php echo cssJSToolbox::getText('Please or you can go to the installation page directly through the') ?>
|
17 |
+
<a href="<?php echo admin_url('admin.php?page=cjtoolbox') ?>"><?php echo cssJSToolbox::getText('CSS & JavaScript Toolbox page.') ?></a>
|
18 |
</p>
|
19 |
<a class="dismiss" href="#"><?php echo cssJSToolbox::getText('Dismiss') ?></a>
|
20 |
</div>
|
views/installer/notice/view.php
CHANGED
File without changes
|
views/packages/install/public/css/install.css
CHANGED
File without changes
|
views/packages/install/public/js/install/install.js
CHANGED
File without changes
|
views/packages/install/public/js/install/install.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript $VAR$ variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/packages/install/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/packages/install/view.php
CHANGED
@@ -1,47 +1,47 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// No direct access.
|
7 |
defined('ABSPATH') or die('Access denied');
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
class CJTPackagesInstallView extends CJTView {
|
13 |
-
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
-
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
protected $moduleParamName;
|
20 |
-
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
-
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
protected $uploaderModuleName;
|
27 |
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
-
*
|
31 |
* @var mixed
|
32 |
*/
|
33 |
protected $uploaderActionName;
|
34 |
-
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
-
*
|
38 |
* @var mixed
|
39 |
*/
|
40 |
protected $uploaderControllerName;
|
41 |
-
|
42 |
/**
|
43 |
* put your comment there...
|
44 |
-
*
|
45 |
* @param mixed $tpl
|
46 |
*/
|
47 |
public function display($tpl = null) {
|
@@ -53,15 +53,15 @@ class CJTPackagesInstallView extends CJTView {
|
|
53 |
// Display form.
|
54 |
echo $this->getTemplate($tpl);
|
55 |
}
|
56 |
-
|
57 |
/**
|
58 |
-
* Output
|
59 |
-
*
|
60 |
* @return void
|
61 |
*/
|
62 |
public function enququeScripts() {
|
63 |
// Use related scripts.
|
64 |
-
self::useScripts(__CLASS__,
|
65 |
'jquery',
|
66 |
'thickbox',
|
67 |
'jquery-serialize-object',
|
@@ -69,10 +69,10 @@ class CJTPackagesInstallView extends CJTView {
|
|
69 |
'views:packages:install:public:js:{CJT-}install'
|
70 |
);
|
71 |
}
|
72 |
-
|
73 |
/**
|
74 |
* Output CSS files required to Add-New-Block view.
|
75 |
-
*
|
76 |
* @return void
|
77 |
*/
|
78 |
public function enququeStyles() {
|
@@ -84,7 +84,7 @@ class CJTPackagesInstallView extends CJTView {
|
|
84 |
'views:packages:install:public:css:{CJT-}install'
|
85 |
);
|
86 |
}
|
87 |
-
|
88 |
} // End class.
|
89 |
|
90 |
// Hookable!!
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// No direct access.
|
7 |
defined('ABSPATH') or die('Access denied');
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
class CJTPackagesInstallView extends CJTView {
|
13 |
+
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
+
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
protected $moduleParamName;
|
20 |
+
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
+
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
protected $uploaderModuleName;
|
27 |
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
+
*
|
31 |
* @var mixed
|
32 |
*/
|
33 |
protected $uploaderActionName;
|
34 |
+
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
+
*
|
38 |
* @var mixed
|
39 |
*/
|
40 |
protected $uploaderControllerName;
|
41 |
+
|
42 |
/**
|
43 |
* put your comment there...
|
44 |
+
*
|
45 |
* @param mixed $tpl
|
46 |
*/
|
47 |
public function display($tpl = null) {
|
53 |
// Display form.
|
54 |
echo $this->getTemplate($tpl);
|
55 |
}
|
56 |
+
|
57 |
/**
|
58 |
+
* Output JavaScript files requirred to Add-New-Block view to run.
|
59 |
+
*
|
60 |
* @return void
|
61 |
*/
|
62 |
public function enququeScripts() {
|
63 |
// Use related scripts.
|
64 |
+
self::useScripts(__CLASS__,
|
65 |
'jquery',
|
66 |
'thickbox',
|
67 |
'jquery-serialize-object',
|
69 |
'views:packages:install:public:js:{CJT-}install'
|
70 |
);
|
71 |
}
|
72 |
+
|
73 |
/**
|
74 |
* Output CSS files required to Add-New-Block view.
|
75 |
+
*
|
76 |
* @return void
|
77 |
*/
|
78 |
public function enququeStyles() {
|
84 |
'views:packages:install:public:css:{CJT-}install'
|
85 |
);
|
86 |
}
|
87 |
+
|
88 |
} // End class.
|
89 |
|
90 |
// Hookable!!
|
views/packages/manager/helpers/wp-list-table.inc.php
CHANGED
File without changes
|
views/packages/manager/public/css/default.css
CHANGED
File without changes
|
views/packages/manager/public/js/manager/manager.js
CHANGED
File without changes
|
views/packages/manager/public/js/manager/manager.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript cjtJQueryBlockI18N variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/packages/manager/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/packages/manager/view.php
CHANGED
File without changes
|
views/packages/raw-file/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/packages/raw-file/view.php
CHANGED
File without changes
|
views/settings/manager/public/css/default.css
CHANGED
File without changes
|
views/settings/manager/public/js/settings/settings.js
CHANGED
File without changes
|
views/settings/manager/tmpl/pages/metabox.html.tmpl
CHANGED
File without changes
|
views/settings/manager/tmpl/pages/uninstall.html.tmpl
CHANGED
File without changes
|
views/settings/manager/tmpl/settings.html.tmpl
CHANGED
File without changes
|
views/settings/manager/view.php
CHANGED
File without changes
|
views/setup/activation-form/public/css/default.css
CHANGED
File without changes
|
views/setup/activation-form/public/images/activate.png
CHANGED
Binary file
|
views/setup/activation-form/public/images/deactivate.png
CHANGED
Binary file
|
views/setup/activation-form/public/images/error.png
CHANGED
Binary file
|
views/setup/activation-form/public/images/invalid.png
CHANGED
Binary file
|
views/setup/activation-form/public/images/reset.png
CHANGED
Binary file
|
views/setup/activation-form/public/images/valid.png
CHANGED
Binary file
|
views/setup/activation-form/public/js/default/default.js
CHANGED
File without changes
|
views/setup/activation-form/public/js/default/default.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
@@ -17,7 +17,7 @@ return array(
|
|
17 |
'confirmreset' => cssJSToolbox::getText('The reset operation will clear the license fields and clear component license cache! This is really great once you need to stop using a previously entered key! This operation help your key to stay secure when you really need that! All cached data would be cleared now! You can reactivate your key anytime later!'),
|
18 |
/* Action button names */
|
19 |
'activateActionButtonCaption' => cssJSToolbox::getText('Activate'),
|
20 |
-
'deactivateActionButtonCaption' => cssJSToolbox::getText('Deactivate'),
|
21 |
/* Actions State name to be showed while in progress! */
|
22 |
'activateActionStateName' => cssJSToolbox::getText('Activating Key'),
|
23 |
'deactivateActionStateName' => cssJSToolbox::getText('Deactivating key'),
|
@@ -32,25 +32,25 @@ return array(
|
|
32 |
'activateStateName' => cssJSToolbox::getText('Activated'),
|
33 |
'deactivateStateName' => cssJSToolbox::getText('Deactivated'),
|
34 |
'resetStateName' => cssJSToolbox::getText('Reseted'),
|
35 |
-
|
36 |
/* Request message to be showed after the request is completed! */
|
37 |
'readvalidRequestMessage' => cssJSToolbox::getText('License key is activate! Thank you!'),
|
38 |
'resetvalidRequestMessage' => cssJSToolbox::getText('License Cache has been reseted!'),
|
39 |
-
|
40 |
'activatevalidRequestMessage' => cssJSToolbox::getText('License key is activated!'),
|
41 |
'activateinvalidRequestMessage' => cssJSToolbox::getText('Could not activate the provided license key!'),
|
42 |
'activateerrorRequestMessage' => cssJSToolbox::getText('Could not activate License Key due to the server error!'),
|
43 |
-
|
44 |
'deactivatevalidRequestMessage' => cssJSToolbox::getText('The license key is deactivated!'),
|
45 |
'deactivateinvalidRequestMessage' => cssJSToolbox::getText('Could not deactivate the provided license key!'),
|
46 |
'deactivateerrorRequestMessage' => cssJSToolbox::getText('Could not deactivate License Key due to the server error!'),
|
47 |
-
|
48 |
'checkvalidRequestMessage' => cssJSToolbox::getText('The ckeck operation detects that the provided key is a valid key!'),
|
49 |
'checkinvalidRequestMessage' => cssJSToolbox::getText('The check operation detects that the provided key is an invalid key!'),
|
50 |
'checkerrorRequestMessage' => cssJSToolbox::getText('Could not check License Key due to the server error!'),
|
51 |
'checksite_inactiveRequestMessage' => cssJSToolbox::getText('The ckeck operation detects that the provided key is a valid key! The key is not being activated yet.'),
|
52 |
'checkinactiveRequestMessage' => cssJSToolbox::getText('The ckeck operation detects that the provided key is a valid key! The license key need to be activated from the CJT Website.'),
|
53 |
-
|
54 |
'resetButtonCaption' => cssJSToolbox::getText('Reset'),
|
55 |
/* Validation */
|
56 |
'invalidName' => cssJSToolbox::getText('Invalid License name!'),
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
17 |
'confirmreset' => cssJSToolbox::getText('The reset operation will clear the license fields and clear component license cache! This is really great once you need to stop using a previously entered key! This operation help your key to stay secure when you really need that! All cached data would be cleared now! You can reactivate your key anytime later!'),
|
18 |
/* Action button names */
|
19 |
'activateActionButtonCaption' => cssJSToolbox::getText('Activate'),
|
20 |
+
'deactivateActionButtonCaption' => cssJSToolbox::getText('Deactivate'),
|
21 |
/* Actions State name to be showed while in progress! */
|
22 |
'activateActionStateName' => cssJSToolbox::getText('Activating Key'),
|
23 |
'deactivateActionStateName' => cssJSToolbox::getText('Deactivating key'),
|
32 |
'activateStateName' => cssJSToolbox::getText('Activated'),
|
33 |
'deactivateStateName' => cssJSToolbox::getText('Deactivated'),
|
34 |
'resetStateName' => cssJSToolbox::getText('Reseted'),
|
35 |
+
|
36 |
/* Request message to be showed after the request is completed! */
|
37 |
'readvalidRequestMessage' => cssJSToolbox::getText('License key is activate! Thank you!'),
|
38 |
'resetvalidRequestMessage' => cssJSToolbox::getText('License Cache has been reseted!'),
|
39 |
+
|
40 |
'activatevalidRequestMessage' => cssJSToolbox::getText('License key is activated!'),
|
41 |
'activateinvalidRequestMessage' => cssJSToolbox::getText('Could not activate the provided license key!'),
|
42 |
'activateerrorRequestMessage' => cssJSToolbox::getText('Could not activate License Key due to the server error!'),
|
43 |
+
|
44 |
'deactivatevalidRequestMessage' => cssJSToolbox::getText('The license key is deactivated!'),
|
45 |
'deactivateinvalidRequestMessage' => cssJSToolbox::getText('Could not deactivate the provided license key!'),
|
46 |
'deactivateerrorRequestMessage' => cssJSToolbox::getText('Could not deactivate License Key due to the server error!'),
|
47 |
+
|
48 |
'checkvalidRequestMessage' => cssJSToolbox::getText('The ckeck operation detects that the provided key is a valid key!'),
|
49 |
'checkinvalidRequestMessage' => cssJSToolbox::getText('The check operation detects that the provided key is an invalid key!'),
|
50 |
'checkerrorRequestMessage' => cssJSToolbox::getText('Could not check License Key due to the server error!'),
|
51 |
'checksite_inactiveRequestMessage' => cssJSToolbox::getText('The ckeck operation detects that the provided key is a valid key! The key is not being activated yet.'),
|
52 |
'checkinactiveRequestMessage' => cssJSToolbox::getText('The ckeck operation detects that the provided key is a valid key! The license key need to be activated from the CJT Website.'),
|
53 |
+
|
54 |
'resetButtonCaption' => cssJSToolbox::getText('Reset'),
|
55 |
/* Validation */
|
56 |
'invalidName' => cssJSToolbox::getText('Invalid License name!'),
|
views/setup/activation-form/tmpl/default.html.tmpl
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
@@ -25,7 +25,7 @@ $this->suppressPrintScriptsHook();
|
|
25 |
<strong><?php echo cssJSToolbox::getText('License Key') ?> <span class="component-name">"<?php echo $this->component['title'] ?>"</span></strong>
|
26 |
<p>
|
27 |
<?php echo cssJSToolbox::getText('In order to get the benefits from the premium services we provide you\'ve to obtain your license key from') ?>
|
28 |
-
<a target="_blank" href="<?php echo $this->cjtWebSite ?>"> <?php echo cssJSToolbox::getText('CSS &
|
29 |
</p>
|
30 |
<ul class="fields-list">
|
31 |
<li>
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// Disallow direct access.
|
25 |
<strong><?php echo cssJSToolbox::getText('License Key') ?> <span class="component-name">"<?php echo $this->component['title'] ?>"</span></strong>
|
26 |
<p>
|
27 |
<?php echo cssJSToolbox::getText('In order to get the benefits from the premium services we provide you\'ve to obtain your license key from') ?>
|
28 |
+
<a target="_blank" href="<?php echo $this->cjtWebSite ?>"> <?php echo cssJSToolbox::getText('CSS & JavaScript Toolbox') ?> </a><?php echo cssJSToolbox::getText('web site') ?>.
|
29 |
</p>
|
30 |
<ul class="fields-list">
|
31 |
<li>
|
views/setup/activation-form/view.php
CHANGED
File without changes
|
views/setup/setup/public/js/default/default.js
CHANGED
File without changes
|
views/setup/setup/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/setup/setup/view.php
CHANGED
File without changes
|
views/templates/info/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/templates/info/view.php
CHANGED
File without changes
|
views/templates/lookup/public/css/lookup.css
CHANGED
@@ -8,9 +8,9 @@ a:visited {text-decoration: none;}
|
|
8 |
a,
|
9 |
a:visited {color: #a0a0a0 !important;}
|
10 |
|
11 |
-
a:hover {color: #
|
12 |
|
13 |
-
a.active {color: #
|
14 |
|
15 |
ul {width: 100%;}
|
16 |
ul li {margin-bottom: 0;}
|
@@ -49,4 +49,4 @@ form#templates-lookup {height: 100%;}
|
|
49 |
border-top: 1px solid #bbb;
|
50 |
padding: 9px;
|
51 |
}
|
52 |
-
.ui-accordion-header.ui-accordion-header-active a {color: #
|
8 |
a,
|
9 |
a:visited {color: #a0a0a0 !important;}
|
10 |
|
11 |
+
a:hover {color: #3f7eaa !important;}
|
12 |
|
13 |
+
a.active {color: #005DA4 !important;}
|
14 |
|
15 |
ul {width: 100%;}
|
16 |
ul li {margin-bottom: 0;}
|
49 |
border-top: 1px solid #bbb;
|
50 |
padding: 9px;
|
51 |
}
|
52 |
+
.ui-accordion-header.ui-accordion-header-active a {color: #005DA4 !important;}
|
views/templates/lookup/public/js/lookup/lookup.js
CHANGED
File without changes
|
views/templates/lookup/public/js/lookup/lookup.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript cjtJQueryBlockI18N variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/templates/lookup/tmpl/default.html.tmpl
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
/**
|
@@ -25,11 +25,27 @@ $this->suppressPrintScriptsHook();
|
|
25 |
|
26 |
<?php else : ?>
|
27 |
<div id="templates-list">
|
28 |
-
<?php foreach ($this->items as $type => $authors) :
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
<div id="#templates-type-content-<?php echo $type ?>" class="templates-list">
|
31 |
<ul class="authors-list">
|
32 |
-
<?php
|
33 |
foreach ($authors as $author => $templates) :
|
34 |
$authorIdentifier ="{$type}_" . str_replace(array(' ', '-', '_'), '', $author);
|
35 |
?>
|
@@ -57,16 +73,16 @@ $this->suppressPrintScriptsHook();
|
|
57 |
<?php endforeach; ?>
|
58 |
</ul>
|
59 |
</div>
|
60 |
-
<?php endforeach; ?>
|
61 |
</div>
|
62 |
<?php endif; ?>
|
63 |
</form>
|
64 |
<div class="sweep">
|
65 |
<span class="wrap">
|
66 |
-
<span class="filters-title"><?php echo cssJSToolbox::getText('Show') ?>: </span>
|
67 |
<span class="filters">
|
68 |
-
<a href="#linked"><?php echo cssJSToolbox::getText('Linked') ?></a> |
|
69 |
-
<a href="#unlinked"><?php echo cssJSToolbox::getText('Unlinked') ?></a> |
|
70 |
<a href="#all" class="active"><?php echo cssJSToolbox::getText('All') ?></a>
|
71 |
</span>
|
72 |
</span>
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
/**
|
25 |
|
26 |
<?php else : ?>
|
27 |
<div id="templates-list">
|
28 |
+
<?php foreach ($this->items as $type => $authors) :
|
29 |
+
$_txt = $type;
|
30 |
+
|
31 |
+
switch ( $type ) :
|
32 |
+
case 'javascript':
|
33 |
+
$_txt = 'JavaScript';
|
34 |
+
break;
|
35 |
+
case 'css':
|
36 |
+
$_txt = 'CSS';
|
37 |
+
break;
|
38 |
+
case 'html':
|
39 |
+
$_txt = 'HTML';
|
40 |
+
break;
|
41 |
+
case 'php':
|
42 |
+
$_txt = 'PHP';
|
43 |
+
break;
|
44 |
+
endswitch; ?>
|
45 |
+
<h3 id="#templates-type-header-<?php echo $type ?>"><a href="#"><?php echo cssJSToolbox::getText($_txt) ?></a></h3>
|
46 |
<div id="#templates-type-content-<?php echo $type ?>" class="templates-list">
|
47 |
<ul class="authors-list">
|
48 |
+
<?php
|
49 |
foreach ($authors as $author => $templates) :
|
50 |
$authorIdentifier ="{$type}_" . str_replace(array(' ', '-', '_'), '', $author);
|
51 |
?>
|
73 |
<?php endforeach; ?>
|
74 |
</ul>
|
75 |
</div>
|
76 |
+
<?php endforeach; ?>
|
77 |
</div>
|
78 |
<?php endif; ?>
|
79 |
</form>
|
80 |
<div class="sweep">
|
81 |
<span class="wrap">
|
82 |
+
<span class="filters-title"><?php echo cssJSToolbox::getText('Show') ?>: </span>
|
83 |
<span class="filters">
|
84 |
+
<a href="#linked"><?php echo cssJSToolbox::getText('Linked') ?></a> |
|
85 |
+
<a href="#unlinked"><?php echo cssJSToolbox::getText('Unlinked') ?></a> |
|
86 |
<a href="#all" class="active"><?php echo cssJSToolbox::getText('All') ?></a>
|
87 |
</span>
|
88 |
</span>
|
views/templates/lookup/view.php
CHANGED
File without changes
|
views/templates/manager/helpers/wp-list-table.inc.php
CHANGED
File without changes
|
views/templates/manager/public/css/default.css
CHANGED
File without changes
|
views/templates/manager/public/js/manager/manager.js
CHANGED
File without changes
|
views/templates/manager/public/js/manager/manager.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript cjtJQueryBlockI18N variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/templates/manager/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/templates/manager/view.php
CHANGED
File without changes
|
views/templates/template/public/css/default.css
CHANGED
File without changes
|
views/templates/template/public/js/template/template.js
CHANGED
File without changes
|
views/templates/template/public/js/template/template.localization.php
CHANGED
@@ -5,8 +5,8 @@
|
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
-
* Localization for
|
9 |
-
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
5 |
*/
|
6 |
|
7 |
/**
|
8 |
+
* Localization for JavaScript $VAR$ variable.
|
9 |
+
*
|
10 |
* Localization text for backups script.
|
11 |
*/
|
12 |
return array(
|
views/templates/template/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/templates/template/view.php
CHANGED
@@ -1,40 +1,40 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// No direct access.
|
7 |
defined('ABSPATH') or die('Access denied');
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
class CJTTemplatesTemplateView extends CJTView {
|
13 |
-
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
-
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
protected $isNew;
|
20 |
-
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
-
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
public $item;
|
27 |
-
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
-
*
|
31 |
* @var mixed
|
32 |
*/
|
33 |
protected $onprepareitem = array('parameters' => array('item', 'isNew'));
|
34 |
-
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
-
*
|
38 |
* @param mixed $tpl
|
39 |
*/
|
40 |
public function display($tpl = null) {
|
@@ -62,15 +62,15 @@ class CJTTemplatesTemplateView extends CJTView {
|
|
62 |
$this->item = $this->onprepareitem($this->item, $this->isNew);
|
63 |
echo $this->getTemplate($tpl) ;
|
64 |
}
|
65 |
-
|
66 |
/**
|
67 |
-
* Output
|
68 |
-
*
|
69 |
* @return void
|
70 |
*/
|
71 |
public function enququeScripts() {
|
72 |
// Use related scripts.
|
73 |
-
self::useScripts(__CLASS__,
|
74 |
'jquery',
|
75 |
'thickbox',
|
76 |
'jquery-serialize-object',
|
@@ -81,10 +81,10 @@ class CJTTemplatesTemplateView extends CJTView {
|
|
81 |
'views:templates:template:public:js:{CJT-}template'
|
82 |
);
|
83 |
}
|
84 |
-
|
85 |
/**
|
86 |
* Output CSS files required to Add-New-Block view.
|
87 |
-
*
|
88 |
* @return void
|
89 |
*/
|
90 |
public function enququeStyles() {
|
@@ -97,7 +97,7 @@ class CJTTemplatesTemplateView extends CJTView {
|
|
97 |
'views:templates:template:public:css:{CJT-}default'
|
98 |
);
|
99 |
}
|
100 |
-
|
101 |
} // End class.
|
102 |
|
103 |
// Hookable!!
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// No direct access.
|
7 |
defined('ABSPATH') or die('Access denied');
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
class CJTTemplatesTemplateView extends CJTView {
|
13 |
+
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
+
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
protected $isNew;
|
20 |
+
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
+
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
public $item;
|
27 |
+
|
28 |
/**
|
29 |
* put your comment there...
|
30 |
+
*
|
31 |
* @var mixed
|
32 |
*/
|
33 |
protected $onprepareitem = array('parameters' => array('item', 'isNew'));
|
34 |
+
|
35 |
/**
|
36 |
* put your comment there...
|
37 |
+
*
|
38 |
* @param mixed $tpl
|
39 |
*/
|
40 |
public function display($tpl = null) {
|
62 |
$this->item = $this->onprepareitem($this->item, $this->isNew);
|
63 |
echo $this->getTemplate($tpl) ;
|
64 |
}
|
65 |
+
|
66 |
/**
|
67 |
+
* Output JavaScript files requirred to Add-New-Block view to run.
|
68 |
+
*
|
69 |
* @return void
|
70 |
*/
|
71 |
public function enququeScripts() {
|
72 |
// Use related scripts.
|
73 |
+
self::useScripts(__CLASS__,
|
74 |
'jquery',
|
75 |
'thickbox',
|
76 |
'jquery-serialize-object',
|
81 |
'views:templates:template:public:js:{CJT-}template'
|
82 |
);
|
83 |
}
|
84 |
+
|
85 |
/**
|
86 |
* Output CSS files required to Add-New-Block view.
|
87 |
+
*
|
88 |
* @return void
|
89 |
*/
|
90 |
public function enququeStyles() {
|
97 |
'views:templates:template:public:css:{CJT-}default'
|
98 |
);
|
99 |
}
|
100 |
+
|
101 |
} // End class.
|
102 |
|
103 |
// Hookable!!
|
views/uploader/single/public/css/uploader.css
CHANGED
File without changes
|
views/uploader/single/public/js/uploader/uploader.js
CHANGED
File without changes
|
views/uploader/single/tmpl/default.html.tmpl
CHANGED
File without changes
|
views/uploader/single/view.php
CHANGED
@@ -1,32 +1,32 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*/
|
5 |
|
6 |
// No direct access.
|
7 |
defined('ABSPATH') or die('Access denied');
|
8 |
|
9 |
/**
|
10 |
-
*
|
11 |
*/
|
12 |
class CJTUploaderSingleView extends CJTView {
|
13 |
-
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
-
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
protected $pon;
|
20 |
-
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
-
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
protected $state;
|
27 |
/**
|
28 |
* put your comment there...
|
29 |
-
*
|
30 |
* @param mixed $tpl
|
31 |
*/
|
32 |
public function display($tpl = null) {
|
@@ -36,27 +36,27 @@ class CJTUploaderSingleView extends CJTView {
|
|
36 |
// Output.
|
37 |
echo $this->getTemplate($tpl);
|
38 |
}
|
39 |
-
|
40 |
/**
|
41 |
-
* Output
|
42 |
-
*
|
43 |
* @return void
|
44 |
*/
|
45 |
public function enququeScripts() {
|
46 |
// Use related scripts.
|
47 |
self::useScripts(__CLASS__, 'jquery', 'views:uploader:single:public:js:{CJT-}uploader');
|
48 |
}
|
49 |
-
|
50 |
/**
|
51 |
* Output CSS files required to Add-New-Block view.
|
52 |
-
*
|
53 |
* @return void
|
54 |
*/
|
55 |
public function enququeStyles() {
|
56 |
// Use related styles.
|
57 |
self::useStyles(__CLASS__, 'views:uploader:single:public:css:{CJT-}uploader');
|
58 |
}
|
59 |
-
|
60 |
} // End class.
|
61 |
|
62 |
// Hookable!!
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
*/
|
5 |
|
6 |
// No direct access.
|
7 |
defined('ABSPATH') or die('Access denied');
|
8 |
|
9 |
/**
|
10 |
+
*
|
11 |
*/
|
12 |
class CJTUploaderSingleView extends CJTView {
|
13 |
+
|
14 |
/**
|
15 |
* put your comment there...
|
16 |
+
*
|
17 |
* @var mixed
|
18 |
*/
|
19 |
protected $pon;
|
20 |
+
|
21 |
/**
|
22 |
* put your comment there...
|
23 |
+
*
|
24 |
* @var mixed
|
25 |
*/
|
26 |
protected $state;
|
27 |
/**
|
28 |
* put your comment there...
|
29 |
+
*
|
30 |
* @param mixed $tpl
|
31 |
*/
|
32 |
public function display($tpl = null) {
|
36 |
// Output.
|
37 |
echo $this->getTemplate($tpl);
|
38 |
}
|
39 |
+
|
40 |
/**
|
41 |
+
* Output JavaScript files requirred to Add-New-Block view to run.
|
42 |
+
*
|
43 |
* @return void
|
44 |
*/
|
45 |
public function enququeScripts() {
|
46 |
// Use related scripts.
|
47 |
self::useScripts(__CLASS__, 'jquery', 'views:uploader:single:public:js:{CJT-}uploader');
|
48 |
}
|
49 |
+
|
50 |
/**
|
51 |
* Output CSS files required to Add-New-Block view.
|
52 |
+
*
|
53 |
* @return void
|
54 |
*/
|
55 |
public function enququeStyles() {
|
56 |
// Use related styles.
|
57 |
self::useStyles(__CLASS__, 'views:uploader:single:public:css:{CJT-}uploader');
|
58 |
}
|
59 |
+
|
60 |
} // End class.
|
61 |
|
62 |
// Hookable!!
|