Version Description
- 20/07/2017 =
- Feature - Plugin installer and activator mechinism.
- Fix - Call to undefined function
preg_filter()
. - Dev - Improved file structure.
- Dev - Introduced
tg_demo_installer_enabled()
. - Dev - Introduced
tg_demo_installer_preview()
. - Dev - Introduced
tg_demo_preview_screenshot_url()
.
See changelog for all versions.
=
Download this release
Release Info
Developer | ThemeGrill |
Plugin | ThemeGrill Demo Importer |
Version | 1.4.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.4 to 1.4.0
- .stylelintrc +0 -59
- .wordpress-org/banner-772x250.jpg +0 -0
- CHANGELOG.txt +0 -31
- CODE_OF_CONDUCT.md +0 -46
- assets/css/demo-importer-rtl.css +1 -1
- assets/css/demo-importer.css +1 -1
- assets/css/demo-importer.scss +63 -30
- assets/images/flash/flash-construction-v2.jpg +0 -0
- assets/images/flash/flash-construction.jpg +0 -0
- assets/images/flash/flash-default.jpg +0 -0
- assets/images/flash/flash-food-v2.jpg +0 -0
- assets/images/flash/flash-food.jpg +0 -0
- assets/images/flash/flash-onepage.jpg +0 -0
- assets/images/flash/flash-pro-agency.jpg +0 -0
- assets/images/flash/flash-pro-band.jpg +0 -0
- assets/images/flash/flash-pro-church.jpg +0 -0
- assets/images/flash/flash-pro-default.jpg +0 -0
- assets/images/flash/flash-pro-education.jpg +0 -0
- assets/images/flash/flash-pro-gym.jpg +0 -0
- assets/images/flash/flash-pro-health.jpg +0 -0
- assets/images/flash/flash-pro-store.jpg +0 -0
- assets/images/flash/flash-pro-wedding.jpg +0 -0
- assets/js/admin/demo-importer.js +162 -6
- assets/js/admin/demo-importer.min.js +1 -1
- assets/js/admin/demo-updates.js +100 -1
- assets/js/admin/demo-updates.min.js +1 -1
- composer.lock +0 -295
- includes/{includes/admin → admin}/class-demo-installer-skin.php +0 -0
- includes/{includes/admin → admin}/class-demo-upgrader.php +0 -0
- includes/{includes/admin → admin}/views/html-admin-page-importer.php +65 -39
- includes/{includes/admin → admin}/views/html-admin-page-installer-preview.php +5 -3
- includes/{includes/admin → admin}/views/html-admin-page-installer-uploads.php +0 -0
- includes/{includes/admin → admin}/views/html-admin-page-installer.php +70 -42
- includes/{includes/admin → admin}/views/html-notice-reset-wizard-success.php +0 -0
- includes/{includes/admin → admin}/views/html-notice-reset-wizard.php +0 -0
- includes/class-demo-importer.php +64 -103
- includes/{includes/functions-demo-importer.php → functions-demo-importer.php} +133 -25
- includes/functions-demo-template.php +67 -0
- includes/functions-demo-update.php +1 -1
- includes/{includes → importers}/class-customizer-importer.php +0 -0
- includes/{includes → importers}/class-widget-importer.php +0 -0
- includes/{includes → importers}/customize/class-oc-customize-demo-importer-setting.php +0 -0
- includes/{includes/importers → importers/wordpress-importer}/class-wxr-importer.php +0 -0
- includes/{includes/importers → importers/wordpress-importer}/class-wxr-parsers.php +0 -0
- languages/themegrill-demo-importer.pot +512 -448
- phpcs.ruleset.xml +0 -195
- readme.txt +13 -9
- themegrill-demo-importer.php +20 -12
.stylelintrc
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"rules": {
|
3 |
-
"indentation": "tab",
|
4 |
-
"color-hex-case": "lower",
|
5 |
-
"color-no-invalid-hex": true,
|
6 |
-
|
7 |
-
"function-calc-no-unspaced-operator": true,
|
8 |
-
"function-comma-space-after": "always-single-line",
|
9 |
-
"function-comma-space-before": "never",
|
10 |
-
"function-name-case": "lower",
|
11 |
-
"function-url-quotes": "always",
|
12 |
-
"function-whitespace-after": "always",
|
13 |
-
|
14 |
-
"number-leading-zero": "always",
|
15 |
-
"number-no-trailing-zeros": true,
|
16 |
-
"length-zero-no-unit": true,
|
17 |
-
|
18 |
-
"string-no-newline": true,
|
19 |
-
"string-quotes": "single",
|
20 |
-
|
21 |
-
"unit-case": "lower",
|
22 |
-
"unit-no-unknown": true,
|
23 |
-
"unit-whitelist": ["px", "%", "deg", "ms", "em", "vh", "vw", "rem", "s", "ex", "pt", "cm"],
|
24 |
-
|
25 |
-
"value-list-comma-space-after": "always-single-line",
|
26 |
-
"value-list-comma-space-before": "never",
|
27 |
-
|
28 |
-
"shorthand-property-no-redundant-values": true,
|
29 |
-
|
30 |
-
"property-case": "lower",
|
31 |
-
|
32 |
-
"declaration-block-no-duplicate-properties": [true, { "severity": "warning" } ],
|
33 |
-
"declaration-block-no-ignored-properties": [true, { "severity": "warning" } ],
|
34 |
-
"declaration-block-trailing-semicolon": "always",
|
35 |
-
"declaration-block-single-line-max-declarations": 0,
|
36 |
-
"declaration-block-semicolon-space-before": "never",
|
37 |
-
"declaration-block-semicolon-space-after": "always-single-line",
|
38 |
-
"declaration-block-semicolon-newline-before": "never-multi-line",
|
39 |
-
"declaration-block-semicolon-newline-after": "always-multi-line",
|
40 |
-
|
41 |
-
"block-closing-brace-newline-after": "always",
|
42 |
-
"block-closing-brace-newline-before": "always-multi-line",
|
43 |
-
"block-no-empty": true,
|
44 |
-
"block-opening-brace-newline-after": "always-multi-line",
|
45 |
-
"block-opening-brace-space-before": "always",
|
46 |
-
|
47 |
-
"selector-attribute-brackets-space-inside": "never",
|
48 |
-
"selector-attribute-operator-space-after": "never",
|
49 |
-
"selector-attribute-operator-space-before": "never",
|
50 |
-
"selector-combinator-space-after": "always",
|
51 |
-
"selector-combinator-space-before": "always",
|
52 |
-
"selector-pseudo-class-case": "lower",
|
53 |
-
"selector-pseudo-class-parentheses-space-inside": "always",
|
54 |
-
"selector-pseudo-element-case": "lower",
|
55 |
-
"selector-pseudo-element-colon-notation": "double",
|
56 |
-
"selector-pseudo-element-no-unknown": true,
|
57 |
-
"selector-type-case": "lower",
|
58 |
-
}
|
59 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.wordpress-org/banner-772x250.jpg
DELETED
Binary file
|
CHANGELOG.txt
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
== Changelog ==
|
2 |
-
|
3 |
-
= 1.3.3 =
|
4 |
-
* Tweak - Support demo import for suffice theme.
|
5 |
-
|
6 |
-
= 1.3.2 =
|
7 |
-
* Tweak - Load screenshots for pro theme demos.
|
8 |
-
|
9 |
-
= 1.3.1 =
|
10 |
-
* Tweak - Load screenshot from theme instead of plugin for themes with single demo.
|
11 |
-
|
12 |
-
= 1.3.0 =
|
13 |
-
* Tweak - Support data update for nested siteorigin layoutbuilder.
|
14 |
-
* Fix - Import button not working on firefox.
|
15 |
-
|
16 |
-
= 1.2.0 =
|
17 |
-
* Tweak - Load scripts perfecly on demo importer appearance page.
|
18 |
-
* Tweak - Set transient for redirecting to demo importer page after install or update.
|
19 |
-
* Tweak - Introduced filter hook `themegrill_demo_importer_installer` to control demo view.
|
20 |
-
|
21 |
-
= 1.1.0 =
|
22 |
-
* Feature - Backbone views interface for demos and previews
|
23 |
-
* Feature - Added download button for the preview not installed
|
24 |
-
* Feature - Robust quick search view to change in demo interface
|
25 |
-
* Feature - Detailed information in popup to showcase plugins, events, etc
|
26 |
-
* Refactor - Replace old way to import demo with new `wp.updates` methods
|
27 |
-
* Fix - Menu classes to hide admin menu if no JS using css class `hide-if-no-js`
|
28 |
-
* Fix - Remove the old demo pack if found and to update the new demo packs
|
29 |
-
|
30 |
-
= 1.0.0 =
|
31 |
-
* Initial Public Release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CODE_OF_CONDUCT.md
DELETED
@@ -1,46 +0,0 @@
|
|
1 |
-
# Contributor Covenant Code of Conduct
|
2 |
-
|
3 |
-
## Our Pledge
|
4 |
-
|
5 |
-
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6 |
-
|
7 |
-
## Our Standards
|
8 |
-
|
9 |
-
Examples of behavior that contributes to creating a positive environment include:
|
10 |
-
|
11 |
-
* Using welcoming and inclusive language
|
12 |
-
* Being respectful of differing viewpoints and experiences
|
13 |
-
* Gracefully accepting constructive criticism
|
14 |
-
* Focusing on what is best for the community
|
15 |
-
* Showing empathy towards other community members
|
16 |
-
|
17 |
-
Examples of unacceptable behavior by participants include:
|
18 |
-
|
19 |
-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
20 |
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
21 |
-
* Public or private harassment
|
22 |
-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
23 |
-
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
24 |
-
|
25 |
-
## Our Responsibilities
|
26 |
-
|
27 |
-
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
28 |
-
|
29 |
-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
30 |
-
|
31 |
-
## Scope
|
32 |
-
|
33 |
-
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
34 |
-
|
35 |
-
## Enforcement
|
36 |
-
|
37 |
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at support@themegrill.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
38 |
-
|
39 |
-
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
40 |
-
|
41 |
-
## Attribution
|
42 |
-
|
43 |
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
44 |
-
|
45 |
-
[homepage]: http://contributor-covenant.org
|
46 |
-
[version]: http://contributor-covenant.org/version/1/4/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/css/demo-importer-rtl.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.appearance_page_demo-importer .demo-importer h1{margin-bottom:15px}.appearance_page_demo-importer .demo-importer .search-form{display:inline}.appearance_page_demo-importer .demo-importer .wp-filter-search{position:relative;top:-2px;right:20px;margin:0;width:280px;font-size:16px;font-weight:300;line-height:1.5}.appearance_page_demo-importer .demo-installer .wp-filter{padding:0 20px}.appearance_page_demo-importer .demo-installer .wp-filter .filter-links li>a:focus{box-shadow:none}.appearance_page_demo-importer .demo-installer .welcome-panel{margin:0;background:#e9eff3;border:10px solid #fff;box-shadow:none}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content{width:45%;float:right}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content .welcome-panel-column{width:100%}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content .welcome-panel-column ul{padding-right:10px}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video{float:left;width:50%}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video .welcome-panel-iframe-video-inner{position:relative;height:0;margin:0 10px 23px;padding-bottom:56.25%;border:5px solid #dadada}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video .welcome-panel-iframe-video-inner iframe{position:absolute;top:0;right:0;width:100%;height:100%}.appearance_page_demo-importer .demo-installer .premium-ribbon{overflow:hidden}.appearance_page_demo-importer .demo-installer .premium-ribbon
|
1 |
+
.appearance_page_demo-importer .demo-importer h1{margin-bottom:15px}.appearance_page_demo-importer .demo-importer .search-form{display:inline}.appearance_page_demo-importer .demo-importer .wp-filter-search{position:relative;top:-2px;right:20px;margin:0;width:280px;font-size:16px;font-weight:300;line-height:1.5}.appearance_page_demo-importer .demo-installer .wp-filter{padding:0 20px}.appearance_page_demo-importer .demo-installer .wp-filter .filter-links li>a:focus{box-shadow:none}.appearance_page_demo-importer .demo-installer .welcome-panel{margin:0;background:#e9eff3;border:10px solid #fff;box-shadow:none}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content{width:45%;float:right}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content .welcome-panel-column{width:100%}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content .welcome-panel-column ul{padding-right:10px}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video{float:left;width:50%}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video .welcome-panel-iframe-video-inner{position:relative;height:0;margin:0 10px 23px;padding-bottom:56.25%;border:5px solid #dadada}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video .welcome-panel-iframe-video-inner iframe{position:absolute;top:0;right:0;width:100%;height:100%}.appearance_page_demo-importer .demo-installer .premium-ribbon{position:absolute;left:0;top:0;width:100%;height:100%;overflow:hidden}.appearance_page_demo-importer .demo-installer .premium-ribbon span{color:#fff;display:block;text-transform:uppercase;border:1px solid #069c64;background-color:#24b37e;box-shadow:0 0 4px rgba(255,255,255,.5) inset,0 1px 3px rgba(0,0,0,.3);font-size:15px;font-weight:700;text-align:center;padding:5px 30px;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg);position:absolute;top:6px;left:-30px}table.plugins-list-table{margin-bottom:1em}table.plugins-list-table .plugin-status{text-align:center}table.plugins-list-table .plugin-status span{width:20px;height:20px;visibility:hidden;vertical-align:top;display:inline-block}table.plugins-list-table .plugin-status span::before{visibility:visible;display:inline-block;font:normal 20px/1 dashicons;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}table.plugins-list-table .plugin-status .active::before{color:#7ad03a;content:'\f147'}table.plugins-list-table .plugin-status .activate-now::before,table.plugins-list-table .plugin-status .install-now::before{color:#a00;content:'\f153'}table.plugins-list-table .plugin-status .activate-now::before{content:'\f534'}table.plugins-list-table .plugin-status .updating-message::before{color:#f56e28;content:'\f463';-webkit-animation:rotation 2s infinite linear;animation:rotation 2s infinite linear}table.plugins-list-table .plugin-actions .plugins-activate,table.plugins-list-table .plugin-actions .plugins-install{float:left;-webkit-transform:none;-ms-transform:none;transform:none}table.plugins-list-table .plugin-actions .plugins-install{margin-right:8px}.tips{cursor:help;text-decoration:none}img.tips{padding:5px 0 0}#tiptip_holder{display:none;z-index:8675309;position:absolute;top:0;left:0}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-right:-6px;border-top-color:#333}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-right:-6px;border-bottom-color:#333}#tiptip_holder.tip_right{padding-right:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-right:-5px;border-left-color:#333}#tiptip_holder.tip_left{padding-left:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-right:-7px;border-right-color:#333}#tiptip_content{color:#fff;font-size:.8em;max-width:150px;background:#333;text-align:center;border-radius:3px;padding:.618em 1em;box-shadow:0 1px 3px rgba(0,0,0,.2)}#tiptip_content code{padding:1px;background:#888}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}#tiptip_arrow{right:50%;margin-right:-6px}@media screen and (max-width:500px){.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content,.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video{float:none;width:100%}}
|
assets/css/demo-importer.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.appearance_page_demo-importer .demo-importer h1{margin-bottom:15px}.appearance_page_demo-importer .demo-importer .search-form{display:inline}.appearance_page_demo-importer .demo-importer .wp-filter-search{position:relative;top:-2px;left:20px;margin:0;width:280px;font-size:16px;font-weight:300;line-height:1.5}.appearance_page_demo-importer .demo-installer .wp-filter{padding:0 20px}.appearance_page_demo-importer .demo-installer .wp-filter .filter-links li>a:focus{box-shadow:none}.appearance_page_demo-importer .demo-installer .welcome-panel{margin:0;background:#e9eff3;border:10px solid #fff;box-shadow:none}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content{width:45%;float:left}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content .welcome-panel-column{width:100%}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content .welcome-panel-column ul{padding-left:10px}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video{float:right;width:50%}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video .welcome-panel-iframe-video-inner{position:relative;height:0;margin:0 10px 23px;padding-bottom:56.25%;border:5px solid #dadada}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video .welcome-panel-iframe-video-inner iframe{position:absolute;top:0;left:0;width:100%;height:100%}.appearance_page_demo-importer .demo-installer .premium-ribbon{overflow:hidden}.appearance_page_demo-importer .demo-installer .premium-ribbon
|
1 |
+
.appearance_page_demo-importer .demo-importer h1{margin-bottom:15px}.appearance_page_demo-importer .demo-importer .search-form{display:inline}.appearance_page_demo-importer .demo-importer .wp-filter-search{position:relative;top:-2px;left:20px;margin:0;width:280px;font-size:16px;font-weight:300;line-height:1.5}.appearance_page_demo-importer .demo-installer .wp-filter{padding:0 20px}.appearance_page_demo-importer .demo-installer .wp-filter .filter-links li>a:focus{box-shadow:none}.appearance_page_demo-importer .demo-installer .welcome-panel{margin:0;background:#e9eff3;border:10px solid #fff;box-shadow:none}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content{width:45%;float:left}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content .welcome-panel-column{width:100%}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content .welcome-panel-column ul{padding-left:10px}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video{float:right;width:50%}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video .welcome-panel-iframe-video-inner{position:relative;height:0;margin:0 10px 23px;padding-bottom:56.25%;border:5px solid #dadada}.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video .welcome-panel-iframe-video-inner iframe{position:absolute;top:0;left:0;width:100%;height:100%}.appearance_page_demo-importer .demo-installer .premium-ribbon{position:absolute;right:0;top:0;width:100%;height:100%;overflow:hidden}.appearance_page_demo-importer .demo-installer .premium-ribbon span{color:#fff;display:block;text-transform:uppercase;border:1px solid #069c64;background-color:#24b37e;box-shadow:0 0 4px rgba(255,255,255,.5) inset,0 1px 3px rgba(0,0,0,.3);font-size:15px;font-weight:700;text-align:center;padding:5px 30px;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);position:absolute;top:6px;right:-30px}table.plugins-list-table{margin-bottom:1em}table.plugins-list-table .plugin-status{text-align:center}table.plugins-list-table .plugin-status span{width:20px;height:20px;visibility:hidden;vertical-align:top;display:inline-block}table.plugins-list-table .plugin-status span::before{visibility:visible;display:inline-block;font:normal 20px/1 dashicons;-webkit-transition:color .1s ease-in 0;transition:color .1s ease-in 0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}table.plugins-list-table .plugin-status .active::before{color:#7ad03a;content:'\f147'}table.plugins-list-table .plugin-status .activate-now::before,table.plugins-list-table .plugin-status .install-now::before{color:#a00;content:'\f153'}table.plugins-list-table .plugin-status .activate-now::before{content:'\f534'}table.plugins-list-table .plugin-status .updating-message::before{color:#f56e28;content:'\f463';-webkit-animation:rotation 2s infinite linear;animation:rotation 2s infinite linear}table.plugins-list-table .plugin-actions .plugins-activate,table.plugins-list-table .plugin-actions .plugins-install{float:right;-webkit-transform:none;-ms-transform:none;transform:none}table.plugins-list-table .plugin-actions .plugins-install{margin-left:8px}.tips{cursor:help;text-decoration:none}img.tips{padding:5px 0 0}#tiptip_holder{display:none;z-index:8675309;position:absolute;top:0;left:0}#tiptip_holder.tip_top{padding-bottom:5px}#tiptip_holder.tip_top #tiptip_arrow_inner{margin-top:-7px;margin-left:-6px;border-top-color:#333}#tiptip_holder.tip_bottom{padding-top:5px}#tiptip_holder.tip_bottom #tiptip_arrow_inner{margin-top:-5px;margin-left:-6px;border-bottom-color:#333}#tiptip_holder.tip_right{padding-left:5px}#tiptip_holder.tip_right #tiptip_arrow_inner{margin-top:-6px;margin-left:-5px;border-right-color:#333}#tiptip_holder.tip_left{padding-right:5px}#tiptip_holder.tip_left #tiptip_arrow_inner{margin-top:-6px;margin-left:-7px;border-left-color:#333}#tiptip_content{color:#fff;font-size:.8em;max-width:150px;background:#333;text-align:center;border-radius:3px;padding:.618em 1em;box-shadow:0 1px 3px rgba(0,0,0,.2)}#tiptip_content code{padding:1px;background:#888}#tiptip_arrow,#tiptip_arrow_inner{position:absolute;border-color:transparent;border-style:solid;border-width:6px;height:0;width:0}@media screen and (max-width:500px){.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-content,.appearance_page_demo-importer .demo-installer .welcome-panel .welcome-panel-iframe-video{float:none;width:100%}}
|
assets/css/demo-importer.scss
CHANGED
@@ -79,21 +79,28 @@
|
|
79 |
}
|
80 |
|
81 |
.premium-ribbon {
|
|
|
|
|
|
|
|
|
|
|
82 |
overflow: hidden;
|
83 |
|
84 |
-
|
85 |
-
|
|
|
|
|
86 |
border: 1px solid #069c64;
|
|
|
87 |
box-shadow: 0 0 4px rgba( 255, 255, 255, 0.5 ) inset, 0 1px 3px rgba( 0, 0, 0, 0.3 );
|
88 |
-
|
89 |
-
content: 'PRO';
|
90 |
-
font-size: 16px;
|
91 |
font-weight: 700;
|
|
|
92 |
padding: 5px 30px;
|
|
|
93 |
position: absolute;
|
94 |
-
right: -30px;
|
95 |
top: 6px;
|
96 |
-
|
97 |
}
|
98 |
}
|
99 |
}
|
@@ -102,40 +109,66 @@
|
|
102 |
table.plugins-list-table {
|
103 |
margin-bottom: 1em;
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
background: #fcfcfc;
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
th {
|
112 |
-
padding: 9px;
|
113 |
-
font-weight: 600;
|
114 |
-
}
|
115 |
|
116 |
-
|
117 |
-
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
122 |
}
|
123 |
|
124 |
-
|
125 |
-
|
|
|
|
|
|
|
|
|
126 |
}
|
127 |
|
128 |
-
|
129 |
-
|
|
|
|
|
130 |
}
|
131 |
|
132 |
-
|
133 |
-
|
|
|
|
|
|
|
|
|
134 |
}
|
135 |
}
|
136 |
|
137 |
-
.plugin-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
}
|
141 |
|
79 |
}
|
80 |
|
81 |
.premium-ribbon {
|
82 |
+
position: absolute;
|
83 |
+
right: 0;
|
84 |
+
top: 0;
|
85 |
+
width: 100%;
|
86 |
+
height: 100%;
|
87 |
overflow: hidden;
|
88 |
|
89 |
+
span {
|
90 |
+
color: #fff;
|
91 |
+
display: block;
|
92 |
+
text-transform: uppercase;
|
93 |
border: 1px solid #069c64;
|
94 |
+
background-color: #24b37e;
|
95 |
box-shadow: 0 0 4px rgba( 255, 255, 255, 0.5 ) inset, 0 1px 3px rgba( 0, 0, 0, 0.3 );
|
96 |
+
font-size: 15px;
|
|
|
|
|
97 |
font-weight: 700;
|
98 |
+
text-align: center;
|
99 |
padding: 5px 30px;
|
100 |
+
transform: rotate(45deg);
|
101 |
position: absolute;
|
|
|
102 |
top: 6px;
|
103 |
+
right: -30px;
|
104 |
}
|
105 |
}
|
106 |
}
|
109 |
table.plugins-list-table {
|
110 |
margin-bottom: 1em;
|
111 |
|
112 |
+
.plugin-status {
|
113 |
+
text-align: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
+
span {
|
116 |
+
width: 20px;
|
117 |
+
height: 20px;
|
118 |
+
visibility: hidden;
|
119 |
+
vertical-align: top;
|
120 |
+
display: inline-block;
|
121 |
+
|
122 |
+
&::before {
|
123 |
+
visibility: visible;
|
124 |
+
display: inline-block;
|
125 |
+
font: normal 20px/1 'dashicons';
|
126 |
+
transition: color 0.1s ease-in 0;
|
127 |
+
-webkit-font-smoothing: antialiased;
|
128 |
+
-moz-osx-font-smoothing: grayscale;
|
129 |
+
}
|
130 |
+
}
|
131 |
|
132 |
+
.active {
|
133 |
+
&::before {
|
134 |
+
color: #7ad03a;
|
135 |
+
content: '\f147';
|
136 |
+
}
|
137 |
}
|
138 |
|
139 |
+
.install-now,
|
140 |
+
.activate-now {
|
141 |
+
&::before {
|
142 |
+
color: #a00;
|
143 |
+
content: '\f153';
|
144 |
+
}
|
145 |
}
|
146 |
|
147 |
+
.activate-now {
|
148 |
+
&::before {
|
149 |
+
content: '\f534';
|
150 |
+
}
|
151 |
}
|
152 |
|
153 |
+
.updating-message {
|
154 |
+
&::before {
|
155 |
+
color: #f56e28;
|
156 |
+
content: '\f463';
|
157 |
+
animation: rotation 2s infinite linear;
|
158 |
+
}
|
159 |
}
|
160 |
}
|
161 |
|
162 |
+
.plugin-actions {
|
163 |
+
.plugins-install,
|
164 |
+
.plugins-activate {
|
165 |
+
float: right;
|
166 |
+
transform: none;
|
167 |
+
}
|
168 |
+
|
169 |
+
.plugins-install {
|
170 |
+
margin-left: 8px;
|
171 |
+
}
|
172 |
}
|
173 |
}
|
174 |
|
assets/images/flash/flash-construction-v2.jpg
DELETED
Binary file
|
assets/images/flash/flash-construction.jpg
DELETED
Binary file
|
assets/images/flash/flash-default.jpg
DELETED
Binary file
|
assets/images/flash/flash-food-v2.jpg
DELETED
Binary file
|
assets/images/flash/flash-food.jpg
DELETED
Binary file
|
assets/images/flash/flash-onepage.jpg
DELETED
Binary file
|
assets/images/flash/flash-pro-agency.jpg
DELETED
Binary file
|
assets/images/flash/flash-pro-band.jpg
DELETED
Binary file
|
assets/images/flash/flash-pro-church.jpg
DELETED
Binary file
|
assets/images/flash/flash-pro-default.jpg
DELETED
Binary file
|
assets/images/flash/flash-pro-education.jpg
DELETED
Binary file
|
assets/images/flash/flash-pro-gym.jpg
DELETED
Binary file
|
assets/images/flash/flash-pro-health.jpg
DELETED
Binary file
|
assets/images/flash/flash-pro-store.jpg
DELETED
Binary file
|
assets/images/flash/flash-pro-wedding.jpg
DELETED
Binary file
|
assets/js/admin/demo-importer.js
CHANGED
@@ -272,11 +272,6 @@ demos.view.Demo = wp.Backbone.View.extend({
|
|
272 |
if ( this.model.get( 'displayAuthor' ) ) {
|
273 |
this.$el.addClass( 'display-author' );
|
274 |
}
|
275 |
-
|
276 |
-
// Append ribbon class
|
277 |
-
if ( this.model.get( 'actions' ).pro_link ) {
|
278 |
-
this.$el.html( this.html( data ) ).addClass( 'premium-ribbon' );
|
279 |
-
}
|
280 |
},
|
281 |
|
282 |
// Adds a class to the currently active demo
|
@@ -376,7 +371,8 @@ demos.view.Details = wp.Backbone.View.extend({
|
|
376 |
'click .delete-demo': 'deleteDemo',
|
377 |
'click .left': 'previousDemo',
|
378 |
'click .right': 'nextDemo',
|
379 |
-
'click .demo-import': 'importDemo'
|
|
|
380 |
},
|
381 |
|
382 |
// The HTML template for the theme overlay
|
@@ -530,6 +526,142 @@ demos.view.Details = wp.Backbone.View.extend({
|
|
530 |
} );
|
531 |
},
|
532 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
533 |
deleteDemo: function( event ) {
|
534 |
var _this = this,
|
535 |
_collection = this.model.collection,
|
@@ -1225,6 +1357,30 @@ $( document ).ready( function() {
|
|
1225 |
|
1226 |
frame.attr( 'src', frame.data( 'src' ) );
|
1227 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1228 |
});
|
1229 |
|
1230 |
})( jQuery );
|
272 |
if ( this.model.get( 'displayAuthor' ) ) {
|
273 |
this.$el.addClass( 'display-author' );
|
274 |
}
|
|
|
|
|
|
|
|
|
|
|
275 |
},
|
276 |
|
277 |
// Adds a class to the currently active demo
|
371 |
'click .delete-demo': 'deleteDemo',
|
372 |
'click .left': 'previousDemo',
|
373 |
'click .right': 'nextDemo',
|
374 |
+
'click .demo-import': 'importDemo',
|
375 |
+
'click .plugins-install': 'installPlugin'
|
376 |
},
|
377 |
|
378 |
// The HTML template for the theme overlay
|
526 |
} );
|
527 |
},
|
528 |
|
529 |
+
installPlugin: function( event ) {
|
530 |
+
var itemsSelected = $( document ).find( 'input[name="required[]"], input[name="checked[]"]:checked' ),
|
531 |
+
$target = $( event.target ),
|
532 |
+
success = 0,
|
533 |
+
error = 0,
|
534 |
+
errorMessages = [];
|
535 |
+
|
536 |
+
event.preventDefault();
|
537 |
+
|
538 |
+
if ( $target.hasClass( 'disabled' ) || $target.hasClass( 'updating-message' ) ) {
|
539 |
+
return;
|
540 |
+
}
|
541 |
+
|
542 |
+
// Remove previous error messages, if any.
|
543 |
+
$( '.theme-info .update-message' ).remove();
|
544 |
+
|
545 |
+
// Bail if there were no items selected.
|
546 |
+
if ( ! itemsSelected.length ) {
|
547 |
+
event.preventDefault();
|
548 |
+
$( '.theme-about' ).animate( { scrollTop: 0 } );
|
549 |
+
$( '.theme-info .plugins-info' ).after( wp.updates.adminNotice( {
|
550 |
+
id: 'no-items-selected',
|
551 |
+
className: 'update-message notice-error notice-alt',
|
552 |
+
message: wp.updates.l10n.noItemsSelected
|
553 |
+
} ) );
|
554 |
+
}
|
555 |
+
|
556 |
+
wp.updates.maybeRequestFilesystemCredentials( event );
|
557 |
+
|
558 |
+
// Confirmation dialog for installing bulk plugins.
|
559 |
+
if ( ! window.confirm( wp.demos.data.settings.confirmInstall ) ) {
|
560 |
+
return;
|
561 |
+
}
|
562 |
+
|
563 |
+
// Un-check the bulk checkboxes.
|
564 |
+
$( document ).find( '.manage-column [type="checkbox"]' ).prop( 'checked', false );
|
565 |
+
|
566 |
+
$( document ).trigger( 'wp-plugin-bulk-install', itemsSelected );
|
567 |
+
|
568 |
+
// Find all the checkboxes which have been checked.
|
569 |
+
itemsSelected.each( function( index, element ) {
|
570 |
+
var $checkbox = $( element ),
|
571 |
+
$itemRow = $checkbox.parents( 'tr' );
|
572 |
+
|
573 |
+
// Only add install-able items to the update queue.
|
574 |
+
if ( ! $itemRow.hasClass( 'install' ) || $itemRow.find( 'notice-error' ).length ) {
|
575 |
+
|
576 |
+
// Un-check the box.
|
577 |
+
$checkbox.filter( ':not(:disabled)' ).prop( 'checked', false );
|
578 |
+
return;
|
579 |
+
} else {
|
580 |
+
$target
|
581 |
+
.addClass( 'updating-message' )
|
582 |
+
.text( wp.updates.l10n.installing );
|
583 |
+
|
584 |
+
wp.a11y.speak( wp.updates.l10n.installingMsg, 'polite' );
|
585 |
+
}
|
586 |
+
|
587 |
+
// Add it to the queue.
|
588 |
+
wp.updates.queue.push( {
|
589 |
+
action: 'install-plugin',
|
590 |
+
data: {
|
591 |
+
slug: $itemRow.data( 'slug' )
|
592 |
+
}
|
593 |
+
} );
|
594 |
+
} );
|
595 |
+
|
596 |
+
// Display bulk notification for install of plugin.
|
597 |
+
$( document ).on( 'wp-plugin-bulk-install-success wp-plugin-bulk-install-error', function( event, response ) {
|
598 |
+
var $itemRow = $( '[data-slug="' + response.slug + '"]' ),
|
599 |
+
$bulkActionNotice, itemName;
|
600 |
+
|
601 |
+
if ( 'wp-' + response.install + '-bulk-install-success' === event.type ) {
|
602 |
+
success++;
|
603 |
+
} else {
|
604 |
+
itemName = response.pluginName ? response.pluginName : $itemRow.find( '.plugin-name' ).text();
|
605 |
+
|
606 |
+
error++;
|
607 |
+
errorMessages.push( itemName + ': ' + response.errorMessage );
|
608 |
+
}
|
609 |
+
|
610 |
+
$itemRow.find( 'input[name="checked[]"]:checked' ).filter( ':not(:disabled)' ).prop( 'checked', false );
|
611 |
+
|
612 |
+
wp.updates.adminNotice = wp.template( 'wp-bulk-installs-admin-notice' );
|
613 |
+
|
614 |
+
// Remove previous error messages, if any.
|
615 |
+
$( '.theme-info .bulk-action-notice' ).remove();
|
616 |
+
|
617 |
+
$( '.theme-info .plugins-info' ).after( wp.updates.adminNotice( {
|
618 |
+
id: 'bulk-action-notice',
|
619 |
+
className: 'bulk-action-notice notice-alt',
|
620 |
+
successes: success,
|
621 |
+
errors: error,
|
622 |
+
errorMessages: errorMessages,
|
623 |
+
type: response.install
|
624 |
+
} ) );
|
625 |
+
|
626 |
+
$bulkActionNotice = $( '#bulk-action-notice' ).on( 'click', 'button', function() {
|
627 |
+
// $( this ) is the clicked button, no need to get it again.
|
628 |
+
$( this )
|
629 |
+
.toggleClass( 'bulk-action-errors-collapsed' )
|
630 |
+
.attr( 'aria-expanded', ! $( this ).hasClass( 'bulk-action-errors-collapsed' ) );
|
631 |
+
// Show the errors list.
|
632 |
+
$bulkActionNotice.find( '.bulk-action-errors' ).toggleClass( 'hidden' );
|
633 |
+
} );
|
634 |
+
|
635 |
+
if ( ! wp.updates.queue.length ) {
|
636 |
+
if ( error > 0 ) {
|
637 |
+
$target
|
638 |
+
.removeClass( 'updating-message' ).addClass( 'disabled' )
|
639 |
+
.text( wp.updates.l10n.installFailedShort );
|
640 |
+
|
641 |
+
wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' );
|
642 |
+
|
643 |
+
$( '.theme-about' ).animate( { scrollTop: 0 } );
|
644 |
+
} else {
|
645 |
+
$target
|
646 |
+
.removeClass( 'updating-message' ).addClass( 'disabled' )
|
647 |
+
.text( wp.updates.l10n.pluginInstalled );
|
648 |
+
|
649 |
+
wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' );
|
650 |
+
|
651 |
+
$( '.plugins-activate' ).removeAttr( 'disabled' );
|
652 |
+
}
|
653 |
+
}
|
654 |
+
} );
|
655 |
+
|
656 |
+
// Reset admin notice template after #bulk-action-notice was added.
|
657 |
+
$( document ).on( 'wp-updates-notice-added', function() {
|
658 |
+
wp.updates.adminNotice = wp.template( 'wp-updates-admin-notice' );
|
659 |
+
} );
|
660 |
+
|
661 |
+
// Check the queue, now that the event handlers have been added.
|
662 |
+
wp.updates.queueChecker();
|
663 |
+
},
|
664 |
+
|
665 |
deleteDemo: function( event ) {
|
666 |
var _this = this,
|
667 |
_collection = this.model.collection,
|
1357 |
|
1358 |
frame.attr( 'src', frame.data( 'src' ) );
|
1359 |
});
|
1360 |
+
|
1361 |
+
// Make disabled checkbox always checked through data-checked.
|
1362 |
+
$( document.body ).on( 'click', 'thead .check-column :checkbox', function( event ) {
|
1363 |
+
var $this = $( this ),
|
1364 |
+
$table = $this.closest( 'table' ),
|
1365 |
+
controlChecked = $this.prop( 'checked' ),
|
1366 |
+
toggle = event.shiftKey || $this.data( 'wp-toggle' );
|
1367 |
+
|
1368 |
+
$table.children( 'tbody' ).filter( ':visible' )
|
1369 |
+
.children().children( '.check-column' ).find( ':checkbox' )
|
1370 |
+
.prop( 'checked', function() {
|
1371 |
+
if ( $( this ).is( ':hidden,:disabled' ) ) {
|
1372 |
+
return $( this ).data( 'checked' ) ? true : false;
|
1373 |
+
}
|
1374 |
+
|
1375 |
+
if ( toggle ) {
|
1376 |
+
return ! $( this ).prop( 'checked' );
|
1377 |
+
} else if ( controlChecked ) {
|
1378 |
+
return true;
|
1379 |
+
}
|
1380 |
+
|
1381 |
+
return false;
|
1382 |
+
});
|
1383 |
+
});
|
1384 |
});
|
1385 |
|
1386 |
})( jQuery );
|
assets/js/admin/demo-importer.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
window.wp=window.wp||{},function(e){var t,i;(t=wp.demos=wp.demos||{}).data=demoImporterLocalizeScript,i=t.data.l10n,t.isPreview=!!t.data.settings.isPreview,t.isInstall=!!t.data.settings.isInstall,_.extend(t,{model:{},view:{},routes:{},router:{},template:wp.template}),t.Model=Backbone.Model.extend({initialize:function(){var e;-1!==_.indexOf(t.data.installedDemos,this.get("slug"))&&this.set({installed:!0}),this.set({id:this.get("slug")||this.get("id")}),this.has("sections")&&(e=this.get("sections").description,this.set({description:e}))}}),t.view.Appearance=wp.Backbone.View.extend({el:"#wpbody-content .wrap .theme-browser",window:e(window),page:0,initialize:function(e){_.bindAll(this,"scroller"),this.SearchView=e.SearchView?e.SearchView:t.view.Search,this.window.bind("scroll",_.throttle(this.scroller,300))},render:function(){this.view=new t.view.Demos({collection:this.collection,parent:this}),this.search(),this.view.render(),this.$el.empty().append(this.view.el).addClass("rendered")},searchContainer:e(".search-form"),search:function(){var o,s=this;1!==t.data.demos.length&&((o=new this.SearchView({collection:s.collection,parent:this})).render(),this.searchContainer.append(e.parseHTML('<label class="screen-reader-text" for="wp-filter-search-input">'+i.search+"</label>")).append(o.el))},scroller:function(){var e,t,i=this;e=this.window.scrollTop()+i.window.height(),t=i.$el.offset().top+i.$el.outerHeight(!1)-i.window.height(),e>(t=Math.round(.9*t))&&this.trigger("demo:scroll")},initTipTip:function(){e("#tiptip_holder").removeAttr("style"),e("#tiptip_arrow").removeAttr("style"),e(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:50})}}),t.Collection=Backbone.Collection.extend({model:t.Model,terms:"",doSearch:function(i){this.terms!==i&&(this.terms=i,this.terms.length>0&&this.search(this.terms),""===this.terms&&(this.reset(t.data.demos),e("body").removeClass("no-results")),this.trigger("demos:update"))},search:function(i){var o,s,n,r,a,l;this.reset(t.data.demos,{silent:!0}),i=i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),i=i.replace(/ /g,")(?=.*"),o=new RegExp("^(?=.*"+i+").+","i"),0===(s=this.filter(function(e){return r=e.get("name").replace(/(<([^>]+)>)/gi,""),a=e.get("description").replace(/(<([^>]+)>)/gi,""),l=e.get("author").replace(/(<([^>]+)>)/gi,""),n=_.union([r,e.get("id"),a,l,e.get("tags")]),o.test(e.get("author"))&&i.length>2&&e.set("displayAuthor",!0),o.test(n)})).length?this.trigger("query:empty"):e("body").removeClass("no-results"),this.reset(s)},paginate:function(e){var t=this;return e=e||0,t=_(t.rest(20*e)),t=_(t.first(20))}}),t.view.Demo=wp.Backbone.View.extend({className:"theme",state:"grid",html:t.template(t.isPreview?"demo-preview":"demo"),events:{click:"expand",keydown:"expand",touchend:"expand",keyup:"addFocus",touchmove:"preventExpand","click .demo-import":"importDemo"},touchDrag:!1,initialize:function(){this.model.on("change",this.render,this)},render:function(){var e=this.model.toJSON();this.$el.html(this.html(e)).attr({tabindex:0,"aria-describedby":e.id+"-action "+e.id+"-name","data-slug":e.id}),this.activeDemo(),this.model.get("displayAuthor")&&this.$el.addClass("display-author"),this.model.get("actions").pro_link&&this.$el.html(this.html(e)).addClass("premium-ribbon")},activeDemo:function(){this.model.get("active")&&this.$el.addClass("active")},addFocus:function(){var t=e(":focus").hasClass("theme")?e(":focus"):e(":focus").parents(".theme");e(".theme.focus").removeClass("focus"),t.addClass("focus")},expand:function(i){var o=this;if(!t.isPreview&&("keydown"!==(i=i||window.event).type||13===i.which||32===i.which))return!0===this.touchDrag?this.touchDrag=!1:void(e(i.target).is(".theme-actions a")||e(i.target).is(".theme-actions a, .update-message, .button-link, .notice-dismiss")||(t.focusedDemo=this.$el,this.trigger("demo:expand",o.model.cid)))},preventExpand:function(){this.touchDrag=!0},importDemo:function(t){var i=this,o=e(t.target);t.preventDefault(),o.hasClass("disabled")||window.confirm(wp.demos.data.settings.confirmImport)&&(e(document).on("wp-demo-import-success",function(e,t){i.model.get("id")===t.slug&&i.model.set({imported:!0})}),wp.updates.importDemo({slug:o.data("slug")}))}}),t.view.Details=wp.Backbone.View.extend({className:"theme-overlay",events:{click:"collapse","click .delete-demo":"deleteDemo","click .left":"previousDemo","click .right":"nextDemo","click .demo-import":"importDemo"},html:t.template("demo-single"),render:function(){var e=this.model.toJSON();this.$el.html(this.html(e)),this.activeDemo(),this.navigation(),this.screenshotCheck(this.$el),this.containFocus(this.$el)},activeDemo:function(){this.$el.toggleClass("active",this.model.get("active"))},containFocus:function(t){_.delay(function(){e(".theme-wrap a.button-primary:visible").focus()},100),t.on("keydown.wp-themes",function(e){var i=t.find(".theme-header button:not(.disabled)").first(),o=t.find(".theme-actions a:visible").last();9===e.which&&(i[0]===e.target&&e.shiftKey?(o.focus(),e.preventDefault()):o[0]!==e.target||e.shiftKey||(i.focus(),e.preventDefault()))})},collapse:function(i){var o,s=this;i=i||window.event,1!==t.data.demos.length&&(e(i.target).is(".theme-backdrop")||e(i.target).is(".close")||27===i.keyCode)&&(e("body").addClass("closing-overlay"),this.$el.fadeOut(130,function(){e("body").removeClass("closing-overlay"),s.closeOverlay(),o=document.body.scrollTop,t.router.navigate(t.router.baseUrl("")),document.body.scrollTop=o,t.focusedDemo&&t.focusedDemo.focus()}))},navigation:function(){this.model.cid===this.model.collection.at(0).cid&&this.$el.find(".left").addClass("disabled").prop("disabled",!0),this.model.cid===this.model.collection.at(this.model.collection.length-1).cid&&this.$el.find(".right").addClass("disabled").prop("disabled",!0)},closeOverlay:function(){e("body").removeClass("modal-open"),this.remove(),this.unbind(),this.trigger("demo:collapse")},importDemo:function(t){var i=this,o=e(t.target);t.preventDefault(),o.hasClass("disabled")||window.confirm(wp.demos.data.settings.confirmImport)&&(e(document).on("wp-demo-import-success",function(e,t){i.model.get("id")===t.slug&&i.model.set({imported:!0})}),e(document).on("wp-updates-queue-job",function(e,t){"import-demo"===t.action&&wp.updates.importDemo(t.data)}),wp.updates.importDemo({slug:o.data("slug")}))},deleteDemo:function(i){var o=this,s=this.model.collection,n=t;i.preventDefault(),window.confirm(wp.demos.data.settings.confirmDelete)&&(wp.updates.maybeRequestFilesystemCredentials(i),e(document).one("wp-demo-delete-success",function(t,i){o.$el.find(".close").trigger("click"),e('[data-slug="'+i.slug+'"').css({backgroundColor:"#faafaa"}).fadeOut(350,function(){e(this).remove(),n.data.demos=_.without(n.data.demos,_.findWhere(n.data.demos,{id:i.slug})),e(".wp-filter-search").val(""),s.doSearch(""),s.remove(o.model),s.trigger("demos:update")})}),wp.updates.deleteDemo({slug:this.model.get("id")}))},nextDemo:function(){var e=this;return e.trigger("demo:next",e.model.cid),!1},previousDemo:function(){var e=this;return e.trigger("demo:previous",e.model.cid),!1},screenshotCheck:function(e){var t,i;t=e.find(".screenshot img"),(i=new Image).src=t.attr("src"),i.width&&i.width<=300&&e.addClass("small-screenshot")}}),t.view.Demos=wp.Backbone.View.extend({className:"themes wp-clearfix",$overlay:e("div.theme-overlay"),index:0,count:e(".wrap .demo-count"),liveDemoCount:0,initialize:function(t){var i=this;this.parent=t.parent,i.importedDemo(),this.setView("grid"),this.listenTo(i.collection,"demos:update",function(){i.parent.page=0,i.importedDemo(),i.render(this),i.parent.initTipTip()}),this.listenTo(i.collection,"query:success",function(e){_.isNumber(e)?(i.count.text(e),i.announceSearchResults(e)):(i.count.text(i.collection.length),i.announceSearchResults(i.collection.length))}),this.listenTo(i.collection,"query:empty",function(){e("body").addClass("no-results")}),this.listenTo(this.parent,"demo:scroll",function(){i.renderDemos(i.parent.page)}),this.listenTo(this.parent,"demo:close",function(){i.overlay&&i.overlay.closeOverlay()}),e("body").on("keyup",function(t){i.overlay&&(e("#request-filesystem-credentials-dialog").is(":visible")||(39===t.keyCode&&i.overlay.nextDemo(),37===t.keyCode&&i.overlay.previousDemo(),27===t.keyCode&&i.overlay.collapse(t)))})},render:function(){this.$el.empty(),t.isPreview||1!==t.data.demos.length||(this.singleDemo=new t.view.Details({model:this.collection.models[0]}),this.singleDemo.render(),this.$el.addClass("single-theme"),this.$el.append(this.singleDemo.el)),this.options.collection.size()>0&&this.renderDemos(this.parent.page),this.liveDemoCount=this.collection.count?this.collection.count:this.collection.length,this.count.text(this.liveDemoCount)},renderDemos:function(e){var o=this;o.instance=o.collection.paginate(e),0!==o.instance.size()?(o.instance.each(function(e){o.demo=new t.view.Demo({model:e,parent:o}),o.demo.render(),o.$el.append(o.demo.el),o.listenTo(o.demo,"demo:expand",o.expand,o)}),!t.isPreview&&t.isInstall&&t.data.settings.canInstall&&this.$el.append('<div class="theme add-new-theme"><a href="'+t.data.settings.installURI+'"><div class="theme-screenshot"><span></span></div><h2 class="theme-name">'+i.addNew+"</h2></a></div>"),this.parent.page++):this.parent.trigger("demo:end")},importedDemo:function(){var e,t=this;(e=t.collection.findWhere({active:!0}))&&(t.collection.remove(e),t.collection.add(e,{at:0}))},setView:function(e){return e},expand:function(i){var o,s,n=this;this.model=n.collection.get(i),t.router.navigate(t.router.baseUrl(t.router.demoPath+this.model.id)),this.setView("detail"),e("body").addClass("modal-open"),this.overlay=new t.view.Details({model:n.model}),this.overlay.render(),this.model.get("hasUpdate")&&(o=e('[data-slug="'+this.model.id+'"]'),s=e(this.overlay.el),o.find(".updating-message").length?(s.find(".notice-warning h3").remove(),s.find(".notice-warning").removeClass("notice-large").addClass("updating-message").find("p").text(wp.updates.l10n.updating)):o.find(".notice-error").length&&s.find(".notice-warning").remove()),this.$overlay.html(this.overlay.el),this.listenTo(this.overlay,"demo:next",function(){n.next([n.model.cid])}).listenTo(this.overlay,"demo:previous",function(){n.previous([n.model.cid])})},next:function(e){var t,i,o=this;t=o.collection.get(e[0]),(i=o.collection.at(o.collection.indexOf(t)+1))!==undefined&&(this.overlay.closeOverlay(),o.demo.trigger("demo:expand",i.cid))},previous:function(e){var t,i,o=this;t=o.collection.get(e[0]),(i=o.collection.at(o.collection.indexOf(t)-1))!==undefined&&(this.overlay.closeOverlay(),o.demo.trigger("demo:expand",i.cid))},announceSearchResults:function(e){0===e?wp.a11y.speak(i.noDemosFound):wp.a11y.speak(i.demosFound.replace("%d",e))}}),t.view.Search=wp.Backbone.View.extend({tagName:"input",className:"wp-filter-search",id:"wp-filter-search-input",searching:!1,attributes:{placeholder:i.searchPlaceholder,type:"search","aria-describedby":"live-search-desc"},events:{input:"search",keyup:"search",blur:"pushState"},initialize:function(e){this.parent=e.parent,this.listenTo(this.parent,"demo:close",function(){this.searching=!1})},search:function(e){"keyup"===e.type&&27===e.which&&(e.target.value=""),this.doSearch(e)},doSearch:_.debounce(function(e){var i={};this.collection.doSearch(e.target.value),this.searching&&13!==e.which?i.replace=!0:this.searching=!0,e.target.value?t.router.navigate(t.router.baseUrl(t.router.searchPath+e.target.value),i):t.router.navigate(t.router.baseUrl(""))},500),pushState:function(e){var i=t.router.baseUrl("");e.target.value&&(i=t.router.baseUrl(t.router.searchPath+e.target.value)),this.searching=!1,t.router.navigate(i)}}),t.Router=Backbone.Router.extend({routes:{"themes.php?page=demo-importer&demo=:slug":"demo","themes.php?page=demo-importer&search=:query":"search","themes.php?page=demo-importer&s=:query":"search","themes.php?page=demo-importer":"demos","":"demos"},baseUrl:function(e){return"themes.php?page=demo-importer"+e},demoPath:"&demo=",searchPath:"&search=",search:function(t){e(".wp-filter-search").val(t)},demos:function(){e(".wp-filter-search").val("")},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),t.Run={init:function(){this.demos=new t.Collection(t.data.demos),this.view=new t.view.Appearance({collection:this.demos}),this.render()},render:function(){this.view.render(),this.view.initTipTip(),this.routes(),Backbone.history.start({root:t.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var i=this;t.router=new t.Router,t.router.on("route:demo",function(e){i.view.view.expand(e)}),t.router.on("route:demos",function(){i.demos.doSearch(""),i.view.trigger("demo:close")}),t.router.on("route:search",function(){e(".wp-filter-search").trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},t.view.Installer=t.view.Appearance.extend({el:"#wpbody-content .wrap",render:function(){this.search(),this.uploader(),this.view=new t.view.Demos({collection:this.collection,parent:this}),this.$el.find(".themes").remove(),this.view.render(),this.$el.find(".theme-browser").append(this.view.el).addClass("rendered")},uploader:function(){var t=e(".upload-view-toggle"),i=e(document.body);t.on("click",function(){i.toggleClass("show-upload-view"),t.attr("aria-expanded",i.hasClass("show-upload-view"))})},clearSearch:function(){e("#wp-filter-search-input").val("")}}),t.InstallerRouter=Backbone.Router.extend({routes:{"themes.php?page=demo-importer&browse=uploads&demo=:slug":"demo","themes.php?page=demo-importer&browse=:sort&search=:query":"search","themes.php?page=demo-importer&browse=:sort&s=:query":"search","themes.php?page=demo-importer&browse=welcome":"sort","themes.php?page=demo-importer&browse=:sort":"demos","themes.php?page=demo-importer":"sort"},browse:function(){return t.isPreview?"preview":"uploads"},baseUrl:function(e){return"themes.php?page=demo-importer&browse="+this.browse()+e},demoPath:"&demo=",searchPath:"&search=",search:function(t,i){e(".wp-filter-search").val(i)},demos:function(){e(".wp-filter-search").val("")},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),t.RunInstaller={init:function(){this.demos=new t.Collection(t.data.demos),this.view=new t.view.Installer({collection:this.demos}),this.render()},render:function(){this.view.render(),this.view.initTipTip(),this.routes(),Backbone.history.start({root:t.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var i=this;t.router=new t.InstallerRouter,t.router.on("route:demo",function(e){i.view.view.expand(e)}),t.router.on("route:demos",function(){i.demos.doSearch(""),i.view.trigger("demo:close")}),t.router.on("route:sort",function(t){t&&"welcome"!==t||e(".wp-filter-search").hide()}),t.router.on("route:search",function(){e(".wp-filter-search").focus().trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},e(document).ready(function(){t.isInstall?t.RunInstaller.init():t.Run.init(),e(".themegrill-demo-importer-rating-link").on("click",function(){var i=e(this);e.post(t.data.settings.ajaxUrl,{action:"footer-text-rated"}),i.parent().text(i.data("rated"))}),e(".themegrill-reset-wordpress").on("click",function(){return window.confirm(t.data.settings.confirmReset)}),e("#contextual-help-link").on("click",function(){var t=e("#tab-panel-themegrill_demo_importer_guided_tour_tab iframe");t.attr("src",t.data("src"))})})}(jQuery);
|
1 |
+
window.wp=window.wp||{},function(e){var t,i;(t=wp.demos=wp.demos||{}).data=demoImporterLocalizeScript,i=t.data.l10n,t.isPreview=!!t.data.settings.isPreview,t.isInstall=!!t.data.settings.isInstall,_.extend(t,{model:{},view:{},routes:{},router:{},template:wp.template}),t.Model=Backbone.Model.extend({initialize:function(){var e;-1!==_.indexOf(t.data.installedDemos,this.get("slug"))&&this.set({installed:!0}),this.set({id:this.get("slug")||this.get("id")}),this.has("sections")&&(e=this.get("sections").description,this.set({description:e}))}}),t.view.Appearance=wp.Backbone.View.extend({el:"#wpbody-content .wrap .theme-browser",window:e(window),page:0,initialize:function(e){_.bindAll(this,"scroller"),this.SearchView=e.SearchView?e.SearchView:t.view.Search,this.window.bind("scroll",_.throttle(this.scroller,300))},render:function(){this.view=new t.view.Demos({collection:this.collection,parent:this}),this.search(),this.view.render(),this.$el.empty().append(this.view.el).addClass("rendered")},searchContainer:e(".search-form"),search:function(){var o,s=this;1!==t.data.demos.length&&((o=new this.SearchView({collection:s.collection,parent:this})).render(),this.searchContainer.append(e.parseHTML('<label class="screen-reader-text" for="wp-filter-search-input">'+i.search+"</label>")).append(o.el))},scroller:function(){var e,t,i=this;e=this.window.scrollTop()+i.window.height(),t=i.$el.offset().top+i.$el.outerHeight(!1)-i.window.height(),e>(t=Math.round(.9*t))&&this.trigger("demo:scroll")},initTipTip:function(){e("#tiptip_holder").removeAttr("style"),e("#tiptip_arrow").removeAttr("style"),e(".tips").tipTip({attribute:"data-tip",fadeIn:50,fadeOut:50,delay:50})}}),t.Collection=Backbone.Collection.extend({model:t.Model,terms:"",doSearch:function(i){this.terms!==i&&(this.terms=i,this.terms.length>0&&this.search(this.terms),""===this.terms&&(this.reset(t.data.demos),e("body").removeClass("no-results")),this.trigger("demos:update"))},search:function(i){var o,s,n,a,r,l;this.reset(t.data.demos,{silent:!0}),i=i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),i=i.replace(/ /g,")(?=.*"),o=new RegExp("^(?=.*"+i+").+","i"),0===(s=this.filter(function(e){return a=e.get("name").replace(/(<([^>]+)>)/gi,""),r=e.get("description").replace(/(<([^>]+)>)/gi,""),l=e.get("author").replace(/(<([^>]+)>)/gi,""),n=_.union([a,e.get("id"),r,l,e.get("tags")]),o.test(e.get("author"))&&i.length>2&&e.set("displayAuthor",!0),o.test(n)})).length?this.trigger("query:empty"):e("body").removeClass("no-results"),this.reset(s)},paginate:function(e){var t=this;return e=e||0,t=_(t.rest(20*e)),t=_(t.first(20))}}),t.view.Demo=wp.Backbone.View.extend({className:"theme",state:"grid",html:t.template(t.isPreview?"demo-preview":"demo"),events:{click:"expand",keydown:"expand",touchend:"expand",keyup:"addFocus",touchmove:"preventExpand","click .demo-import":"importDemo"},touchDrag:!1,initialize:function(){this.model.on("change",this.render,this)},render:function(){var e=this.model.toJSON();this.$el.html(this.html(e)).attr({tabindex:0,"aria-describedby":e.id+"-action "+e.id+"-name","data-slug":e.id}),this.activeDemo(),this.model.get("displayAuthor")&&this.$el.addClass("display-author")},activeDemo:function(){this.model.get("active")&&this.$el.addClass("active")},addFocus:function(){var t=e(":focus").hasClass("theme")?e(":focus"):e(":focus").parents(".theme");e(".theme.focus").removeClass("focus"),t.addClass("focus")},expand:function(i){var o=this;if(!t.isPreview&&("keydown"!==(i=i||window.event).type||13===i.which||32===i.which))return!0===this.touchDrag?this.touchDrag=!1:void(e(i.target).is(".theme-actions a")||e(i.target).is(".theme-actions a, .update-message, .button-link, .notice-dismiss")||(t.focusedDemo=this.$el,this.trigger("demo:expand",o.model.cid)))},preventExpand:function(){this.touchDrag=!0},importDemo:function(t){var i=this,o=e(t.target);t.preventDefault(),o.hasClass("disabled")||window.confirm(wp.demos.data.settings.confirmImport)&&(e(document).on("wp-demo-import-success",function(e,t){i.model.get("id")===t.slug&&i.model.set({imported:!0})}),wp.updates.importDemo({slug:o.data("slug")}))}}),t.view.Details=wp.Backbone.View.extend({className:"theme-overlay",events:{click:"collapse","click .delete-demo":"deleteDemo","click .left":"previousDemo","click .right":"nextDemo","click .demo-import":"importDemo","click .plugins-install":"installPlugin"},html:t.template("demo-single"),render:function(){var e=this.model.toJSON();this.$el.html(this.html(e)),this.activeDemo(),this.navigation(),this.screenshotCheck(this.$el),this.containFocus(this.$el)},activeDemo:function(){this.$el.toggleClass("active",this.model.get("active"))},containFocus:function(t){_.delay(function(){e(".theme-wrap a.button-primary:visible").focus()},100),t.on("keydown.wp-themes",function(e){var i=t.find(".theme-header button:not(.disabled)").first(),o=t.find(".theme-actions a:visible").last();9===e.which&&(i[0]===e.target&&e.shiftKey?(o.focus(),e.preventDefault()):o[0]!==e.target||e.shiftKey||(i.focus(),e.preventDefault()))})},collapse:function(i){var o,s=this;i=i||window.event,1!==t.data.demos.length&&(e(i.target).is(".theme-backdrop")||e(i.target).is(".close")||27===i.keyCode)&&(e("body").addClass("closing-overlay"),this.$el.fadeOut(130,function(){e("body").removeClass("closing-overlay"),s.closeOverlay(),o=document.body.scrollTop,t.router.navigate(t.router.baseUrl("")),document.body.scrollTop=o,t.focusedDemo&&t.focusedDemo.focus()}))},navigation:function(){this.model.cid===this.model.collection.at(0).cid&&this.$el.find(".left").addClass("disabled").prop("disabled",!0),this.model.cid===this.model.collection.at(this.model.collection.length-1).cid&&this.$el.find(".right").addClass("disabled").prop("disabled",!0)},closeOverlay:function(){e("body").removeClass("modal-open"),this.remove(),this.unbind(),this.trigger("demo:collapse")},importDemo:function(t){var i=this,o=e(t.target);t.preventDefault(),o.hasClass("disabled")||window.confirm(wp.demos.data.settings.confirmImport)&&(e(document).on("wp-demo-import-success",function(e,t){i.model.get("id")===t.slug&&i.model.set({imported:!0})}),e(document).on("wp-updates-queue-job",function(e,t){"import-demo"===t.action&&wp.updates.importDemo(t.data)}),wp.updates.importDemo({slug:o.data("slug")}))},installPlugin:function(t){var i=e(document).find('input[name="required[]"], input[name="checked[]"]:checked'),o=e(t.target),s=0,n=0,a=[];t.preventDefault(),o.hasClass("disabled")||o.hasClass("updating-message")||(e(".theme-info .update-message").remove(),i.length||(t.preventDefault(),e(".theme-about").animate({scrollTop:0}),e(".theme-info .plugins-info").after(wp.updates.adminNotice({id:"no-items-selected",className:"update-message notice-error notice-alt",message:wp.updates.l10n.noItemsSelected}))),wp.updates.maybeRequestFilesystemCredentials(t),window.confirm(wp.demos.data.settings.confirmInstall)&&(e(document).find('.manage-column [type="checkbox"]').prop("checked",!1),e(document).trigger("wp-plugin-bulk-install",i),i.each(function(t,i){var s=e(i),n=s.parents("tr");n.hasClass("install")&&!n.find("notice-error").length?(o.addClass("updating-message").text(wp.updates.l10n.installing),wp.a11y.speak(wp.updates.l10n.installingMsg,"polite"),wp.updates.queue.push({action:"install-plugin",data:{slug:n.data("slug")}})):s.filter(":not(:disabled)").prop("checked",!1)}),e(document).on("wp-plugin-bulk-install-success wp-plugin-bulk-install-error",function(t,i){var r,l,d=e('[data-slug="'+i.slug+'"]');"wp-"+i.install+"-bulk-install-success"===t.type?s++:(l=i.pluginName?i.pluginName:d.find(".plugin-name").text(),n++,a.push(l+": "+i.errorMessage)),d.find('input[name="checked[]"]:checked').filter(":not(:disabled)").prop("checked",!1),wp.updates.adminNotice=wp.template("wp-bulk-installs-admin-notice"),e(".theme-info .bulk-action-notice").remove(),e(".theme-info .plugins-info").after(wp.updates.adminNotice({id:"bulk-action-notice",className:"bulk-action-notice notice-alt",successes:s,errors:n,errorMessages:a,type:i.install})),r=e("#bulk-action-notice").on("click","button",function(){e(this).toggleClass("bulk-action-errors-collapsed").attr("aria-expanded",!e(this).hasClass("bulk-action-errors-collapsed")),r.find(".bulk-action-errors").toggleClass("hidden")}),wp.updates.queue.length||(n>0?(o.removeClass("updating-message").addClass("disabled").text(wp.updates.l10n.installFailedShort),wp.a11y.speak(wp.updates.l10n.installedMsg,"polite"),e(".theme-about").animate({scrollTop:0})):(o.removeClass("updating-message").addClass("disabled").text(wp.updates.l10n.pluginInstalled),wp.a11y.speak(wp.updates.l10n.installedMsg,"polite"),e(".plugins-activate").removeAttr("disabled")))}),e(document).on("wp-updates-notice-added",function(){wp.updates.adminNotice=wp.template("wp-updates-admin-notice")}),wp.updates.queueChecker()))},deleteDemo:function(i){var o=this,s=this.model.collection,n=t;i.preventDefault(),window.confirm(wp.demos.data.settings.confirmDelete)&&(wp.updates.maybeRequestFilesystemCredentials(i),e(document).one("wp-demo-delete-success",function(t,i){o.$el.find(".close").trigger("click"),e('[data-slug="'+i.slug+'"').css({backgroundColor:"#faafaa"}).fadeOut(350,function(){e(this).remove(),n.data.demos=_.without(n.data.demos,_.findWhere(n.data.demos,{id:i.slug})),e(".wp-filter-search").val(""),s.doSearch(""),s.remove(o.model),s.trigger("demos:update")})}),wp.updates.deleteDemo({slug:this.model.get("id")}))},nextDemo:function(){var e=this;return e.trigger("demo:next",e.model.cid),!1},previousDemo:function(){var e=this;return e.trigger("demo:previous",e.model.cid),!1},screenshotCheck:function(e){var t,i;t=e.find(".screenshot img"),(i=new Image).src=t.attr("src"),i.width&&i.width<=300&&e.addClass("small-screenshot")}}),t.view.Demos=wp.Backbone.View.extend({className:"themes wp-clearfix",$overlay:e("div.theme-overlay"),index:0,count:e(".wrap .demo-count"),liveDemoCount:0,initialize:function(t){var i=this;this.parent=t.parent,i.importedDemo(),this.setView("grid"),this.listenTo(i.collection,"demos:update",function(){i.parent.page=0,i.importedDemo(),i.render(this),i.parent.initTipTip()}),this.listenTo(i.collection,"query:success",function(e){_.isNumber(e)?(i.count.text(e),i.announceSearchResults(e)):(i.count.text(i.collection.length),i.announceSearchResults(i.collection.length))}),this.listenTo(i.collection,"query:empty",function(){e("body").addClass("no-results")}),this.listenTo(this.parent,"demo:scroll",function(){i.renderDemos(i.parent.page)}),this.listenTo(this.parent,"demo:close",function(){i.overlay&&i.overlay.closeOverlay()}),e("body").on("keyup",function(t){i.overlay&&(e("#request-filesystem-credentials-dialog").is(":visible")||(39===t.keyCode&&i.overlay.nextDemo(),37===t.keyCode&&i.overlay.previousDemo(),27===t.keyCode&&i.overlay.collapse(t)))})},render:function(){this.$el.empty(),t.isPreview||1!==t.data.demos.length||(this.singleDemo=new t.view.Details({model:this.collection.models[0]}),this.singleDemo.render(),this.$el.addClass("single-theme"),this.$el.append(this.singleDemo.el)),this.options.collection.size()>0&&this.renderDemos(this.parent.page),this.liveDemoCount=this.collection.count?this.collection.count:this.collection.length,this.count.text(this.liveDemoCount)},renderDemos:function(e){var o=this;o.instance=o.collection.paginate(e),0!==o.instance.size()?(o.instance.each(function(e){o.demo=new t.view.Demo({model:e,parent:o}),o.demo.render(),o.$el.append(o.demo.el),o.listenTo(o.demo,"demo:expand",o.expand,o)}),!t.isPreview&&t.isInstall&&t.data.settings.canInstall&&this.$el.append('<div class="theme add-new-theme"><a href="'+t.data.settings.installURI+'"><div class="theme-screenshot"><span></span></div><h2 class="theme-name">'+i.addNew+"</h2></a></div>"),this.parent.page++):this.parent.trigger("demo:end")},importedDemo:function(){var e,t=this;(e=t.collection.findWhere({active:!0}))&&(t.collection.remove(e),t.collection.add(e,{at:0}))},setView:function(e){return e},expand:function(i){var o,s,n=this;this.model=n.collection.get(i),t.router.navigate(t.router.baseUrl(t.router.demoPath+this.model.id)),this.setView("detail"),e("body").addClass("modal-open"),this.overlay=new t.view.Details({model:n.model}),this.overlay.render(),this.model.get("hasUpdate")&&(o=e('[data-slug="'+this.model.id+'"]'),s=e(this.overlay.el),o.find(".updating-message").length?(s.find(".notice-warning h3").remove(),s.find(".notice-warning").removeClass("notice-large").addClass("updating-message").find("p").text(wp.updates.l10n.updating)):o.find(".notice-error").length&&s.find(".notice-warning").remove()),this.$overlay.html(this.overlay.el),this.listenTo(this.overlay,"demo:next",function(){n.next([n.model.cid])}).listenTo(this.overlay,"demo:previous",function(){n.previous([n.model.cid])})},next:function(e){var t,i,o=this;t=o.collection.get(e[0]),(i=o.collection.at(o.collection.indexOf(t)+1))!==undefined&&(this.overlay.closeOverlay(),o.demo.trigger("demo:expand",i.cid))},previous:function(e){var t,i,o=this;t=o.collection.get(e[0]),(i=o.collection.at(o.collection.indexOf(t)-1))!==undefined&&(this.overlay.closeOverlay(),o.demo.trigger("demo:expand",i.cid))},announceSearchResults:function(e){0===e?wp.a11y.speak(i.noDemosFound):wp.a11y.speak(i.demosFound.replace("%d",e))}}),t.view.Search=wp.Backbone.View.extend({tagName:"input",className:"wp-filter-search",id:"wp-filter-search-input",searching:!1,attributes:{placeholder:i.searchPlaceholder,type:"search","aria-describedby":"live-search-desc"},events:{input:"search",keyup:"search",blur:"pushState"},initialize:function(e){this.parent=e.parent,this.listenTo(this.parent,"demo:close",function(){this.searching=!1})},search:function(e){"keyup"===e.type&&27===e.which&&(e.target.value=""),this.doSearch(e)},doSearch:_.debounce(function(e){var i={};this.collection.doSearch(e.target.value),this.searching&&13!==e.which?i.replace=!0:this.searching=!0,e.target.value?t.router.navigate(t.router.baseUrl(t.router.searchPath+e.target.value),i):t.router.navigate(t.router.baseUrl(""))},500),pushState:function(e){var i=t.router.baseUrl("");e.target.value&&(i=t.router.baseUrl(t.router.searchPath+e.target.value)),this.searching=!1,t.router.navigate(i)}}),t.Router=Backbone.Router.extend({routes:{"themes.php?page=demo-importer&demo=:slug":"demo","themes.php?page=demo-importer&search=:query":"search","themes.php?page=demo-importer&s=:query":"search","themes.php?page=demo-importer":"demos","":"demos"},baseUrl:function(e){return"themes.php?page=demo-importer"+e},demoPath:"&demo=",searchPath:"&search=",search:function(t){e(".wp-filter-search").val(t)},demos:function(){e(".wp-filter-search").val("")},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),t.Run={init:function(){this.demos=new t.Collection(t.data.demos),this.view=new t.view.Appearance({collection:this.demos}),this.render()},render:function(){this.view.render(),this.view.initTipTip(),this.routes(),Backbone.history.start({root:t.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var i=this;t.router=new t.Router,t.router.on("route:demo",function(e){i.view.view.expand(e)}),t.router.on("route:demos",function(){i.demos.doSearch(""),i.view.trigger("demo:close")}),t.router.on("route:search",function(){e(".wp-filter-search").trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},t.view.Installer=t.view.Appearance.extend({el:"#wpbody-content .wrap",render:function(){this.search(),this.uploader(),this.view=new t.view.Demos({collection:this.collection,parent:this}),this.$el.find(".themes").remove(),this.view.render(),this.$el.find(".theme-browser").append(this.view.el).addClass("rendered")},uploader:function(){var t=e(".upload-view-toggle"),i=e(document.body);t.on("click",function(){i.toggleClass("show-upload-view"),t.attr("aria-expanded",i.hasClass("show-upload-view"))})},clearSearch:function(){e("#wp-filter-search-input").val("")}}),t.InstallerRouter=Backbone.Router.extend({routes:{"themes.php?page=demo-importer&browse=uploads&demo=:slug":"demo","themes.php?page=demo-importer&browse=:sort&search=:query":"search","themes.php?page=demo-importer&browse=:sort&s=:query":"search","themes.php?page=demo-importer&browse=welcome":"sort","themes.php?page=demo-importer&browse=:sort":"demos","themes.php?page=demo-importer":"sort"},browse:function(){return t.isPreview?"preview":"uploads"},baseUrl:function(e){return"themes.php?page=demo-importer&browse="+this.browse()+e},demoPath:"&demo=",searchPath:"&search=",search:function(t,i){e(".wp-filter-search").val(i)},demos:function(){e(".wp-filter-search").val("")},navigate:function(){Backbone.history._hasPushState&&Backbone.Router.prototype.navigate.apply(this,arguments)}}),t.RunInstaller={init:function(){this.demos=new t.Collection(t.data.demos),this.view=new t.view.Installer({collection:this.demos}),this.render()},render:function(){this.view.render(),this.view.initTipTip(),this.routes(),Backbone.history.start({root:t.data.settings.adminUrl,pushState:!0,hashChange:!1})},routes:function(){var i=this;t.router=new t.InstallerRouter,t.router.on("route:demo",function(e){i.view.view.expand(e)}),t.router.on("route:demos",function(){i.demos.doSearch(""),i.view.trigger("demo:close")}),t.router.on("route:sort",function(t){t&&"welcome"!==t||e(".wp-filter-search").hide()}),t.router.on("route:search",function(){e(".wp-filter-search").focus().trigger("keyup")}),this.extraRoutes()},extraRoutes:function(){return!1}},e(document).ready(function(){t.isInstall?t.RunInstaller.init():t.Run.init(),e(".themegrill-demo-importer-rating-link").on("click",function(){var i=e(this);e.post(t.data.settings.ajaxUrl,{action:"footer-text-rated"}),i.parent().text(i.data("rated"))}),e(".themegrill-reset-wordpress").on("click",function(){return window.confirm(t.data.settings.confirmReset)}),e("#contextual-help-link").on("click",function(){var t=e("#tab-panel-themegrill_demo_importer_guided_tour_tab iframe");t.attr("src",t.data("src"))}),e(document.body).on("click","thead .check-column :checkbox",function(t){var i=e(this),o=i.closest("table"),s=i.prop("checked"),n=t.shiftKey||i.data("wp-toggle");o.children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",function(){return e(this).is(":hidden,:disabled")?!!e(this).data("checked"):n?!e(this).prop("checked"):!!s})})})}(jQuery);
|
assets/js/admin/demo-updates.js
CHANGED
@@ -108,7 +108,7 @@
|
|
108 |
|
109 |
$document.trigger( 'wp-demo-import-success', response );
|
110 |
|
111 |
-
$message = $card.find( '.button-primary' )
|
112 |
.removeClass( 'updating-message' )
|
113 |
.addClass( 'updated-message disabled' )
|
114 |
.attr( 'aria-label', wp.updates.l10n.demoImportedLabel.replace( '%s', response.demoName ) )
|
@@ -251,6 +251,101 @@
|
|
251 |
$document.trigger( 'wp-demo-delete-error', response );
|
252 |
};
|
253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
/**
|
255 |
* Validates an AJAX response to ensure it's a proper object.
|
256 |
*
|
@@ -331,6 +426,10 @@
|
|
331 |
wp.updates.deleteDemo( job.data );
|
332 |
break;
|
333 |
|
|
|
|
|
|
|
|
|
334 |
default:
|
335 |
break;
|
336 |
}
|
108 |
|
109 |
$document.trigger( 'wp-demo-import-success', response );
|
110 |
|
111 |
+
$message = $card.find( '.button-primary:not(.plugins-install)' )
|
112 |
.removeClass( 'updating-message' )
|
113 |
.addClass( 'updated-message disabled' )
|
114 |
.attr( 'aria-label', wp.updates.l10n.demoImportedLabel.replace( '%s', response.demoName ) )
|
251 |
$document.trigger( 'wp-demo-delete-error', response );
|
252 |
};
|
253 |
|
254 |
+
/**
|
255 |
+
* Sends an Ajax request to the server to install a plugin.
|
256 |
+
*
|
257 |
+
* @param {object} args Arguments.
|
258 |
+
* @param {string} args.slug Plugin identifier in the WordPress.org Plugin repository.
|
259 |
+
* @param {bulkInstallPluginSuccess=} args.success Optional. Success callback. Default: wp.updates.bulkInstallPluginSuccess
|
260 |
+
* @param {bulkInstallPluginError=} args.error Optional. Error callback. Default: wp.updates.bulkInstallPluginError
|
261 |
+
* @return {$.promise} A jQuery promise that represents the request,
|
262 |
+
* decorated with an abort() method.
|
263 |
+
*/
|
264 |
+
wp.updates.bulkInstallPlugin = function( args ) {
|
265 |
+
var $pluginRow = $( 'tr[data-slug="' + args.slug + '"]' ),
|
266 |
+
$message = $pluginRow.find( '.plugin-status span' );
|
267 |
+
|
268 |
+
args = _.extend( {
|
269 |
+
success: wp.updates.bulkInstallPluginSuccess,
|
270 |
+
error: wp.updates.bulkInstallPluginError
|
271 |
+
}, args );
|
272 |
+
|
273 |
+
if ( $message.html() !== wp.updates.l10n.installing ) {
|
274 |
+
$message.data( 'originaltext', $message.html() );
|
275 |
+
}
|
276 |
+
|
277 |
+
$message
|
278 |
+
.addClass( 'updating-message' )
|
279 |
+
.attr( 'aria-label', wp.updates.l10n.pluginInstallingLabel.replace( '%s', $pluginRow.data( 'name' ) ) )
|
280 |
+
.text( wp.updates.l10n.installing );
|
281 |
+
|
282 |
+
wp.a11y.speak( wp.updates.l10n.installingMsg, 'polite' );
|
283 |
+
|
284 |
+
$document.trigger( 'wp-plugin-bulk-installing', args );
|
285 |
+
|
286 |
+
return wp.updates.ajax( 'install-plugin', args );
|
287 |
+
};
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Updates the UI appropriately after a successful plugin install.
|
291 |
+
*
|
292 |
+
* @typedef {object} installPluginSuccess
|
293 |
+
* @param {object} response Response from the server.
|
294 |
+
* @param {string} response.slug Slug of the installed plugin.
|
295 |
+
* @param {string} response.pluginName Name of the installed plugin.
|
296 |
+
* @param {string} response.activateUrl URL to activate the just installed plugin.
|
297 |
+
*/
|
298 |
+
wp.updates.bulkInstallPluginSuccess = function( response ) {
|
299 |
+
var $pluginRow = $( 'tr[data-slug="' + response.slug + '"]' ).removeClass( 'install' ).addClass( 'installed' ),
|
300 |
+
$updateMessage = $pluginRow.find( '.plugin-status span' );
|
301 |
+
|
302 |
+
$updateMessage
|
303 |
+
.removeClass( 'updating-message install-now' )
|
304 |
+
.addClass( 'updated-message activate-now' )
|
305 |
+
.attr( 'aria-label', wp.updates.l10n.pluginInstalledLabel.replace( '%s', response.pluginName ) )
|
306 |
+
.text( wp.updates.l10n.pluginInstalled );
|
307 |
+
|
308 |
+
wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' );
|
309 |
+
|
310 |
+
$document.trigger( 'wp-plugin-bulk-install-success', response );
|
311 |
+
};
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Updates the UI appropriately after a failed plugin install.
|
315 |
+
*
|
316 |
+
* @typedef {object} installPluginError
|
317 |
+
* @param {object} response Response from the server.
|
318 |
+
* @param {string} response.slug Slug of the plugin to be installed.
|
319 |
+
* @param {string=} response.pluginName Optional. Name of the plugin to be installed.
|
320 |
+
* @param {string} response.errorCode Error code for the error that occurred.
|
321 |
+
* @param {string} response.errorMessage The error that occurred.
|
322 |
+
*/
|
323 |
+
wp.updates.bulkInstallPluginError = function( response ) {
|
324 |
+
var $pluginRow = $( 'tr[data-slug="' + response.slug + '"]' ),
|
325 |
+
$updateMessage = $pluginRow.find( '.plugin-status span' ),
|
326 |
+
errorMessage;
|
327 |
+
|
328 |
+
if ( ! wp.updates.isValidResponse( response, 'install' ) ) {
|
329 |
+
return;
|
330 |
+
}
|
331 |
+
|
332 |
+
if ( wp.updates.maybeHandleCredentialError( response, 'install-plugin' ) ) {
|
333 |
+
return;
|
334 |
+
}
|
335 |
+
|
336 |
+
errorMessage = wp.updates.l10n.installFailed.replace( '%s', response.errorMessage );
|
337 |
+
|
338 |
+
$updateMessage
|
339 |
+
.removeClass( 'updating-message' )
|
340 |
+
.addClass( 'updated-message' )
|
341 |
+
.attr( 'aria-label', wp.updates.l10n.pluginInstallFailedLabel.replace( '%s', $pluginRow.data( 'name' ) ) )
|
342 |
+
.text( wp.updates.l10n.installFailedShort );
|
343 |
+
|
344 |
+
wp.a11y.speak( errorMessage, 'assertive' );
|
345 |
+
|
346 |
+
$document.trigger( 'wp-plugin-bulk-install-error', response );
|
347 |
+
};
|
348 |
+
|
349 |
/**
|
350 |
* Validates an AJAX response to ensure it's a proper object.
|
351 |
*
|
426 |
wp.updates.deleteDemo( job.data );
|
427 |
break;
|
428 |
|
429 |
+
case 'install-plugin':
|
430 |
+
wp.updates.bulkInstallPlugin( job.data );
|
431 |
+
break;
|
432 |
+
|
433 |
default:
|
434 |
break;
|
435 |
}
|
assets/js/admin/demo-updates.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e,t
|
1 |
+
!function(e,a,t){var s=e(document);(a=a||{}).updates=a.updates||{},a.updates.l10n=_.extend(a.updates.l10n,t.l10n||{}),a.updates.addAdminNotice=function(t){var l,d=e(t.selector),r=e(".wp-header-end");delete t.selector,l=a.updates.adminNotice(t),d.length||(d=e("#"+t.id)),d.length?d.replaceWith(l):r.length?e(".wp-header-end").after(l):e(".wrap").find("> h1").after(l),s.trigger("wp-updates-notice-added")},a.updates.importDemo=function(t){var l=e('.demo-import[data-slug="'+t.slug+'"]');return t=_.extend({success:a.updates.importDemoSuccess,error:a.updates.importDemoError},t),l.addClass("updating-message"),l.parents(".theme").addClass("focus"),l.html()!==a.updates.l10n.importing&&l.data("originaltext",l.html()),l.text(a.updates.l10n.importing).attr("aria-label",a.updates.l10n.demoImportingLabel.replace("%s",l.data("name"))),a.a11y.speak(a.updates.l10n.importingMsg,"polite"),e('.theme-info .theme-description, [data-slug="'+t.slug+'"]').removeClass("demo-import-failed").find(".notice.notice-error").remove(),s.trigger("wp-demo-importing",t),a.updates.ajax("import-demo",t)},a.updates.importDemoSuccess=function(t){var l,d=e(".theme-overlay, [data-slug="+t.slug+"]");s.trigger("wp-demo-import-success",t),l=d.find(".button-primary:not(.plugins-install)").removeClass("updating-message").addClass("updated-message disabled").attr("aria-label",a.updates.l10n.demoImportedLabel.replace("%s",t.demoName)).text(a.updates.l10n.imported),a.a11y.speak(a.updates.l10n.importedMsg,"polite"),setTimeout(function(){t.previewUrl&&(l.siblings(".demo-preview").remove(),l.attr("target","_blank").attr("href",t.previewUrl).removeClass("demo-import updated-message disabled").addClass("live-preview").attr("aria-label",a.updates.l10n.livePreviewLabel.replace("%s",t.demoName)).text(a.updates.l10n.livePreview))},1e3)},a.updates.importDemoError=function(t){var l,d=a.updates.l10n.importFailed.replace("%s",t.errorMessage),r=a.updates.adminNotice({className:"update-message notice-error notice-alt",message:d});a.updates.isValidResponse(t,"import")&&(s.find("body").hasClass("modal-open")||s.find(".themes").hasClass("single-theme")?(l=e('.demo-import[data-slug="'+t.slug+'"]'),e(".theme-info .theme-description").prepend(r)):l=e('[data-slug="'+t.slug+'"]').removeClass("focus").addClass("demo-import-failed").append(r).find(".demo-import"),l.removeClass("updating-message").attr("aria-label",a.updates.l10n.demoImportFailedLabel.replace("%s",l.data("name"))).text(a.updates.l10n.importFailedShort),a.a11y.speak(d,"assertive"),s.trigger("wp-demo-import-error",t))},a.updates.deleteDemo=function(t){var l=e(".theme-actions .delete-demo");return t=_.extend({success:a.updates.deleteDemoSuccess,error:a.updates.deleteDemoError},t),l&&l.html()!==a.updates.l10n.deleting&&l.data("originaltext",l.html()).text(a.updates.l10n.deleting),a.a11y.speak(a.updates.l10n.deleting,"polite"),e(".theme-info .update-message").remove(),s.trigger("wp-demo-deleting",t),a.updates.ajax("delete-demo",t)},a.updates.deleteDemoSuccess=function(e){a.a11y.speak(a.updates.l10n.deleted,"polite"),s.trigger("wp-demo-delete-success",e)},a.updates.deleteDemoError=function(t){var l=e(".theme-actions .delete-demo"),d=a.updates.l10n.deleteFailed.replace("%s",t.errorMessage),r=a.updates.adminNotice({className:"update-message notice-error notice-alt",message:d});a.updates.maybeHandleCredentialError(t,"delete-demo")||(e(".theme-info .theme-description").before(r),l.html(l.data("originaltext")),a.a11y.speak(d,"assertive"),s.trigger("wp-demo-delete-error",t))},a.updates.bulkInstallPlugin=function(t){var l=e('tr[data-slug="'+t.slug+'"]'),d=l.find(".plugin-status span");return t=_.extend({success:a.updates.bulkInstallPluginSuccess,error:a.updates.bulkInstallPluginError},t),d.html()!==a.updates.l10n.installing&&d.data("originaltext",d.html()),d.addClass("updating-message").attr("aria-label",a.updates.l10n.pluginInstallingLabel.replace("%s",l.data("name"))).text(a.updates.l10n.installing),a.a11y.speak(a.updates.l10n.installingMsg,"polite"),s.trigger("wp-plugin-bulk-installing",t),a.updates.ajax("install-plugin",t)},a.updates.bulkInstallPluginSuccess=function(t){e('tr[data-slug="'+t.slug+'"]').removeClass("install").addClass("installed").find(".plugin-status span").removeClass("updating-message install-now").addClass("updated-message activate-now").attr("aria-label",a.updates.l10n.pluginInstalledLabel.replace("%s",t.pluginName)).text(a.updates.l10n.pluginInstalled),a.a11y.speak(a.updates.l10n.installedMsg,"polite"),s.trigger("wp-plugin-bulk-install-success",t)},a.updates.bulkInstallPluginError=function(t){var l,d=e('tr[data-slug="'+t.slug+'"]'),r=d.find(".plugin-status span");a.updates.isValidResponse(t,"install")&&(a.updates.maybeHandleCredentialError(t,"install-plugin")||(l=a.updates.l10n.installFailed.replace("%s",t.errorMessage),r.removeClass("updating-message").addClass("updated-message").attr("aria-label",a.updates.l10n.pluginInstallFailedLabel.replace("%s",d.data("name"))).text(a.updates.l10n.installFailedShort),a.a11y.speak(l,"assertive"),s.trigger("wp-plugin-bulk-install-error",t)))},a.updates.isValidResponse=function(t,s){var l,d=a.updates.l10n.unknownError;if(_.isObject(t)&&!_.isFunction(t.always))return!0;switch(_.isString(t)&&"-1"===t?d=a.updates.l10n.nonceError:_.isString(t)?d=t:"undefined"!=typeof t.readyState&&0===t.readyState?d=a.updates.l10n.connectionError:_.isString(t.statusText)&&(d=t.statusText+" "+a.updates.l10n.statusTextLink),s){case"import":l=a.updates.l10n.importFailed}return l=l.replace("%s",d),a.updates.addAdminNotice({id:"unknown_error",className:"notice-error is-dismissible",message:_.unescape(l)}),e(".button.updating-message").removeClass("updating-message").removeAttr("aria-label").text(a.updates.l10n.updateFailedShort),a.a11y.speak(l,"assertive"),!1},a.updates.queueChecker=function(){var e;if(!a.updates.ajaxLocked&&a.updates.queue.length){switch((e=a.updates.queue.shift()).action){case"import-demo":a.updates.importDemo(e.data);break;case"delete-demo":a.updates.deleteDemo(e.data);break;case"install-plugin":a.updates.bulkInstallPlugin(e.data)}s.trigger("wp-updates-queue-job",e)}}}(jQuery,window.wp,window._demoUpdatesSettings);
|
composer.lock
DELETED
@@ -1,295 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_readme": [
|
3 |
-
"This file locks the dependencies of your project to a known state",
|
4 |
-
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
5 |
-
"This file is @generated automatically"
|
6 |
-
],
|
7 |
-
"hash": "dc8868b0f068d03c4a1ea5221933732b",
|
8 |
-
"content-hash": "e902d62f93fd8f9f14910ae4a1e8a26f",
|
9 |
-
"packages": [
|
10 |
-
{
|
11 |
-
"name": "composer/installers",
|
12 |
-
"version": "v1.2.0",
|
13 |
-
"source": {
|
14 |
-
"type": "git",
|
15 |
-
"url": "https://github.com/composer/installers.git",
|
16 |
-
"reference": "d78064c68299743e0161004f2de3a0204e33b804"
|
17 |
-
},
|
18 |
-
"dist": {
|
19 |
-
"type": "zip",
|
20 |
-
"url": "https://api.github.com/repos/composer/installers/zipball/d78064c68299743e0161004f2de3a0204e33b804",
|
21 |
-
"reference": "d78064c68299743e0161004f2de3a0204e33b804",
|
22 |
-
"shasum": ""
|
23 |
-
},
|
24 |
-
"require": {
|
25 |
-
"composer-plugin-api": "^1.0"
|
26 |
-
},
|
27 |
-
"replace": {
|
28 |
-
"roundcube/plugin-installer": "*",
|
29 |
-
"shama/baton": "*"
|
30 |
-
},
|
31 |
-
"require-dev": {
|
32 |
-
"composer/composer": "1.0.*@dev",
|
33 |
-
"phpunit/phpunit": "4.1.*"
|
34 |
-
},
|
35 |
-
"type": "composer-plugin",
|
36 |
-
"extra": {
|
37 |
-
"class": "Composer\\Installers\\Plugin",
|
38 |
-
"branch-alias": {
|
39 |
-
"dev-master": "1.0-dev"
|
40 |
-
}
|
41 |
-
},
|
42 |
-
"autoload": {
|
43 |
-
"psr-4": {
|
44 |
-
"Composer\\Installers\\": "src/Composer/Installers"
|
45 |
-
}
|
46 |
-
},
|
47 |
-
"notification-url": "https://packagist.org/downloads/",
|
48 |
-
"license": [
|
49 |
-
"MIT"
|
50 |
-
],
|
51 |
-
"authors": [
|
52 |
-
{
|
53 |
-
"name": "Kyle Robinson Young",
|
54 |
-
"email": "kyle@dontkry.com",
|
55 |
-
"homepage": "https://github.com/shama"
|
56 |
-
}
|
57 |
-
],
|
58 |
-
"description": "A multi-framework Composer library installer",
|
59 |
-
"homepage": "https://composer.github.io/installers/",
|
60 |
-
"keywords": [
|
61 |
-
"Craft",
|
62 |
-
"Dolibarr",
|
63 |
-
"Hurad",
|
64 |
-
"ImageCMS",
|
65 |
-
"MODX Evo",
|
66 |
-
"Mautic",
|
67 |
-
"OXID",
|
68 |
-
"Plentymarkets",
|
69 |
-
"RadPHP",
|
70 |
-
"SMF",
|
71 |
-
"Thelia",
|
72 |
-
"WolfCMS",
|
73 |
-
"agl",
|
74 |
-
"aimeos",
|
75 |
-
"annotatecms",
|
76 |
-
"attogram",
|
77 |
-
"bitrix",
|
78 |
-
"cakephp",
|
79 |
-
"chef",
|
80 |
-
"cockpit",
|
81 |
-
"codeigniter",
|
82 |
-
"concrete5",
|
83 |
-
"croogo",
|
84 |
-
"dokuwiki",
|
85 |
-
"drupal",
|
86 |
-
"elgg",
|
87 |
-
"expressionengine",
|
88 |
-
"fuelphp",
|
89 |
-
"grav",
|
90 |
-
"installer",
|
91 |
-
"joomla",
|
92 |
-
"kohana",
|
93 |
-
"laravel",
|
94 |
-
"lithium",
|
95 |
-
"magento",
|
96 |
-
"mako",
|
97 |
-
"mediawiki",
|
98 |
-
"modulework",
|
99 |
-
"moodle",
|
100 |
-
"phpbb",
|
101 |
-
"piwik",
|
102 |
-
"ppi",
|
103 |
-
"puppet",
|
104 |
-
"reindex",
|
105 |
-
"roundcube",
|
106 |
-
"shopware",
|
107 |
-
"silverstripe",
|
108 |
-
"symfony",
|
109 |
-
"typo3",
|
110 |
-
"wordpress",
|
111 |
-
"yawik",
|
112 |
-
"zend",
|
113 |
-
"zikula"
|
114 |
-
],
|
115 |
-
"time": "2016-08-13 20:53:52"
|
116 |
-
}
|
117 |
-
],
|
118 |
-
"packages-dev": [
|
119 |
-
{
|
120 |
-
"name": "simplyadmire/composer-plugins",
|
121 |
-
"version": "dev-master",
|
122 |
-
"source": {
|
123 |
-
"type": "git",
|
124 |
-
"url": "https://github.com/SimplyAdmire/ComposerPlugins.git",
|
125 |
-
"reference": "d8380f670694c1c2330b22591ca74adc82cffe19"
|
126 |
-
},
|
127 |
-
"dist": {
|
128 |
-
"type": "zip",
|
129 |
-
"url": "https://api.github.com/repos/SimplyAdmire/ComposerPlugins/zipball/d8380f670694c1c2330b22591ca74adc82cffe19",
|
130 |
-
"reference": "d8380f670694c1c2330b22591ca74adc82cffe19",
|
131 |
-
"shasum": ""
|
132 |
-
},
|
133 |
-
"require": {
|
134 |
-
"composer-plugin-api": "^1.0",
|
135 |
-
"squizlabs/php_codesniffer": "*"
|
136 |
-
},
|
137 |
-
"type": "composer-plugin",
|
138 |
-
"extra": {
|
139 |
-
"class": [
|
140 |
-
"SimplyAdmire\\ComposerPlugins\\PhpCodesnifferStandardInstallerPlugin"
|
141 |
-
]
|
142 |
-
},
|
143 |
-
"autoload": {
|
144 |
-
"psr-0": {
|
145 |
-
"SimplyAdmire\\ComposerPlugins": ""
|
146 |
-
}
|
147 |
-
},
|
148 |
-
"notification-url": "https://packagist.org/downloads/",
|
149 |
-
"license": [
|
150 |
-
"LGPL-3.0+"
|
151 |
-
],
|
152 |
-
"authors": [
|
153 |
-
{
|
154 |
-
"name": "Rens Admiraal",
|
155 |
-
"email": "rens@simplyadmire.com",
|
156 |
-
"role": "lead"
|
157 |
-
}
|
158 |
-
],
|
159 |
-
"description": "Composer plugin for installing PHP_CodeSniffer standards",
|
160 |
-
"keywords": [
|
161 |
-
"PHP_CodeSniffer",
|
162 |
-
"TYPO3 CMS",
|
163 |
-
"TYPO3 Flow",
|
164 |
-
"TYPO3 Neos",
|
165 |
-
"phpcs",
|
166 |
-
"standards",
|
167 |
-
"typo3"
|
168 |
-
],
|
169 |
-
"time": "2016-05-12 11:58:38"
|
170 |
-
},
|
171 |
-
{
|
172 |
-
"name": "squizlabs/php_codesniffer",
|
173 |
-
"version": "2.7.0",
|
174 |
-
"source": {
|
175 |
-
"type": "git",
|
176 |
-
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
177 |
-
"reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed"
|
178 |
-
},
|
179 |
-
"dist": {
|
180 |
-
"type": "zip",
|
181 |
-
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/571e27b6348e5b3a637b2abc82ac0d01e6d7bbed",
|
182 |
-
"reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed",
|
183 |
-
"shasum": ""
|
184 |
-
},
|
185 |
-
"require": {
|
186 |
-
"ext-simplexml": "*",
|
187 |
-
"ext-tokenizer": "*",
|
188 |
-
"ext-xmlwriter": "*",
|
189 |
-
"php": ">=5.1.2"
|
190 |
-
},
|
191 |
-
"require-dev": {
|
192 |
-
"phpunit/phpunit": "~4.0"
|
193 |
-
},
|
194 |
-
"bin": [
|
195 |
-
"scripts/phpcs",
|
196 |
-
"scripts/phpcbf"
|
197 |
-
],
|
198 |
-
"type": "library",
|
199 |
-
"extra": {
|
200 |
-
"branch-alias": {
|
201 |
-
"dev-master": "2.x-dev"
|
202 |
-
}
|
203 |
-
},
|
204 |
-
"autoload": {
|
205 |
-
"classmap": [
|
206 |
-
"CodeSniffer.php",
|
207 |
-
"CodeSniffer/CLI.php",
|
208 |
-
"CodeSniffer/Exception.php",
|
209 |
-
"CodeSniffer/File.php",
|
210 |
-
"CodeSniffer/Fixer.php",
|
211 |
-
"CodeSniffer/Report.php",
|
212 |
-
"CodeSniffer/Reporting.php",
|
213 |
-
"CodeSniffer/Sniff.php",
|
214 |
-
"CodeSniffer/Tokens.php",
|
215 |
-
"CodeSniffer/Reports/",
|
216 |
-
"CodeSniffer/Tokenizers/",
|
217 |
-
"CodeSniffer/DocGenerators/",
|
218 |
-
"CodeSniffer/Standards/AbstractPatternSniff.php",
|
219 |
-
"CodeSniffer/Standards/AbstractScopeSniff.php",
|
220 |
-
"CodeSniffer/Standards/AbstractVariableSniff.php",
|
221 |
-
"CodeSniffer/Standards/IncorrectPatternException.php",
|
222 |
-
"CodeSniffer/Standards/Generic/Sniffs/",
|
223 |
-
"CodeSniffer/Standards/MySource/Sniffs/",
|
224 |
-
"CodeSniffer/Standards/PEAR/Sniffs/",
|
225 |
-
"CodeSniffer/Standards/PSR1/Sniffs/",
|
226 |
-
"CodeSniffer/Standards/PSR2/Sniffs/",
|
227 |
-
"CodeSniffer/Standards/Squiz/Sniffs/",
|
228 |
-
"CodeSniffer/Standards/Zend/Sniffs/"
|
229 |
-
]
|
230 |
-
},
|
231 |
-
"notification-url": "https://packagist.org/downloads/",
|
232 |
-
"license": [
|
233 |
-
"BSD-3-Clause"
|
234 |
-
],
|
235 |
-
"authors": [
|
236 |
-
{
|
237 |
-
"name": "Greg Sherwood",
|
238 |
-
"role": "lead"
|
239 |
-
}
|
240 |
-
],
|
241 |
-
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
|
242 |
-
"homepage": "http://www.squizlabs.com/php-codesniffer",
|
243 |
-
"keywords": [
|
244 |
-
"phpcs",
|
245 |
-
"standards"
|
246 |
-
],
|
247 |
-
"time": "2016-09-01 23:53:02"
|
248 |
-
},
|
249 |
-
{
|
250 |
-
"name": "wp-coding-standards/wpcs",
|
251 |
-
"version": "0.10.0",
|
252 |
-
"source": {
|
253 |
-
"type": "git",
|
254 |
-
"url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git",
|
255 |
-
"reference": "b39490465f6fd7375743a395019cd597e12119c9"
|
256 |
-
},
|
257 |
-
"dist": {
|
258 |
-
"type": "zip",
|
259 |
-
"url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/b39490465f6fd7375743a395019cd597e12119c9",
|
260 |
-
"reference": "b39490465f6fd7375743a395019cd597e12119c9",
|
261 |
-
"shasum": ""
|
262 |
-
},
|
263 |
-
"require": {
|
264 |
-
"squizlabs/php_codesniffer": "^2.6"
|
265 |
-
},
|
266 |
-
"type": "library",
|
267 |
-
"notification-url": "https://packagist.org/downloads/",
|
268 |
-
"license": [
|
269 |
-
"MIT"
|
270 |
-
],
|
271 |
-
"authors": [
|
272 |
-
{
|
273 |
-
"name": "Contributors",
|
274 |
-
"homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors"
|
275 |
-
}
|
276 |
-
],
|
277 |
-
"description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
|
278 |
-
"keywords": [
|
279 |
-
"phpcs",
|
280 |
-
"standards",
|
281 |
-
"wordpress"
|
282 |
-
],
|
283 |
-
"time": "2016-08-29 20:04:47"
|
284 |
-
}
|
285 |
-
],
|
286 |
-
"aliases": [],
|
287 |
-
"minimum-stability": "stable",
|
288 |
-
"stability-flags": {
|
289 |
-
"simplyadmire/composer-plugins": 20
|
290 |
-
},
|
291 |
-
"prefer-stable": false,
|
292 |
-
"prefer-lowest": false,
|
293 |
-
"platform": [],
|
294 |
-
"platform-dev": []
|
295 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/{includes/admin → admin}/class-demo-installer-skin.php
RENAMED
File without changes
|
includes/{includes/admin → admin}/class-demo-upgrader.php
RENAMED
File without changes
|
includes/{includes/admin → admin}/views/html-admin-page-importer.php
RENAMED
@@ -167,48 +167,73 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
167 |
|
168 |
<h3 class="plugins-info"><?php _e( 'Plugins Information', 'themegrill-demo-importer' ); ?></h3>
|
169 |
|
170 |
-
<
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
<
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
<
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
<
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
</tr>
|
204 |
-
<# }
|
205 |
-
|
|
|
206 |
<tr>
|
207 |
-
<
|
|
|
|
|
|
|
208 |
</tr>
|
209 |
-
|
210 |
-
</
|
211 |
-
</
|
212 |
|
213 |
<# if ( data.tags ) { #>
|
214 |
<p class="theme-tags"><span><?php _e( 'Tags:', 'themegrill-demo-importer' ); ?></span> {{{ data.tags }}}</p>
|
@@ -245,3 +270,4 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
245 |
<?php
|
246 |
wp_print_request_filesystem_credentials_modal();
|
247 |
wp_print_admin_notice_templates();
|
|
167 |
|
168 |
<h3 class="plugins-info"><?php _e( 'Plugins Information', 'themegrill-demo-importer' ); ?></h3>
|
169 |
|
170 |
+
<form method="post" id="bulk-action-form">
|
171 |
+
<?php wp_nonce_field( 'bulk-plugins-activate' ); ?>
|
172 |
+
<table class="plugins-list-table widefat striped">
|
173 |
+
<thead>
|
174 |
+
<tr>
|
175 |
+
<td id="cb" class="manage-column check-column">
|
176 |
+
<label class="screen-reader-text" for="cb-select-all-1"><?php esc_html_e( 'Select All', 'themegrill-demo-importer' ); ?></label>
|
177 |
+
<input id="cb-select-all-1" type="checkbox">
|
178 |
+
</td>
|
179 |
+
<th scope="col" class="manage-column plugin-name"><?php esc_html_e( 'Plugin Name', 'themegrill-demo-importer' ); ?></th>
|
180 |
+
<th scope="col" class="manage-column plugin-type"><?php esc_html_e( 'Type', 'themegrill-demo-importer' ); ?></th>
|
181 |
+
<th scope="col" class="manage-column plugin-status"><?php esc_html_e( 'Status', 'themegrill-demo-importer' ); ?></th>
|
182 |
+
</tr>
|
183 |
+
</thead>
|
184 |
+
<tbody id="the-list">
|
185 |
+
<# if ( ! _.isEmpty( data.plugins ) ) { #>
|
186 |
+
<# _.each( data.plugins, function( plugin, slug ) { #>
|
187 |
+
<# var checkboxIdPrefix = _.uniqueId( 'checkbox_' ) #>
|
188 |
+
<tr class="plugin<# if ( ! plugin.is_install ) { #> install<# } #>" data-slug="{{ slug }}" data-plugin="{{ plugin.slug }}" data-name="{{ plugin.name }}">
|
189 |
+
<th scope="row" class="check-column">
|
190 |
+
<label class="screen-reader-text" for="{{ checkboxIdPrefix }}"><?php printf( __( 'Select %s', 'themegrill-demo-importer' ), '{{ plugin.name }}' ); ?></label>
|
191 |
+
<input type="checkbox" name="checked[]" value="{{ plugin.slug }}" id="{{ checkboxIdPrefix }}"<# if ( plugin.required ) { #> data-checked="1" checked="checked" disabled="disabled"<# } #>>
|
192 |
+
<# if ( plugin.required ) { #>
|
193 |
+
<input type="hidden" name="checked[]" value="{{ plugin.slug }}">
|
194 |
+
<# } #>
|
195 |
+
</th>
|
196 |
+
<td class="plugin-name">
|
197 |
+
<# if ( plugin.link ) { #>
|
198 |
+
<a href="{{{ plugin.link }}}" target="_blank">{{{ plugin.name }}}</a>
|
199 |
+
<# } else { #>
|
200 |
+
<a href="<?php printf( esc_url( 'https://wordpress.org/plugins/%s' ), '{{ slug }}' ); ?>" target="_blank">{{ plugin.name }}</a>
|
201 |
+
<# } #>
|
202 |
+
</td>
|
203 |
+
<td class="plugin-type">
|
204 |
+
<# if ( plugin.required ) { #>
|
205 |
+
<abbr class="required"><?php esc_html_e( 'Required', 'themegrill-demo-importer' ); ?></abbr>
|
206 |
+
<# } else { #>
|
207 |
+
<abbr class="recommended"><?php esc_html_e( 'Recommended', 'themegrill-demo-importer' ); ?></abbr>
|
208 |
+
<# } #>
|
209 |
+
</td>
|
210 |
+
<td class="plugin-status">
|
211 |
+
<# if ( plugin.is_active && plugin.is_install ) { #>
|
212 |
+
<span class="active"><?php esc_html_e( 'Active', 'themegrill-demo-importer' ); ?></span>
|
213 |
+
<# } else if ( plugin.is_install ) { #>
|
214 |
+
<span class="activate-now"><?php esc_html_e( 'Activate', 'themegrill-demo-importer' ); ?></span>
|
215 |
+
<# } else { #>
|
216 |
+
<span class="install-now"><?php esc_html_e( 'Install Now', 'themegrill-demo-importer' ); ?></span>
|
217 |
+
<# } #>
|
218 |
+
</td>
|
219 |
+
</tr>
|
220 |
+
<# }); #>
|
221 |
+
<# } else { #>
|
222 |
+
<tr class="no-items">
|
223 |
+
<td class="colspanchange" colspan="4"><?php _e( 'No plugins are needed to import this demo.', 'themegrill-demo-importer' ); ?></td>
|
224 |
</tr>
|
225 |
+
<# } #>
|
226 |
+
</tbody>
|
227 |
+
<tfoot>
|
228 |
<tr>
|
229 |
+
<th scope="col" class="manage-column plugin-actions<# if ( ! data.pluginActions['install'] ) { #> installed<# } #>" colspan="4">
|
230 |
+
<a href="#" class="button button-primary plugins-install<# if ( ! data.pluginActions['install'] ) { #> disabled<# } #>"><?php _e( 'Install Plugins', 'themegrill-demo-importer' ); ?></a>
|
231 |
+
<input type="submit" name="bulk_action" id="bulk_action" class="button button-secondary plugins-activate" value="<?php esc_attr_e( __( 'Activate Plugins', 'themegrill-demo-importer' ) ); ?>"<# if ( ! data.pluginActions['activate'] ) { #> disabled<# } #>>
|
232 |
+
</th>
|
233 |
</tr>
|
234 |
+
</tfoot>
|
235 |
+
</table>
|
236 |
+
</form>
|
237 |
|
238 |
<# if ( data.tags ) { #>
|
239 |
<p class="theme-tags"><span><?php _e( 'Tags:', 'themegrill-demo-importer' ); ?></span> {{{ data.tags }}}</p>
|
270 |
<?php
|
271 |
wp_print_request_filesystem_credentials_modal();
|
272 |
wp_print_admin_notice_templates();
|
273 |
+
tg_print_admin_notice_templates();
|
includes/{includes/admin → admin}/views/html-admin-page-installer-preview.php
RENAMED
@@ -11,7 +11,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
11 |
<div class="theme-browser rendered">
|
12 |
<div class="themes wp-clearfix">
|
13 |
<?php foreach ( $demos as $demo ) : ?>
|
14 |
-
<div class="theme
|
15 |
<a target="_blank" href="<?php echo esc_url( $demo['actions']['preview_url'] ); ?>">
|
16 |
<?php if ( $demo['screenshot'] ) : ?>
|
17 |
<div class="theme-screenshot">
|
@@ -21,6 +21,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
21 |
<div class="theme-screenshot blank"></div>
|
22 |
<?php endif; ?>
|
23 |
<span class="more-details"><?php _e( 'Demo Preview', 'themegrill-demo-importer' ); ?></span>
|
|
|
|
|
|
|
24 |
</a>
|
25 |
<div class="theme-author"><?php
|
26 |
/* translators: %s: Demo author name */
|
@@ -35,8 +38,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
35 |
$aria_label = sprintf( _x( 'Download %s', 'demo', 'themegrill-demo-importer' ), esc_attr( $demo['name'] ) );
|
36 |
?>
|
37 |
<a class="button button-primary demo-download" data-name="<?php echo esc_attr( $demo['name'] ); ?>" href="<?php echo esc_url( $demo['actions']['download_url'] ); ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Download', 'themegrill-demo-importer' ); ?></a>
|
38 |
-
<?php
|
39 |
-
<?php if ( $demo['actions']['pro_link'] ) : ?>
|
40 |
<?php
|
41 |
/* translators: %s: Demo name */
|
42 |
$aria_label = sprintf( _x( 'View %s Pro', 'demo', 'themegrill-demo-importer' ), esc_attr( $demo['name'] ) );
|
11 |
<div class="theme-browser rendered">
|
12 |
<div class="themes wp-clearfix">
|
13 |
<?php foreach ( $demos as $demo ) : ?>
|
14 |
+
<div class="theme" tabindex="0">
|
15 |
<a target="_blank" href="<?php echo esc_url( $demo['actions']['preview_url'] ); ?>">
|
16 |
<?php if ( $demo['screenshot'] ) : ?>
|
17 |
<div class="theme-screenshot">
|
21 |
<div class="theme-screenshot blank"></div>
|
22 |
<?php endif; ?>
|
23 |
<span class="more-details"><?php _e( 'Demo Preview', 'themegrill-demo-importer' ); ?></span>
|
24 |
+
<?php if ( $demo['actions']['pro_link'] ) : ?>
|
25 |
+
<span class="premium-ribbon"><span><?php _e( 'Pro', 'themegrill-demo-importer' ); ?></span></span>
|
26 |
+
<?php endif; ?>
|
27 |
</a>
|
28 |
<div class="theme-author"><?php
|
29 |
/* translators: %s: Demo author name */
|
38 |
$aria_label = sprintf( _x( 'Download %s', 'demo', 'themegrill-demo-importer' ), esc_attr( $demo['name'] ) );
|
39 |
?>
|
40 |
<a class="button button-primary demo-download" data-name="<?php echo esc_attr( $demo['name'] ); ?>" href="<?php echo esc_url( $demo['actions']['download_url'] ); ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Download', 'themegrill-demo-importer' ); ?></a>
|
41 |
+
<?php elseif ( $demo['actions']['pro_link'] ) : ?>
|
|
|
42 |
<?php
|
43 |
/* translators: %s: Demo name */
|
44 |
$aria_label = sprintf( _x( 'View %s Pro', 'demo', 'themegrill-demo-importer' ), esc_attr( $demo['name'] ) );
|
includes/{includes/admin → admin}/views/html-admin-page-installer-uploads.php
RENAMED
File without changes
|
includes/{includes/admin → admin}/views/html-admin-page-installer.php
RENAMED
@@ -21,7 +21,7 @@ $demo_filter_links = apply_filters( 'themegrill_demo_importer_filter_links_array
|
|
21 |
<h1 class="wp-heading-inline"><?php esc_html_e( 'Demo Importer', 'themegrill-demo-importer' ); ?></h1>
|
22 |
|
23 |
<?php if ( current_user_can( 'upload_files' ) ) : ?>
|
24 |
-
<button type="button" class="upload-view-toggle page-title-action hide-if-no-js
|
25 |
<?php endif; ?>
|
26 |
|
27 |
<hr class="wp-header-end">
|
@@ -183,48 +183,73 @@ $demo_filter_links = apply_filters( 'themegrill_demo_importer_filter_links_array
|
|
183 |
|
184 |
<h3 class="plugins-info"><?php _e( 'Plugins Information', 'themegrill-demo-importer' ); ?></h3>
|
185 |
|
186 |
-
<
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
<
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
<
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
<
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
</tr>
|
220 |
-
<# }
|
221 |
-
|
|
|
222 |
<tr>
|
223 |
-
<
|
|
|
|
|
|
|
224 |
</tr>
|
225 |
-
|
226 |
-
</
|
227 |
-
</
|
228 |
|
229 |
<# if ( data.tags ) { #>
|
230 |
<p class="theme-tags"><span><?php _e( 'Tags:', 'themegrill-demo-importer' ); ?></span> {{{ data.tags }}}</p>
|
@@ -268,6 +293,9 @@ $demo_filter_links = apply_filters( 'themegrill_demo_importer_filter_links_array
|
|
268 |
<div class="theme-screenshot blank"></div>
|
269 |
<# } #>
|
270 |
<span class="more-details"><?php _e( 'Demo Preview', 'themegrill-demo-importer' ); ?></span>
|
|
|
|
|
|
|
271 |
</a>
|
272 |
<div class="theme-author"><?php
|
273 |
/* translators: %s: Demo author name */
|
@@ -282,8 +310,7 @@ $demo_filter_links = apply_filters( 'themegrill_demo_importer_filter_links_array
|
|
282 |
$aria_label = sprintf( _x( 'Download %s', 'demo', 'themegrill-demo-importer' ), '{{ data.name }}' );
|
283 |
?>
|
284 |
<a class="button button-primary demo-download" data-name="{{ data.name }}" href="{{ data.actions.download_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Download', 'themegrill-demo-importer' ); ?></a>
|
285 |
-
<# } #>
|
286 |
-
<# if ( data.actions.pro_link ) { #>
|
287 |
<?php
|
288 |
/* translators: %s: Demo name */
|
289 |
$aria_label = sprintf( _x( 'View %s Pro', 'demo', 'themegrill-demo-importer' ), '{{ data.name }}' );
|
@@ -301,3 +328,4 @@ $demo_filter_links = apply_filters( 'themegrill_demo_importer_filter_links_array
|
|
301 |
<?php
|
302 |
wp_print_request_filesystem_credentials_modal();
|
303 |
wp_print_admin_notice_templates();
|
|
21 |
<h1 class="wp-heading-inline"><?php esc_html_e( 'Demo Importer', 'themegrill-demo-importer' ); ?></h1>
|
22 |
|
23 |
<?php if ( current_user_can( 'upload_files' ) ) : ?>
|
24 |
+
<button type="button" class="upload-view-toggle page-title-action hide-if-no-js" aria-expanded="false"><?php _e( 'Upload Demo', 'themegrill-demo-importer' ); ?></button>
|
25 |
<?php endif; ?>
|
26 |
|
27 |
<hr class="wp-header-end">
|
183 |
|
184 |
<h3 class="plugins-info"><?php _e( 'Plugins Information', 'themegrill-demo-importer' ); ?></h3>
|
185 |
|
186 |
+
<form method="post" id="bulk-action-form">
|
187 |
+
<?php wp_nonce_field( 'bulk-plugins-activate' ); ?>
|
188 |
+
<table class="plugins-list-table widefat striped">
|
189 |
+
<thead>
|
190 |
+
<tr>
|
191 |
+
<td id="cb" class="manage-column check-column">
|
192 |
+
<label class="screen-reader-text" for="cb-select-all-1"><?php esc_html_e( 'Select All', 'themegrill-demo-importer' ); ?></label>
|
193 |
+
<input id="cb-select-all-1" type="checkbox">
|
194 |
+
</td>
|
195 |
+
<th scope="col" class="manage-column plugin-name"><?php esc_html_e( 'Plugin Name', 'themegrill-demo-importer' ); ?></th>
|
196 |
+
<th scope="col" class="manage-column plugin-type"><?php esc_html_e( 'Type', 'themegrill-demo-importer' ); ?></th>
|
197 |
+
<th scope="col" class="manage-column plugin-status"><?php esc_html_e( 'Status', 'themegrill-demo-importer' ); ?></th>
|
198 |
+
</tr>
|
199 |
+
</thead>
|
200 |
+
<tbody id="the-list">
|
201 |
+
<# if ( ! _.isEmpty( data.plugins ) ) { #>
|
202 |
+
<# _.each( data.plugins, function( plugin, slug ) { #>
|
203 |
+
<# var checkboxIdPrefix = _.uniqueId( 'checkbox_' ) #>
|
204 |
+
<tr class="plugin<# if ( ! plugin.is_install ) { #> install<# } #>" data-slug="{{ slug }}" data-plugin="{{ plugin.slug }}" data-name="{{ plugin.name }}">
|
205 |
+
<th scope="row" class="check-column">
|
206 |
+
<label class="screen-reader-text" for="{{ checkboxIdPrefix }}"><?php printf( __( 'Select %s', 'themegrill-demo-importer' ), '{{ plugin.name }}' ); ?></label>
|
207 |
+
<input type="checkbox" name="checked[]" value="{{ plugin.slug }}" id="{{ checkboxIdPrefix }}"<# if ( plugin.required ) { #> data-checked="1" checked="checked" disabled="disabled"<# } #>>
|
208 |
+
<# if ( plugin.required ) { #>
|
209 |
+
<input type="hidden" name="checked[]" value="{{ plugin.slug }}">
|
210 |
+
<# } #>
|
211 |
+
</th>
|
212 |
+
<td class="plugin-name">
|
213 |
+
<# if ( plugin.link ) { #>
|
214 |
+
<a href="{{{ plugin.link }}}" target="_blank">{{{ plugin.name }}}</a>
|
215 |
+
<# } else { #>
|
216 |
+
<a href="<?php printf( esc_url( 'https://wordpress.org/plugins/%s' ), '{{ slug }}' ); ?>" target="_blank">{{ plugin.name }}</a>
|
217 |
+
<# } #>
|
218 |
+
</td>
|
219 |
+
<td class="plugin-type">
|
220 |
+
<# if ( plugin.required ) { #>
|
221 |
+
<abbr class="required"><?php esc_html_e( 'Required', 'themegrill-demo-importer' ); ?></abbr>
|
222 |
+
<# } else { #>
|
223 |
+
<abbr class="recommended"><?php esc_html_e( 'Recommended', 'themegrill-demo-importer' ); ?></abbr>
|
224 |
+
<# } #>
|
225 |
+
</td>
|
226 |
+
<td class="plugin-status">
|
227 |
+
<# if ( plugin.is_active && plugin.is_install ) { #>
|
228 |
+
<span class="active"><?php esc_html_e( 'Active', 'themegrill-demo-importer' ); ?></span>
|
229 |
+
<# } else if ( plugin.is_install ) { #>
|
230 |
+
<span class="activate-now"><?php esc_html_e( 'Activate', 'themegrill-demo-importer' ); ?></span>
|
231 |
+
<# } else { #>
|
232 |
+
<span class="install-now"><?php esc_html_e( 'Install Now', 'themegrill-demo-importer' ); ?></span>
|
233 |
+
<# } #>
|
234 |
+
</td>
|
235 |
+
</tr>
|
236 |
+
<# }); #>
|
237 |
+
<# } else { #>
|
238 |
+
<tr class="no-items">
|
239 |
+
<td class="colspanchange" colspan="4"><?php _e( 'No plugins are needed to import this demo.', 'themegrill-demo-importer' ); ?></td>
|
240 |
</tr>
|
241 |
+
<# } #>
|
242 |
+
</tbody>
|
243 |
+
<tfoot>
|
244 |
<tr>
|
245 |
+
<th scope="col" class="manage-column plugin-actions<# if ( ! data.pluginActions['install'] ) { #> installed<# } #>" colspan="4">
|
246 |
+
<a href="#" class="button button-primary plugins-install<# if ( ! data.pluginActions['install'] ) { #> disabled<# } #>"><?php _e( 'Install Plugins', 'themegrill-demo-importer' ); ?></a>
|
247 |
+
<input type="submit" name="bulk_action" id="bulk_action" class="button button-secondary plugins-activate" value="<?php esc_attr_e( __( 'Activate Plugins', 'themegrill-demo-importer' ) ); ?>"<# if ( ! data.pluginActions['activate'] ) { #> disabled<# } #>>
|
248 |
+
</th>
|
249 |
</tr>
|
250 |
+
</tfoot>
|
251 |
+
</table>
|
252 |
+
</form>
|
253 |
|
254 |
<# if ( data.tags ) { #>
|
255 |
<p class="theme-tags"><span><?php _e( 'Tags:', 'themegrill-demo-importer' ); ?></span> {{{ data.tags }}}</p>
|
293 |
<div class="theme-screenshot blank"></div>
|
294 |
<# } #>
|
295 |
<span class="more-details"><?php _e( 'Demo Preview', 'themegrill-demo-importer' ); ?></span>
|
296 |
+
<# if ( data.actions.pro_link ) { #>
|
297 |
+
<span class="premium-ribbon"><span><?php _e( 'Pro', 'themegrill-demo-importer' ); ?></span></span>
|
298 |
+
<# } #>
|
299 |
</a>
|
300 |
<div class="theme-author"><?php
|
301 |
/* translators: %s: Demo author name */
|
310 |
$aria_label = sprintf( _x( 'Download %s', 'demo', 'themegrill-demo-importer' ), '{{ data.name }}' );
|
311 |
?>
|
312 |
<a class="button button-primary demo-download" data-name="{{ data.name }}" href="{{ data.actions.download_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Download', 'themegrill-demo-importer' ); ?></a>
|
313 |
+
<# } else if ( data.actions.pro_link ) { #>
|
|
|
314 |
<?php
|
315 |
/* translators: %s: Demo name */
|
316 |
$aria_label = sprintf( _x( 'View %s Pro', 'demo', 'themegrill-demo-importer' ), '{{ data.name }}' );
|
328 |
<?php
|
329 |
wp_print_request_filesystem_credentials_modal();
|
330 |
wp_print_admin_notice_templates();
|
331 |
+
tg_print_admin_notice_templates();
|
includes/{includes/admin → admin}/views/html-notice-reset-wizard-success.php
RENAMED
File without changes
|
includes/{includes/admin → admin}/views/html-notice-reset-wizard.php
RENAMED
File without changes
|
includes/class-demo-importer.php
CHANGED
@@ -30,12 +30,6 @@ class TG_Demo_Importer {
|
|
30 |
*/
|
31 |
public $demo_packages;
|
32 |
|
33 |
-
/**
|
34 |
-
* Demo installer.
|
35 |
-
* @var bool
|
36 |
-
*/
|
37 |
-
public $demo_installer = true;
|
38 |
-
|
39 |
/**
|
40 |
* Constructor.
|
41 |
*/
|
@@ -80,18 +74,16 @@ class TG_Demo_Importer {
|
|
80 |
* Demo importer setup.
|
81 |
*/
|
82 |
public function setup() {
|
83 |
-
$this->demo_config
|
84 |
-
$this->demo_packages
|
85 |
-
$this->demo_installer = apply_filters( 'themegrill_demo_importer_installer', true );
|
86 |
}
|
87 |
|
88 |
/**
|
89 |
* Include required core files.
|
90 |
*/
|
91 |
public function includes() {
|
92 |
-
include_once( dirname( __FILE__ ) . '/
|
93 |
-
include_once( dirname( __FILE__ ) . '/
|
94 |
-
include_once( dirname( __FILE__ ) . '/includes/class-widget-importer.php' );
|
95 |
}
|
96 |
|
97 |
/**
|
@@ -130,29 +122,6 @@ class TG_Demo_Importer {
|
|
130 |
return trailingslashit( $working_dir ) . sanitize_file_name( $filename );
|
131 |
}
|
132 |
|
133 |
-
/**
|
134 |
-
* Get the demo preview screenshot URL.
|
135 |
-
*
|
136 |
-
* @param string $demo_dir
|
137 |
-
* @param string $current_template
|
138 |
-
* @return string the demo preview screenshot URL.
|
139 |
-
*/
|
140 |
-
public function get_screenshot_url( $demo_dir, $current_template ) {
|
141 |
-
$screenshot_theme_path = get_template_directory() . "/images/demo/{$demo_dir}.jpg";
|
142 |
-
$screenshot_plugin_path = TGDM()->plugin_path() . "/assets/images/{$current_template}/{$demo_dir}.jpg";
|
143 |
-
|
144 |
-
if ( file_exists( $screenshot_theme_path ) ) {
|
145 |
-
$screenshot_url = get_template_directory_uri() . "/images/demo/{$demo_dir}.jpg";
|
146 |
-
} elseif ( file_exists( $screenshot_plugin_path ) ) {
|
147 |
-
$screenshot_url = TGDM()->plugin_url() . "/assets/images/{$current_template}/{$demo_dir}.jpg";
|
148 |
-
} else {
|
149 |
-
$theme_data = wp_get_theme();
|
150 |
-
$screenshot_url = $theme_data->get_screenshot();
|
151 |
-
}
|
152 |
-
|
153 |
-
return $screenshot_url;
|
154 |
-
}
|
155 |
-
|
156 |
/**
|
157 |
* Check if demo pack is enabled.
|
158 |
* @param array $demo_id
|
@@ -180,7 +149,7 @@ class TG_Demo_Importer {
|
|
180 |
global $submenu;
|
181 |
|
182 |
if ( isset( $submenu['themes.php'] ) ) {
|
183 |
-
$submenu_class =
|
184 |
|
185 |
// Add menu classes if user has access.
|
186 |
if ( apply_filters( 'themegrill_demo_importer_include_class_in_menu', true ) ) {
|
@@ -235,17 +204,18 @@ class TG_Demo_Importer {
|
|
235 |
),
|
236 |
) );
|
237 |
wp_localize_script( 'tg-demo-importer', 'demoImporterLocalizeScript', array(
|
238 |
-
'demos' => $this->prepare_demos_for_js(
|
239 |
'settings' => array(
|
240 |
-
'isPreview'
|
241 |
-
'isInstall'
|
242 |
-
'canInstall'
|
243 |
-
'installURI'
|
244 |
-
'confirmReset'
|
245 |
-
'confirmDelete'
|
246 |
-
'confirmImport'
|
247 |
-
'
|
248 |
-
'
|
|
|
249 |
),
|
250 |
'l10n' => array(
|
251 |
'addNew' => __( 'Add New Demo', 'themegrill-demo-importer' ),
|
@@ -275,7 +245,7 @@ class TG_Demo_Importer {
|
|
275 |
if ( isset( $current_screen->id ) && apply_filters( 'themegrill_demo_importer_display_admin_footer_text', in_array( $current_screen->id, array( 'appearance_page_demo-importer' ) ) ) ) {
|
276 |
// Change the footer text.
|
277 |
if ( ! get_option( 'themegrill_demo_importer_admin_footer_text_rated' ) ) {
|
278 |
-
$footer_text = sprintf( __( 'If you like <strong>ThemeGrill Demo Importer</strong> please leave us a %s★★★★★%s rating. A huge thanks in advance!', 'themegrill-demo-importer' ), '<a href="https://wordpress.org/support/plugin/themegrill-demo-importer/reviews?rate=5#new-post" target="_blank" class="themegrill-demo-importer-rating-link" data-rated="' . esc_attr__( 'Thanks :)', 'themegrill-demo-importer' ) . '">', '</a>' );
|
279 |
} else {
|
280 |
$footer_text = __( 'Thank you for importing with ThemeGrill Demo Importer.', 'themegrill-demo-importer' );
|
281 |
}
|
@@ -297,24 +267,21 @@ class TG_Demo_Importer {
|
|
297 |
$video_map = array(
|
298 |
'demo-importer' => array(
|
299 |
'title' => __( 'Importing Demo', 'themegrill-demo-importer' ),
|
300 |
-
'
|
301 |
),
|
302 |
);
|
303 |
|
304 |
-
$
|
305 |
-
$video_key = $page ? $page : $screen->id;
|
306 |
|
307 |
-
if ( !
|
308 |
$screen->add_help_tab( array(
|
309 |
'id' => 'themegrill_demo_importer_guided_tour_tab',
|
310 |
'title' => __( 'Guided Tour', 'themegrill-demo-importer' ),
|
311 |
'content' =>
|
312 |
'<h2>' . __( 'Guided Tour', 'themegrill-demo-importer' ) . ' – ' . esc_html( $video_map[ $video_key ]['title'] ) . '</h2>' .
|
313 |
-
'<
|
314 |
-
<div class="
|
315 |
-
|
316 |
-
</div></div>
|
317 |
-
<script src="//fast.wistia.net/assets/external/E-v1.js" async></script>',
|
318 |
) );
|
319 |
}
|
320 |
|
@@ -378,9 +345,9 @@ class TG_Demo_Importer {
|
|
378 |
|
379 |
// Output reset wizard notice.
|
380 |
if ( ! $demo_notice_dismiss && in_array( $demo_activated_id, array_keys( $this->demo_config ) ) ) {
|
381 |
-
include_once( dirname( __FILE__ ) . '/
|
382 |
} elseif ( isset( $_GET['reset'] ) && 'true' === $_GET['reset'] ) {
|
383 |
-
include_once( dirname( __FILE__ ) . '/
|
384 |
}
|
385 |
}
|
386 |
|
@@ -420,7 +387,7 @@ class TG_Demo_Importer {
|
|
420 |
$blog_public = get_option( 'blog_public' );
|
421 |
$footer_rated = get_option( 'themegrill_demo_importer_admin_footer_text_rated' );
|
422 |
|
423 |
-
if ( $current_user->user_login
|
424 |
$user = get_user_by( 'login', 'admin' );
|
425 |
}
|
426 |
|
@@ -458,16 +425,12 @@ class TG_Demo_Importer {
|
|
458 |
}
|
459 |
|
460 |
// Activate required plugins.
|
461 |
-
$
|
462 |
-
if (
|
463 |
-
|
464 |
-
$
|
465 |
-
if ( ! is_wp_error( validate_plugin( $plugin ) ) ) {
|
466 |
-
activate_plugin( $plugin );
|
467 |
-
}
|
468 |
}
|
469 |
-
|
470 |
-
activate_plugin( TGDM_PLUGIN_BASENAME );
|
471 |
}
|
472 |
|
473 |
// Update the cookies.
|
@@ -480,18 +443,6 @@ class TG_Demo_Importer {
|
|
480 |
}
|
481 |
}
|
482 |
|
483 |
-
/**
|
484 |
-
* Check for preview filter.
|
485 |
-
* @return bool
|
486 |
-
*/
|
487 |
-
public function is_preview() {
|
488 |
-
if ( $this->demo_installer && isset( $_GET['browse'] ) ) {
|
489 |
-
return 'preview' === $_GET['browse'] ? true : false;
|
490 |
-
}
|
491 |
-
|
492 |
-
return false;
|
493 |
-
}
|
494 |
-
|
495 |
/**
|
496 |
* Prepare demos for JavaScript.
|
497 |
*
|
@@ -517,14 +468,15 @@ class TG_Demo_Importer {
|
|
517 |
}
|
518 |
|
519 |
// Make sure the imported demo is listed first.
|
520 |
-
if ( !
|
521 |
$prepared_demos[ $demo_activated_id ] = array();
|
522 |
}
|
523 |
|
524 |
if ( ! empty( $demos ) ) {
|
525 |
foreach ( $demos as $demo_id => $demo_data ) {
|
526 |
-
$
|
527 |
-
$
|
|
|
528 |
$premium_link = isset( $demo_data['pro_link'] ) ? $demo_data['pro_link'] : '';
|
529 |
$download_url = isset( $demo_data['download'] ) ? $demo_data['download'] : "https://github.com/themegrill/themegrill-demo-pack/raw/master/packages/{$current_template}/{$demo_id}.zip";
|
530 |
$demo_package = isset( $demo_data['demo_pack'] ) ? $demo_data['demo_pack'] : false;
|
@@ -533,30 +485,35 @@ class TG_Demo_Importer {
|
|
533 |
// Plugins status.
|
534 |
foreach ( $plugins_list as $plugin => $plugin_data ) {
|
535 |
$plugins_list[ $plugin ]['is_active'] = is_plugin_active( $plugin_data['slug'] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
536 |
}
|
537 |
|
538 |
// Add demo notices.
|
|
|
539 |
if ( isset( $demo_data['template'] ) && $current_template !== $demo_data['template'] ) {
|
540 |
$demo_notices['required_theme'] = true;
|
541 |
} elseif ( wp_list_filter( $plugins_list, array( 'required' => true, 'is_active' => false ) ) ) {
|
542 |
$demo_notices['required_plugins'] = true;
|
543 |
}
|
544 |
|
545 |
-
// Check if demo is installed.
|
546 |
-
$installed = false;
|
547 |
-
if ( in_array( $demo_id, array_keys( $this->demo_config ) ) ) {
|
548 |
-
$installed = true;
|
549 |
-
}
|
550 |
-
|
551 |
// Prepare all demos.
|
552 |
-
if (
|
553 |
$prepared_demos[ $demo_id ] = array(
|
554 |
'id' => $demo_id,
|
555 |
'name' => $demo_data['name'],
|
556 |
-
'installed' => $
|
557 |
-
'screenshot' =>
|
558 |
-
'description' =>
|
559 |
-
'author' =>
|
560 |
'actions' => array(
|
561 |
'pro_link' => $premium_link,
|
562 |
'preview_url' => $demo_data['preview'],
|
@@ -570,13 +527,17 @@ class TG_Demo_Importer {
|
|
570 |
'theme' => $demo_data['theme'],
|
571 |
'package' => $demo_package,
|
572 |
'screenshot' => $this->import_file_url( $demo_id, 'screenshot.jpg' ),
|
573 |
-
'description' =>
|
574 |
-
'author' =>
|
575 |
'authorAndUri' => '<a href="https://themegrill.com" target="_blank">ThemeGrill</a>',
|
576 |
-
'version' =>
|
577 |
'active' => $demo_id === $demo_activated_id,
|
578 |
'hasNotice' => $demo_notices,
|
579 |
'plugins' => $plugins_list,
|
|
|
|
|
|
|
|
|
580 |
'actions' => array(
|
581 |
'preview' => home_url( '/' ),
|
582 |
'demo_url' => $demo_data['demo_url'],
|
@@ -603,13 +564,13 @@ class TG_Demo_Importer {
|
|
603 |
* Demo Importer page output.
|
604 |
*/
|
605 |
public function demo_importer() {
|
606 |
-
$demos = $this->prepare_demos_for_js(
|
607 |
|
608 |
if ( isset( $_GET['action'] ) && 'upload-demo' === $_GET['action'] ) {
|
609 |
$this->upload_demo_pack();
|
610 |
} else {
|
611 |
-
$suffix =
|
612 |
-
include_once( dirname( __FILE__ ) . "/
|
613 |
}
|
614 |
}
|
615 |
|
@@ -633,8 +594,8 @@ class TG_Demo_Importer {
|
|
633 |
$type = 'upload'; // Install demo type, From Web or an Upload.
|
634 |
|
635 |
// Demo Upgrader Class.
|
636 |
-
include_once( dirname( __FILE__ ) . '/
|
637 |
-
include_once( dirname( __FILE__ ) . '/
|
638 |
|
639 |
$upgrader = new TG_Demo_Upgrader( new TG_Demo_Installer_Skin( compact( 'type', 'title', 'nonce', 'url' ) ) );
|
640 |
$result = $upgrader->install( $file_upload->package );
|
@@ -730,7 +691,7 @@ class TG_Demo_Importer {
|
|
730 |
}
|
731 |
|
732 |
// Include WXR Importer.
|
733 |
-
require dirname( __FILE__ ) . '/
|
734 |
|
735 |
do_action( 'themegrill_ajax_before_dummy_xml_import', $demo_data, $demo_id );
|
736 |
|
30 |
*/
|
31 |
public $demo_packages;
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
/**
|
34 |
* Constructor.
|
35 |
*/
|
74 |
* Demo importer setup.
|
75 |
*/
|
76 |
public function setup() {
|
77 |
+
$this->demo_config = apply_filters( 'themegrill_demo_importer_config', array() );
|
78 |
+
$this->demo_packages = apply_filters( 'themegrill_demo_importer_packages', array() );
|
|
|
79 |
}
|
80 |
|
81 |
/**
|
82 |
* Include required core files.
|
83 |
*/
|
84 |
public function includes() {
|
85 |
+
include_once( dirname( __FILE__ ) . '/importers/class-widget-importer.php' );
|
86 |
+
include_once( dirname( __FILE__ ) . '/importers/class-customizer-importer.php' );
|
|
|
87 |
}
|
88 |
|
89 |
/**
|
122 |
return trailingslashit( $working_dir ) . sanitize_file_name( $filename );
|
123 |
}
|
124 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
/**
|
126 |
* Check if demo pack is enabled.
|
127 |
* @param array $demo_id
|
149 |
global $submenu;
|
150 |
|
151 |
if ( isset( $submenu['themes.php'] ) ) {
|
152 |
+
$submenu_class = tg_demo_installer_enabled() ? 'demo-installer hide-if-no-js' : 'demo-importer';
|
153 |
|
154 |
// Add menu classes if user has access.
|
155 |
if ( apply_filters( 'themegrill_demo_importer_include_class_in_menu', true ) ) {
|
204 |
),
|
205 |
) );
|
206 |
wp_localize_script( 'tg-demo-importer', 'demoImporterLocalizeScript', array(
|
207 |
+
'demos' => $this->prepare_demos_for_js( tg_demo_installer_preview() ? $this->demo_packages : $this->demo_config ),
|
208 |
'settings' => array(
|
209 |
+
'isPreview' => tg_demo_installer_preview(),
|
210 |
+
'isInstall' => tg_demo_installer_enabled(),
|
211 |
+
'canInstall' => current_user_can( 'upload_files' ),
|
212 |
+
'installURI' => current_user_can( 'upload_files' ) ? self_admin_url( 'themes.php?page=demo-importer&browse=preview' ) : null,
|
213 |
+
'confirmReset' => __( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the reset wizard now?', 'themegrill-demo-importer' ),
|
214 |
+
'confirmDelete' => __( "Are you sure you want to delete this demo?\n\nClick 'Cancel' to go back, 'OK' to confirm the delete.", 'themegrill-demo-importer' ),
|
215 |
+
'confirmImport' => __( 'Importing demo content will replicate the live demo and overwrites your current customizer, widgets and other settings. It might take few minutes to complete the demo import. Are you sure you want to import this demo?', 'themegrill-demo-importer' ),
|
216 |
+
'confirmInstall' => __( 'Are you sure you want to install the selected plugins and their data?', 'themegrill-demo-importer' ),
|
217 |
+
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
|
218 |
+
'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ),
|
219 |
),
|
220 |
'l10n' => array(
|
221 |
'addNew' => __( 'Add New Demo', 'themegrill-demo-importer' ),
|
245 |
if ( isset( $current_screen->id ) && apply_filters( 'themegrill_demo_importer_display_admin_footer_text', in_array( $current_screen->id, array( 'appearance_page_demo-importer' ) ) ) ) {
|
246 |
// Change the footer text.
|
247 |
if ( ! get_option( 'themegrill_demo_importer_admin_footer_text_rated' ) ) {
|
248 |
+
$footer_text = sprintf( __( 'If you like <strong>ThemeGrill Demo Importer</strong> please leave us a %1$s★★★★★%2$s rating. A huge thanks in advance!', 'themegrill-demo-importer' ), '<a href="https://wordpress.org/support/plugin/themegrill-demo-importer/reviews?rate=5#new-post" target="_blank" class="themegrill-demo-importer-rating-link" data-rated="' . esc_attr__( 'Thanks :)', 'themegrill-demo-importer' ) . '">', '</a>' );
|
249 |
} else {
|
250 |
$footer_text = __( 'Thank you for importing with ThemeGrill Demo Importer.', 'themegrill-demo-importer' );
|
251 |
}
|
267 |
$video_map = array(
|
268 |
'demo-importer' => array(
|
269 |
'title' => __( 'Importing Demo', 'themegrill-demo-importer' ),
|
270 |
+
'id' => 'ctdquor9uh',
|
271 |
),
|
272 |
);
|
273 |
|
274 |
+
$video_key = empty( $_GET['page'] ) ? $screen->id : sanitize_title( $_GET['page'] );
|
|
|
275 |
|
276 |
+
if ( ! tg_demo_installer_enabled() && isset( $video_map[ $video_key ] ) ) {
|
277 |
$screen->add_help_tab( array(
|
278 |
'id' => 'themegrill_demo_importer_guided_tour_tab',
|
279 |
'title' => __( 'Guided Tour', 'themegrill-demo-importer' ),
|
280 |
'content' =>
|
281 |
'<h2>' . __( 'Guided Tour', 'themegrill-demo-importer' ) . ' – ' . esc_html( $video_map[ $video_key ]['title'] ) . '</h2>' .
|
282 |
+
'<script src="//fast.wistia.net/assets/external/E-v1.js" aync></script>
|
283 |
+
<div class="wistia_embed wistia_async_' . esc_attr( $video_map[ $video_key ]['id'] ) . ' videoFoam=true seo=false" style="width:640px;height:360px;"> </div>
|
284 |
+
',
|
|
|
|
|
285 |
) );
|
286 |
}
|
287 |
|
345 |
|
346 |
// Output reset wizard notice.
|
347 |
if ( ! $demo_notice_dismiss && in_array( $demo_activated_id, array_keys( $this->demo_config ) ) ) {
|
348 |
+
include_once( dirname( __FILE__ ) . '/admin/views/html-notice-reset-wizard.php' );
|
349 |
} elseif ( isset( $_GET['reset'] ) && 'true' === $_GET['reset'] ) {
|
350 |
+
include_once( dirname( __FILE__ ) . '/admin/views/html-notice-reset-wizard-success.php' );
|
351 |
}
|
352 |
}
|
353 |
|
387 |
$blog_public = get_option( 'blog_public' );
|
388 |
$footer_rated = get_option( 'themegrill_demo_importer_admin_footer_text_rated' );
|
389 |
|
390 |
+
if ( 'admin' != $current_user->user_login ) {
|
391 |
$user = get_user_by( 'login', 'admin' );
|
392 |
}
|
393 |
|
425 |
}
|
426 |
|
427 |
// Activate required plugins.
|
428 |
+
$required_plugins = (array) apply_filters( 'themegrill_demo_importer_' . $template . '_required_plugins', array() );
|
429 |
+
if ( is_array( $required_plugins ) ) {
|
430 |
+
if ( ! in_array( TGDM_PLUGIN_BASENAME, $required_plugins ) ) {
|
431 |
+
$required_plugins = array_merge( $required_plugins, array( TGDM_PLUGIN_BASENAME ) );
|
|
|
|
|
|
|
432 |
}
|
433 |
+
activate_plugins( $required_plugins, '', is_network_admin(), true );
|
|
|
434 |
}
|
435 |
|
436 |
// Update the cookies.
|
443 |
}
|
444 |
}
|
445 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
/**
|
447 |
* Prepare demos for JavaScript.
|
448 |
*
|
468 |
}
|
469 |
|
470 |
// Make sure the imported demo is listed first.
|
471 |
+
if ( ! tg_demo_installer_preview() && isset( $demos[ $demo_activated_id ] ) ) {
|
472 |
$prepared_demos[ $demo_activated_id ] = array();
|
473 |
}
|
474 |
|
475 |
if ( ! empty( $demos ) ) {
|
476 |
foreach ( $demos as $demo_id => $demo_data ) {
|
477 |
+
$author = isset( $demo_data['author'] ) ? $demo_data['author'] : __( 'ThemeGrill', 'themegrill-demo-importer' );
|
478 |
+
$version = isset( $demo_data['version'] ) ? $demo_data['version'] : TGDM_VERSION;
|
479 |
+
$description = isset( $demo_data['description'] ) ? $demo_data['description'] : '';
|
480 |
$premium_link = isset( $demo_data['pro_link'] ) ? $demo_data['pro_link'] : '';
|
481 |
$download_url = isset( $demo_data['download'] ) ? $demo_data['download'] : "https://github.com/themegrill/themegrill-demo-pack/raw/master/packages/{$current_template}/{$demo_id}.zip";
|
482 |
$demo_package = isset( $demo_data['demo_pack'] ) ? $demo_data['demo_pack'] : false;
|
485 |
// Plugins status.
|
486 |
foreach ( $plugins_list as $plugin => $plugin_data ) {
|
487 |
$plugins_list[ $plugin ]['is_active'] = is_plugin_active( $plugin_data['slug'] );
|
488 |
+
|
489 |
+
// Looks like a plugin is installed, but not active.
|
490 |
+
if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin ) ) {
|
491 |
+
$plugins = get_plugins( '/' . $plugin );
|
492 |
+
if ( ! empty( $plugins ) ) {
|
493 |
+
$plugins_list[ $plugin ]['is_install'] = true;
|
494 |
+
}
|
495 |
+
} else {
|
496 |
+
$plugins_list[ $plugin ]['is_install'] = false;
|
497 |
+
}
|
498 |
}
|
499 |
|
500 |
// Add demo notices.
|
501 |
+
$demo_notices = array();
|
502 |
if ( isset( $demo_data['template'] ) && $current_template !== $demo_data['template'] ) {
|
503 |
$demo_notices['required_theme'] = true;
|
504 |
} elseif ( wp_list_filter( $plugins_list, array( 'required' => true, 'is_active' => false ) ) ) {
|
505 |
$demo_notices['required_plugins'] = true;
|
506 |
}
|
507 |
|
|
|
|
|
|
|
|
|
|
|
|
|
508 |
// Prepare all demos.
|
509 |
+
if ( tg_demo_installer_preview() ) {
|
510 |
$prepared_demos[ $demo_id ] = array(
|
511 |
'id' => $demo_id,
|
512 |
'name' => $demo_data['name'],
|
513 |
+
'installed' => in_array( $demo_id, array_keys( $this->demo_config ) ),
|
514 |
+
'screenshot' => tg_get_demo_preview_screenshot_url( $demo_id, $current_template ),
|
515 |
+
'description' => $description,
|
516 |
+
'author' => $author,
|
517 |
'actions' => array(
|
518 |
'pro_link' => $premium_link,
|
519 |
'preview_url' => $demo_data['preview'],
|
527 |
'theme' => $demo_data['theme'],
|
528 |
'package' => $demo_package,
|
529 |
'screenshot' => $this->import_file_url( $demo_id, 'screenshot.jpg' ),
|
530 |
+
'description' => $description,
|
531 |
+
'author' => $author,
|
532 |
'authorAndUri' => '<a href="https://themegrill.com" target="_blank">ThemeGrill</a>',
|
533 |
+
'version' => $version,
|
534 |
'active' => $demo_id === $demo_activated_id,
|
535 |
'hasNotice' => $demo_notices,
|
536 |
'plugins' => $plugins_list,
|
537 |
+
'pluginActions' => array(
|
538 |
+
'install' => wp_list_filter( $plugins_list, array( 'is_install' => false ) ) ? true : false,
|
539 |
+
'activate' => wp_list_filter( $plugins_list, array( 'is_active' => false ) ) ? true : false,
|
540 |
+
),
|
541 |
'actions' => array(
|
542 |
'preview' => home_url( '/' ),
|
543 |
'demo_url' => $demo_data['demo_url'],
|
564 |
* Demo Importer page output.
|
565 |
*/
|
566 |
public function demo_importer() {
|
567 |
+
$demos = $this->prepare_demos_for_js( tg_demo_installer_preview() ? $this->demo_packages : $this->demo_config );
|
568 |
|
569 |
if ( isset( $_GET['action'] ) && 'upload-demo' === $_GET['action'] ) {
|
570 |
$this->upload_demo_pack();
|
571 |
} else {
|
572 |
+
$suffix = tg_demo_installer_enabled() ? 'installer' : 'importer';
|
573 |
+
include_once( dirname( __FILE__ ) . "/admin/views/html-admin-page-{$suffix}.php" );
|
574 |
}
|
575 |
}
|
576 |
|
594 |
$type = 'upload'; // Install demo type, From Web or an Upload.
|
595 |
|
596 |
// Demo Upgrader Class.
|
597 |
+
include_once( dirname( __FILE__ ) . '/admin/class-demo-upgrader.php' );
|
598 |
+
include_once( dirname( __FILE__ ) . '/admin/class-demo-installer-skin.php' );
|
599 |
|
600 |
$upgrader = new TG_Demo_Upgrader( new TG_Demo_Installer_Skin( compact( 'type', 'title', 'nonce', 'url' ) ) );
|
601 |
$result = $upgrader->install( $file_upload->package );
|
691 |
}
|
692 |
|
693 |
// Include WXR Importer.
|
694 |
+
require( dirname( __FILE__ ) . '/importers/wordpress-importer/class-wxr-importer.php' );
|
695 |
|
696 |
do_action( 'themegrill_ajax_before_dummy_xml_import', $demo_data, $demo_id );
|
697 |
|
includes/{includes/functions-demo-importer.php → functions-demo-importer.php}
RENAMED
@@ -12,31 +12,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
12 |
exit;
|
13 |
}
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Get a demo file URL.
|
19 |
-
*
|
20 |
-
* @param string $demo_dir demo dir.
|
21 |
-
* @return string the demo data file URL.
|
22 |
-
*/
|
23 |
-
function tg_get_demo_file_url( $demo_dir ) {
|
24 |
-
return apply_filters( 'themegrill_demo_file_url', get_template_directory_uri() . '/inc/demo-data/' . $demo_dir, $demo_dir );
|
25 |
-
}
|
26 |
-
}
|
27 |
-
|
28 |
-
if ( ! function_exists( 'tg_get_demo_file_path' ) ) {
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Get a demo file path.
|
32 |
-
*
|
33 |
-
* @param string $demo_dir demo dir.
|
34 |
-
* @return string the demo data file path.
|
35 |
-
*/
|
36 |
-
function tg_get_demo_file_path( $demo_dir ) {
|
37 |
-
return apply_filters( 'themegrill_demo_file_path', get_template_directory() . '/inc/demo-data/' . $demo_dir . '/dummy-data', $demo_dir );
|
38 |
-
}
|
39 |
-
}
|
40 |
|
41 |
/**
|
42 |
* Get an attachment ID from the filename.
|
@@ -83,6 +60,40 @@ function tg_get_attachment_id( $filename ) {
|
|
83 |
return $attachment_id;
|
84 |
}
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
/**
|
87 |
* Ajax handler for deleting a demo pack.
|
88 |
* @see tg_delete_demo_pack()
|
@@ -215,6 +226,32 @@ function tg_delete_demo_pack( $demo_pack, $redirect = '' ) {
|
|
215 |
return true;
|
216 |
}
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
/**
|
219 |
* Clear data before demo import AJAX action.
|
220 |
*
|
@@ -347,3 +384,74 @@ function tg_set_wc_pages( $demo_id ) {
|
|
347 |
// We no longer need WC setup wizard redirect.
|
348 |
delete_transient( '_wc_activation_redirect' );
|
349 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
exit;
|
13 |
}
|
14 |
|
15 |
+
// Include core functions (available in both admin and frontend).
|
16 |
+
include_once( TGDM_ABSPATH . 'includes/functions-demo-update.php' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
/**
|
19 |
* Get an attachment ID from the filename.
|
60 |
return $attachment_id;
|
61 |
}
|
62 |
|
63 |
+
/**
|
64 |
+
* Bulk plugin activation action.
|
65 |
+
*/
|
66 |
+
function tg_activate_bulk_plugin() {
|
67 |
+
if ( ! empty( $_REQUEST['bulk_action'] ) ) {
|
68 |
+
if ( ! current_user_can( 'activate_plugins' ) ) {
|
69 |
+
wp_die( __( 'Sorry, you are not allowed to activate plugins for this site.', 'themegrill-demo-importer' ) );
|
70 |
+
}
|
71 |
+
|
72 |
+
check_admin_referer( 'bulk-plugins-activate' );
|
73 |
+
|
74 |
+
$plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
|
75 |
+
|
76 |
+
if ( is_network_admin() ) {
|
77 |
+
foreach ( $plugins as $i => $plugin ) {
|
78 |
+
// Only activate plugins which are not already network activated.
|
79 |
+
if ( is_plugin_active_for_network( $plugin ) ) {
|
80 |
+
unset( $plugins[ $i ] );
|
81 |
+
}
|
82 |
+
}
|
83 |
+
} else {
|
84 |
+
foreach ( $plugins as $i => $plugin ) {
|
85 |
+
// Only activate plugins which are not already active and are not network-only when on Multisite.
|
86 |
+
if ( is_plugin_active( $plugin ) || ( is_multisite() && is_network_only_plugin( $plugin ) ) ) {
|
87 |
+
unset( $plugins[ $i ] );
|
88 |
+
}
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
activate_plugins( $plugins, '', is_network_admin() );
|
93 |
+
}
|
94 |
+
}
|
95 |
+
add_action( 'admin_init', 'tg_activate_bulk_plugin' );
|
96 |
+
|
97 |
/**
|
98 |
* Ajax handler for deleting a demo pack.
|
99 |
* @see tg_delete_demo_pack()
|
226 |
return true;
|
227 |
}
|
228 |
|
229 |
+
if ( ! function_exists( 'tg_demo_installer_enabled' ) ) {
|
230 |
+
|
231 |
+
/**
|
232 |
+
* Is demo installer enabled?
|
233 |
+
* @return bool
|
234 |
+
*/
|
235 |
+
function tg_demo_installer_enabled() {
|
236 |
+
return apply_filters( 'themegrill_demo_importer_installer', true );
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
if ( ! function_exists( 'tg_demo_installer_preview' ) ) {
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Is demo installer preview filter?
|
244 |
+
* @return bool
|
245 |
+
*/
|
246 |
+
function tg_demo_installer_preview() {
|
247 |
+
if ( tg_demo_installer_enabled() && isset( $_GET['browse'] ) ) {
|
248 |
+
return 'preview' === $_GET['browse'] ? true : false;
|
249 |
+
}
|
250 |
+
|
251 |
+
return false;
|
252 |
+
}
|
253 |
+
}
|
254 |
+
|
255 |
/**
|
256 |
* Clear data before demo import AJAX action.
|
257 |
*
|
384 |
// We no longer need WC setup wizard redirect.
|
385 |
delete_transient( '_wc_activation_redirect' );
|
386 |
}
|
387 |
+
|
388 |
+
/**
|
389 |
+
* Prints the JavaScript templates for install admin notices.
|
390 |
+
*
|
391 |
+
* Template takes one argument with four values:
|
392 |
+
*
|
393 |
+
* param {object} data {
|
394 |
+
* Arguments for admin notice.
|
395 |
+
*
|
396 |
+
* @type string id ID of the notice.
|
397 |
+
* @type string className Class names for the notice.
|
398 |
+
* @type string message The notice's message.
|
399 |
+
* @type string type The type of update the notice is for. Either 'plugin' or 'theme'.
|
400 |
+
* }
|
401 |
+
*
|
402 |
+
* @since 1.4.0
|
403 |
+
*/
|
404 |
+
function tg_print_admin_notice_templates() {
|
405 |
+
?>
|
406 |
+
<script id="tmpl-wp-installs-admin-notice" type="text/html">
|
407 |
+
<div <# if ( data.id ) { #>id="{{ data.id }}"<# } #> class="notice {{ data.className }}"><p>{{{ data.message }}}</p></div>
|
408 |
+
</script>
|
409 |
+
<script id="tmpl-wp-bulk-installs-admin-notice" type="text/html">
|
410 |
+
<div id="{{ data.id }}" class="{{ data.className }} notice <# if ( data.errors ) { #>notice-error<# } else { #>notice-success<# } #>">
|
411 |
+
<p>
|
412 |
+
<# if ( data.successes ) { #>
|
413 |
+
<# if ( 1 === data.successes ) { #>
|
414 |
+
<# if ( 'plugin' === data.type ) { #>
|
415 |
+
<?php
|
416 |
+
/* translators: %s: Number of plugins */
|
417 |
+
printf( __( '%s plugin successfully installed.' ), '{{ data.successes }}' );
|
418 |
+
?>
|
419 |
+
<# } #>
|
420 |
+
<# } else { #>
|
421 |
+
<# if ( 'plugin' === data.type ) { #>
|
422 |
+
<?php
|
423 |
+
/* translators: %s: Number of plugins */
|
424 |
+
printf( __( '%s plugins successfully installed.' ), '{{ data.successes }}' );
|
425 |
+
?>
|
426 |
+
<# } #>
|
427 |
+
<# } #>
|
428 |
+
<# } #>
|
429 |
+
<# if ( data.errors ) { #>
|
430 |
+
<button class="button-link bulk-action-errors-collapsed" aria-expanded="false">
|
431 |
+
<# if ( 1 === data.errors ) { #>
|
432 |
+
<?php
|
433 |
+
/* translators: %s: Number of failed installs */
|
434 |
+
printf( __( '%s install failed.' ), '{{ data.errors }}' );
|
435 |
+
?>
|
436 |
+
<# } else { #>
|
437 |
+
<?php
|
438 |
+
/* translators: %s: Number of failed installs */
|
439 |
+
printf( __( '%s installs failed.' ), '{{ data.errors }}' );
|
440 |
+
?>
|
441 |
+
<# } #>
|
442 |
+
<span class="screen-reader-text"><?php _e( 'Show more details' ); ?></span>
|
443 |
+
<span class="toggle-indicator" aria-hidden="true"></span>
|
444 |
+
</button>
|
445 |
+
<# } #>
|
446 |
+
</p>
|
447 |
+
<# if ( data.errors ) { #>
|
448 |
+
<ul class="bulk-action-errors hidden">
|
449 |
+
<# _.each( data.errorMessages, function( errorMessage ) { #>
|
450 |
+
<li>{{ errorMessage }}</li>
|
451 |
+
<# } ); #>
|
452 |
+
</ul>
|
453 |
+
<# } #>
|
454 |
+
</div>
|
455 |
+
</script>
|
456 |
+
<?php
|
457 |
+
}
|
includes/functions-demo-template.php
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Demo Importer Template.
|
4 |
+
*
|
5 |
+
* Functions for the templating system.
|
6 |
+
*
|
7 |
+
* @author ThemeGrill
|
8 |
+
* @category Admin
|
9 |
+
* @package Importer/Functions
|
10 |
+
* @version 1.0.0
|
11 |
+
*/
|
12 |
+
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
14 |
+
exit;
|
15 |
+
}
|
16 |
+
|
17 |
+
if ( ! function_exists( 'tg_get_demo_file_url' ) ) {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get a demo file URL.
|
21 |
+
*
|
22 |
+
* @param string $demo_dir demo dir.
|
23 |
+
* @return string the demo data file URL.
|
24 |
+
*/
|
25 |
+
function tg_get_demo_file_url( $demo_dir ) {
|
26 |
+
return apply_filters( 'themegrill_demo_file_url', get_template_directory_uri() . '/inc/demo-importer/demos/' . $demo_dir, $demo_dir );
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
+
if ( ! function_exists( 'tg_get_demo_file_path' ) ) {
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get a demo file path.
|
34 |
+
*
|
35 |
+
* @param string $demo_dir demo dir.
|
36 |
+
* @return string the demo data file path.
|
37 |
+
*/
|
38 |
+
function tg_get_demo_file_path( $demo_dir ) {
|
39 |
+
return apply_filters( 'themegrill_demo_file_path', get_template_directory() . '/inc/demo-importer/demos/' . $demo_dir . '/dummy-data', $demo_dir );
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( ! function_exists( 'tg_get_demo_preview_screenshot_url' ) ) {
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Get the demo preview screenshot URL.
|
47 |
+
*
|
48 |
+
* @param string $demo_dir
|
49 |
+
* @param string $current_template
|
50 |
+
* @return string the demo preview screenshot URL.
|
51 |
+
*/
|
52 |
+
function tg_get_demo_preview_screenshot_url( $demo_dir, $current_template ) {
|
53 |
+
$screenshot_theme_path = get_template_directory() . "/images/demo/{$demo_dir}.jpg";
|
54 |
+
$screenshot_plugin_path = TGDM()->plugin_path() . "/assets/images/{$current_template}/{$demo_dir}.jpg";
|
55 |
+
|
56 |
+
if ( file_exists( $screenshot_theme_path ) ) {
|
57 |
+
$screenshot_url = get_template_directory_uri() . "/images/demo/{$demo_dir}.jpg";
|
58 |
+
} elseif ( file_exists( $screenshot_plugin_path ) ) {
|
59 |
+
$screenshot_url = TGDM()->plugin_url() . "/assets/images/{$current_template}/{$demo_dir}.jpg";
|
60 |
+
} else {
|
61 |
+
$theme_data = wp_get_theme();
|
62 |
+
$screenshot_url = $theme_data->get_screenshot();
|
63 |
+
}
|
64 |
+
|
65 |
+
return $screenshot_url;
|
66 |
+
}
|
67 |
+
}
|
includes/functions-demo-update.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Demo Importer Updates.
|
4 |
*
|
5 |
-
* Backward compatibility for demo configs.
|
6 |
*
|
7 |
* @author ThemeGrill
|
8 |
* @category Admin
|
2 |
/**
|
3 |
* Demo Importer Updates.
|
4 |
*
|
5 |
+
* Backward compatibility for demo importer configs and options.
|
6 |
*
|
7 |
* @author ThemeGrill
|
8 |
* @category Admin
|
includes/{includes → importers}/class-customizer-importer.php
RENAMED
File without changes
|
includes/{includes → importers}/class-widget-importer.php
RENAMED
File without changes
|
includes/{includes → importers}/customize/class-oc-customize-demo-importer-setting.php
RENAMED
File without changes
|
includes/{includes/importers → importers/wordpress-importer}/class-wxr-importer.php
RENAMED
File without changes
|
includes/{includes/importers → importers/wordpress-importer}/class-wxr-parsers.php
RENAMED
File without changes
|
languages/themegrill-demo-importer.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the GPLv3 or later.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: ThemeGrill Demo Importer 1.
|
6 |
"Report-Msgid-Bugs-To: themegrill@gmail.com\n"
|
7 |
-
"POT-Creation-Date: 2017-07-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -13,655 +13,719 @@ msgstr ""
|
|
13 |
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
|
14 |
"X-Generator: grunt-wp-i18n1.0.0\n"
|
15 |
|
16 |
-
#: includes/class-demo-
|
17 |
-
#: includes/
|
18 |
-
|
19 |
-
#: themegrill-demo-importer.php:227
|
20 |
-
msgid "Demo Importer"
|
21 |
-
msgstr ""
|
22 |
-
|
23 |
-
#: includes/class-demo-importer.php:223
|
24 |
-
msgid "Importing..."
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: includes/class-demo-
|
28 |
-
msgid "
|
29 |
msgstr ""
|
30 |
|
31 |
-
#: includes/class-demo-
|
32 |
-
msgid "
|
33 |
msgstr ""
|
34 |
|
35 |
-
#: includes/class-demo-
|
36 |
-
msgid "
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: includes/class-demo-
|
40 |
-
msgid "
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: includes/class-demo-
|
44 |
-
|
45 |
-
#: includes/includes/admin/views/html-admin-page-importer.php:109
|
46 |
-
#: includes/includes/admin/views/html-admin-page-importer.php:221
|
47 |
-
#: includes/includes/admin/views/html-admin-page-importer.php:230
|
48 |
-
#: includes/includes/admin/views/html-admin-page-installer-uploads.php:40
|
49 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:125
|
50 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:237
|
51 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:246
|
52 |
-
msgid "Live Preview"
|
53 |
msgstr ""
|
54 |
|
55 |
-
#: includes/class-demo-
|
56 |
-
msgid "
|
57 |
msgstr ""
|
58 |
|
59 |
-
#: includes/class-demo-
|
60 |
-
msgid "
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: includes/class-demo-
|
64 |
-
msgid ""
|
65 |
-
"It is strongly recommended that you backup your database before proceeding. "
|
66 |
-
"Are you sure you wish to run the reset wizard now?"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: includes/class-demo-
|
70 |
-
msgid ""
|
71 |
-
"Are you sure you want to delete this demo?\n"
|
72 |
-
"\n"
|
73 |
-
"Click 'Cancel' to go back, 'OK' to confirm the delete."
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: includes/class-demo-
|
77 |
-
msgid ""
|
78 |
-
"Importing demo content will replicate the live demo and overwrites your "
|
79 |
-
"current customizer, widgets and other settings. It might take few minutes "
|
80 |
-
"to complete the demo import. Are you sure you want to import this demo?"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: includes/class-demo-
|
84 |
-
msgid "
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: includes/
|
88 |
-
|
|
|
|
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: includes/
|
92 |
-
msgid "
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: includes/
|
96 |
-
|
|
|
97 |
msgstr ""
|
98 |
|
99 |
-
#: includes/
|
100 |
-
#: includes/
|
101 |
-
#: includes/
|
102 |
-
|
|
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: includes/
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
msgstr ""
|
110 |
|
111 |
-
#: includes/
|
112 |
-
|
|
|
|
|
|
|
|
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: includes/
|
116 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: includes/
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
121 |
msgstr ""
|
122 |
|
123 |
-
#: includes/
|
124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
125 |
msgstr ""
|
126 |
|
127 |
-
#: includes/
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
msgstr ""
|
130 |
|
131 |
-
#: includes/
|
132 |
-
|
133 |
-
|
134 |
-
"
|
135 |
-
"all kinds of resources including snippets, tutorials and much more."
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: includes/
|
139 |
-
|
140 |
-
"
|
141 |
-
"<a href=\"%1$s\">community forum</a>. If you need help with premium themes "
|
142 |
-
"sold by ThemeGrill, please <a href=\"%2$s\">use our free support forum</a>."
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: includes/
|
146 |
-
|
|
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: includes/
|
150 |
-
|
|
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: includes/
|
154 |
-
|
|
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: includes/
|
158 |
-
|
159 |
-
"
|
160 |
-
"via <a href=\"%1$s\">Github issues</a>. Ensure you read the <a "
|
161 |
-
"href=\"%2$s\">contribution guide</a> prior to submitting your report. To "
|
162 |
-
"help us solve your issue, please be as descriptive as possible."
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: includes/
|
166 |
-
|
|
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: includes/
|
170 |
-
#: includes/
|
171 |
-
msgid "
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: includes/
|
175 |
-
|
176 |
-
"
|
177 |
-
"the button below."
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: includes/
|
181 |
-
|
|
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: includes/
|
185 |
-
|
|
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: includes/
|
189 |
-
|
|
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: includes/
|
193 |
-
|
|
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: includes/
|
197 |
-
|
|
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: includes/
|
201 |
-
|
|
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: includes/
|
205 |
-
|
|
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: includes/
|
209 |
-
#:
|
210 |
-
msgid "
|
211 |
msgstr ""
|
212 |
|
213 |
-
|
214 |
-
|
|
|
|
|
215 |
msgstr ""
|
216 |
|
217 |
-
#: includes/
|
218 |
-
|
|
|
219 |
msgstr ""
|
220 |
|
221 |
-
#: includes/
|
222 |
-
|
|
|
223 |
msgstr ""
|
224 |
|
225 |
-
#: includes/
|
226 |
-
#: includes/
|
227 |
-
msgid "
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: includes/
|
231 |
-
|
|
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: includes/
|
235 |
-
|
|
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: includes/
|
239 |
-
|
|
|
240 |
msgstr ""
|
241 |
|
242 |
-
#: includes/
|
243 |
-
|
|
|
244 |
msgstr ""
|
245 |
|
246 |
-
#: includes/
|
247 |
-
#: includes/
|
248 |
-
msgid "
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: includes/
|
252 |
-
msgid "
|
253 |
msgstr ""
|
254 |
|
255 |
-
#: includes/
|
256 |
-
msgid "
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: includes/
|
260 |
-
msgid "
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: includes/
|
264 |
-
msgid "
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: includes/
|
268 |
-
msgid "
|
|
|
|
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: includes/
|
272 |
-
msgid "
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: includes/
|
276 |
-
msgid "
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: includes/
|
280 |
-
msgid "
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: includes/
|
284 |
-
msgid "
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: includes/
|
288 |
-
msgid "
|
|
|
|
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: includes/
|
292 |
-
msgid "
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: includes/
|
296 |
-
msgid "
|
|
|
|
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: includes/
|
300 |
-
|
301 |
-
msgid "The Demo Importer screen requires JavaScript."
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: includes/
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
msgid "Demo Details"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: includes/
|
312 |
-
|
313 |
-
#: includes/includes/admin/views/html-admin-page-importer.php:155
|
314 |
-
#: includes/includes/admin/views/html-admin-page-installer-preview.php:27
|
315 |
-
#: includes/includes/admin/views/html-admin-page-installer-uploads.php:26
|
316 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:111
|
317 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:171
|
318 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:274
|
319 |
-
#. translators: %s: Demo author name
|
320 |
-
msgid "By %s"
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: includes/
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
#. translators: %s: Demo name
|
328 |
-
msgid "<span>Imported:</span> %s"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: includes/
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:129
|
336 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:176
|
337 |
-
msgid "Required %s theme must be activated to import this demo."
|
338 |
msgstr ""
|
339 |
|
340 |
-
#: includes/
|
341 |
-
|
342 |
-
#: includes/includes/admin/views/html-admin-page-importer.php:70
|
343 |
-
#: includes/includes/admin/views/html-admin-page-importer.php:113
|
344 |
-
#: includes/includes/admin/views/html-admin-page-importer.php:115
|
345 |
-
#: includes/includes/admin/views/html-admin-page-importer.php:122
|
346 |
-
#: includes/includes/admin/views/html-admin-page-importer.php:232
|
347 |
-
#: includes/includes/admin/views/html-admin-page-installer-uploads.php:44
|
348 |
-
#: includes/includes/admin/views/html-admin-page-installer-uploads.php:46
|
349 |
-
#: includes/includes/admin/views/html-admin-page-installer-uploads.php:53
|
350 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:129
|
351 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:131
|
352 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:138
|
353 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:248
|
354 |
-
msgid "Import"
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: includes/
|
358 |
-
|
359 |
-
#: includes/includes/admin/views/html-admin-page-importer.php:235
|
360 |
-
#: includes/includes/admin/views/html-admin-page-installer-preview.php:46
|
361 |
-
#: includes/includes/admin/views/html-admin-page-installer-uploads.php:55
|
362 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:140
|
363 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:251
|
364 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:293
|
365 |
-
msgid "Preview"
|
366 |
msgstr ""
|
367 |
|
368 |
-
#: includes/
|
369 |
-
|
370 |
-
msgid "Show previous demo"
|
371 |
msgstr ""
|
372 |
|
373 |
-
#: includes/
|
374 |
-
|
375 |
-
msgid "Show next demo"
|
376 |
msgstr ""
|
377 |
|
378 |
-
#: includes/
|
379 |
-
|
380 |
-
msgid "Close details dialog"
|
381 |
msgstr ""
|
382 |
|
383 |
-
#: includes/
|
384 |
-
|
385 |
-
msgid "Imported Demo"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: includes/
|
389 |
-
|
390 |
-
msgid "Version: %s"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: includes/
|
394 |
-
|
395 |
-
msgid "Required Plugin must be activated to import this demo."
|
396 |
msgstr ""
|
397 |
|
398 |
-
#: includes/
|
399 |
-
|
400 |
-
msgid "Plugins Information"
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: includes/
|
404 |
-
|
405 |
-
|
|
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: includes/
|
409 |
-
|
410 |
-
|
|
|
|
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: includes/
|
414 |
-
|
415 |
-
|
|
|
|
|
416 |
msgstr ""
|
417 |
|
418 |
-
#: includes/
|
419 |
-
|
420 |
-
msgid "Required"
|
421 |
msgstr ""
|
422 |
|
423 |
-
#: includes/
|
424 |
-
|
425 |
-
msgid "Recommended"
|
426 |
msgstr ""
|
427 |
|
428 |
-
#: includes/
|
429 |
-
|
430 |
-
msgid "No plugins are needed to import this demo."
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: includes/
|
434 |
-
|
435 |
-
msgid "Tags:"
|
436 |
msgstr ""
|
437 |
|
438 |
-
#: includes/
|
439 |
-
|
440 |
-
msgid "Delete"
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: includes/
|
444 |
-
|
445 |
-
|
|
|
|
|
446 |
msgstr ""
|
447 |
|
448 |
-
#: includes/
|
449 |
-
|
450 |
-
msgid "Download"
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: includes/
|
454 |
-
|
455 |
-
msgid "View Pro"
|
456 |
msgstr ""
|
457 |
|
458 |
-
#: includes/
|
459 |
-
msgid "
|
460 |
msgstr ""
|
461 |
|
462 |
-
#: includes/includes/
|
463 |
-
msgid "
|
464 |
msgstr ""
|
465 |
|
466 |
-
#: includes/includes/
|
467 |
-
msgid "
|
468 |
msgstr ""
|
469 |
|
470 |
-
#: includes/
|
471 |
-
msgid "
|
|
|
|
|
|
|
472 |
msgstr ""
|
473 |
|
474 |
-
#: includes/
|
475 |
msgid ""
|
476 |
-
"
|
477 |
-
"
|
|
|
478 |
msgstr ""
|
479 |
|
480 |
-
#: includes/
|
481 |
-
msgid "
|
482 |
msgstr ""
|
483 |
|
484 |
-
#: includes/
|
485 |
-
msgid "
|
486 |
msgstr ""
|
487 |
|
488 |
-
#: includes/includes/
|
489 |
-
msgid "
|
490 |
msgstr ""
|
491 |
|
492 |
-
#: includes/
|
493 |
-
msgid "
|
|
|
|
|
|
|
|
|
494 |
msgstr ""
|
495 |
|
496 |
-
#: includes/
|
497 |
-
msgid "
|
498 |
msgstr ""
|
499 |
|
500 |
-
#: includes/includes/
|
501 |
-
|
502 |
-
|
503 |
-
"and download the theme demo zip file."
|
504 |
msgstr ""
|
505 |
|
506 |
-
#: includes/
|
507 |
-
msgid "
|
|
|
|
|
508 |
msgstr ""
|
509 |
|
510 |
-
#: includes/
|
511 |
-
msgid ""
|
512 |
-
"3. Browse the downloaded demo zip file and click on <strong>Install "
|
513 |
-
"Now</strong> button."
|
514 |
msgstr ""
|
515 |
|
516 |
-
#: includes/
|
517 |
-
msgid "
|
518 |
msgstr ""
|
519 |
|
520 |
-
#: includes/
|
521 |
-
msgid ""
|
522 |
-
"5. Click on the <strong>Import</strong> button and wait for few minutes. "
|
523 |
-
"Done!"
|
524 |
msgstr ""
|
525 |
|
526 |
-
#: includes/
|
527 |
-
msgid "
|
528 |
msgstr ""
|
529 |
|
530 |
-
#: includes/
|
531 |
-
msgid ""
|
532 |
-
"WordPress has been reset back to defaults. The user "
|
533 |
-
"<strong>\"%1$s\"</strong> was recreated with its previous password."
|
534 |
msgstr ""
|
535 |
|
536 |
-
#: includes/
|
537 |
-
msgid ""
|
538 |
-
"<strong>Reset Wizard</strong> – If you need to reset the WordPress "
|
539 |
-
"back to default again :)"
|
540 |
msgstr ""
|
541 |
|
542 |
-
#: includes/
|
543 |
-
msgid "
|
544 |
msgstr ""
|
545 |
|
546 |
-
#: includes/
|
547 |
-
|
|
|
548 |
msgstr ""
|
549 |
|
550 |
-
|
551 |
-
msgid ""
|
552 |
-
"The customizer import file is not in a correct format. Please make sure to "
|
553 |
-
"use the correct customizer import file."
|
554 |
msgstr ""
|
555 |
|
556 |
-
#: includes/
|
557 |
-
msgid ""
|
558 |
-
"The customizer import file is not suitable for current theme. You can only "
|
559 |
-
"import customizer settings for the same theme or a child theme."
|
560 |
msgstr ""
|
561 |
|
562 |
-
#: includes/
|
563 |
-
msgid "
|
564 |
msgstr ""
|
565 |
|
566 |
-
#: includes/
|
567 |
-
|
|
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: includes/
|
571 |
-
msgid "
|
572 |
msgstr ""
|
573 |
|
574 |
-
#: includes/
|
575 |
-
msgid "
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: includes/
|
579 |
-
msgid "
|
580 |
msgstr ""
|
581 |
|
582 |
-
#: includes/
|
583 |
-
msgid "
|
584 |
msgstr ""
|
585 |
|
586 |
-
#: includes/
|
587 |
-
msgid "
|
588 |
msgstr ""
|
589 |
|
590 |
-
#: includes/
|
591 |
msgid "Sorry, you are not allowed to delete demo on this site."
|
592 |
msgstr ""
|
593 |
|
594 |
-
#: includes/
|
595 |
msgid "Unable to connect to the filesystem. Please confirm your credentials."
|
596 |
msgstr ""
|
597 |
|
598 |
-
#: includes/
|
599 |
msgid "Demo could not be deleted."
|
600 |
msgstr ""
|
601 |
|
602 |
-
#: includes/
|
603 |
msgid "Could not access filesystem."
|
604 |
msgstr ""
|
605 |
|
606 |
-
#: includes/
|
607 |
msgid "Filesystem error."
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: includes/
|
611 |
msgid "Unable to locate ThemeGrill demo pack directory."
|
612 |
msgstr ""
|
613 |
|
614 |
-
#: includes/
|
615 |
msgid "Could not fully remove the demo %s."
|
616 |
msgstr ""
|
617 |
|
618 |
-
#: includes/
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
623 |
msgid "Sorry, there has been an error."
|
624 |
msgstr ""
|
625 |
|
626 |
-
#: includes/
|
627 |
msgid "The file does not exist, please try again."
|
628 |
msgstr ""
|
629 |
|
630 |
-
#: includes/
|
631 |
msgid "All done."
|
632 |
msgstr ""
|
633 |
|
634 |
-
#: includes/
|
635 |
msgid "Have fun!"
|
636 |
msgstr ""
|
637 |
|
638 |
-
#: includes/
|
639 |
msgid "Remember to update the passwords and roles of imported users."
|
640 |
msgstr ""
|
641 |
|
642 |
-
#: includes/
|
643 |
msgid ""
|
644 |
"The export file could not be found at <code>%s</code>. It is likely that "
|
645 |
"this was caused by a permissions problem."
|
646 |
msgstr ""
|
647 |
|
648 |
-
#: includes/
|
649 |
msgid ""
|
650 |
"This WXR file (version %s) may not be supported by this version of the "
|
651 |
"importer. Please consider updating."
|
652 |
msgstr ""
|
653 |
|
654 |
-
#: includes/
|
655 |
msgid ""
|
656 |
"Failed to import author %s. Their posts will be attributed to the current "
|
657 |
"user."
|
658 |
msgstr ""
|
659 |
|
660 |
-
#: includes/
|
661 |
msgid "Assign Authors"
|
662 |
msgstr ""
|
663 |
|
664 |
-
#: includes/
|
665 |
msgid ""
|
666 |
"To make it easier for you to edit and save the imported content, you may "
|
667 |
"want to reassign the author of the imported item to an existing user of "
|
@@ -669,169 +733,169 @@ msgid ""
|
|
669 |
"<code>admin</code>s entries."
|
670 |
msgstr ""
|
671 |
|
672 |
-
#: includes/
|
673 |
msgid ""
|
674 |
"If a new user is created by WordPress, a new password will be randomly "
|
675 |
"generated and the new user’s role will be set as %s. Manually "
|
676 |
"changing the new user’s details will be necessary."
|
677 |
msgstr ""
|
678 |
|
679 |
-
#: includes/
|
680 |
msgid "Import Attachments"
|
681 |
msgstr ""
|
682 |
|
683 |
-
#: includes/
|
684 |
msgid "Download and import file attachments"
|
685 |
msgstr ""
|
686 |
|
687 |
-
#: includes/
|
688 |
msgid "Submit"
|
689 |
msgstr ""
|
690 |
|
691 |
-
#: includes/
|
692 |
msgid "Import author:"
|
693 |
msgstr ""
|
694 |
|
695 |
-
#: includes/
|
696 |
msgid "or create new user with login name:"
|
697 |
msgstr ""
|
698 |
|
699 |
-
#: includes/
|
700 |
msgid "as a new user:"
|
701 |
msgstr ""
|
702 |
|
703 |
-
#: includes/
|
704 |
msgid "assign posts to an existing user:"
|
705 |
msgstr ""
|
706 |
|
707 |
-
#: includes/
|
708 |
msgid "or assign posts to an existing user:"
|
709 |
msgstr ""
|
710 |
|
711 |
-
#: includes/
|
712 |
msgid "- Select -"
|
713 |
msgstr ""
|
714 |
|
715 |
-
#: includes/
|
716 |
msgid ""
|
717 |
"Failed to create new user for %s. Their posts will be attributed to the "
|
718 |
"current user."
|
719 |
msgstr ""
|
720 |
|
721 |
-
#: includes/
|
722 |
msgid "Failed to import category %s"
|
723 |
msgstr ""
|
724 |
|
725 |
-
#: includes/
|
726 |
msgid "Failed to import post tag %s"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: includes/
|
730 |
-
#: includes/
|
731 |
msgid "Failed to import %s %s"
|
732 |
msgstr ""
|
733 |
|
734 |
-
#: includes/
|
735 |
msgid "Failed to import “%s”: Invalid post type %s"
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: includes/
|
739 |
msgid "%s “%s” already exists."
|
740 |
msgstr ""
|
741 |
|
742 |
-
#: includes/
|
743 |
msgid "Failed to import %s “%s”"
|
744 |
msgstr ""
|
745 |
|
746 |
-
#: includes/
|
747 |
msgid "Menu item skipped due to missing menu slug"
|
748 |
msgstr ""
|
749 |
|
750 |
-
#: includes/
|
751 |
msgid "Menu item skipped due to invalid menu slug: %s"
|
752 |
msgstr ""
|
753 |
|
754 |
-
#: includes/
|
755 |
msgid "Fetching attachments is not enabled"
|
756 |
msgstr ""
|
757 |
|
758 |
-
#: includes/
|
759 |
msgid "Invalid file type"
|
760 |
msgstr ""
|
761 |
|
762 |
-
#: includes/
|
763 |
msgid "Remote server returned %1$d %2$s for %3$s"
|
764 |
msgstr ""
|
765 |
|
766 |
-
#: includes/
|
767 |
msgid "Remote file is incorrect size"
|
768 |
msgstr ""
|
769 |
|
770 |
-
#: includes/
|
771 |
msgid "Zero size file downloaded"
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: includes/
|
775 |
msgid "Remote file is too large, limit is %s"
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: includes/
|
779 |
msgid "Import WordPress"
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: includes/
|
783 |
msgid ""
|
784 |
"A new version of this importer is available. Please update to version %s to "
|
785 |
"ensure compatibility with newer export files."
|
786 |
msgstr ""
|
787 |
|
788 |
-
#: includes/
|
789 |
msgid ""
|
790 |
"Howdy! Upload your WordPress eXtended RSS (WXR) file and we’ll import "
|
791 |
"the posts, pages, comments, custom fields, categories, and tags into this "
|
792 |
"site."
|
793 |
msgstr ""
|
794 |
|
795 |
-
#: includes/
|
796 |
msgid "Choose a WXR (.xml) file to upload, then click Upload file and import."
|
797 |
msgstr ""
|
798 |
|
799 |
-
#: includes/
|
800 |
-
#: includes/
|
801 |
-
#: includes/
|
802 |
msgid "There was an error when reading this WXR file"
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: includes/
|
806 |
msgid ""
|
807 |
"Details are shown above. The importer will now try again with a different "
|
808 |
"parser..."
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: includes/
|
812 |
-
#: includes/
|
813 |
-
#: includes/
|
814 |
-
#: includes/
|
815 |
msgid "This does not appear to be a WXR file, missing/invalid WXR version number"
|
816 |
msgstr ""
|
817 |
|
818 |
-
#: themegrill-demo-importer.php:
|
819 |
msgid "View Demo Importer"
|
820 |
msgstr ""
|
821 |
|
822 |
-
#: themegrill-demo-importer.php:
|
823 |
msgid "View Demo Importer Documentation"
|
824 |
msgstr ""
|
825 |
|
826 |
-
#: themegrill-demo-importer.php:
|
827 |
msgid "Docs"
|
828 |
msgstr ""
|
829 |
|
830 |
-
#: themegrill-demo-importer.php:
|
831 |
msgid "Visit Free Customer Support Forum"
|
832 |
msgstr ""
|
833 |
|
834 |
-
#: themegrill-demo-importer.php:
|
835 |
msgid "Free Support"
|
836 |
msgstr ""
|
837 |
|
@@ -839,11 +903,11 @@ msgstr ""
|
|
839 |
msgid "ThemeGrill Demo Importer"
|
840 |
msgstr ""
|
841 |
|
842 |
-
#: themegrill-demo-importer.php:
|
843 |
msgid "This plugin requires %s by ThemeGrill to work."
|
844 |
msgstr ""
|
845 |
|
846 |
-
#: themegrill-demo-importer.php:
|
847 |
msgid "Official Theme"
|
848 |
msgstr ""
|
849 |
|
@@ -861,68 +925,68 @@ msgstr ""
|
|
861 |
msgid "https://themegrill.com"
|
862 |
msgstr ""
|
863 |
|
864 |
-
#: includes/
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
#: includes/
|
|
|
870 |
msgctxt "demo"
|
871 |
-
msgid "
|
872 |
msgstr ""
|
873 |
|
874 |
-
#: includes/
|
|
|
875 |
msgctxt "demo"
|
876 |
-
msgid "
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: includes/
|
|
|
|
|
880 |
msgctxt "demo"
|
881 |
-
msgid "%s
|
882 |
msgstr ""
|
883 |
|
884 |
-
#: includes/
|
|
|
|
|
885 |
msgctxt "demo"
|
886 |
-
msgid "
|
887 |
msgstr ""
|
888 |
|
889 |
-
#: includes/
|
890 |
-
#: includes/includes/admin/views/html-admin-page-importer.php:120
|
891 |
-
#: includes/includes/admin/views/html-admin-page-importer.php:226
|
892 |
-
#: includes/includes/admin/views/html-admin-page-installer-uploads.php:51
|
893 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:136
|
894 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:242
|
895 |
-
#. translators: %s: Demo name
|
896 |
msgctxt "demo"
|
897 |
-
msgid "
|
898 |
msgstr ""
|
899 |
|
900 |
-
#: includes/
|
901 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:145
|
902 |
msgctxt "demo"
|
903 |
-
msgid "
|
904 |
msgstr ""
|
905 |
|
906 |
-
#: includes/
|
907 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:282
|
908 |
-
#. translators: %s: Demo name
|
909 |
msgctxt "demo"
|
910 |
-
msgid "
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: includes/
|
914 |
-
#: includes/includes/admin/views/html-admin-page-installer.php:289
|
915 |
-
#. translators: %s: Demo name
|
916 |
msgctxt "demo"
|
917 |
-
msgid "
|
918 |
msgstr ""
|
919 |
|
920 |
-
#: includes/
|
921 |
msgctxt "demo"
|
922 |
-
msgid "
|
923 |
msgstr ""
|
924 |
|
925 |
-
#: includes/
|
926 |
msgctxt "theme"
|
927 |
msgid "Installed"
|
|
|
|
|
|
|
|
|
|
|
928 |
msgstr ""
|
2 |
# This file is distributed under the GPLv3 or later.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: ThemeGrill Demo Importer 1.4.0-dev\n"
|
6 |
"Report-Msgid-Bugs-To: themegrill@gmail.com\n"
|
7 |
+
"POT-Creation-Date: 2017-07-20 11:15:41+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
|
14 |
"X-Generator: grunt-wp-i18n1.0.0\n"
|
15 |
|
16 |
+
#: includes/admin/class-demo-installer-skin.php:47
|
17 |
+
#: includes/admin/class-demo-installer-skin.php:49
|
18 |
+
msgid "Return to Demo Importer"
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
msgstr ""
|
20 |
|
21 |
+
#: includes/admin/class-demo-installer-skin.php:51
|
22 |
+
msgid "Return to Demos page"
|
23 |
msgstr ""
|
24 |
|
25 |
+
#: includes/admin/class-demo-upgrader.php:40
|
26 |
+
msgid "Install package not available."
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: includes/admin/class-demo-upgrader.php:41
|
30 |
+
msgid "Downloading install package from <span class=\"code\">%s</span>…"
|
31 |
msgstr ""
|
32 |
|
33 |
+
#: includes/admin/class-demo-upgrader.php:42
|
34 |
+
msgid "Unpacking the package…"
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: includes/admin/class-demo-upgrader.php:43
|
38 |
+
msgid "Removing the old version of the demo…"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
msgstr ""
|
40 |
|
41 |
+
#: includes/admin/class-demo-upgrader.php:44
|
42 |
+
msgid "Could not remove the old demo."
|
43 |
msgstr ""
|
44 |
|
45 |
+
#: includes/admin/class-demo-upgrader.php:45
|
46 |
+
msgid "Installing the demo…"
|
47 |
msgstr ""
|
48 |
|
49 |
+
#: includes/admin/class-demo-upgrader.php:46
|
50 |
+
msgid "The demo contains no files."
|
|
|
|
|
51 |
msgstr ""
|
52 |
|
53 |
+
#: includes/admin/class-demo-upgrader.php:47
|
54 |
+
msgid "Demo install failed."
|
|
|
|
|
|
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: includes/admin/class-demo-upgrader.php:48
|
58 |
+
msgid "Demo installed successfully."
|
|
|
|
|
|
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: includes/admin/class-demo-upgrader.php:131
|
62 |
+
msgid "No valid demos were found."
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: includes/admin/views/html-admin-page-importer.php:12
|
66 |
+
#: includes/admin/views/html-admin-page-installer.php:21
|
67 |
+
#: includes/class-demo-importer.php:142 themegrill-demo-importer.php:235
|
68 |
+
msgid "Demo Importer"
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: includes/admin/views/html-admin-page-importer.php:17
|
72 |
+
msgid "New Demos"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: includes/admin/views/html-admin-page-importer.php:25
|
76 |
+
#: includes/admin/views/html-admin-page-installer.php:30
|
77 |
+
msgid "The Demo Importer screen requires JavaScript."
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: includes/admin/views/html-admin-page-importer.php:40
|
81 |
+
#: includes/admin/views/html-admin-page-importer.php:92
|
82 |
+
#: includes/admin/views/html-admin-page-installer-uploads.php:23
|
83 |
+
#: includes/admin/views/html-admin-page-installer.php:108
|
84 |
+
msgid "Demo Details"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: includes/admin/views/html-admin-page-importer.php:43
|
88 |
+
#: includes/admin/views/html-admin-page-importer.php:95
|
89 |
+
#: includes/admin/views/html-admin-page-importer.php:155
|
90 |
+
#: includes/admin/views/html-admin-page-installer-preview.php:30
|
91 |
+
#: includes/admin/views/html-admin-page-installer-uploads.php:26
|
92 |
+
#: includes/admin/views/html-admin-page-installer.php:111
|
93 |
+
#: includes/admin/views/html-admin-page-installer.php:171
|
94 |
+
#: includes/admin/views/html-admin-page-installer.php:302
|
95 |
+
#. translators: %s: Demo author name
|
96 |
+
msgid "By %s"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: includes/admin/views/html-admin-page-importer.php:49
|
100 |
+
#: includes/admin/views/html-admin-page-importer.php:101
|
101 |
+
#: includes/admin/views/html-admin-page-installer-uploads.php:32
|
102 |
+
#: includes/admin/views/html-admin-page-installer.php:117
|
103 |
+
#. translators: %s: Demo name
|
104 |
+
msgid "<span>Imported:</span> %s"
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: includes/admin/views/html-admin-page-importer.php:57
|
108 |
+
#: includes/admin/views/html-admin-page-importer.php:109
|
109 |
+
#: includes/admin/views/html-admin-page-importer.php:246
|
110 |
+
#: includes/admin/views/html-admin-page-importer.php:255
|
111 |
+
#: includes/admin/views/html-admin-page-installer-uploads.php:40
|
112 |
+
#: includes/admin/views/html-admin-page-installer.php:125
|
113 |
+
#: includes/admin/views/html-admin-page-installer.php:262
|
114 |
+
#: includes/admin/views/html-admin-page-installer.php:271
|
115 |
+
#: includes/class-demo-importer.php:200
|
116 |
+
msgid "Live Preview"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: includes/admin/views/html-admin-page-importer.php:61
|
120 |
+
#: includes/admin/views/html-admin-page-importer.php:113
|
121 |
+
#: includes/admin/views/html-admin-page-importer.php:160
|
122 |
+
#: includes/admin/views/html-admin-page-installer-uploads.php:44
|
123 |
+
#: includes/admin/views/html-admin-page-installer.php:129
|
124 |
+
#: includes/admin/views/html-admin-page-installer.php:176
|
125 |
+
msgid "Required %s theme must be activated to import this demo."
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: includes/admin/views/html-admin-page-importer.php:61
|
129 |
+
#: includes/admin/views/html-admin-page-importer.php:63
|
130 |
+
#: includes/admin/views/html-admin-page-importer.php:70
|
131 |
+
#: includes/admin/views/html-admin-page-importer.php:113
|
132 |
+
#: includes/admin/views/html-admin-page-importer.php:115
|
133 |
+
#: includes/admin/views/html-admin-page-importer.php:122
|
134 |
+
#: includes/admin/views/html-admin-page-importer.php:257
|
135 |
+
#: includes/admin/views/html-admin-page-installer-uploads.php:44
|
136 |
+
#: includes/admin/views/html-admin-page-installer-uploads.php:46
|
137 |
+
#: includes/admin/views/html-admin-page-installer-uploads.php:53
|
138 |
+
#: includes/admin/views/html-admin-page-installer.php:129
|
139 |
+
#: includes/admin/views/html-admin-page-installer.php:131
|
140 |
+
#: includes/admin/views/html-admin-page-installer.php:138
|
141 |
+
#: includes/admin/views/html-admin-page-installer.php:273
|
142 |
+
msgid "Import"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: includes/admin/views/html-admin-page-importer.php:72
|
146 |
+
#: includes/admin/views/html-admin-page-importer.php:124
|
147 |
+
#: includes/admin/views/html-admin-page-importer.php:260
|
148 |
+
#: includes/admin/views/html-admin-page-installer-preview.php:48
|
149 |
+
#: includes/admin/views/html-admin-page-installer-uploads.php:55
|
150 |
+
#: includes/admin/views/html-admin-page-installer.php:140
|
151 |
+
#: includes/admin/views/html-admin-page-installer.php:276
|
152 |
+
#: includes/admin/views/html-admin-page-installer.php:320
|
153 |
+
msgid "Preview"
|
154 |
msgstr ""
|
155 |
|
156 |
+
#: includes/admin/views/html-admin-page-importer.php:80
|
157 |
+
#: includes/admin/views/html-admin-page-installer.php:95
|
158 |
+
#: includes/class-demo-importer.php:225
|
159 |
+
msgid "No demos found. Try a different search."
|
|
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: includes/admin/views/html-admin-page-importer.php:137
|
163 |
+
#: includes/admin/views/html-admin-page-installer.php:153
|
164 |
+
msgid "Show previous demo"
|
|
|
|
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: includes/admin/views/html-admin-page-importer.php:138
|
168 |
+
#: includes/admin/views/html-admin-page-installer.php:154
|
169 |
+
msgid "Show next demo"
|
170 |
msgstr ""
|
171 |
|
172 |
+
#: includes/admin/views/html-admin-page-importer.php:139
|
173 |
+
#: includes/admin/views/html-admin-page-installer.php:155
|
174 |
+
msgid "Close details dialog"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: includes/admin/views/html-admin-page-importer.php:152
|
178 |
+
#: includes/admin/views/html-admin-page-installer.php:168
|
179 |
+
msgid "Imported Demo"
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: includes/admin/views/html-admin-page-importer.php:154
|
183 |
+
#: includes/admin/views/html-admin-page-installer.php:170
|
184 |
+
msgid "Version: %s"
|
|
|
|
|
|
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: includes/admin/views/html-admin-page-importer.php:162
|
188 |
+
#: includes/admin/views/html-admin-page-installer.php:178
|
189 |
+
msgid "Required Plugin must be activated to import this demo."
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: includes/admin/views/html-admin-page-importer.php:168
|
193 |
+
#: includes/admin/views/html-admin-page-installer.php:184
|
194 |
+
msgid "Plugins Information"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: includes/admin/views/html-admin-page-importer.php:176
|
198 |
+
#: includes/admin/views/html-admin-page-installer.php:192
|
199 |
+
msgid "Select All"
|
|
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: includes/admin/views/html-admin-page-importer.php:179
|
203 |
+
#: includes/admin/views/html-admin-page-installer.php:195
|
204 |
+
msgid "Plugin Name"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: includes/admin/views/html-admin-page-importer.php:180
|
208 |
+
#: includes/admin/views/html-admin-page-installer.php:196
|
209 |
+
msgid "Type"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: includes/admin/views/html-admin-page-importer.php:181
|
213 |
+
#: includes/admin/views/html-admin-page-installer.php:197
|
214 |
+
msgid "Status"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: includes/admin/views/html-admin-page-importer.php:190
|
218 |
+
#: includes/admin/views/html-admin-page-installer.php:206
|
219 |
+
msgid "Select %s"
|
220 |
msgstr ""
|
221 |
|
222 |
+
#: includes/admin/views/html-admin-page-importer.php:205
|
223 |
+
#: includes/admin/views/html-admin-page-installer.php:221
|
224 |
+
msgid "Required"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: includes/admin/views/html-admin-page-importer.php:207
|
228 |
+
#: includes/admin/views/html-admin-page-installer.php:223
|
229 |
+
msgid "Recommended"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: includes/admin/views/html-admin-page-importer.php:212
|
233 |
+
#: includes/admin/views/html-admin-page-installer.php:228
|
234 |
+
msgid "Active"
|
235 |
msgstr ""
|
236 |
|
237 |
+
#: includes/admin/views/html-admin-page-importer.php:214
|
238 |
+
#: includes/admin/views/html-admin-page-installer.php:230
|
239 |
+
msgid "Activate"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: includes/admin/views/html-admin-page-importer.php:216
|
243 |
+
#: includes/admin/views/html-admin-page-installer.php:39
|
244 |
+
#: includes/admin/views/html-admin-page-installer.php:232
|
245 |
+
msgid "Install Now"
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: includes/admin/views/html-admin-page-importer.php:223
|
249 |
+
#: includes/admin/views/html-admin-page-installer.php:239
|
250 |
+
msgid "No plugins are needed to import this demo."
|
251 |
msgstr ""
|
252 |
|
253 |
+
#: includes/admin/views/html-admin-page-importer.php:230
|
254 |
+
#: includes/admin/views/html-admin-page-installer.php:246
|
255 |
+
msgid "Install Plugins"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: includes/admin/views/html-admin-page-importer.php:239
|
259 |
+
#: includes/admin/views/html-admin-page-installer.php:255
|
260 |
+
msgid "Tags:"
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: includes/admin/views/html-admin-page-importer.php:264
|
264 |
+
#: includes/admin/views/html-admin-page-installer.php:280
|
265 |
+
msgid "Delete"
|
266 |
msgstr ""
|
267 |
|
268 |
+
#: includes/admin/views/html-admin-page-installer-preview.php:23
|
269 |
+
#: includes/admin/views/html-admin-page-installer.php:295
|
270 |
+
msgid "Demo Preview"
|
271 |
msgstr ""
|
272 |
|
273 |
+
#: includes/admin/views/html-admin-page-installer-preview.php:25
|
274 |
+
#: includes/admin/views/html-admin-page-installer.php:297
|
275 |
+
msgid "Pro"
|
276 |
msgstr ""
|
277 |
|
278 |
+
#: includes/admin/views/html-admin-page-installer-preview.php:40
|
279 |
+
#: includes/admin/views/html-admin-page-installer.php:312
|
280 |
+
msgid "Download"
|
281 |
msgstr ""
|
282 |
|
283 |
+
#: includes/admin/views/html-admin-page-installer-preview.php:46
|
284 |
+
#: includes/admin/views/html-admin-page-installer.php:318
|
285 |
+
msgid "View Pro"
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: includes/admin/views/html-admin-page-installer.php:14
|
289 |
+
msgid "Welcome"
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: includes/admin/views/html-admin-page-installer.php:15
|
293 |
+
msgid "Installed Demos"
|
294 |
msgstr ""
|
295 |
|
296 |
+
#: includes/admin/views/html-admin-page-installer.php:16
|
297 |
+
msgid "Theme Demos"
|
298 |
msgstr ""
|
299 |
|
300 |
+
#: includes/admin/views/html-admin-page-installer.php:24
|
301 |
+
msgid "Upload Demo"
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: includes/admin/views/html-admin-page-installer.php:34
|
305 |
+
msgid ""
|
306 |
+
"If you have a demo pack in a .zip format, you may install it by uploading "
|
307 |
+
"it here."
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: includes/admin/views/html-admin-page-installer.php:37
|
311 |
+
msgid "Demo zip file"
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: includes/admin/views/html-admin-page-installer.php:43
|
315 |
+
msgid "Filter demos list"
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: includes/admin/views/html-admin-page-installer.php:67
|
319 |
+
msgid "Welcome to ThemeGrill Demo Importer!"
|
320 |
msgstr ""
|
321 |
|
322 |
+
#: includes/admin/views/html-admin-page-installer.php:68
|
323 |
+
msgid "Get Started"
|
324 |
msgstr ""
|
325 |
|
326 |
+
#: includes/admin/views/html-admin-page-installer.php:72
|
327 |
+
msgid ""
|
328 |
+
"1. Visit <a href=\"%s\" target=\"_blank\"><strong>this page</strong></a> "
|
329 |
+
"and download the theme demo zip file."
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: includes/admin/views/html-admin-page-installer.php:73
|
333 |
+
msgid "2. Click on the <strong>Upload Demo</strong> button on the top of this page."
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: includes/admin/views/html-admin-page-installer.php:74
|
337 |
+
msgid ""
|
338 |
+
"3. Browse the downloaded demo zip file and click on <strong>Install "
|
339 |
+
"Now</strong> button."
|
340 |
msgstr ""
|
341 |
|
342 |
+
#: includes/admin/views/html-admin-page-installer.php:75
|
343 |
+
msgid "4. Go to <strong>Installed Demos</strong> tab."
|
|
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: includes/admin/views/html-admin-page-installer.php:76
|
347 |
+
msgid ""
|
348 |
+
"5. Click on the <strong>Import</strong> button and wait for few minutes. "
|
349 |
+
"Done!"
|
|
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: includes/admin/views/html-admin-page-installer.php:88
|
353 |
+
msgid "Available demos list"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: includes/admin/views/html-notice-reset-wizard-success.php:14
|
357 |
+
msgid ""
|
358 |
+
"WordPress has been reset back to defaults. The user "
|
359 |
+
"<strong>\"%1$s\"</strong> was recreated with its previous password."
|
|
|
|
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: includes/admin/views/html-notice-reset-wizard.php:12
|
363 |
+
msgid ""
|
364 |
+
"<strong>Reset Wizard</strong> – If you need to reset the WordPress "
|
365 |
+
"back to default again :)"
|
|
|
|
|
|
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: includes/admin/views/html-notice-reset-wizard.php:13
|
369 |
+
msgid "Run the Reset Wizard"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
msgstr ""
|
371 |
|
372 |
+
#: includes/admin/views/html-notice-reset-wizard.php:13
|
373 |
+
msgid "Hide this notice"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
msgstr ""
|
375 |
|
376 |
+
#: includes/class-demo-importer.php:192
|
377 |
+
msgid "Importing..."
|
|
|
378 |
msgstr ""
|
379 |
|
380 |
+
#: includes/class-demo-importer.php:194
|
381 |
+
msgid "Importing... please wait."
|
|
|
382 |
msgstr ""
|
383 |
|
384 |
+
#: includes/class-demo-importer.php:195
|
385 |
+
msgid "Import completed successfully."
|
|
|
386 |
msgstr ""
|
387 |
|
388 |
+
#: includes/class-demo-importer.php:196
|
389 |
+
msgid "Import Failed!"
|
|
|
390 |
msgstr ""
|
391 |
|
392 |
+
#: includes/class-demo-importer.php:197
|
393 |
+
msgid "Import failed: %s"
|
|
|
394 |
msgstr ""
|
395 |
|
396 |
+
#: includes/class-demo-importer.php:202
|
397 |
+
msgid "Imported!"
|
|
|
398 |
msgstr ""
|
399 |
|
400 |
+
#: includes/class-demo-importer.php:203
|
401 |
+
msgid "Try this solution!"
|
|
|
402 |
msgstr ""
|
403 |
|
404 |
+
#: includes/class-demo-importer.php:213
|
405 |
+
msgid ""
|
406 |
+
"It is strongly recommended that you backup your database before proceeding. "
|
407 |
+
"Are you sure you wish to run the reset wizard now?"
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: includes/class-demo-importer.php:214
|
411 |
+
msgid ""
|
412 |
+
"Are you sure you want to delete this demo?\n"
|
413 |
+
"\n"
|
414 |
+
"Click 'Cancel' to go back, 'OK' to confirm the delete."
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: includes/class-demo-importer.php:215
|
418 |
+
msgid ""
|
419 |
+
"Importing demo content will replicate the live demo and overwrites your "
|
420 |
+
"current customizer, widgets and other settings. It might take few minutes "
|
421 |
+
"to complete the demo import. Are you sure you want to import this demo?"
|
422 |
msgstr ""
|
423 |
|
424 |
+
#: includes/class-demo-importer.php:216
|
425 |
+
msgid "Are you sure you want to install the selected plugins and their data?"
|
|
|
426 |
msgstr ""
|
427 |
|
428 |
+
#: includes/class-demo-importer.php:221
|
429 |
+
msgid "Add New Demo"
|
|
|
430 |
msgstr ""
|
431 |
|
432 |
+
#: includes/class-demo-importer.php:222
|
433 |
+
msgid "Search Demos"
|
|
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: includes/class-demo-importer.php:223
|
437 |
+
msgid "Search demos..."
|
|
|
438 |
msgstr ""
|
439 |
|
440 |
+
#: includes/class-demo-importer.php:224
|
441 |
+
msgid "Number of Demos found: %d"
|
|
|
442 |
msgstr ""
|
443 |
|
444 |
+
#: includes/class-demo-importer.php:248
|
445 |
+
msgid ""
|
446 |
+
"If you like <strong>ThemeGrill Demo Importer</strong> please leave us a "
|
447 |
+
"%1$s★★★★★%2$s rating. A huge thanks in "
|
448 |
+
"advance!"
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: includes/class-demo-importer.php:248
|
452 |
+
msgid "Thanks :)"
|
|
|
453 |
msgstr ""
|
454 |
|
455 |
+
#: includes/class-demo-importer.php:250
|
456 |
+
msgid "Thank you for importing with ThemeGrill Demo Importer."
|
|
|
457 |
msgstr ""
|
458 |
|
459 |
+
#: includes/class-demo-importer.php:269
|
460 |
+
msgid "Importing Demo"
|
461 |
msgstr ""
|
462 |
|
463 |
+
#: includes/class-demo-importer.php:279 includes/class-demo-importer.php:281
|
464 |
+
msgid "Guided Tour"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: includes/class-demo-importer.php:290 includes/class-demo-importer.php:292
|
468 |
+
msgid "Help & Support"
|
469 |
msgstr ""
|
470 |
|
471 |
+
#: includes/class-demo-importer.php:294
|
472 |
+
msgid ""
|
473 |
+
"Should you need help understanding, using, or extending ThemeGrill Demo "
|
474 |
+
"Importer, <a href=\"%s\">please read our documentation</a>. You will find "
|
475 |
+
"all kinds of resources including snippets, tutorials and much more."
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: includes/class-demo-importer.php:298
|
479 |
msgid ""
|
480 |
+
"For further assistance with ThemeGrill Demo Importer core you can use the "
|
481 |
+
"<a href=\"%1$s\">community forum</a>. If you need help with premium themes "
|
482 |
+
"sold by ThemeGrill, please <a href=\"%2$s\">use our free support forum</a>."
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: includes/class-demo-importer.php:302
|
486 |
+
msgid "Community forum"
|
487 |
msgstr ""
|
488 |
|
489 |
+
#: includes/class-demo-importer.php:302
|
490 |
+
msgid "ThemeGrill Support"
|
491 |
msgstr ""
|
492 |
|
493 |
+
#: includes/class-demo-importer.php:307 includes/class-demo-importer.php:309
|
494 |
+
msgid "Found a bug?"
|
495 |
msgstr ""
|
496 |
|
497 |
+
#: includes/class-demo-importer.php:310
|
498 |
+
msgid ""
|
499 |
+
"If you find a bug within ThemeGrill Demo Importer you can create a ticket "
|
500 |
+
"via <a href=\"%1$s\">Github issues</a>. Ensure you read the <a "
|
501 |
+
"href=\"%2$s\">contribution guide</a> prior to submitting your report. To "
|
502 |
+
"help us solve your issue, please be as descriptive as possible."
|
503 |
msgstr ""
|
504 |
|
505 |
+
#: includes/class-demo-importer.php:311
|
506 |
+
msgid "Report a bug"
|
507 |
msgstr ""
|
508 |
|
509 |
+
#: includes/class-demo-importer.php:317 includes/class-demo-importer.php:319
|
510 |
+
#: includes/class-demo-importer.php:321
|
511 |
+
msgid "Reset wizard"
|
|
|
512 |
msgstr ""
|
513 |
|
514 |
+
#: includes/class-demo-importer.php:320
|
515 |
+
msgid ""
|
516 |
+
"If you need to reset the WordPress back to default again, please click on "
|
517 |
+
"the button below."
|
518 |
msgstr ""
|
519 |
|
520 |
+
#: includes/class-demo-importer.php:325
|
521 |
+
msgid "For more information:"
|
|
|
|
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: includes/class-demo-importer.php:326
|
525 |
+
msgid "About Demo Importer"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: includes/class-demo-importer.php:327
|
529 |
+
msgid "WordPress.org project"
|
|
|
|
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: includes/class-demo-importer.php:328
|
533 |
+
msgid "Github project"
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: includes/class-demo-importer.php:329
|
537 |
+
msgid "Official themes"
|
|
|
|
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: includes/class-demo-importer.php:330
|
541 |
+
msgid "Official plugins"
|
|
|
|
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: includes/class-demo-importer.php:360
|
545 |
+
msgid "Action failed. Please refresh the page and retry."
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: includes/class-demo-importer.php:364 themegrill-demo-importer.php:54
|
549 |
+
#: themegrill-demo-importer.php:62
|
550 |
+
msgid "Cheatin’ huh?"
|
551 |
msgstr ""
|
552 |
|
553 |
+
#. Author of the plugin/theme
|
554 |
+
msgid "ThemeGrill"
|
|
|
|
|
555 |
msgstr ""
|
556 |
|
557 |
+
#: includes/class-demo-importer.php:584
|
558 |
+
msgid "Sorry, you are not allowed to install demo on this site."
|
|
|
|
|
559 |
msgstr ""
|
560 |
|
561 |
+
#: includes/class-demo-importer.php:591
|
562 |
+
msgid "Installing Demo from uploaded file: %s"
|
563 |
msgstr ""
|
564 |
|
565 |
+
#: includes/class-demo-importer.php:618
|
566 |
+
#: includes/functions-demo-importer.php:108
|
567 |
+
msgid "No demo specified."
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: includes/class-demo-importer.php:634
|
571 |
+
msgid "Sorry, you are not allowed to import."
|
572 |
msgstr ""
|
573 |
|
574 |
+
#: includes/class-demo-importer.php:711
|
575 |
+
msgid "The XML file dummy content is missing."
|
576 |
msgstr ""
|
577 |
|
578 |
+
#: includes/class-demo-importer.php:774
|
579 |
+
msgid "The DAT file customizer data is missing."
|
580 |
msgstr ""
|
581 |
|
582 |
+
#: includes/class-demo-importer.php:798
|
583 |
+
msgid "The WIE file widget content is missing."
|
584 |
msgstr ""
|
585 |
|
586 |
+
#: includes/functions-demo-importer.php:69
|
587 |
+
msgid "Sorry, you are not allowed to activate plugins for this site."
|
588 |
msgstr ""
|
589 |
|
590 |
+
#: includes/functions-demo-importer.php:119
|
591 |
msgid "Sorry, you are not allowed to delete demo on this site."
|
592 |
msgstr ""
|
593 |
|
594 |
+
#: includes/functions-demo-importer.php:132
|
595 |
msgid "Unable to connect to the filesystem. Please confirm your credentials."
|
596 |
msgstr ""
|
597 |
|
598 |
+
#: includes/functions-demo-importer.php:148
|
599 |
msgid "Demo could not be deleted."
|
600 |
msgstr ""
|
601 |
|
602 |
+
#: includes/functions-demo-importer.php:205
|
603 |
msgid "Could not access filesystem."
|
604 |
msgstr ""
|
605 |
|
606 |
+
#: includes/functions-demo-importer.php:209
|
607 |
msgid "Filesystem error."
|
608 |
msgstr ""
|
609 |
|
610 |
+
#: includes/functions-demo-importer.php:215
|
611 |
msgid "Unable to locate ThemeGrill demo pack directory."
|
612 |
msgstr ""
|
613 |
|
614 |
+
#: includes/functions-demo-importer.php:223
|
615 |
msgid "Could not fully remove the demo %s."
|
616 |
msgstr ""
|
617 |
|
618 |
+
#: includes/functions-demo-importer.php:417
|
619 |
+
#. translators: %s: Number of plugins
|
620 |
+
msgid "%s plugin successfully installed."
|
621 |
+
msgstr ""
|
622 |
+
|
623 |
+
#: includes/functions-demo-importer.php:424
|
624 |
+
#. translators: %s: Number of plugins
|
625 |
+
msgid "%s plugins successfully installed."
|
626 |
+
msgstr ""
|
627 |
+
|
628 |
+
#: includes/functions-demo-importer.php:434
|
629 |
+
#. translators: %s: Number of failed installs
|
630 |
+
msgid "%s install failed."
|
631 |
+
msgstr ""
|
632 |
+
|
633 |
+
#: includes/functions-demo-importer.php:439
|
634 |
+
#. translators: %s: Number of failed installs
|
635 |
+
msgid "%s installs failed."
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: includes/functions-demo-importer.php:442
|
639 |
+
msgid "Show more details"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: includes/importers/class-customizer-importer.php:42
|
643 |
+
msgid ""
|
644 |
+
"The customizer import file is not in a correct format. Please make sure to "
|
645 |
+
"use the correct customizer import file."
|
646 |
+
msgstr ""
|
647 |
+
|
648 |
+
#: includes/importers/class-customizer-importer.php:46
|
649 |
+
msgid ""
|
650 |
+
"The customizer import file is not suitable for current theme. You can only "
|
651 |
+
"import customizer settings for the same theme or a child theme."
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: includes/importers/class-widget-importer.php:39
|
655 |
+
msgid "Widget import data could not be read. Please try a different file."
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: includes/importers/class-widget-importer.php:76
|
659 |
+
msgid "Sidebar does not exist in theme (moving widget to Inactive)"
|
660 |
+
msgstr ""
|
661 |
+
|
662 |
+
#: includes/importers/class-widget-importer.php:98
|
663 |
+
msgid "Site does not support widget"
|
664 |
+
msgstr ""
|
665 |
+
|
666 |
+
#: includes/importers/class-widget-importer.php:133
|
667 |
+
msgid "Widget already exists"
|
668 |
+
msgstr ""
|
669 |
+
|
670 |
+
#: includes/importers/class-widget-importer.php:192
|
671 |
+
msgid "Imported"
|
672 |
+
msgstr ""
|
673 |
+
|
674 |
+
#: includes/importers/class-widget-importer.php:195
|
675 |
+
msgid "Imported to Inactive"
|
676 |
+
msgstr ""
|
677 |
+
|
678 |
+
#: includes/importers/class-widget-importer.php:201
|
679 |
+
msgid "No Title"
|
680 |
+
msgstr ""
|
681 |
+
|
682 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:126
|
683 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:135
|
684 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:186
|
685 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:190
|
686 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:199
|
687 |
msgid "Sorry, there has been an error."
|
688 |
msgstr ""
|
689 |
|
690 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:127
|
691 |
msgid "The file does not exist, please try again."
|
692 |
msgstr ""
|
693 |
|
694 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:170
|
695 |
msgid "All done."
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:170
|
699 |
msgid "Have fun!"
|
700 |
msgstr ""
|
701 |
|
702 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:171
|
703 |
msgid "Remember to update the passwords and roles of imported users."
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:191
|
707 |
msgid ""
|
708 |
"The export file could not be found at <code>%s</code>. It is likely that "
|
709 |
"this was caused by a permissions problem."
|
710 |
msgstr ""
|
711 |
|
712 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:207
|
713 |
msgid ""
|
714 |
"This WXR file (version %s) may not be supported by this version of the "
|
715 |
"importer. Please consider updating."
|
716 |
msgstr ""
|
717 |
|
718 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:232
|
719 |
msgid ""
|
720 |
"Failed to import author %s. Their posts will be attributed to the current "
|
721 |
"user."
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:258
|
725 |
msgid "Assign Authors"
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:259
|
729 |
msgid ""
|
730 |
"To make it easier for you to edit and save the imported content, you may "
|
731 |
"want to reassign the author of the imported item to an existing user of "
|
733 |
"<code>admin</code>s entries."
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:261
|
737 |
msgid ""
|
738 |
"If a new user is created by WordPress, a new password will be randomly "
|
739 |
"generated and the new user’s role will be set as %s. Manually "
|
740 |
"changing the new user’s details will be necessary."
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:271
|
744 |
msgid "Import Attachments"
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:274
|
748 |
msgid "Download and import file attachments"
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:278
|
752 |
msgid "Submit"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:291
|
756 |
msgid "Import author:"
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:302
|
760 |
msgid "or create new user with login name:"
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:305
|
764 |
msgid "as a new user:"
|
765 |
msgstr ""
|
766 |
|
767 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:313
|
768 |
msgid "assign posts to an existing user:"
|
769 |
msgstr ""
|
770 |
|
771 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:315
|
772 |
msgid "or assign posts to an existing user:"
|
773 |
msgstr ""
|
774 |
|
775 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:316
|
776 |
msgid "- Select -"
|
777 |
msgstr ""
|
778 |
|
779 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:366
|
780 |
msgid ""
|
781 |
"Failed to create new user for %s. Their posts will be attributed to the "
|
782 |
"current user."
|
783 |
msgstr ""
|
784 |
|
785 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:418
|
786 |
msgid "Failed to import category %s"
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:461
|
790 |
msgid "Failed to import post tag %s"
|
791 |
msgstr ""
|
792 |
|
793 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:510
|
794 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:732
|
795 |
msgid "Failed to import %s %s"
|
796 |
msgstr ""
|
797 |
|
798 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:599
|
799 |
msgid "Failed to import “%s”: Invalid post type %s"
|
800 |
msgstr ""
|
801 |
|
802 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:636
|
803 |
msgid "%s “%s” already exists."
|
804 |
msgstr ""
|
805 |
|
806 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:698
|
807 |
msgid "Failed to import %s “%s”"
|
808 |
msgstr ""
|
809 |
|
810 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:863
|
811 |
msgid "Menu item skipped due to missing menu slug"
|
812 |
msgstr ""
|
813 |
|
814 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:870
|
815 |
msgid "Menu item skipped due to invalid menu slug: %s"
|
816 |
msgstr ""
|
817 |
|
818 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:938
|
819 |
msgid "Fetching attachments is not enabled"
|
820 |
msgstr ""
|
821 |
|
822 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:952
|
823 |
msgid "Invalid file type"
|
824 |
msgstr ""
|
825 |
|
826 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:1030
|
827 |
msgid "Remote server returned %1$d %2$s for %3$s"
|
828 |
msgstr ""
|
829 |
|
830 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:1043
|
831 |
msgid "Remote file is incorrect size"
|
832 |
msgstr ""
|
833 |
|
834 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:1048
|
835 |
msgid "Zero size file downloaded"
|
836 |
msgstr ""
|
837 |
|
838 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:1054
|
839 |
msgid "Remote file is too large, limit is %s"
|
840 |
msgstr ""
|
841 |
|
842 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:1147
|
843 |
msgid "Import WordPress"
|
844 |
msgstr ""
|
845 |
|
846 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:1154
|
847 |
msgid ""
|
848 |
"A new version of this importer is available. Please update to version %s to "
|
849 |
"ensure compatibility with newer export files."
|
850 |
msgstr ""
|
851 |
|
852 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:1169
|
853 |
msgid ""
|
854 |
"Howdy! Upload your WordPress eXtended RSS (WXR) file and we’ll import "
|
855 |
"the posts, pages, comments, custom fields, categories, and tags into this "
|
856 |
"site."
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: includes/importers/wordpress-importer/class-wxr-importer.php:1170
|
860 |
msgid "Choose a WXR (.xml) file to upload, then click Upload file and import."
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: includes/importers/wordpress-importer/class-wxr-parsers.php:44
|
864 |
+
#: includes/importers/wordpress-importer/class-wxr-parsers.php:74
|
865 |
+
#: includes/importers/wordpress-importer/class-wxr-parsers.php:82
|
866 |
msgid "There was an error when reading this WXR file"
|
867 |
msgstr ""
|
868 |
|
869 |
+
#: includes/importers/wordpress-importer/class-wxr-parsers.php:45
|
870 |
msgid ""
|
871 |
"Details are shown above. The importer will now try again with a different "
|
872 |
"parser..."
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: includes/importers/wordpress-importer/class-wxr-parsers.php:86
|
876 |
+
#: includes/importers/wordpress-importer/class-wxr-parsers.php:91
|
877 |
+
#: includes/importers/wordpress-importer/class-wxr-parsers.php:308
|
878 |
+
#: includes/importers/wordpress-importer/class-wxr-parsers.php:497
|
879 |
msgid "This does not appear to be a WXR file, missing/invalid WXR version number"
|
880 |
msgstr ""
|
881 |
|
882 |
+
#: themegrill-demo-importer.php:235
|
883 |
msgid "View Demo Importer"
|
884 |
msgstr ""
|
885 |
|
886 |
+
#: themegrill-demo-importer.php:250
|
887 |
msgid "View Demo Importer Documentation"
|
888 |
msgstr ""
|
889 |
|
890 |
+
#: themegrill-demo-importer.php:250
|
891 |
msgid "Docs"
|
892 |
msgstr ""
|
893 |
|
894 |
+
#: themegrill-demo-importer.php:251
|
895 |
msgid "Visit Free Customer Support Forum"
|
896 |
msgstr ""
|
897 |
|
898 |
+
#: themegrill-demo-importer.php:251
|
899 |
msgid "Free Support"
|
900 |
msgstr ""
|
901 |
|
903 |
msgid "ThemeGrill Demo Importer"
|
904 |
msgstr ""
|
905 |
|
906 |
+
#: themegrill-demo-importer.php:265
|
907 |
msgid "This plugin requires %s by ThemeGrill to work."
|
908 |
msgstr ""
|
909 |
|
910 |
+
#: themegrill-demo-importer.php:265
|
911 |
msgid "Official Theme"
|
912 |
msgstr ""
|
913 |
|
925 |
msgid "https://themegrill.com"
|
926 |
msgstr ""
|
927 |
|
928 |
+
#: includes/admin/views/html-admin-page-importer.php:68
|
929 |
+
#: includes/admin/views/html-admin-page-importer.php:120
|
930 |
+
#: includes/admin/views/html-admin-page-importer.php:251
|
931 |
+
#: includes/admin/views/html-admin-page-installer-uploads.php:51
|
932 |
+
#: includes/admin/views/html-admin-page-installer.php:136
|
933 |
+
#: includes/admin/views/html-admin-page-installer.php:267
|
934 |
+
#. translators: %s: Demo name
|
935 |
msgctxt "demo"
|
936 |
+
msgid "Import %s"
|
937 |
msgstr ""
|
938 |
|
939 |
+
#: includes/admin/views/html-admin-page-importer.php:129
|
940 |
+
#: includes/admin/views/html-admin-page-installer.php:145
|
941 |
msgctxt "demo"
|
942 |
+
msgid "Imported"
|
943 |
msgstr ""
|
944 |
|
945 |
+
#: includes/admin/views/html-admin-page-installer-preview.php:38
|
946 |
+
#: includes/admin/views/html-admin-page-installer.php:310
|
947 |
+
#. translators: %s: Demo name
|
948 |
msgctxt "demo"
|
949 |
+
msgid "Download %s"
|
950 |
msgstr ""
|
951 |
|
952 |
+
#: includes/admin/views/html-admin-page-installer-preview.php:44
|
953 |
+
#: includes/admin/views/html-admin-page-installer.php:316
|
954 |
+
#. translators: %s: Demo name
|
955 |
msgctxt "demo"
|
956 |
+
msgid "View %s Pro"
|
957 |
msgstr ""
|
958 |
|
959 |
+
#: includes/admin/views/html-admin-page-installer.php:324
|
|
|
|
|
|
|
|
|
|
|
|
|
960 |
msgctxt "demo"
|
961 |
+
msgid "Installed"
|
962 |
msgstr ""
|
963 |
|
964 |
+
#: includes/class-demo-importer.php:193
|
|
|
965 |
msgctxt "demo"
|
966 |
+
msgid "Importing %s..."
|
967 |
msgstr ""
|
968 |
|
969 |
+
#: includes/class-demo-importer.php:198
|
|
|
|
|
970 |
msgctxt "demo"
|
971 |
+
msgid "%s imported!"
|
972 |
msgstr ""
|
973 |
|
974 |
+
#: includes/class-demo-importer.php:199
|
|
|
|
|
975 |
msgctxt "demo"
|
976 |
+
msgid "%s import failed"
|
977 |
msgstr ""
|
978 |
|
979 |
+
#: includes/class-demo-importer.php:201
|
980 |
msgctxt "demo"
|
981 |
+
msgid "Live Preview %s"
|
982 |
msgstr ""
|
983 |
|
984 |
+
#: includes/admin/views/html-admin-page-installer-preview.php:52
|
985 |
msgctxt "theme"
|
986 |
msgid "Installed"
|
987 |
+
msgstr ""
|
988 |
+
|
989 |
+
#: includes/class-demo-importer.php:157
|
990 |
+
msgctxt "Admin menu name"
|
991 |
+
msgid "Demo Importer"
|
992 |
msgstr ""
|
phpcs.ruleset.xml
DELETED
@@ -1,195 +0,0 @@
|
|
1 |
-
<?xml version="1.0"?>
|
2 |
-
<ruleset name="WordPress Coding Standards">
|
3 |
-
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
|
4 |
-
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml -->
|
5 |
-
|
6 |
-
<!-- Set a description for this ruleset. -->
|
7 |
-
<description>A custom set of code standard rules to check for WordPress themes and plugins.</description>
|
8 |
-
|
9 |
-
<!-- Include the WordPress ruleset, with exclusions. -->
|
10 |
-
<rule ref="WordPress">
|
11 |
-
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCATCH" />
|
12 |
-
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIF" />
|
13 |
-
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedELSE" />
|
14 |
-
<exclude name="Generic.CodeAnalysis.ForLoopWithTestFunctionalCall.NotAllowed" />
|
15 |
-
<exclude name="Generic.Commenting.DocComment.LongNotCapital" />
|
16 |
-
<exclude name="Generic.Commenting.DocComment.MissingShort" />
|
17 |
-
<exclude name="Generic.Commenting.DocComment.ShortNotCapital" />
|
18 |
-
<exclude name="Generic.Commenting.DocComment.SpacingAfter" />
|
19 |
-
<exclude name="Generic.Commenting.DocComment.SpacingBeforeTags" />
|
20 |
-
<exclude name="Generic.ControlStructures.InlineControlStructure.NotAllowed" />
|
21 |
-
<!-- <exclude name="Generic.Files.EndFileNewline.NotFound" /> -->
|
22 |
-
<exclude name="Generic.Files.LineEndings.InvalidEOLChar" />
|
23 |
-
<exclude name="Generic.Files.LowercasedFilename.NotFound" />
|
24 |
-
<!-- <exclude name="Generic.Formatting.DisallowMultipleStatements.SameLine" /> -->
|
25 |
-
<!-- <exclude name="Generic.Formatting.SpaceAfterCast.NoSpace" /> -->
|
26 |
-
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine" />
|
27 |
-
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.ContentAfterBrace" />
|
28 |
-
<exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie.SpaceBeforeBrace" />
|
29 |
-
<exclude name="Generic.PHP.DeprecatedFunctions.Deprecated" />
|
30 |
-
<exclude name="Generic.PHP.ForbiddenFunctions.FoundWithAlternative" />
|
31 |
-
<exclude name="Generic.PHP.LowerCaseKeyword.Found" />
|
32 |
-
<exclude name="Generic.PHP.NoSilencedErrors.Discouraged" />
|
33 |
-
<exclude name="Generic.Strings.UnnecessaryStringConcat.Found" />
|
34 |
-
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed" />
|
35 |
-
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
|
36 |
-
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
|
37 |
-
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
|
38 |
-
<!-- <exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterCloseBracket" /> -->
|
39 |
-
<!-- <exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" /> -->
|
40 |
-
<!-- <exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeCloseBracket" /> -->
|
41 |
-
<!-- <exclude name="PEAR.Functions.FunctionCallSignature.SpaceBeforeOpenBracket" /> -->
|
42 |
-
<!-- <exclude name="Squiz.Commenting.BlockComment.NoEmptyLineBefore" /> -->
|
43 |
-
<!-- <exclude name="Squiz.Commenting.BlockComment.NoNewLine" /> -->
|
44 |
-
<exclude name="Squiz.Commenting.BlockComment.WrongEnd" />
|
45 |
-
<exclude name="Squiz.Commenting.ClassComment.SpacingAfter" />
|
46 |
-
<exclude name="Squiz.Commenting.ClassComment.Missing" />
|
47 |
-
<exclude name="Squiz.Commenting.ClosingDeclarationComment.Abstract" />
|
48 |
-
<!-- <exclude name="Squiz.Commenting.DocCommentAlignment.SpaceBeforeStar" /> -->
|
49 |
-
<exclude name="Squiz.Commenting.EmptyCatchComment.Missing" />
|
50 |
-
<exclude name="Squiz.Commenting.FileComment.Missing" />
|
51 |
-
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag" />
|
52 |
-
<exclude name="Squiz.Commenting.FileComment.SpacingAfterComment" />
|
53 |
-
<exclude name="Squiz.Commenting.FileComment.SpacingAfterOpen" />
|
54 |
-
<exclude name="Squiz.Commenting.FileComment.WrongStyle" />
|
55 |
-
<exclude name="Squiz.Commenting.FunctionComment.EmptyThrows" />
|
56 |
-
<exclude name="Squiz.Commenting.FunctionComment.ExtraParamComment" />
|
57 |
-
<exclude name="Squiz.Commenting.FunctionComment.InvalidNoReturn" />
|
58 |
-
<exclude name="Squiz.Commenting.FunctionComment.InvalidReturnVoid" />
|
59 |
-
<exclude name="Squiz.Commenting.FunctionComment.Missing" />
|
60 |
-
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
|
61 |
-
<exclude name="Squiz.Commenting.FunctionComment.MissingParamName" />
|
62 |
-
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag" />
|
63 |
-
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop" />
|
64 |
-
<exclude name="Squiz.Commenting.FunctionComment.ParamNameNoCaseMatch" />
|
65 |
-
<exclude name="Squiz.Commenting.FunctionComment.ParamNameNoMatch" />
|
66 |
-
<exclude name="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing" />
|
67 |
-
<!-- <exclude name="Squiz.Commenting.FunctionComment.SpacingAfter" /> -->
|
68 |
-
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType" />
|
69 |
-
<exclude name="Squiz.Commenting.FunctionComment.ThrowsNoFullStop" />
|
70 |
-
<exclude name="Squiz.Commenting.FunctionComment.ThrowsNotCapital" />
|
71 |
-
<exclude name="Squiz.Commenting.FunctionCommentThrowTag.Missing" />
|
72 |
-
<exclude name="Squiz.Commenting.FunctionCommentThrowTag.WrongNumber" />
|
73 |
-
<exclude name="Squiz.Commenting.FunctionComment.WrongStyle" />
|
74 |
-
<exclude name="Squiz.Commenting.InlineComment.Empty" />
|
75 |
-
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
|
76 |
-
<!-- <exclude name="Squiz.Commenting.InlineComment.NoSpaceBefore" /> -->
|
77 |
-
<exclude name="Squiz.Commenting.InlineComment.NotCapital" />
|
78 |
-
<!-- <exclude name="Squiz.Commenting.InlineComment.SpacingAfter" /> -->
|
79 |
-
<!-- <exclude name="Squiz.Commenting.InlineComment.SpacingBefore" /> -->
|
80 |
-
<exclude name="Squiz.Commenting.InlineComment.WrongStyle" />
|
81 |
-
<exclude name="Squiz.Commenting.VariableComment.Missing" />
|
82 |
-
<exclude name="Squiz.Commenting.VariableComment.MissingVar" />
|
83 |
-
<exclude name="Squiz.Commenting.VariableComment.WrongStyle" />
|
84 |
-
<!-- <exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace" /> -->
|
85 |
-
<!-- <exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseParenthesis" /> -->
|
86 |
-
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword" />
|
87 |
-
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceAfterDefault" />
|
88 |
-
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpen" />
|
89 |
-
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpenHint" />
|
90 |
-
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpaceBeforeEquals" />
|
91 |
-
<exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingBeforeClose" />
|
92 |
-
<exclude name="Squiz.PHP.CommentedOutCode.Found" />
|
93 |
-
<exclude name="Squiz.Strings.DoubleQuoteUsage.NotRequired" />
|
94 |
-
<!-- <exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" /> -->
|
95 |
-
<!-- <exclude name="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine" /> -->
|
96 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.CloseBraceNewLine" /> -->
|
97 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.FirstIndexNoNewline" /> -->
|
98 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.FirstValueNoNewline" /> -->
|
99 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.IndexNoNewline" /> -->
|
100 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.NoComma" /> -->
|
101 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.NoCommaAfterLast" /> -->
|
102 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.NoSpaceAfterComma" /> -->
|
103 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.NoSpaceAfterDoubleArrow" /> -->
|
104 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.NoSpaceAfterOpenParenthesis" /> -->
|
105 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.NoSpaceBeforeDoubleArrow" /> -->
|
106 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.SpaceAfterArrayOpener" /> -->
|
107 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.SpaceAfterDoubleArrow" /> -->
|
108 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.SpaceAfterKeyword" /> -->
|
109 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.SpaceBeforeComma" /> -->
|
110 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.SpaceInEmptyArray" /> -->
|
111 |
-
<!-- <exclude name="WordPress.Arrays.ArrayDeclaration.ValueNoNewline" /> -->
|
112 |
-
<!-- <exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.NoSpacesAroundArrayKeys" /> -->
|
113 |
-
<!-- <exclude name="WordPress.Arrays.ArrayKeySpacingRestrictions.SpacesAroundArrayKeys" /> -->
|
114 |
-
<exclude name="WordPress.Classes.ClassOpeningStatement.BraceOnNewLine" />
|
115 |
-
<exclude name="WordPress.CSRF.NonceVerification.NoNonceVerification" />
|
116 |
-
<exclude name="WordPress.DB.RestrictedFunctions.mysql" />
|
117 |
-
<exclude name="WordPress.Files.FileName.UnderscoresNotAllowed" />
|
118 |
-
<exclude name="WordPress.Functions.DontExtract.extract" />
|
119 |
-
<exclude name="WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid" />
|
120 |
-
<exclude name="WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid" />
|
121 |
-
<exclude name="WordPress.NamingConventions.ValidHookName.UseUnderscores" />
|
122 |
-
<exclude name="WordPress.NamingConventions.ValidVariableName.MemberNotSnakeCase" />
|
123 |
-
<exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCase" />
|
124 |
-
<exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar" />
|
125 |
-
<exclude name="WordPress.NamingConventions.ValidVariableName.StringNotSnakeCase" />
|
126 |
-
<exclude name="WordPress.PHP.DiscouragedFunctions.Discouraged" />
|
127 |
-
<exclude name="WordPress.PHP.DiscouragedFunctions.DiscouragedWithAlternative" />
|
128 |
-
<exclude name="WordPress.PHP.StrictComparisons.LooseComparison" />
|
129 |
-
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict" />
|
130 |
-
<!-- <exclude name="WordPress.PHP.YodaConditions.NotYoda" /> -->
|
131 |
-
<exclude name="WordPress.VIP.AdminBarRemoval.RemovalDetected" />
|
132 |
-
<exclude name="WordPress.VIP.CronInterval.ChangeDetected" />
|
133 |
-
<exclude name="WordPress.VIP.DirectDatabaseQuery.DirectQuery" />
|
134 |
-
<exclude name="WordPress.VIP.DirectDatabaseQuery.NoCaching" />
|
135 |
-
<exclude name="WordPress.VIP.DirectDatabaseQuery.SchemaChange" />
|
136 |
-
<exclude name="WordPress.VIP.FileSystemWritesDisallow.FileWriteDetected" />
|
137 |
-
<exclude name="WordPress.VIP.OrderByRand.orderby" />
|
138 |
-
<exclude name="WordPress.VIP.PostsPerPage.posts_per_page" />
|
139 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.count_user_posts" />
|
140 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.custom_role" />
|
141 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.cookies" />
|
142 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.curl" />
|
143 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.error_log" />
|
144 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.extract" />
|
145 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.file_get_contents" />
|
146 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.get_pages" />
|
147 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.get_posts" />
|
148 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.get_term_by" />
|
149 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.get_term_link" />
|
150 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.get_page_by_title" />
|
151 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.parse_url" />
|
152 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.prevent_path_disclosure" />
|
153 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.runtime_configuration" />
|
154 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.serialize" />
|
155 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.urlencode" />
|
156 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.url_to_postid" />
|
157 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.user_meta" />
|
158 |
-
<!-- <exclude name="WordPress.VIP.RestrictedFunctions.wp_get_post_terms" /> -->
|
159 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.wp_redirect" />
|
160 |
-
<exclude name="WordPress.VIP.RestrictedFunctions.wp_remote_get" />
|
161 |
-
<exclude name="WordPress.VIP.RestrictedVariables.user_meta" />
|
162 |
-
<exclude name="WordPress.VIP.RestrictedVariables.cache_constraints" />
|
163 |
-
<exclude name="WordPress.VIP.SessionFunctionsUsage.session_write_close" />
|
164 |
-
<exclude name="WordPress.VIP.SlowDBQuery.slow_db_query" />
|
165 |
-
<exclude name="WordPress.VIP.SuperGlobalInputUsage.AccessDetected" />
|
166 |
-
<exclude name="WordPress.VIP.ValidatedSanitizedInput.InputNotSanitized" />
|
167 |
-
<exclude name="WordPress.VIP.ValidatedSanitizedInput.InputNotValidated" />
|
168 |
-
<exclude name="WordPress.VIP.ValidatedSanitizedInput.MissingUnslash" />
|
169 |
-
<exclude name="WordPress.Variables.GlobalVariables.OverrideProhibited" />
|
170 |
-
<exclude name="WordPress.WP.EnqueuedResources.NonEnqueuedScript" />
|
171 |
-
<exclude name="WordPress.WP.I18n.MissingSingularPlaceholder" />
|
172 |
-
<exclude name="WordPress.WP.I18n.MismatchedPlaceholders" />
|
173 |
-
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralPlural" />
|
174 |
-
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralText" />
|
175 |
-
<exclude name="WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet" />
|
176 |
-
<exclude name="WordPress.WP.PreparedSQL.NotPrepared" />
|
177 |
-
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd" /> -->
|
178 |
-
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.ExtraSpaceAfterCloseParenthesis" /> -->
|
179 |
-
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis" /> -->
|
180 |
-
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis" /> -->
|
181 |
-
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterStructureOpen" /> -->
|
182 |
-
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBetweenStructureColon" /> -->
|
183 |
-
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis" /> -->
|
184 |
-
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis" /> -->
|
185 |
-
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.OpenBraceNotSameLine" /> -->
|
186 |
-
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.SpaceBeforeFunctionOpenParenthesis" /> -->
|
187 |
-
<!-- <exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceAfter" /> -->
|
188 |
-
<!-- <exclude name="WordPress.WhiteSpace.OperatorSpacing.NoSpaceBefore" /> -->
|
189 |
-
<!-- <exclude name="WordPress.WhiteSpace.OperatorSpacing.SpacingAfter" /> -->
|
190 |
-
<!-- <exclude name="WordPress.WhiteSpace.OperatorSpacing.SpacingBefore" /> -->
|
191 |
-
<exclude name="WordPress.XSS.EscapeOutput.OutputNotEscaped" />
|
192 |
-
<exclude name="WordPress.XSS.EscapeOutput.UnsafePrintingFunction" />
|
193 |
-
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
|
194 |
-
</rule>
|
195 |
-
</ruleset>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: ThemeGrill, shivapoudel
|
|
3 |
Tags: themegrill, themes, demo, importer, download
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.8
|
6 |
-
Stable tag: 1.
|
7 |
License: GPLv3 or later
|
8 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -67,13 +67,17 @@ Yes you can! Join in on our [GitHub repository](https://github.com/themegrill/th
|
|
67 |
|
68 |
== Changelog ==
|
69 |
|
70 |
-
= 1.
|
71 |
-
* Feature -
|
72 |
-
*
|
73 |
-
*
|
74 |
-
*
|
75 |
-
*
|
76 |
-
*
|
77 |
-
* Tweak - Fallback screenshot for flash demo preview.
|
78 |
|
79 |
[See changelog for all versions](https://raw.githubusercontent.com/themegrill/themegrill-demo-importer/master/CHANGELOG.txt).
|
|
|
|
|
|
|
|
|
|
3 |
Tags: themegrill, themes, demo, importer, download
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.8
|
6 |
+
Stable tag: 1.4.0
|
7 |
License: GPLv3 or later
|
8 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
67 |
|
68 |
== Changelog ==
|
69 |
|
70 |
+
= 1.4.0 - 20/07/2017 =
|
71 |
+
* Feature - Plugin installer and activator mechinism.
|
72 |
+
* Fix - Call to undefined function `preg_filter()`.
|
73 |
+
* Dev - Improved file structure.
|
74 |
+
* Dev - Introduced `tg_demo_installer_enabled()`.
|
75 |
+
* Dev - Introduced `tg_demo_installer_preview()`.
|
76 |
+
* Dev - Introduced `tg_demo_preview_screenshot_url()`.
|
|
|
77 |
|
78 |
[See changelog for all versions](https://raw.githubusercontent.com/themegrill/themegrill-demo-importer/master/CHANGELOG.txt).
|
79 |
+
|
80 |
+
== Upgrade Notice ==
|
81 |
+
|
82 |
+
= 1.4.0 =
|
83 |
+
1.4.0 is a major update. Make a full site backup, update your theme and extensions before upgrading.
|
themegrill-demo-importer.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: ThemeGrill Demo Importer
|
4 |
* Plugin URI: https://themegrill.com/demo-importer/
|
5 |
* Description: Import your demo content, widgets and theme settings with one click for ThemeGrill official themes.
|
6 |
-
* Version: 1.
|
7 |
* Author: ThemeGrill
|
8 |
* Author URI: https://themegrill.com
|
9 |
* License: GPLv3 or later
|
@@ -26,7 +26,7 @@ final class ThemeGrill_Demo_Importer {
|
|
26 |
* Plugin version.
|
27 |
* @var string
|
28 |
*/
|
29 |
-
public $version = '1.
|
30 |
|
31 |
/**
|
32 |
* Instance of this class.
|
@@ -79,8 +79,8 @@ final class ThemeGrill_Demo_Importer {
|
|
79 |
$upload_dir = wp_upload_dir();
|
80 |
|
81 |
$this->define( 'TGDM_PLUGIN_FILE', __FILE__ );
|
82 |
-
$this->define( 'TGDM_ABSPATH', dirname(
|
83 |
-
$this->define( 'TGDM_PLUGIN_BASENAME', plugin_basename(
|
84 |
$this->define( 'TGDM_VERSION', $this->version );
|
85 |
$this->define( 'TGDM_DEMO_DIR', $upload_dir['basedir'] . '/tg-demo-pack/' );
|
86 |
$this->define( 'TGDM_DEMO_URL', $upload_dir['baseurl'] . '/tg-demo-pack/' );
|
@@ -106,12 +106,13 @@ final class ThemeGrill_Demo_Importer {
|
|
106 |
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
|
107 |
|
108 |
// Register activation hook.
|
109 |
-
register_activation_hook(
|
110 |
|
111 |
// Check with ThemeGrill theme is installed.
|
112 |
if ( in_array( get_option( 'template' ), $this->get_core_supported_themes() ) ) {
|
113 |
$this->includes();
|
114 |
|
|
|
115 |
add_filter( 'plugin_action_links_' . TGDM_PLUGIN_BASENAME, array( $this, 'plugin_action_links' ) );
|
116 |
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
|
117 |
} else {
|
@@ -124,12 +125,12 @@ final class ThemeGrill_Demo_Importer {
|
|
124 |
* @return array
|
125 |
*/
|
126 |
private function get_core_supported_themes() {
|
127 |
-
$core_themes = array( 'spacious', 'colormag', 'flash', 'estore', 'ample', 'accelerate', 'colornews', 'foodhunt', 'fitclub', 'radiate', 'freedom', 'himalayas', 'esteem', 'envince', 'suffice', 'explore' );
|
128 |
|
129 |
// Check for core themes pro version :)
|
130 |
-
$pro_themes
|
131 |
if ( ! empty( $pro_themes ) ) {
|
132 |
-
$pro_themes =
|
133 |
}
|
134 |
|
135 |
return array_merge( $core_themes, $pro_themes );
|
@@ -140,7 +141,7 @@ final class ThemeGrill_Demo_Importer {
|
|
140 |
*/
|
141 |
private function includes() {
|
142 |
include_once( TGDM_ABSPATH . 'includes/class-demo-importer.php' );
|
143 |
-
include_once( TGDM_ABSPATH . 'includes/functions-demo-
|
144 |
|
145 |
// Include valid demo packages config.
|
146 |
if ( false === strpos( get_option( 'template' ), '-pro' ) ) {
|
@@ -155,6 +156,13 @@ final class ThemeGrill_Demo_Importer {
|
|
155 |
}
|
156 |
}
|
157 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
/**
|
159 |
* Install TG Demo Importer.
|
160 |
*/
|
@@ -198,7 +206,7 @@ final class ThemeGrill_Demo_Importer {
|
|
198 |
$locale = apply_filters( 'plugin_locale', get_locale(), 'themegrill-demo-importer' );
|
199 |
|
200 |
load_textdomain( 'themegrill-demo-importer', WP_LANG_DIR . '/themegrill-demo-importer/themegrill-demo-importer-' . $locale . '.mo' );
|
201 |
-
load_plugin_textdomain( 'themegrill-demo-importer', false, plugin_basename( dirname(
|
202 |
}
|
203 |
|
204 |
/**
|
@@ -206,7 +214,7 @@ final class ThemeGrill_Demo_Importer {
|
|
206 |
* @return string
|
207 |
*/
|
208 |
public function plugin_url() {
|
209 |
-
return untrailingslashit( plugins_url( '/',
|
210 |
}
|
211 |
|
212 |
/**
|
@@ -214,7 +222,7 @@ final class ThemeGrill_Demo_Importer {
|
|
214 |
* @return string
|
215 |
*/
|
216 |
public function plugin_path() {
|
217 |
-
return untrailingslashit( plugin_dir_path(
|
218 |
}
|
219 |
|
220 |
/**
|
3 |
* Plugin Name: ThemeGrill Demo Importer
|
4 |
* Plugin URI: https://themegrill.com/demo-importer/
|
5 |
* Description: Import your demo content, widgets and theme settings with one click for ThemeGrill official themes.
|
6 |
+
* Version: 1.4.0
|
7 |
* Author: ThemeGrill
|
8 |
* Author URI: https://themegrill.com
|
9 |
* License: GPLv3 or later
|
26 |
* Plugin version.
|
27 |
* @var string
|
28 |
*/
|
29 |
+
public $version = '1.4.0';
|
30 |
|
31 |
/**
|
32 |
* Instance of this class.
|
79 |
$upload_dir = wp_upload_dir();
|
80 |
|
81 |
$this->define( 'TGDM_PLUGIN_FILE', __FILE__ );
|
82 |
+
$this->define( 'TGDM_ABSPATH', dirname( TGDM_PLUGIN_FILE ) . '/' );
|
83 |
+
$this->define( 'TGDM_PLUGIN_BASENAME', plugin_basename( TGDM_PLUGIN_FILE ) );
|
84 |
$this->define( 'TGDM_VERSION', $this->version );
|
85 |
$this->define( 'TGDM_DEMO_DIR', $upload_dir['basedir'] . '/tg-demo-pack/' );
|
86 |
$this->define( 'TGDM_DEMO_URL', $upload_dir['baseurl'] . '/tg-demo-pack/' );
|
106 |
add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
|
107 |
|
108 |
// Register activation hook.
|
109 |
+
register_activation_hook( TGDM_PLUGIN_FILE, array( $this, 'install' ) );
|
110 |
|
111 |
// Check with ThemeGrill theme is installed.
|
112 |
if ( in_array( get_option( 'template' ), $this->get_core_supported_themes() ) ) {
|
113 |
$this->includes();
|
114 |
|
115 |
+
add_action( 'after_setup_theme', array( $this, 'include_template_functions' ), 11 );
|
116 |
add_filter( 'plugin_action_links_' . TGDM_PLUGIN_BASENAME, array( $this, 'plugin_action_links' ) );
|
117 |
add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
|
118 |
} else {
|
125 |
* @return array
|
126 |
*/
|
127 |
private function get_core_supported_themes() {
|
128 |
+
$core_themes = array( 'spacious', 'colormag', 'flash', 'estore', 'ample', 'accelerate', 'colornews', 'foodhunt', 'fitclub', 'radiate', 'freedom', 'himalayas', 'esteem', 'envince', 'suffice', 'explore', 'masonic' );
|
129 |
|
130 |
// Check for core themes pro version :)
|
131 |
+
$pro_themes = array_diff( $core_themes, array( 'explore', 'masonic' ) );
|
132 |
if ( ! empty( $pro_themes ) ) {
|
133 |
+
$pro_themes = preg_replace( '/$/', '-pro', $pro_themes );
|
134 |
}
|
135 |
|
136 |
return array_merge( $core_themes, $pro_themes );
|
141 |
*/
|
142 |
private function includes() {
|
143 |
include_once( TGDM_ABSPATH . 'includes/class-demo-importer.php' );
|
144 |
+
include_once( TGDM_ABSPATH . 'includes/functions-demo-importer.php' );
|
145 |
|
146 |
// Include valid demo packages config.
|
147 |
if ( false === strpos( get_option( 'template' ), '-pro' ) ) {
|
156 |
}
|
157 |
}
|
158 |
|
159 |
+
/**
|
160 |
+
* Template Functions - This makes them pluggable by plugins and themes.
|
161 |
+
*/
|
162 |
+
public function include_template_functions() {
|
163 |
+
include_once( TGDM_ABSPATH . 'includes/functions-demo-template.php' );
|
164 |
+
}
|
165 |
+
|
166 |
/**
|
167 |
* Install TG Demo Importer.
|
168 |
*/
|
206 |
$locale = apply_filters( 'plugin_locale', get_locale(), 'themegrill-demo-importer' );
|
207 |
|
208 |
load_textdomain( 'themegrill-demo-importer', WP_LANG_DIR . '/themegrill-demo-importer/themegrill-demo-importer-' . $locale . '.mo' );
|
209 |
+
load_plugin_textdomain( 'themegrill-demo-importer', false, plugin_basename( dirname( TGDM_PLUGIN_FILE ) ) . '/languages' );
|
210 |
}
|
211 |
|
212 |
/**
|
214 |
* @return string
|
215 |
*/
|
216 |
public function plugin_url() {
|
217 |
+
return untrailingslashit( plugins_url( '/', TGDM_PLUGIN_FILE ) );
|
218 |
}
|
219 |
|
220 |
/**
|
222 |
* @return string
|
223 |
*/
|
224 |
public function plugin_path() {
|
225 |
+
return untrailingslashit( plugin_dir_path( TGDM_PLUGIN_FILE ) );
|
226 |
}
|
227 |
|
228 |
/**
|