Version Description
Download this release
Release Info
Developer | themeisle |
Plugin | Orbit Fox by ThemeIsle |
Version | 2.10.11 |
Comparing to | |
See all releases |
Code changes from version 2.10.10 to 2.10.11
- CHANGELOG.md +6 -0
- core/app/class-orbit-fox-admin.php +25 -5
- core/app/class-orbit-fox-plugin-install.php +2 -4
- core/includes/class-orbit-fox.php +1 -1
- dashboard/assets/wp-landing.jpg +0 -0
- dashboard/build/dashboard.asset.php +1 -1
- dashboard/build/dashboard.js +1 -1
- dashboard/build/style-dashboard.css +1 -1
- dashboard/src/components/PluginCard.js +43 -25
- dashboard/src/scss/components/_plugin-card.scss +15 -0
- languages/themeisle-companion.pot +43 -230
- obfx_modules/template-directory/assets/img/neve.svg +3 -0
- obfx_modules/template-directory/assets/img/starter.jpg +0 -0
- obfx_modules/template-directory/assets/img/tpc.svg +5 -0
- obfx_modules/template-directory/css/admin.css +108 -0
- obfx_modules/template-directory/init.php +168 -28
- obfx_modules/template-directory/js/template-directory.asset.php +1 -0
- obfx_modules/template-directory/js/template-directory.js +1 -0
- obfx_modules/template-directory/src/components/App.js +11 -0
- obfx_modules/template-directory/src/components/StarterSitesUnavailable.js +250 -0
- obfx_modules/template-directory/src/template-directory.js +5 -0
- readme.md +9 -0
- readme.txt +9 -0
- themeisle-companion.php +1 -1
- vendor/autoload.php +1 -1
- vendor/codeinwp/templates-directory/LICENSE +0 -201
- vendor/codeinwp/templates-directory/class-page-templates-directory.php +0 -617
- vendor/codeinwp/templates-directory/css/admin.css +0 -348
- vendor/codeinwp/templates-directory/js/script.js +0 -254
- vendor/codeinwp/templates-directory/load.php +0 -11
- vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php +0 -153
- vendor/codeinwp/templates-directory/views/template-directory-render-template-tpl.php +0 -13
- vendor/codeinwp/themeisle-sdk/CHANGELOG.md +10 -0
- vendor/codeinwp/themeisle-sdk/load.php +5 -4
- vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php +11 -2
- vendor/codeinwp/themeisle-sdk/src/Modules/Notification.php +35 -6
- vendor/composer/ClassLoader.php +1 -1
- vendor/composer/autoload_files.php +1 -2
- vendor/composer/autoload_real.php +14 -9
- vendor/composer/autoload_static.php +5 -6
- vendor/composer/installed.json +19 -65
- vendor/composer/installed.php +9 -20
CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 2.10.10](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.9...v2.10.10) (2021-12-23)
|
2 |
|
3 |
- Fix error with gutenberg-blocks
|
1 |
+
##### [Version 2.10.11](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.10...v2.10.11) (2022-02-17)
|
2 |
+
|
3 |
+
- Replace the templates module with the one based on Neve and Cloud Templates & Patterns collection
|
4 |
+
- Fix warnings with PHP 8
|
5 |
+
- Update recommended plugins
|
6 |
+
|
7 |
##### [Version 2.10.10](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.9...v2.10.10) (2021-12-23)
|
8 |
|
9 |
- Fix error with gutenberg-blocks
|
core/app/class-orbit-fox-admin.php
CHANGED
@@ -411,14 +411,24 @@ class Orbit_Fox_Admin {
|
|
411 |
$plugins = [
|
412 |
'optimole-wp',
|
413 |
'feedzy-rss-feeds',
|
414 |
-
'wpforms-lite',
|
415 |
'translatepress-multilingual',
|
416 |
-
'autoptimize',
|
417 |
'wp-cloudflare-page-cache',
|
418 |
-
'wordpress-seo',
|
419 |
'otter-blocks',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
];
|
421 |
-
shuffle( $plugins );
|
422 |
$install_instance = new Orbit_Fox_Plugin_Install();
|
423 |
|
424 |
$data = array();
|
@@ -431,7 +441,7 @@ class Orbit_Fox_Admin {
|
|
431 |
$data[ $plugin ] = array(
|
432 |
'banner' => $current_plugin->banners['low'],
|
433 |
'name' => html_entity_decode( $current_plugin->name ),
|
434 |
-
'description' => html_entity_decode( $current_plugin->short_description ),
|
435 |
'version' => $current_plugin->version,
|
436 |
'author' => html_entity_decode( wp_strip_all_tags( $current_plugin->author ) ),
|
437 |
'action' => $install_instance->check_plugin_state( $plugin ),
|
@@ -441,6 +451,16 @@ class Orbit_Fox_Admin {
|
|
441 |
);
|
442 |
}
|
443 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
444 |
return $data;
|
445 |
}
|
446 |
|
411 |
$plugins = [
|
412 |
'optimole-wp',
|
413 |
'feedzy-rss-feeds',
|
|
|
414 |
'translatepress-multilingual',
|
|
|
415 |
'wp-cloudflare-page-cache',
|
|
|
416 |
'otter-blocks',
|
417 |
+
'wp-maintenance-mode',
|
418 |
+
'multiple-pages-generator-by-porthas',
|
419 |
+
];
|
420 |
+
|
421 |
+
$th_plugins = [
|
422 |
+
'wp-landing-kit' => [
|
423 |
+
'banner' => esc_url( OBFX_URL ) . '/dashboard/assets/wp-landing.jpg',
|
424 |
+
'name' => 'WP Landing Kit',
|
425 |
+
'description' => __( 'Turn WordPress into a landing page powerhouse with Landing Kit. Map domains to pages or any other published resource.', 'themeisle-companion' ),
|
426 |
+
'author' => 'Themeisle',
|
427 |
+
'action' => 'external',
|
428 |
+
'url' => 'https://wplandingkit.com/?utm_medium=orbitfoxdashboard&utm_source=recommendedplugins&utm_campaign=orbitfox',
|
429 |
+
'premium' => true,
|
430 |
+
],
|
431 |
];
|
|
|
432 |
$install_instance = new Orbit_Fox_Plugin_Install();
|
433 |
|
434 |
$data = array();
|
441 |
$data[ $plugin ] = array(
|
442 |
'banner' => $current_plugin->banners['low'],
|
443 |
'name' => html_entity_decode( $current_plugin->name ),
|
444 |
+
'description' => html_entity_decode( $current_plugin->short_description, ENT_QUOTES ),
|
445 |
'version' => $current_plugin->version,
|
446 |
'author' => html_entity_decode( wp_strip_all_tags( $current_plugin->author ) ),
|
447 |
'action' => $install_instance->check_plugin_state( $plugin ),
|
451 |
);
|
452 |
}
|
453 |
|
454 |
+
foreach ( $th_plugins as $plugin_slug => $plugin_data ) {
|
455 |
+
$data[ $plugin_slug ] = $plugin_data;
|
456 |
+
}
|
457 |
+
uksort(
|
458 |
+
$data,
|
459 |
+
function() {
|
460 |
+
return rand() > rand();
|
461 |
+
}
|
462 |
+
);
|
463 |
+
|
464 |
return $data;
|
465 |
}
|
466 |
|
core/app/class-orbit-fox-plugin-install.php
CHANGED
@@ -80,16 +80,14 @@ class Orbit_Fox_Plugin_Install {
|
|
80 |
public static function get_plugin_path( $slug ) {
|
81 |
|
82 |
switch ( $slug ) {
|
83 |
-
case 'wpforms-lite':
|
84 |
-
return $slug . '/wpforms.php';
|
85 |
case 'translatepress-multilingual':
|
86 |
return $slug . '/index.php';
|
87 |
case 'feedzy-rss-feeds':
|
88 |
return $slug . '/feedzy-rss-feed.php';
|
89 |
-
case 'wordpress-seo':
|
90 |
-
return $slug . '/wp-seo.php';
|
91 |
case 'wp-cloudflare-page-cache':
|
92 |
return $slug . '/wp-cloudflare-super-page-cache.php';
|
|
|
|
|
93 |
default:
|
94 |
return $slug . '/' . $slug . '.php';
|
95 |
}
|
80 |
public static function get_plugin_path( $slug ) {
|
81 |
|
82 |
switch ( $slug ) {
|
|
|
|
|
83 |
case 'translatepress-multilingual':
|
84 |
return $slug . '/index.php';
|
85 |
case 'feedzy-rss-feeds':
|
86 |
return $slug . '/feedzy-rss-feed.php';
|
|
|
|
|
87 |
case 'wp-cloudflare-page-cache':
|
88 |
return $slug . '/wp-cloudflare-super-page-cache.php';
|
89 |
+
case 'multiple-pages-generator-by-porthas':
|
90 |
+
return $slug . '/porthas-multi-pages-generator.php';
|
91 |
default:
|
92 |
return $slug . '/' . $slug . '.php';
|
93 |
}
|
core/includes/class-orbit-fox.php
CHANGED
@@ -69,7 +69,7 @@ class Orbit_Fox {
|
|
69 |
|
70 |
$this->plugin_name = 'orbit-fox';
|
71 |
|
72 |
-
$this->version = '2.10.
|
73 |
|
74 |
$this->load_dependencies();
|
75 |
$this->set_locale();
|
69 |
|
70 |
$this->plugin_name = 'orbit-fox';
|
71 |
|
72 |
+
$this->version = '2.10.11';
|
73 |
|
74 |
$this->load_dependencies();
|
75 |
$this->set_locale();
|
dashboard/assets/wp-landing.jpg
ADDED
Binary file
|
dashboard/build/dashboard.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'e303a8ec088d6705788c6965ab8901af');
|
dashboard/build/dashboard.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackJsonp_themeisle_companion=window.webpackJsonp_themeisle_companion||[]).push([[1],{6:function(e,t,n){}}]),function(e){function t(t){for(var a,o,l=t[0],r=t[1],i=t[2],d=0,m=[];d<l.length;d++)o=l[d],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&m.push(c[o][0]),c[o]=0;for(a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);for(u&&u(t);m.length;)m.shift()();return s.push.apply(s,i||[]),n()}function n(){for(var e,t=0;t<s.length;t++){for(var n=s[t],a=!0,l=1;l<n.length;l++){var r=n[l];0!==c[r]&&(a=!1)}a&&(s.splice(t--,1),e=o(o.s=n[0]))}return e}var a={},c={0:0},s=[];function o(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=a,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var l=window.webpackJsonp_themeisle_companion=window.webpackJsonp_themeisle_companion||[],r=l.push.bind(l);l.push=t,l=l.slice();for(var i=0;i<l.length;i++)t(l[i]);var u=r;s.push([7,1]),n()}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t,n){var a;!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var s=typeof a;if("string"===s||"number"===s)e.push(a);else if(Array.isArray(a)){if(a.length){var o=c.apply(null,a);o&&e.push(o)}}else if("object"===s)if(a.toString===Object.prototype.toString)for(var l in a)n.call(a,l)&&a[l]&&e.push(l);else e.push(a.toString())}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(a=function(){return c}.apply(t,[]))||(e.exports=a)}()},function(e,t,n){"use strict";var a=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==a)return a;throw new Error("unable to locate global object")}();e.exports=t=a.fetch,a.fetch&&(t.default=a.fetch.bind(a)),t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response},function(e,t){e.exports=window.lodash},,function(e,t,n){"use strict";n.r(t);var a=n(0);n(6);const c=Object(a.createContext)(),s=Object(a.createContext)(),o=Object(a.createContext)();var l=n(4),r=n.n(l);const i=async(e,t=!1,n={},a=!1,c="POST")=>{const s={method:c,headers:{Accept:"application/json","Content-Type":a?"application/x-www-form-urlencoded":"application/json","x-wp-nonce":obfxDash.nonce}};return"POST"===c&&(s.body=a?n:JSON.stringify(n)),await r()(e,s).then(e=>t?e:e.json())};var u=n(3),d=n.n(u),m=n(5),b=n(2),p=n(1);const{options:O,root:j,setSettingsRoute:v}=obfxDash;var h=({slug:e})=>{const{modulesData:t,setModulesData:n}=Object(a.useContext)(c),{setToast:s}=Object(a.useContext)(o),[l,r]=Object(a.useState)(!1),[u,h]=Object(a.useState)(!1),f=t.module_settings[e]||{},[g,E]=Object(a.useState)({...f}),_=Object(a.createElement)(b.Dashicon,{size:18,icon:"update",className:"is-loading"}),y=(e,t)=>{const n=g;n[e]=t,E({...n})};return Object(a.createElement)("div",{className:d()(["module-settings",l?"open":"closed"])},Object(a.createElement)("button",{"aria-expanded":l,className:"accordion-header",onClick:()=>r(!l)},Object(a.createElement)("div",{className:"accordion-title"}," Settings "),Object(a.createElement)(b.Dashicon,{icon:l?"arrow-up-alt2":"arrow-down-alt2"})),l&&Object(a.createElement)("div",{className:d()(["accordion-content",u?"loading":""])},(()=>{const t=[];for(let n=0;n<O[e].length;n++){let c=O[e][n];if(c.title&&c.label&&t.push(Object(a.createElement)("p",{className:"title"}," ",c.title," ")),c.hasOwnProperty("before_wrap")){const o=[],l="1"===g[c.id]||!g[c.id]&&"1"===c.default;for(;o.push(P(c,g,y,s)),!c.hasOwnProperty("after_wrap");)c=O[e][++n];const r=d()(["settings-row",l&&"active"]);t.push(Object(a.createElement)("div",{className:r}," ",o," "))}else if("checkbox"!==c.type)t.push(P(c,g,y,s));else{const o=[];for(;"checkbox"===c.type;)o.push(P(c,g,y,s)),c=O[e][++n];t.push(Object(a.createElement)("div",{className:"checkboxes-row"}," ",o," "))}}return t})(),Object(a.createElement)("div",{className:"buttons-container"},Object(a.createElement)(b.Button,{isSecondary:!0,className:"obfx-button",onClick:()=>r(!1)},Object(p.__)("Close","themeisle-companion")),Object(a.createElement)(b.Button,{isPrimary:!0,disabled:Object(m.isEqual)(g,f),className:"obfx-button",onClick:()=>{h(!0),i(j+v,!1,{slug:e,value:g}).then(a=>{if("success"!==a.type)return E({...f}),h(!1),void s(Object(p.__)("Could not update options. Please try again.","themeisle-companion"));t.module_settings[e]={...g},n({...t}),h(!1),s(Object(p.__)("Options updated successfully.","themeisle-companion"))})}},u?_:Object(p.__)("Save","themeisle-companion")))))};const{root:f,toggleStateRoute:g,options:E}=obfxDash;var _=({slug:e,details:t})=>{const n=t.refresh_after_enabled,s=t.active_default,[l,r]=Object(a.useState)(!1),{modulesData:u,setModulesData:m}=Object(a.useContext)(c),{setToast:O}=Object(a.useContext)(o),j=u.module_status,v=j[e]&&void 0!==j[e].active?j[e].active:s,_=d()("module-card",{active:v});return Object(a.createElement)("div",{className:_},Object(a.createElement)("div",{className:"module-card-header"},Object(a.createElement)("h3",{className:"title"},t.name),Object(a.createElement)("div",{className:"toggle-wrap"},l&&Object(a.createElement)(b.Dashicon,{size:18,icon:"update",className:"is-loading"}),Object(a.createElement)(b.ToggleControl,{checked:v,onChange:a=>{r(!0),i(f+g,!1,{slug:e,value:a}).then(c=>{((a,c)=>{if("success"!==a.type)return r(!1),void O(Object(p.__)("Could not activate module. Please try again.","themeisle-companion"));n&&window.location.reload(),j[e]||(j[e]={}),j[e].active=c,m(u),r(!1),O((c?Object(p.__)("Module activated","themeisle-companion"):Object(p.__)("Module deactivated","themeisle-companion"))+` (${t.name})`)})(c,a)})}}))),Object(a.createElement)("div",{className:"module-card-content"},(e=>{const t=[];if(e.indexOf("neve-pro-notice")>=0)return Object(a.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:e}});for(;e.indexOf("<a")>=0;){const n=e.indexOf("<a"),c=e.indexOf("</a>");t.push(e.slice(0,n));const s=e.indexOf('href="')+'href="'.length,o=e.indexOf('"',s),l=e.slice(s,o),r=e.slice(e.indexOf(">",n)+1,c);t.push(Object(a.renderToString)(Object(a.createElement)(b.ExternalLink,{href:l},r))),e=e.slice(c+"</a>".length)}return t.push(e),Object(a.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:t.join(" ")}})})(t.description)),v&&E[e].length>0&&Object(a.createElement)(h,{slug:e}))};const{modules:y,data:w}=obfxDash;var x=()=>{const[e,t]=Object(a.useState)(""===w?{module_status:{},module_settings:{}}:{...w});return e.module_settings||t({...e,module_settings:{}}),e.module_status||t({...e,module_status:{}}),Object(a.createElement)(c.Provider,{value:{modulesData:e,setModulesData:t}},Object(a.createElement)("div",{className:"modules-container"},Object.entries(y).map(([e,t])=>Object(a.createElement)(_,{slug:e,details:t,key:e}))))};var N=({slug:e,data:t})=>{const{banner:n,name:c,description:l,version:r,author:u}=t,{pluginsData:m,setPluginsData:O}=Object(a.useContext)(s),{setToast:j}=Object(a.useContext)(o),[v,h]=Object(a.useState)(!1),f=m[e].action,g=t=>{m[e].action=t,O(m)},E=Object(p.__)("Something went wrong. Please try again.","themeisle-companion"),_={install:{static:Object(p.__)("Install","neve"),progress:Object(p.__)("Installing","neve")},activate:{static:Object(p.__)("Activate","neve"),progress:Object(p.__)("Activating","neve")},deactivate:{static:Object(p.__)("Deactivate","neve"),progress:Object(p.__)("Deactivating","neve")}};return Object(a.createElement)("div",{className:d()(["card","plugin",e])},Object(a.createElement)("div",{className:"card-header"},Object(a.createElement)("img",{src:n,alt:Object(p.__)("Banner Image","name")})),Object(a.createElement)("div",{className:"card-body"},Object(a.createElement)("h3",{className:"card-title"},c),Object(a.createElement)("p",{className:"card-description"},l)),Object(a.createElement)("div",{className:"card-footer"},Object(a.createElement)("div",{className:"plugin-data"},Object(a.createElement)("span",{className:"version"},"v",r)," |"," ",Object(a.createElement)("span",{className:"author"},u)),Object(a.createElement)(b.Button,{className:"plugin-action",isPrimary:["install","activate"].includes(f),isSecondary:"deactivate"===f,disabled:v,onClick:()=>{var n;h(!0),"install"!==f?(n=t[f],!0,i(n,!0,{},"GET")).then(e=>{if(!e.ok)return h(!1),void j(E);g("activate"===f?"deactivate":"activate"),h(!1)}):(e=>new Promise(t=>{wp.updates.ajax("install-plugin",{slug:e,success:()=>{t({success:!0})},error:()=>{t({success:!1})}})}))(e).then(e=>{if(!e.success)return h(!1),void j(E);g("activate"),h(!1)})}},!v&&_[f].static,v&&Object(a.createElement)("span",{style:{display:"flex",alignItems:"center"}},Object(a.createElement)(b.Dashicon,{icon:"update"}),_[f].progress+"..."))))},C=()=>{const{plugins:e}=obfxDash,[t,n]=Object(a.useState)(e);return e?Object(a.createElement)(s.Provider,{value:{pluginsData:t,setPluginsData:n}},Object(a.createElement)("div",{className:"plugins-grid"},Object.keys(e).map(t=>Object(a.createElement)(N,{key:t,slug:t,data:e[t]})))):null};const S={modules:{label:Object(p.__)("Available Modules","themeisle-companion"),render:()=>Object(a.createElement)(x,null)},plugins:{label:Object(p.__)("Recommended Plugins","themeisle-companion"),render:()=>Object(a.createElement)(C,null)}},k=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value},P=(e,t,n,c)=>{const s=void 0!==t[e.id]?t[e.id]:e.default;switch(e.type){case"checkbox":return Object(a.createElement)(b.CheckboxControl,{label:e.label,checked:"1"===s,onChange:t=>n(e.id,t?"1":"0")});case"radio":return Object(a.createElement)(b.RadioControl,{label:e.title,options:e.options.map((e,t)=>({label:e,value:t})),selected:parseInt(s),onChange:t=>n(e.id,t)});case"toggle":return Object(a.createElement)(b.ToggleControl,{label:Object(a.createElement)("div",{dangerouslySetInnerHTML:{__html:e.label}}),checked:"1"===s,onChange:t=>n(e.id,t?"1":"0")});case"select":return Object(a.createElement)("div",{className:"select-wrap"},Object(a.createElement)(b.SelectControl,{label:e.title,value:s,options:Object.entries(e.options).map(([e,t])=>({value:e,label:t})),onChange:t=>n(e.id,t)}));case"text":return Object(a.createElement)(b.TextControl,{label:e.title,value:k(s),onChange:t=>n(e.id,t)});case"link":const t="analytics_accounts_unregister"===e.id;return Object(a.createElement)("div",{className:"select-wrap"},Object(a.createElement)(b.Button,{isPrimary:!t,isDestructive:t,href:e.url?e.url:null,onClick:t&&(()=>{((e,t)=>{var n;(n=e,"deactivate=unregister",i(n,!1,"deactivate=unregister",!0)).then(e=>{!1!==e?window.location.reload():t(Object(p.__)("Could not unregister the site. Please try again.","themeisle-companion"))})})(e.unregisterURL,c)})},Object(a.createElement)("div",{dangerouslySetInnerHTML:{__html:e.text}})))}};var T=({activeTab:e,setActiveTab:t})=>Object(a.createElement)("header",null,Object(a.createElement)("div",{className:"container"},Object(a.createElement)("div",{className:"top"},Object(a.createElement)("img",{src:obfxDash.path+"assets/orbit-fox.png",alt:"logo"}),Object(a.createElement)("h1",null,"Orbit Fox")),Object(a.createElement)("nav",{className:"navigation"},Object.keys(S).map((n,c)=>Object(a.createElement)("li",{key:"tab"+c,className:n===e?"active":""},Object(a.createElement)("a",{href:"#"+n,onClick:()=>t(n)},S[n].label)))))),D=()=>{const{toast:e,setToast:t}=Object(a.useContext)(o);Object(a.useEffect)(()=>{setTimeout(()=>{t(null)},3e3)},[]);const n={opacity:null===e?0:1};return Object(a.createElement)("div",{style:n},Object(a.createElement)(b.Snackbar,{className:"dash-notice"},e))},M=()=>{const e=(()=>{let e=window.location.hash;return"string"!=typeof window.location.hash?null:(e=e.substring(1),Object.keys(S).includes(e)?e:null)})(),[t,n]=Object(a.useState)(e||"modules"),[c,s]=Object(a.useState)();return Object(a.createElement)(o.Provider,{value:{toast:c,setToast:s}},Object(a.createElement)(T,{activeTab:t,setActiveTab:n}),Object(a.createElement)("div",{className:"container"},S[t].render()),c&&Object(a.createElement)(D,null))};Object(a.render)(Object(a.createElement)(()=>Object(a.createElement)(M,null),null),document.getElementById("obfx-dash"))}]);
|
1 |
+
(window.webpackJsonp_themeisle_companion=window.webpackJsonp_themeisle_companion||[]).push([[1],{6:function(e,t,n){}}]),function(e){function t(t){for(var a,o,l=t[0],r=t[1],i=t[2],m=0,d=[];m<l.length;m++)o=l[m],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&d.push(c[o][0]),c[o]=0;for(a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);for(u&&u(t);d.length;)d.shift()();return s.push.apply(s,i||[]),n()}function n(){for(var e,t=0;t<s.length;t++){for(var n=s[t],a=!0,l=1;l<n.length;l++){var r=n[l];0!==c[r]&&(a=!1)}a&&(s.splice(t--,1),e=o(o.s=n[0]))}return e}var a={},c={0:0},s=[];function o(t){if(a[t])return a[t].exports;var n=a[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=a,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var l=window.webpackJsonp_themeisle_companion=window.webpackJsonp_themeisle_companion||[],r=l.push.bind(l);l.push=t,l=l.slice();for(var i=0;i<l.length;i++)t(l[i]);var u=r;s.push([7,1]),n()}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t,n){var a;!function(){"use strict";var n={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var s=typeof a;if("string"===s||"number"===s)e.push(a);else if(Array.isArray(a)){if(a.length){var o=c.apply(null,a);o&&e.push(o)}}else if("object"===s)if(a.toString===Object.prototype.toString)for(var l in a)n.call(a,l)&&a[l]&&e.push(l);else e.push(a.toString())}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(a=function(){return c}.apply(t,[]))||(e.exports=a)}()},function(e,t,n){"use strict";var a=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==a)return a;throw new Error("unable to locate global object")}();e.exports=t=a.fetch,a.fetch&&(t.default=a.fetch.bind(a)),t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response},function(e,t){e.exports=window.lodash},,function(e,t,n){"use strict";n.r(t);var a=n(0);n(6);const c=Object(a.createContext)(),s=Object(a.createContext)(),o=Object(a.createContext)();var l=n(4),r=n.n(l);const i=async(e,t=!1,n={},a=!1,c="POST")=>{const s={method:c,headers:{Accept:"application/json","Content-Type":a?"application/x-www-form-urlencoded":"application/json","x-wp-nonce":obfxDash.nonce}};return"POST"===c&&(s.body=a?n:JSON.stringify(n)),await r()(e,s).then(e=>t?e:e.json())};var u=n(3),m=n.n(u),d=n(5),b=n(2),p=n(1);const{options:O,root:j,setSettingsRoute:h}=obfxDash;var f=({slug:e})=>{const{modulesData:t,setModulesData:n}=Object(a.useContext)(c),{setToast:s}=Object(a.useContext)(o),[l,r]=Object(a.useState)(!1),[u,f]=Object(a.useState)(!1),v=t.module_settings[e]||{},[g,E]=Object(a.useState)({...v}),_=Object(a.createElement)(b.Dashicon,{size:18,icon:"update",className:"is-loading"}),y=(e,t)=>{const n=g;n[e]=t,E({...n})};return Object(a.createElement)("div",{className:m()(["module-settings",l?"open":"closed"])},Object(a.createElement)("button",{"aria-expanded":l,className:"accordion-header",onClick:()=>r(!l)},Object(a.createElement)("div",{className:"accordion-title"}," Settings "),Object(a.createElement)(b.Dashicon,{icon:l?"arrow-up-alt2":"arrow-down-alt2"})),l&&Object(a.createElement)("div",{className:m()(["accordion-content",u?"loading":""])},(()=>{const t=[];for(let n=0;n<O[e].length;n++){let c=O[e][n];if(c.title&&c.label&&t.push(Object(a.createElement)("p",{className:"title"}," ",c.title," ")),c.hasOwnProperty("before_wrap")){const o=[],l="1"===g[c.id]||!g[c.id]&&"1"===c.default;for(;o.push(P(c,g,y,s)),!c.hasOwnProperty("after_wrap");)c=O[e][++n];const r=m()(["settings-row",l&&"active"]);t.push(Object(a.createElement)("div",{className:r}," ",o," "))}else if("checkbox"!==c.type)t.push(P(c,g,y,s));else{const o=[];for(;"checkbox"===c.type;)o.push(P(c,g,y,s)),c=O[e][++n];t.push(Object(a.createElement)("div",{className:"checkboxes-row"}," ",o," "))}}return t})(),Object(a.createElement)("div",{className:"buttons-container"},Object(a.createElement)(b.Button,{isSecondary:!0,className:"obfx-button",onClick:()=>r(!1)},Object(p.__)("Close","themeisle-companion")),Object(a.createElement)(b.Button,{isPrimary:!0,disabled:Object(d.isEqual)(g,v),className:"obfx-button",onClick:()=>{f(!0),i(j+h,!1,{slug:e,value:g}).then(a=>{if("success"!==a.type)return E({...v}),f(!1),void s(Object(p.__)("Could not update options. Please try again.","themeisle-companion"));t.module_settings[e]={...g},n({...t}),f(!1),s(Object(p.__)("Options updated successfully.","themeisle-companion"))})}},u?_:Object(p.__)("Save","themeisle-companion")))))};const{root:v,toggleStateRoute:g,options:E}=obfxDash;var _=({slug:e,details:t})=>{const n=t.refresh_after_enabled,s=t.active_default,[l,r]=Object(a.useState)(!1),{modulesData:u,setModulesData:d}=Object(a.useContext)(c),{setToast:O}=Object(a.useContext)(o),j=u.module_status,h=j[e]&&void 0!==j[e].active?j[e].active:s,_=m()("module-card",{active:h});return Object(a.createElement)("div",{className:_},Object(a.createElement)("div",{className:"module-card-header"},Object(a.createElement)("h3",{className:"title"},t.name),Object(a.createElement)("div",{className:"toggle-wrap"},l&&Object(a.createElement)(b.Dashicon,{size:18,icon:"update",className:"is-loading"}),Object(a.createElement)(b.ToggleControl,{checked:h,onChange:a=>{r(!0),i(v+g,!1,{slug:e,value:a}).then(c=>{((a,c)=>{if("success"!==a.type)return r(!1),void O(Object(p.__)("Could not activate module. Please try again.","themeisle-companion"));n&&window.location.reload(),j[e]||(j[e]={}),j[e].active=c,d(u),r(!1),O((c?Object(p.__)("Module activated","themeisle-companion"):Object(p.__)("Module deactivated","themeisle-companion"))+` (${t.name})`)})(c,a)})}}))),Object(a.createElement)("div",{className:"module-card-content"},(e=>{const t=[];if(e.indexOf("neve-pro-notice")>=0)return Object(a.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:e}});for(;e.indexOf("<a")>=0;){const n=e.indexOf("<a"),c=e.indexOf("</a>");t.push(e.slice(0,n));const s=e.indexOf('href="')+'href="'.length,o=e.indexOf('"',s),l=e.slice(s,o),r=e.slice(e.indexOf(">",n)+1,c);t.push(Object(a.renderToString)(Object(a.createElement)(b.ExternalLink,{href:l},r))),e=e.slice(c+"</a>".length)}return t.push(e),Object(a.createElement)("p",{className:"description",dangerouslySetInnerHTML:{__html:t.join(" ")}})})(t.description)),h&&E[e].length>0&&Object(a.createElement)(f,{slug:e}))};const{modules:y,data:w}=obfxDash;var x=()=>{const[e,t]=Object(a.useState)(""===w?{module_status:{},module_settings:{}}:{...w});return e.module_settings||t({...e,module_settings:{}}),e.module_status||t({...e,module_status:{}}),Object(a.createElement)(c.Provider,{value:{modulesData:e,setModulesData:t}},Object(a.createElement)("div",{className:"modules-container"},Object.entries(y).map(([e,t])=>Object(a.createElement)(_,{slug:e,details:t,key:e}))))};var N=({slug:e,data:t})=>{const{banner:n,name:c,description:l,version:r,author:u,url:d,premium:O}=t,{pluginsData:j,setPluginsData:h}=Object(a.useContext)(s),{setToast:f}=Object(a.useContext)(o),[v,g]=Object(a.useState)(!1),E=j[e].action,_=t=>{j[e].action=t,h(j)},y=Object(p.__)("Something went wrong. Please try again.","themeisle-companion"),w={install:{static:Object(p.__)("Install","themeisle-companion"),progress:Object(p.__)("Installing","themeisle-companion")},activate:{static:Object(p.__)("Activate","themeisle-companion"),progress:Object(p.__)("Activating","themeisle-companion")},deactivate:{static:Object(p.__)("Deactivate","themeisle-companion"),progress:Object(p.__)("Deactivating","themeisle-companion")},external:Object(p.__)("See more details","themeisle-companion")};return Object(a.createElement)("div",{className:m()(["card","plugin",e])},Object(a.createElement)("div",{className:"card-header"},Object(a.createElement)("img",{src:n,alt:Object(p.__)("Banner Image","name")}),O&&Object(a.createElement)("span",{className:"premium-label"},Object(p.__)("Premium","themeisle-companion"))),Object(a.createElement)("div",{className:"card-body"},Object(a.createElement)("h3",{className:"card-title"},c),Object(a.createElement)("p",{className:"card-description"},l)),Object(a.createElement)("div",{className:"card-footer"},Object(a.createElement)("div",{className:"plugin-data"},r&&Object(a.createElement)("span",{className:"version"},"v",r),u&&Object(a.createElement)("span",{className:"author"},u)),"external"!==E&&Object(a.createElement)(b.Button,{className:"plugin-action",isPrimary:["install","activate"].includes(E),isSecondary:"deactivate"===E,disabled:v,onClick:()=>{var n;g(!0),"install"!==E?(n=t[E],!0,i(n,!0,{},"GET")).then(e=>{if(!e.ok)return g(!1),void f(y);_("activate"===E?"deactivate":"activate"),g(!1)}):(e=>new Promise(t=>{wp.updates.ajax("install-plugin",{slug:e,success:()=>{t({success:!0})},error:()=>{t({success:!1})}})}))(e).then(e=>{if(!e.success)return g(!1),void f(y);_("activate"),g(!1)})}},!v&&w[E].static,v&&Object(a.createElement)("span",{style:{display:"flex",alignItems:"center"}},Object(a.createElement)(b.Dashicon,{icon:"update"}),w[E].progress+"...")),"external"===E&&Object(a.createElement)(b.ExternalLink,{href:d},w[E])))},S=()=>{const{plugins:e}=obfxDash,[t,n]=Object(a.useState)(e);return e?Object(a.createElement)(s.Provider,{value:{pluginsData:t,setPluginsData:n}},Object(a.createElement)("div",{className:"plugins-grid"},Object.keys(e).map(t=>Object(a.createElement)(N,{key:t,slug:t,data:e[t]})))):null};const C={modules:{label:Object(p.__)("Available Modules","themeisle-companion"),render:()=>Object(a.createElement)(x,null)},plugins:{label:Object(p.__)("Recommended Plugins","themeisle-companion"),render:()=>Object(a.createElement)(S,null)}},k=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value},P=(e,t,n,c)=>{const s=void 0!==t[e.id]?t[e.id]:e.default;switch(e.type){case"checkbox":return Object(a.createElement)(b.CheckboxControl,{label:e.label,checked:"1"===s,onChange:t=>n(e.id,t?"1":"0")});case"radio":return Object(a.createElement)(b.RadioControl,{label:e.title,options:e.options.map((e,t)=>({label:e,value:t})),selected:parseInt(s),onChange:t=>n(e.id,t)});case"toggle":return Object(a.createElement)(b.ToggleControl,{label:Object(a.createElement)("div",{dangerouslySetInnerHTML:{__html:e.label}}),checked:"1"===s,onChange:t=>n(e.id,t?"1":"0")});case"select":return Object(a.createElement)("div",{className:"select-wrap"},Object(a.createElement)(b.SelectControl,{label:e.title,value:s,options:Object.entries(e.options).map(([e,t])=>({value:e,label:t})),onChange:t=>n(e.id,t)}));case"text":return Object(a.createElement)(b.TextControl,{label:e.title,value:k(s),onChange:t=>n(e.id,t)});case"link":const t="analytics_accounts_unregister"===e.id;return Object(a.createElement)("div",{className:"select-wrap"},Object(a.createElement)(b.Button,{isPrimary:!t,isDestructive:t,href:e.url?e.url:null,onClick:t&&(()=>{((e,t)=>{var n;(n=e,"deactivate=unregister",i(n,!1,"deactivate=unregister",!0)).then(e=>{!1!==e?window.location.reload():t(Object(p.__)("Could not unregister the site. Please try again.","themeisle-companion"))})})(e.unregisterURL,c)})},Object(a.createElement)("div",{dangerouslySetInnerHTML:{__html:e.text}})))}};var T=({activeTab:e,setActiveTab:t})=>Object(a.createElement)("header",null,Object(a.createElement)("div",{className:"container"},Object(a.createElement)("div",{className:"top"},Object(a.createElement)("img",{src:obfxDash.path+"assets/orbit-fox.png",alt:"logo"}),Object(a.createElement)("h1",null,"Orbit Fox")),Object(a.createElement)("nav",{className:"navigation"},Object.keys(C).map((n,c)=>Object(a.createElement)("li",{key:"tab"+c,className:n===e?"active":""},Object(a.createElement)("a",{href:"#"+n,onClick:()=>t(n)},C[n].label)))))),D=()=>{const{toast:e,setToast:t}=Object(a.useContext)(o);Object(a.useEffect)(()=>{setTimeout(()=>{t(null)},3e3)},[]);const n={opacity:null===e?0:1};return Object(a.createElement)("div",{style:n},Object(a.createElement)(b.Snackbar,{className:"dash-notice"},e))},M=()=>{const e=(()=>{let e=window.location.hash;return"string"!=typeof window.location.hash?null:(e=e.substring(1),Object.keys(C).includes(e)?e:null)})(),[t,n]=Object(a.useState)(e||"modules"),[c,s]=Object(a.useState)();return Object(a.createElement)(o.Provider,{value:{toast:c,setToast:s}},Object(a.createElement)(T,{activeTab:t,setActiveTab:n}),Object(a.createElement)("div",{className:"container"},C[t].render()),c&&Object(a.createElement)(D,null))};Object(a.render)(Object(a.createElement)(()=>Object(a.createElement)(M,null),null),document.getElementById("obfx-dash"))}]);
|
dashboard/build/style-dashboard.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#obfx-dash{--wp-admin-theme-color: #5a65b0;--wp-admin-theme-color-darker-10: #464f91;--wp-admin-theme-color-darker-20: #353c6f}#obfx-dash .module-settings .accordion-content .components-radio-control__input[type=radio]:checked:before{width:1px;height:1px}#obfx-dash .css-bmkl3j-Container{width:unset}#wpcontent{padding-left:0 !important}.ob-overflow-off{overflow:hidden !important}#obfx-dash .container{padding:0 20px;max-width:1300px;margin-left:auto;margin-right:auto}#obfx-dash .dash-notice{position:fixed;bottom:30px;margin-left:30px}@-webkit-keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}#obfx-dash header{background-color:#fff;border-bottom:1px solid #e1e1e1}#obfx-dash header .top{padding:65px 0 50px 0;display:flex}#obfx-dash header .top img{max-height:100%}#obfx-dash header .top h1{font-size:45px;margin-left:10px;color:inherit}#obfx-dash header .navigation{display:flex;list-style:none;text-decoration:none;font-weight:600;line-height:1.5;padding-bottom:20px;flex-wrap:nowrap;font-size:19px}#obfx-dash header .navigation li{margin-right:50px}#obfx-dash header .navigation li a{color:inherit;text-decoration:none;box-shadow:none}#obfx-dash header .navigation li.active{color:#5a65b0 !important}#obfx-dash .modules-container{padding-top:20px;display:flex;flex-direction:column;row-gap:20px}#obfx-dash .module-card{background-color:#fff;border:1px solid #e1e1e1;box-shadow:0 1px 1px rgba(0,0,0,.04)}#obfx-dash .module-card .module-card-header{padding:20px;border-bottom:1px solid #e1e1e1;display:flex;position:relative}#obfx-dash .module-card .module-card-header .title{margin:0;font-size:18px;line-height:1.5;color:inherit}#obfx-dash .module-card .module-card-header .toggle-wrap{margin-left:auto;display:flex;align-items:center}#obfx-dash .module-card .module-card-header .toggle-wrap .dashicon{-webkit-animation-name:spin;animation-name:spin;-webkit-animation-duration:2000ms;animation-duration:2000ms;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}#obfx-dash .module-card .module-card-header .toggle-wrap div{margin-bottom:0;margin-left:5px}#obfx-dash .module-card .module-card-header .toggle-wrap span{margin-right:0}#obfx-dash .module-card.active .neve-pro-notice{background-color:#5a65b0;color:#fff;padding:15px 22px;margin-top:10px;border-radius:6px;display:flex;justify-content:space-between}#obfx-dash .module-card.active .neve-pro-notice a{background-color:inherit;color:inherit;border:2px solid #fff;border-radius:2px;padding:0 20px;text-decoration:none;white-space:nowrap;display:flex;align-items:center}#obfx-dash .module-card.active .neve-pro-notice p{font-size:15px;margin:.75em 0}#obfx-dash .module-card .neve-pro-notice{display:none;-webkit-animation:1s notice-appear;animation:1s notice-appear}#obfx-dash .module-card .neve-pro-notice a{opacity:0;-webkit-animation:.2s .3s forwards content-appear;animation:.2s .3s forwards content-appear}#obfx-dash .module-card .module-card-content{padding:20px}#obfx-dash .module-card .module-card-content .description{margin:0;font-size:15px;color:#616161}@-webkit-keyframes notice-appear{from{max-height:0}to{max-height:100px}}@keyframes notice-appear{from{max-height:0}to{max-height:100px}}@-webkit-keyframes content-appear{from{opacity:0}to{opacity:1}}@keyframes content-appear{from{opacity:0}to{opacity:1}}#obfx-dash .module-settings{border-top:1px solid #e1e1e1}#obfx-dash .module-settings.open .accordion-header .accordion-title{color:#3c434a}#obfx-dash .module-settings .accordion-header{padding:15px 20px;background-color:#fff;outline:none;border:none;width:100%;display:flex;cursor:pointer}#obfx-dash .module-settings .accordion-header .accordion-title{margin-right:auto;font-size:15px;font-weight:600;color:#5a65b0;transition-duration:.25s;transition-timing-function:ease-out}#obfx-dash .module-settings .accordion-header .dashicon{margin-left:auto;color:#646d82}#obfx-dash .module-settings .accordion-content{padding:15px 20px;display:flex;flex-direction:column;row-gap:15px}#obfx-dash .module-settings .accordion-content .title{margin:0}#obfx-dash .module-settings .accordion-content .checkboxes-row{display:flex;-moz-column-gap:30px;column-gap:30px}#obfx-dash .module-settings .accordion-content .select-wrap{display:flex;flex-direction:row}#obfx-dash .module-settings .accordion-content .obfx-google{margin-right:10px}#obfx-dash .module-settings .accordion-content .settings-row{display:flex;-moz-column-gap:70px;column-gap:70px}#obfx-dash .module-settings .accordion-content .settings-row>*{transition-duration:.1s;transition-timing-function:ease}#obfx-dash .module-settings .accordion-content .settings-row>:not(:first-child){opacity:0;pointer-events:none}#obfx-dash .module-settings .accordion-content .settings-row.active>:not(:first-child){opacity:1;pointer-events:auto}#obfx-dash .module-settings .accordion-content .settings-row>:first-child{width:150px}#obfx-dash .module-settings .accordion-content.loading{opacity:.75}#obfx-dash .module-settings .accordion-content .buttons-container{margin-left:auto;display:flex;-moz-column-gap:10px;column-gap:10px;justify-content:flex-end;position:relative}#obfx-dash .module-settings .accordion-content .buttons-container .obfx-button{width:60px;justify-content:center}#obfx-dash .module-settings .accordion-content .buttons-container .obfx-button .dashicon{-webkit-animation-name:spin;animation-name:spin;-webkit-animation-duration:2000ms;animation-duration:2000ms;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}#obfx-dash .plugins-grid{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fit, minmax(360px, 1fr));-moz-column-gap:30px;column-gap:30px;row-gap:20px}#obfx-dash .card.plugin{padding:0;max-width:100%;display:flex;flex-direction:column;border:1px solid #e1e1e1}#obfx-dash .card.plugin .card-header img{width:100%;max-width:100%;border-bottom:1px solid #e1e1e1}#obfx-dash .card.plugin .card-body{padding:20px}#obfx-dash .card.plugin .card-body .card-title{margin:0 0 20px;line-height:150%}#obfx-dash .card.plugin .card-footer{border-top:1px solid #e1e1e1;padding:20px 15px 20px 20px;display:flex;align-items:center;margin-top:auto;position:relative}#obfx-dash .card.plugin .card-footer .plugin-data{font-size:14px;color:#616161;display:flex;align-items:center}#obfx-dash .card.plugin .version{margin-right:5px}#obfx-dash .card.plugin .author{margin-left:5px;max-width:200px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#obfx-dash .card.plugin .plugin-action{margin-left:auto}#obfx-dash .card.plugin .plugin-action .dashicon{margin-right:5px;-webkit-animation-name:spin;animation-name:spin;-webkit-animation-duration:2000ms;animation-duration:2000ms;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}
|
1 |
+
#obfx-dash{--wp-admin-theme-color: #5a65b0;--wp-admin-theme-color-darker-10: #464f91;--wp-admin-theme-color-darker-20: #353c6f}#obfx-dash .module-settings .accordion-content .components-radio-control__input[type=radio]:checked:before{width:1px;height:1px}#obfx-dash .css-bmkl3j-Container{width:unset}#wpcontent{padding-left:0 !important}.ob-overflow-off{overflow:hidden !important}#obfx-dash .container{padding:0 20px;max-width:1300px;margin-left:auto;margin-right:auto}#obfx-dash .dash-notice{position:fixed;bottom:30px;margin-left:30px}@-webkit-keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}#obfx-dash header{background-color:#fff;border-bottom:1px solid #e1e1e1}#obfx-dash header .top{padding:65px 0 50px 0;display:flex}#obfx-dash header .top img{max-height:100%}#obfx-dash header .top h1{font-size:45px;margin-left:10px;color:inherit}#obfx-dash header .navigation{display:flex;list-style:none;text-decoration:none;font-weight:600;line-height:1.5;padding-bottom:20px;flex-wrap:nowrap;font-size:19px}#obfx-dash header .navigation li{margin-right:50px}#obfx-dash header .navigation li a{color:inherit;text-decoration:none;box-shadow:none}#obfx-dash header .navigation li.active{color:#5a65b0 !important}#obfx-dash .modules-container{padding-top:20px;display:flex;flex-direction:column;row-gap:20px}#obfx-dash .module-card{background-color:#fff;border:1px solid #e1e1e1;box-shadow:0 1px 1px rgba(0,0,0,.04)}#obfx-dash .module-card .module-card-header{padding:20px;border-bottom:1px solid #e1e1e1;display:flex;position:relative}#obfx-dash .module-card .module-card-header .title{margin:0;font-size:18px;line-height:1.5;color:inherit}#obfx-dash .module-card .module-card-header .toggle-wrap{margin-left:auto;display:flex;align-items:center}#obfx-dash .module-card .module-card-header .toggle-wrap .dashicon{-webkit-animation-name:spin;animation-name:spin;-webkit-animation-duration:2000ms;animation-duration:2000ms;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}#obfx-dash .module-card .module-card-header .toggle-wrap div{margin-bottom:0;margin-left:5px}#obfx-dash .module-card .module-card-header .toggle-wrap span{margin-right:0}#obfx-dash .module-card.active .neve-pro-notice{background-color:#5a65b0;color:#fff;padding:15px 22px;margin-top:10px;border-radius:6px;display:flex;justify-content:space-between}#obfx-dash .module-card.active .neve-pro-notice a{background-color:inherit;color:inherit;border:2px solid #fff;border-radius:2px;padding:0 20px;text-decoration:none;white-space:nowrap;display:flex;align-items:center}#obfx-dash .module-card.active .neve-pro-notice p{font-size:15px;margin:.75em 0}#obfx-dash .module-card .neve-pro-notice{display:none;-webkit-animation:1s notice-appear;animation:1s notice-appear}#obfx-dash .module-card .neve-pro-notice a{opacity:0;-webkit-animation:.2s .3s forwards content-appear;animation:.2s .3s forwards content-appear}#obfx-dash .module-card .module-card-content{padding:20px}#obfx-dash .module-card .module-card-content .description{margin:0;font-size:15px;color:#616161}@-webkit-keyframes notice-appear{from{max-height:0}to{max-height:100px}}@keyframes notice-appear{from{max-height:0}to{max-height:100px}}@-webkit-keyframes content-appear{from{opacity:0}to{opacity:1}}@keyframes content-appear{from{opacity:0}to{opacity:1}}#obfx-dash .module-settings{border-top:1px solid #e1e1e1}#obfx-dash .module-settings.open .accordion-header .accordion-title{color:#3c434a}#obfx-dash .module-settings .accordion-header{padding:15px 20px;background-color:#fff;outline:none;border:none;width:100%;display:flex;cursor:pointer}#obfx-dash .module-settings .accordion-header .accordion-title{margin-right:auto;font-size:15px;font-weight:600;color:#5a65b0;transition-duration:.25s;transition-timing-function:ease-out}#obfx-dash .module-settings .accordion-header .dashicon{margin-left:auto;color:#646d82}#obfx-dash .module-settings .accordion-content{padding:15px 20px;display:flex;flex-direction:column;row-gap:15px}#obfx-dash .module-settings .accordion-content .title{margin:0}#obfx-dash .module-settings .accordion-content .checkboxes-row{display:flex;-moz-column-gap:30px;column-gap:30px}#obfx-dash .module-settings .accordion-content .select-wrap{display:flex;flex-direction:row}#obfx-dash .module-settings .accordion-content .obfx-google{margin-right:10px}#obfx-dash .module-settings .accordion-content .settings-row{display:flex;-moz-column-gap:70px;column-gap:70px}#obfx-dash .module-settings .accordion-content .settings-row>*{transition-duration:.1s;transition-timing-function:ease}#obfx-dash .module-settings .accordion-content .settings-row>:not(:first-child){opacity:0;pointer-events:none}#obfx-dash .module-settings .accordion-content .settings-row.active>:not(:first-child){opacity:1;pointer-events:auto}#obfx-dash .module-settings .accordion-content .settings-row>:first-child{width:150px}#obfx-dash .module-settings .accordion-content.loading{opacity:.75}#obfx-dash .module-settings .accordion-content .buttons-container{margin-left:auto;display:flex;-moz-column-gap:10px;column-gap:10px;justify-content:flex-end;position:relative}#obfx-dash .module-settings .accordion-content .buttons-container .obfx-button{width:60px;justify-content:center}#obfx-dash .module-settings .accordion-content .buttons-container .obfx-button .dashicon{-webkit-animation-name:spin;animation-name:spin;-webkit-animation-duration:2000ms;animation-duration:2000ms;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}#obfx-dash .plugins-grid{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fit, minmax(360px, 1fr));-moz-column-gap:30px;column-gap:30px;row-gap:20px}#obfx-dash .card.plugin{padding:0;max-width:100%;display:flex;flex-direction:column;border:1px solid #e1e1e1}#obfx-dash .card.plugin .card-header{position:relative}#obfx-dash .card.plugin .card-header img{width:100%;max-width:100%;border-bottom:1px solid #e1e1e1}#obfx-dash .card.plugin .premium-label{position:absolute;right:0;padding:10px 20px;background:var(--wp-admin-theme-color);color:#fff;font-weight:700;text-transform:uppercase}#obfx-dash .card.plugin .card-body{padding:20px}#obfx-dash .card.plugin .card-body .card-title{margin:0 0 20px;line-height:150%}#obfx-dash .card.plugin .card-footer{border-top:1px solid #e1e1e1;padding:20px 15px 20px 20px;display:flex;align-items:center;margin-top:auto;position:relative}#obfx-dash .card.plugin .card-footer .plugin-data{font-size:14px;color:#616161;display:flex;align-items:center}#obfx-dash .card.plugin .card-footer .components-external-link{margin-left:auto}#obfx-dash .card.plugin .version{margin-right:5px}#obfx-dash .card.plugin .author{margin-left:5px;max-width:200px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#obfx-dash .card.plugin .plugin-action{margin-left:auto}#obfx-dash .card.plugin .plugin-action .dashicon{margin-right:5px;-webkit-animation-name:spin;animation-name:spin;-webkit-animation-duration:2000ms;animation-duration:2000ms;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}
|
dashboard/src/components/PluginCard.js
CHANGED
@@ -2,12 +2,12 @@ import { DashboardContext, PluginsContext } from './DashboardContext';
|
|
2 |
import { get } from '../utils/rest';
|
3 |
import classnames from 'classnames';
|
4 |
|
5 |
-
import { Button, Dashicon } from '@wordpress/components';
|
6 |
import { useContext, useState } from '@wordpress/element';
|
7 |
import { __ } from '@wordpress/i18n';
|
8 |
|
9 |
const PluginCard = ({ slug, data }) => {
|
10 |
-
const { banner, name, description, version, author } = data;
|
11 |
const { pluginsData, setPluginsData } = useContext(PluginsContext);
|
12 |
const { setToast } = useContext(DashboardContext);
|
13 |
const [inProgress, setInProgress] = useState(false);
|
@@ -25,17 +25,18 @@ const PluginCard = ({ slug, data }) => {
|
|
25 |
|
26 |
const stringMap = {
|
27 |
install: {
|
28 |
-
static: __('Install', '
|
29 |
-
progress: __('Installing', '
|
30 |
},
|
31 |
activate: {
|
32 |
-
static: __('Activate', '
|
33 |
-
progress: __('Activating', '
|
34 |
},
|
35 |
deactivate: {
|
36 |
-
static: __('Deactivate', '
|
37 |
-
progress: __('Deactivating', '
|
38 |
},
|
|
|
39 |
};
|
40 |
|
41 |
const handleActionButton = () => {
|
@@ -74,6 +75,9 @@ const PluginCard = ({ slug, data }) => {
|
|
74 |
<div className={classnames(['card', 'plugin', slug])}>
|
75 |
<div className="card-header">
|
76 |
<img src={banner} alt={__('Banner Image', 'name')} />
|
|
|
|
|
|
|
77 |
</div>
|
78 |
<div className="card-body">
|
79 |
<h3 className="card-title">{name}</h3>
|
@@ -81,24 +85,38 @@ const PluginCard = ({ slug, data }) => {
|
|
81 |
</div>
|
82 |
<div className="card-footer">
|
83 |
<div className="plugin-data">
|
84 |
-
<span className="version">v{version}</span>
|
85 |
-
<span className="author">{author}</span>
|
86 |
</div>
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
</div>
|
103 |
</div>
|
104 |
);
|
2 |
import { get } from '../utils/rest';
|
3 |
import classnames from 'classnames';
|
4 |
|
5 |
+
import { Button, Dashicon, ExternalLink } from '@wordpress/components';
|
6 |
import { useContext, useState } from '@wordpress/element';
|
7 |
import { __ } from '@wordpress/i18n';
|
8 |
|
9 |
const PluginCard = ({ slug, data }) => {
|
10 |
+
const { banner, name, description, version, author, url, premium } = data;
|
11 |
const { pluginsData, setPluginsData } = useContext(PluginsContext);
|
12 |
const { setToast } = useContext(DashboardContext);
|
13 |
const [inProgress, setInProgress] = useState(false);
|
25 |
|
26 |
const stringMap = {
|
27 |
install: {
|
28 |
+
static: __('Install', 'themeisle-companion'),
|
29 |
+
progress: __('Installing', 'themeisle-companion'),
|
30 |
},
|
31 |
activate: {
|
32 |
+
static: __('Activate', 'themeisle-companion'),
|
33 |
+
progress: __('Activating', 'themeisle-companion'),
|
34 |
},
|
35 |
deactivate: {
|
36 |
+
static: __('Deactivate', 'themeisle-companion'),
|
37 |
+
progress: __('Deactivating', 'themeisle-companion'),
|
38 |
},
|
39 |
+
external: __('See more details', 'themeisle-companion'),
|
40 |
};
|
41 |
|
42 |
const handleActionButton = () => {
|
75 |
<div className={classnames(['card', 'plugin', slug])}>
|
76 |
<div className="card-header">
|
77 |
<img src={banner} alt={__('Banner Image', 'name')} />
|
78 |
+
{premium && (
|
79 |
+
<span className="premium-label">{__('Premium', 'themeisle-companion')}</span>
|
80 |
+
)}
|
81 |
</div>
|
82 |
<div className="card-body">
|
83 |
<h3 className="card-title">{name}</h3>
|
85 |
</div>
|
86 |
<div className="card-footer">
|
87 |
<div className="plugin-data">
|
88 |
+
{version && <span className="version">v{version}</span>}
|
89 |
+
{author && <span className="author">{author}</span>}
|
90 |
</div>
|
91 |
+
{pluginState !== 'external' && (
|
92 |
+
<Button
|
93 |
+
className="plugin-action"
|
94 |
+
isPrimary={['install', 'activate'].includes(
|
95 |
+
pluginState
|
96 |
+
)}
|
97 |
+
isSecondary={pluginState === 'deactivate'}
|
98 |
+
disabled={inProgress}
|
99 |
+
onClick={handleActionButton}
|
100 |
+
>
|
101 |
+
{!inProgress && stringMap[pluginState].static}
|
102 |
+
{inProgress && (
|
103 |
+
<span
|
104 |
+
style={{
|
105 |
+
display: 'flex',
|
106 |
+
alignItems: 'center',
|
107 |
+
}}
|
108 |
+
>
|
109 |
+
<Dashicon icon="update" />
|
110 |
+
{stringMap[pluginState].progress + '...'}
|
111 |
+
</span>
|
112 |
+
)}
|
113 |
+
</Button>
|
114 |
+
)}
|
115 |
+
{pluginState === 'external' && (
|
116 |
+
<ExternalLink href={url}>
|
117 |
+
{stringMap[pluginState]}
|
118 |
+
</ExternalLink>
|
119 |
+
)}
|
120 |
</div>
|
121 |
</div>
|
122 |
);
|
dashboard/src/scss/components/_plugin-card.scss
CHANGED
@@ -6,6 +6,7 @@
|
|
6 |
border: 1px solid $border-grey;
|
7 |
|
8 |
.card-header {
|
|
|
9 |
img {
|
10 |
width: 100%;
|
11 |
max-width: 100%;
|
@@ -13,6 +14,16 @@
|
|
13 |
}
|
14 |
}
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
.card-body {
|
17 |
padding: 20px;
|
18 |
|
@@ -36,6 +47,10 @@
|
|
36 |
display: flex;
|
37 |
align-items: center;
|
38 |
}
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
|
41 |
.version {
|
6 |
border: 1px solid $border-grey;
|
7 |
|
8 |
.card-header {
|
9 |
+
position: relative;
|
10 |
img {
|
11 |
width: 100%;
|
12 |
max-width: 100%;
|
14 |
}
|
15 |
}
|
16 |
|
17 |
+
.premium-label{
|
18 |
+
position: absolute;
|
19 |
+
right: 0;
|
20 |
+
padding: 10px 20px;
|
21 |
+
background: var(--wp-admin-theme-color);
|
22 |
+
color: #fff;
|
23 |
+
font-weight: 700;
|
24 |
+
text-transform: uppercase;
|
25 |
+
}
|
26 |
+
|
27 |
.card-body {
|
28 |
padding: 20px;
|
29 |
|
47 |
display: flex;
|
48 |
align-items: center;
|
49 |
}
|
50 |
+
|
51 |
+
.components-external-link{
|
52 |
+
margin-left: auto;
|
53 |
+
}
|
54 |
}
|
55 |
|
56 |
.version {
|
languages/themeisle-companion.pot
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
# Copyright (C)
|
2 |
# This file is distributed under the GPL-2.0+.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Orbit Fox Companion 2.10.
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://github.com/Codeinwp/themeisle-companion/issues\n"
|
8 |
-
"POT-Creation-Date:
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"PO-Revision-Date:
|
13 |
"Last-Translator: Themeisle Translate Team <friends@themeisle.com>\n"
|
14 |
"Language-Team: Themeisle Translate <friends@themeisle.com>\n"
|
15 |
"Language: en\n"
|
@@ -117,6 +117,12 @@ msgstr ""
|
|
117 |
msgid "Options updated, successfully!"
|
118 |
msgstr ""
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
#: core/app/helpers/class-orbit-fox-render-helper.php:123
|
121 |
msgid "No option found for provided type"
|
122 |
msgstr ""
|
@@ -166,7 +172,6 @@ msgid "Got it!"
|
|
166 |
msgstr ""
|
167 |
|
168 |
#: core/app/views/partials/module-tile-tpl.php:67
|
169 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:468
|
170 |
msgid "Activate"
|
171 |
msgstr ""
|
172 |
|
@@ -2361,11 +2366,42 @@ msgid ""
|
|
2361 |
"templates that you can import straight into your website."
|
2362 |
msgstr ""
|
2363 |
|
2364 |
-
#: obfx_modules/template-directory/init.php:
|
2365 |
-
#:
|
2366 |
msgid "Orbit Fox Template Directory"
|
2367 |
msgstr ""
|
2368 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2369 |
#: vendor/codeinwp/elementor-extra-widgets/class-elementor-extra-widgets.php:65
|
2370 |
#: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_manager.php:45
|
2371 |
msgid "Orbit Fox Addons"
|
@@ -2389,8 +2425,6 @@ msgstr ""
|
|
2389 |
#: vendor/codeinwp/gutenberg-blocks/inc/server/class-plugin-card-server.php:255
|
2390 |
#: vendor/codeinwp/gutenberg-blocks/inc/server/class-template-library-server.php:735
|
2391 |
#: vendor/codeinwp/gutenberg-blocks/inc/server/class-template-library-server.php:747
|
2392 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:602
|
2393 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:614
|
2394 |
#: vendor/codeinwp/themeisle-content-forms/form_manager.php:198
|
2395 |
#: vendor/codeinwp/themeisle-content-forms/form_manager.php:210
|
2396 |
msgid "Cheatin’ huh?"
|
@@ -2594,12 +2628,10 @@ msgid "Button border radius"
|
|
2594 |
msgstr ""
|
2595 |
|
2596 |
#: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/posts-grid.php:1572
|
2597 |
-
#: vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php:62
|
2598 |
msgid "Previous"
|
2599 |
msgstr ""
|
2600 |
|
2601 |
#: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/posts-grid.php:1573
|
2602 |
-
#: vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php:64
|
2603 |
msgid "Next"
|
2604 |
msgstr ""
|
2605 |
|
@@ -3284,225 +3316,6 @@ msgstr ""
|
|
3284 |
msgid "File doesn't exist"
|
3285 |
msgstr ""
|
3286 |
|
3287 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:176
|
3288 |
-
msgid "A new Orbit Fox Template"
|
3289 |
-
msgstr ""
|
3290 |
-
|
3291 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:178
|
3292 |
-
msgid "This is an awesome Orbit Fox Template."
|
3293 |
-
msgstr ""
|
3294 |
-
|
3295 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:181
|
3296 |
-
msgid "Elementor Page Builder"
|
3297 |
-
msgstr ""
|
3298 |
-
|
3299 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:186
|
3300 |
-
msgid "About Our Business"
|
3301 |
-
msgstr ""
|
3302 |
-
|
3303 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:187
|
3304 |
-
msgid ""
|
3305 |
-
"Use this layout to present your business in a fancy way. Add an interactive "
|
3306 |
-
"header, shwocase your services via progress bars, introduce your team "
|
3307 |
-
"members, and locate your headquarters on Google Maps. Last but not least, "
|
3308 |
-
"beautify the design by adding catchy images."
|
3309 |
-
msgstr ""
|
3310 |
-
|
3311 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:193
|
3312 |
-
msgid "Contact Us"
|
3313 |
-
msgstr ""
|
3314 |
-
|
3315 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:194
|
3316 |
-
msgid ""
|
3317 |
-
"A clean and simple template for your Contact page, where we integrated our "
|
3318 |
-
"Pirate Forms plugin. It will let your customers send you a message using an "
|
3319 |
-
"intuitive form. A Google map, together with a few other details about your "
|
3320 |
-
"business, completes the section."
|
3321 |
-
msgstr ""
|
3322 |
-
|
3323 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:200
|
3324 |
-
msgid "Pricing"
|
3325 |
-
msgstr ""
|
3326 |
-
|
3327 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:201
|
3328 |
-
msgid ""
|
3329 |
-
"If you plan to sell your products online, this layout offers you elegant "
|
3330 |
-
"pricing tables so you can differentiate the features and services for your "
|
3331 |
-
"clients. Also, for a better clarification, the template provides a FAQ area "
|
3332 |
-
"where you can answer people's questions."
|
3333 |
-
msgstr ""
|
3334 |
-
|
3335 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:207
|
3336 |
-
msgid "Material Homepage"
|
3337 |
-
msgstr ""
|
3338 |
-
|
3339 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:208
|
3340 |
-
msgid ""
|
3341 |
-
"This layout could be your main website homepage (or you can use it as an "
|
3342 |
-
"alternative homepage, if you wish). It was built on material design and "
|
3343 |
-
"comes with call to action, catchy icons, testimonials, blog posts, pricing "
|
3344 |
-
"plans, and other sections that you can add yourself by customizing it."
|
3345 |
-
msgstr ""
|
3346 |
-
|
3347 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:214
|
3348 |
-
msgid "Ether - Landing Page"
|
3349 |
-
msgstr ""
|
3350 |
-
|
3351 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:215
|
3352 |
-
msgid ""
|
3353 |
-
"An elegant and modern landing page for e-commerce, coming with a clean "
|
3354 |
-
"interface, beautiful typography, photo galleries, and call to action. If "
|
3355 |
-
"you have an online shop and want to promote a certain product, use this "
|
3356 |
-
"layout to tell people why they should buy it."
|
3357 |
-
msgstr ""
|
3358 |
-
|
3359 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:221
|
3360 |
-
msgid "Jason - Landing Page"
|
3361 |
-
msgstr ""
|
3362 |
-
|
3363 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:222
|
3364 |
-
msgid ""
|
3365 |
-
"A classy template for freelancers, where you can put your skills and "
|
3366 |
-
"knowldge in the spotlight for potential clients. Talk about yourself, your "
|
3367 |
-
"projects, awards, and let people contact you easily. The template is "
|
3368 |
-
"designed to feature one-page scrolling."
|
3369 |
-
msgstr ""
|
3370 |
-
|
3371 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:228
|
3372 |
-
msgid "Pulse - Landing Page"
|
3373 |
-
msgstr ""
|
3374 |
-
|
3375 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:229
|
3376 |
-
msgid ""
|
3377 |
-
"A good-looking landing page for products and apps, built to mark the "
|
3378 |
-
"features and services that they offer. The layout provides customer "
|
3379 |
-
"reviews, call to action, beautiful pricing tables, an About section, and a "
|
3380 |
-
"creative design. If you want to promote and sell your brand product, this "
|
3381 |
-
"template might help."
|
3382 |
-
msgstr ""
|
3383 |
-
|
3384 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:235
|
3385 |
-
msgid "Ascend - Landing Page"
|
3386 |
-
msgstr ""
|
3387 |
-
|
3388 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:236
|
3389 |
-
msgid ""
|
3390 |
-
"A resume-like template, built for outdoor enthusiasts and nature lovers. "
|
3391 |
-
"Its design and layout make it flexible for any other purpose too, so do not "
|
3392 |
-
"hesitate to showcase any kind of skills and activities, even "
|
3393 |
-
"business-oriented."
|
3394 |
-
msgstr ""
|
3395 |
-
|
3396 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:242
|
3397 |
-
msgid "Path - Landing Page"
|
3398 |
-
msgstr ""
|
3399 |
-
|
3400 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:243
|
3401 |
-
msgid ""
|
3402 |
-
"If you are a business consultant - agency or working on your own - have a "
|
3403 |
-
"look at this template! It comes with a clean design, call to action, "
|
3404 |
-
"statistics, and sections that put your services first."
|
3405 |
-
msgstr ""
|
3406 |
-
|
3407 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:249
|
3408 |
-
msgid "Mocha - Landing Page"
|
3409 |
-
msgstr ""
|
3410 |
-
|
3411 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:250
|
3412 |
-
msgid ""
|
3413 |
-
"An elegant and modern template for cafes and pubs, where you can display "
|
3414 |
-
"your menu in a mouth-watering way. Call to action, blog posts, attractive "
|
3415 |
-
"images, tabbed menus, and a catchy design will help you convince more "
|
3416 |
-
"people to stop by."
|
3417 |
-
msgstr ""
|
3418 |
-
|
3419 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:256
|
3420 |
-
msgid "Rik - Landing Page"
|
3421 |
-
msgstr ""
|
3422 |
-
|
3423 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:257
|
3424 |
-
msgid ""
|
3425 |
-
"This is a clean Landing page, ready to be used for an app presentation. It "
|
3426 |
-
"features beautiful gradients and great layouts for showcasing your product."
|
3427 |
-
msgstr ""
|
3428 |
-
|
3429 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:263
|
3430 |
-
msgid "Zelle Lite - One Page Template"
|
3431 |
-
msgstr ""
|
3432 |
-
|
3433 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:264
|
3434 |
-
msgid ""
|
3435 |
-
"A friendly one-page multipurpose page, with a full-width image in the "
|
3436 |
-
"background. It comes with an elegant and modern design, which could fit "
|
3437 |
-
"very well any kind of business. Zelle Lite has an interactive and colorful "
|
3438 |
-
"interface, with classy parallax effect and lively animations. You can use "
|
3439 |
-
"it for your online shop as well."
|
3440 |
-
msgstr ""
|
3441 |
-
|
3442 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:270
|
3443 |
-
msgid "Notify - Landing Page"
|
3444 |
-
msgstr ""
|
3445 |
-
|
3446 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:271
|
3447 |
-
msgid ""
|
3448 |
-
"A beautiful landing page to showcase your new application. It has a "
|
3449 |
-
"features section to present your app, a subscribe section where you can "
|
3450 |
-
"also add a video showcasing your new app and a testimonials section so you "
|
3451 |
-
"can present the feedback from your beta testers."
|
3452 |
-
msgstr ""
|
3453 |
-
|
3454 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:320
|
3455 |
-
msgid "Template Directory"
|
3456 |
-
msgstr ""
|
3457 |
-
|
3458 |
-
#: vendor/codeinwp/templates-directory/class-page-templates-directory.php:457
|
3459 |
-
msgid "Install and activate"
|
3460 |
-
msgstr ""
|
3461 |
-
|
3462 |
-
#: vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php:21
|
3463 |
-
msgid "Sync Templates"
|
3464 |
-
msgstr ""
|
3465 |
-
|
3466 |
-
#: vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php:33
|
3467 |
-
msgid "More Details"
|
3468 |
-
msgstr ""
|
3469 |
-
|
3470 |
-
#: vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php:44
|
3471 |
-
msgid "Preview"
|
3472 |
-
msgstr ""
|
3473 |
-
|
3474 |
-
#: vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php:59
|
3475 |
-
msgid "Close"
|
3476 |
-
msgstr ""
|
3477 |
-
|
3478 |
-
#: vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php:66
|
3479 |
-
msgid "Import"
|
3480 |
-
msgstr ""
|
3481 |
-
|
3482 |
-
#: vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php:68
|
3483 |
-
msgid "See Pro Version"
|
3484 |
-
msgstr ""
|
3485 |
-
|
3486 |
-
#: vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php:101
|
3487 |
-
msgid "Required Plugins"
|
3488 |
-
msgstr ""
|
3489 |
-
|
3490 |
-
#: vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php:132
|
3491 |
-
msgid "Collapse"
|
3492 |
-
msgstr ""
|
3493 |
-
|
3494 |
-
#: vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php:137
|
3495 |
-
msgid "Enter desktop preview mode"
|
3496 |
-
msgstr ""
|
3497 |
-
|
3498 |
-
#: vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php:140
|
3499 |
-
msgid "Enter tablet preview mode"
|
3500 |
-
msgstr ""
|
3501 |
-
|
3502 |
-
#: vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php:143
|
3503 |
-
msgid "Enter mobile preview mode"
|
3504 |
-
msgstr ""
|
3505 |
-
|
3506 |
#: vendor/codeinwp/themeisle-content-forms/includes/rest/server.php:36
|
3507 |
msgid "What type of form is submitted."
|
3508 |
msgstr ""
|
1 |
+
# Copyright (C) 2022 Themeisle
|
2 |
# This file is distributed under the GPL-2.0+.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Orbit Fox Companion 2.10.11\n"
|
6 |
"Report-Msgid-Bugs-To: "
|
7 |
"https://github.com/Codeinwp/themeisle-companion/issues\n"
|
8 |
+
"POT-Creation-Date: 2022-02-17 10:11:35+00:00\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=utf-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"PO-Revision-Date: 2022-MO-DA HO:MI+ZONE\n"
|
13 |
"Last-Translator: Themeisle Translate Team <friends@themeisle.com>\n"
|
14 |
"Language-Team: Themeisle Translate <friends@themeisle.com>\n"
|
15 |
"Language: en\n"
|
117 |
msgid "Options updated, successfully!"
|
118 |
msgstr ""
|
119 |
|
120 |
+
#: core/app/class-orbit-fox-admin.php:425
|
121 |
+
msgid ""
|
122 |
+
"Turn WordPress into a landing page powerhouse with Landing Kit. Map domains "
|
123 |
+
"to pages or any other published resource."
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
#: core/app/helpers/class-orbit-fox-render-helper.php:123
|
127 |
msgid "No option found for provided type"
|
128 |
msgstr ""
|
172 |
msgstr ""
|
173 |
|
174 |
#: core/app/views/partials/module-tile-tpl.php:67
|
|
|
175 |
msgid "Activate"
|
176 |
msgstr ""
|
177 |
|
2366 |
"templates that you can import straight into your website."
|
2367 |
msgstr ""
|
2368 |
|
2369 |
+
#: obfx_modules/template-directory/init.php:73
|
2370 |
+
#: obfx_modules/template-directory/init.php:120
|
2371 |
msgid "Orbit Fox Template Directory"
|
2372 |
msgstr ""
|
2373 |
|
2374 |
+
#: obfx_modules/template-directory/init.php:74
|
2375 |
+
msgid "Template Directory"
|
2376 |
+
msgstr ""
|
2377 |
+
|
2378 |
+
#: obfx_modules/template-directory/init.php:216
|
2379 |
+
msgid ""
|
2380 |
+
"In order to import any starter sites, Neve theme & Templates Cloud plugin "
|
2381 |
+
"need to be installed and activated. Click the button below to install and "
|
2382 |
+
"activate Neve."
|
2383 |
+
msgstr ""
|
2384 |
+
|
2385 |
+
#: obfx_modules/template-directory/init.php:217
|
2386 |
+
msgid ""
|
2387 |
+
"In order to import any starter sites, Neve theme & Templates Cloud plugin "
|
2388 |
+
"need to be installed and activated. Click the button below to activate Neve."
|
2389 |
+
msgstr ""
|
2390 |
+
|
2391 |
+
#: obfx_modules/template-directory/init.php:218
|
2392 |
+
msgid ""
|
2393 |
+
"In order to import any starter sites, Neve theme & Templates Cloud plugin "
|
2394 |
+
"need to be installed and activated. Click the button below to install and "
|
2395 |
+
"activate Templates Cloud."
|
2396 |
+
msgstr ""
|
2397 |
+
|
2398 |
+
#: obfx_modules/template-directory/init.php:219
|
2399 |
+
msgid ""
|
2400 |
+
"In order to import any starter sites, Neve theme & Templates Cloud plugin "
|
2401 |
+
"need to be installed and activated. Click the button below to activate "
|
2402 |
+
"Templates Cloud."
|
2403 |
+
msgstr ""
|
2404 |
+
|
2405 |
#: vendor/codeinwp/elementor-extra-widgets/class-elementor-extra-widgets.php:65
|
2406 |
#: vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_manager.php:45
|
2407 |
msgid "Orbit Fox Addons"
|
2425 |
#: vendor/codeinwp/gutenberg-blocks/inc/server/class-plugin-card-server.php:255
|
2426 |
#: vendor/codeinwp/gutenberg-blocks/inc/server/class-template-library-server.php:735
|
2427 |
#: vendor/codeinwp/gutenberg-blocks/inc/server/class-template-library-server.php:747
|
|
|
|
|
2428 |
#: vendor/codeinwp/themeisle-content-forms/form_manager.php:198
|
2429 |
#: vendor/codeinwp/themeisle-content-forms/form_manager.php:210
|
2430 |
msgid "Cheatin’ huh?"
|
2628 |
msgstr ""
|
2629 |
|
2630 |
#: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/posts-grid.php:1572
|
|
|
2631 |
msgid "Previous"
|
2632 |
msgstr ""
|
2633 |
|
2634 |
#: vendor/codeinwp/elementor-extra-widgets/widgets/elementor/posts-grid.php:1573
|
|
|
2635 |
msgid "Next"
|
2636 |
msgstr ""
|
2637 |
|
3316 |
msgid "File doesn't exist"
|
3317 |
msgstr ""
|
3318 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3319 |
#: vendor/codeinwp/themeisle-content-forms/includes/rest/server.php:36
|
3320 |
msgid "What type of form is submitted."
|
3321 |
msgstr ""
|
obfx_modules/template-directory/assets/img/neve.svg
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<svg width="51" height="50" viewBox="0 0 51 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2 |
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M0 3.14288C0 1.48603 1.34315 0.142883 3 0.142883H47.5131C49.17 0.142883 50.5131 1.48603 50.5131 3.14288V47C50.5131 48.6569 49.17 50 47.5131 50H3C1.34314 50 0 48.6569 0 47V3.14288ZM20.4811 25.0833V36.9156H14.4323V12.867C14.4323 12.7506 14.4676 12.6692 14.5384 12.6226C14.6091 12.5761 14.7388 12.6343 14.9275 12.7972L30.0319 25.0833V13.1811H36.0807V37.2647C36.0807 37.4043 36.0454 37.4915 35.9746 37.5264C35.9039 37.5613 35.7742 37.4974 35.5855 37.3345L20.4811 25.0833ZM36.0807 40.8158H14.4323V42.7838H36.0807V40.8158Z" fill="#0073AA"/>
|
3 |
+
</svg>
|
obfx_modules/template-directory/assets/img/starter.jpg
ADDED
Binary file
|
obfx_modules/template-directory/assets/img/tpc.svg
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" class="ob-logo">
|
2 |
+
<path d="M95.0264 100H4.97356C2.22797 100 0 97.772 0 95.0264V4.97356C0 2.22797 2.22797 0 4.97356 0H95.0264C97.772 0 100 2.22797 100 4.97356V95.0264C100 97.772 97.772 100 95.0264 100Z" fill="#0366D6"/>
|
3 |
+
<path d="M82.6941 86.7448V30.8205V18.4653H70.3502H14.4146L26.7584 30.8205H70.3502V74.401L82.6941 86.7448Z" fill="white"/>
|
4 |
+
<path d="M42.2416 58.9291L42.2528 71.183L53.2352 82.1653L53.1902 47.9806L18.9941 47.9355L29.9765 58.9066L42.2416 58.9291Z" fill="white"/>
|
5 |
+
</svg>
|
obfx_modules/template-directory/css/admin.css
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#obfx-template-directory {
|
2 |
+
padding-top: 200px;
|
3 |
+
}
|
4 |
+
|
5 |
+
#obfx-template-directory .unavailable-starter-sites {
|
6 |
+
width: 700px;
|
7 |
+
margin: auto;
|
8 |
+
background-color: #fff;
|
9 |
+
border: 1px solid #ccc;
|
10 |
+
text-align: center;
|
11 |
+
overflow: hidden;
|
12 |
+
}
|
13 |
+
|
14 |
+
#obfx-template-directory .slider {
|
15 |
+
width: 200%;
|
16 |
+
display: flex;
|
17 |
+
transition: 0.4s ease-in-out;
|
18 |
+
-webkit-transition: 0.4s ease-in-out;
|
19 |
+
}
|
20 |
+
|
21 |
+
#obfx-template-directory .slider.single {
|
22 |
+
width: 100%;
|
23 |
+
}
|
24 |
+
|
25 |
+
#obfx-template-directory .slider.single .content-wrap {
|
26 |
+
width: 100%;
|
27 |
+
}
|
28 |
+
|
29 |
+
#obfx-template-directory .content-wrap {
|
30 |
+
width: 50%;
|
31 |
+
margin: 35px 35px 25px;
|
32 |
+
}
|
33 |
+
|
34 |
+
#obfx-template-directory .slider.move-right {
|
35 |
+
transform: translateX(-50%);
|
36 |
+
-webkit-transform:translateX(-50%);
|
37 |
+
}
|
38 |
+
|
39 |
+
#obfx-template-directory .ss-background {
|
40 |
+
opacity: .25;
|
41 |
+
z-index: -1;
|
42 |
+
position: absolute;
|
43 |
+
top: 0;
|
44 |
+
bottom: 0;
|
45 |
+
width: 100%;
|
46 |
+
display: block;
|
47 |
+
background-size: cover;
|
48 |
+
background-position: center center;
|
49 |
+
left: 0;
|
50 |
+
right: 0;
|
51 |
+
height: calc(100vh - 100px);
|
52 |
+
flex-grow: 1;
|
53 |
+
}
|
54 |
+
|
55 |
+
#obfx-template-directory .unavailable-starter-sites p {
|
56 |
+
font-size: 15px;
|
57 |
+
line-height: 24px;
|
58 |
+
}
|
59 |
+
|
60 |
+
#obfx-template-directory .unavailable-starter-sites h1 {
|
61 |
+
line-height: 1.6;
|
62 |
+
}
|
63 |
+
|
64 |
+
#obfx-template-directory .unavailable-starter-sites img {
|
65 |
+
width: 50px;
|
66 |
+
}
|
67 |
+
|
68 |
+
#obfx-template-directory .unavailable-starter-sites button {
|
69 |
+
margin-top: 10px;
|
70 |
+
}
|
71 |
+
|
72 |
+
#obfx-template-directory .unavailable-starter-sites button .dashicon {
|
73 |
+
margin-right: 5px;
|
74 |
+
animation-name: spin;
|
75 |
+
animation-duration: 2000ms;
|
76 |
+
animation-iteration-count: infinite;
|
77 |
+
animation-timing-function: linear;
|
78 |
+
}
|
79 |
+
|
80 |
+
#obfx-template-directory .stepper {
|
81 |
+
display: flex;
|
82 |
+
flex-direction: row;
|
83 |
+
justify-content: center;
|
84 |
+
margin-bottom: 35px;
|
85 |
+
column-gap: 8px;
|
86 |
+
}
|
87 |
+
|
88 |
+
#obfx-template-directory .stepper .dot {
|
89 |
+
width: 0;
|
90 |
+
border: 4px solid #d9d9d9;
|
91 |
+
border-radius: 50%;
|
92 |
+
cursor: pointer;
|
93 |
+
margin: 0;
|
94 |
+
padding: 0;
|
95 |
+
}
|
96 |
+
|
97 |
+
#obfx-template-directory .stepper .dot.current {
|
98 |
+
border: 4px solid var(--wp-admin-theme-color);
|
99 |
+
}
|
100 |
+
|
101 |
+
@keyframes spin {
|
102 |
+
from {
|
103 |
+
transform:rotate(0deg);
|
104 |
+
}
|
105 |
+
to {
|
106 |
+
transform:rotate(360deg);
|
107 |
+
}
|
108 |
+
}
|
obfx_modules/template-directory/init.php
CHANGED
@@ -61,10 +61,28 @@ class Template_Directory_OBFX_Module extends Orbit_Fox_Module_Abstract {
|
|
61 |
* @access public
|
62 |
*/
|
63 |
public function hooks() {
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
|
70 |
/**
|
@@ -76,14 +94,14 @@ class Template_Directory_OBFX_Module extends Orbit_Fox_Module_Abstract {
|
|
76 |
$script_handle = $this->slug . '-script';
|
77 |
wp_enqueue_script( 'plugin-install' );
|
78 |
wp_enqueue_script( 'updates' );
|
79 |
-
wp_register_script( $script_handle, plugin_dir_url( $this->get_dir() ) . $this->slug . '/js/script.js', array( 'jquery' ), $this->version );
|
80 |
wp_localize_script(
|
81 |
$script_handle,
|
82 |
'importer_endpoint',
|
83 |
array(
|
84 |
'url' => $this->get_endpoint_url( '/import_elementor' ),
|
85 |
'nonce' => wp_create_nonce( 'wp_rest' ),
|
86 |
-
)
|
87 |
);
|
88 |
wp_enqueue_script( $script_handle );
|
89 |
}
|
@@ -130,6 +148,40 @@ class Template_Directory_OBFX_Module extends Orbit_Fox_Module_Abstract {
|
|
130 |
return array();
|
131 |
}
|
132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
/**
|
134 |
* Method that returns an array of scripts and styles to be loaded
|
135 |
* for the admin part.
|
@@ -139,49 +191,137 @@ class Template_Directory_OBFX_Module extends Orbit_Fox_Module_Abstract {
|
|
139 |
* @return array|boolean
|
140 |
*/
|
141 |
public function admin_enqueue() {
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
}
|
144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
|
146 |
/**
|
147 |
-
*
|
148 |
*
|
149 |
-
* @
|
|
|
|
|
150 |
*/
|
151 |
-
|
152 |
-
|
|
|
153 |
}
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
/**
|
157 |
-
*
|
|
|
|
|
|
|
|
|
158 |
*/
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
}
|
163 |
}
|
164 |
|
165 |
/**
|
166 |
-
*
|
|
|
|
|
|
|
|
|
167 |
*/
|
168 |
-
|
169 |
-
if (
|
170 |
-
|
171 |
}
|
|
|
|
|
172 |
}
|
173 |
|
|
|
174 |
/**
|
175 |
-
*
|
176 |
-
* width one with the header and footer inherited from the active theme.
|
177 |
-
* OBFX Template directory doesn't need the blonk one, so we are going to ditch it.
|
178 |
-
*
|
179 |
-
* @param array $list
|
180 |
*
|
181 |
* @return array
|
182 |
*/
|
183 |
-
public function
|
184 |
-
|
185 |
-
return $list;
|
186 |
}
|
187 |
}
|
61 |
* @access public
|
62 |
*/
|
63 |
public function hooks() {
|
64 |
+
add_action( 'admin_menu', [ $this, 'add_template_directory_submenu' ], 11 );
|
65 |
+
}
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Add the Template Directory submenu
|
69 |
+
*/
|
70 |
+
public function add_template_directory_submenu() {
|
71 |
+
add_submenu_page(
|
72 |
+
'obfx_companion',
|
73 |
+
esc_html__( 'Orbit Fox Template Directory', 'themeisle-companion' ),
|
74 |
+
esc_html__( 'Template Directory', 'themeisle-companion' ),
|
75 |
+
'manage_options',
|
76 |
+
'obfx_template_dir',
|
77 |
+
[ $this, 'render_template_directory' ]
|
78 |
+
);
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Renders the root element for the Template Directory page
|
83 |
+
*/
|
84 |
+
public function render_template_directory() {
|
85 |
+
echo '<div id="obfx-template-directory"></div>';
|
86 |
}
|
87 |
|
88 |
/**
|
94 |
$script_handle = $this->slug . '-script';
|
95 |
wp_enqueue_script( 'plugin-install' );
|
96 |
wp_enqueue_script( 'updates' );
|
97 |
+
wp_register_script( $script_handle, plugin_dir_url( $this->get_dir() ) . $this->slug . '/js/script.js', array( 'jquery' ), $this->version, false );
|
98 |
wp_localize_script(
|
99 |
$script_handle,
|
100 |
'importer_endpoint',
|
101 |
array(
|
102 |
'url' => $this->get_endpoint_url( '/import_elementor' ),
|
103 |
'nonce' => wp_create_nonce( 'wp_rest' ),
|
104 |
+
)
|
105 |
);
|
106 |
wp_enqueue_script( $script_handle );
|
107 |
}
|
148 |
return array();
|
149 |
}
|
150 |
|
151 |
+
/**
|
152 |
+
* Returns the link to activate the Templates Patterns Collection plugin.
|
153 |
+
*
|
154 |
+
* @return string
|
155 |
+
*/
|
156 |
+
public function get_tcp_activation_link() {
|
157 |
+
return add_query_arg(
|
158 |
+
array(
|
159 |
+
'action' => 'activate',
|
160 |
+
'plugin' => rawurlencode( 'templates-patterns-collection/templates-patterns-collection.php' ),
|
161 |
+
'plugin_status' => 'all',
|
162 |
+
'paged' => '1',
|
163 |
+
'_wpnonce' => wp_create_nonce( 'activate-plugin_templates-patterns-collection/templates-patterns-collection.php' ),
|
164 |
+
),
|
165 |
+
esc_url( network_admin_url( 'plugins.php' ) )
|
166 |
+
);
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Returns the link to activate the Neve theme.
|
171 |
+
*
|
172 |
+
* @return string
|
173 |
+
*/
|
174 |
+
public function get_neve_activation_link() {
|
175 |
+
return add_query_arg(
|
176 |
+
array(
|
177 |
+
'action' => 'activate',
|
178 |
+
'stylesheet' => 'neve',
|
179 |
+
'_wpnonce' => wp_create_nonce( 'switch-theme_neve' ),
|
180 |
+
),
|
181 |
+
esc_url( network_admin_url( 'themes.php' ) )
|
182 |
+
);
|
183 |
+
}
|
184 |
+
|
185 |
/**
|
186 |
* Method that returns an array of scripts and styles to be loaded
|
187 |
* for the admin part.
|
191 |
* @return array|boolean
|
192 |
*/
|
193 |
public function admin_enqueue() {
|
194 |
+
$current_screen = get_current_screen();
|
195 |
+
if ( ! isset( $current_screen->id ) || $current_screen->id !== 'orbit-fox_page_obfx_template_dir' ) {
|
196 |
+
return array();
|
197 |
+
}
|
198 |
+
|
199 |
+
$dependencies_file = include OBX_PATH . '/obfx_modules/template-directory/js/template-directory.asset.php';
|
200 |
+
|
201 |
+
$this->localized = array(
|
202 |
+
'template-directory' => array(
|
203 |
+
'slug' => $this->slug,
|
204 |
+
'assets' => OBFX_URL . 'obfx_modules/template-directory/assets',
|
205 |
+
'neveData' => [
|
206 |
+
'cta' => $this->get_state( 'neve' ),
|
207 |
+
'activate' => $this->get_neve_activation_link(),
|
208 |
+
],
|
209 |
+
'tpcData' => [
|
210 |
+
'cta' => $this->get_state( 'tpc' ),
|
211 |
+
'activate' => $this->get_tcp_activation_link(),
|
212 |
+
],
|
213 |
+
'tpcAdminURL' => admin_url( 'themes.php?page=tiob-starter-sites' ),
|
214 |
+
'nonce' => wp_create_nonce( 'wp_rest' ),
|
215 |
+
'strings' => [
|
216 |
+
'themeNotInstalled' => __( 'In order to import any starter sites, Neve theme & Templates Cloud plugin need to be installed and activated. Click the button below to install and activate Neve.', 'themeisle-companion' ),
|
217 |
+
'themeNotActive' => __( 'In order to import any starter sites, Neve theme & Templates Cloud plugin need to be installed and activated. Click the button below to activate Neve.', 'themeisle-companion' ),
|
218 |
+
'tpcNotInstalled' => __( 'In order to import any starter sites, Neve theme & Templates Cloud plugin need to be installed and activated. Click the button below to install and activate Templates Cloud.', 'themeisle-companion' ),
|
219 |
+
'tpcNotActive' => __( 'In order to import any starter sites, Neve theme & Templates Cloud plugin need to be installed and activated. Click the button below to activate Templates Cloud.', 'themeisle-companion' ),
|
220 |
+
],
|
221 |
+
),
|
222 |
+
);
|
223 |
+
|
224 |
+
return array(
|
225 |
+
'js' => [
|
226 |
+
'template-directory' => array_merge( $dependencies_file['dependencies'], [ 'updates' ] ),
|
227 |
+
],
|
228 |
+
'css' => [
|
229 |
+
'admin' => [ 'wp-components' ],
|
230 |
+
],
|
231 |
+
);
|
232 |
}
|
233 |
|
234 |
+
/**
|
235 |
+
* Gets the state (the next action) of a plugin or theme. Can return
|
236 |
+
* 'install' if it's not installed, 'activate' if it's installed and not activates,
|
237 |
+
* and 'deactivate' if it's activated.
|
238 |
+
*
|
239 |
+
* @param $slug string The slug of the plugin or theme.
|
240 |
+
*
|
241 |
+
* @return string
|
242 |
+
*/
|
243 |
+
private function get_state( $slug ) {
|
244 |
+
$state = 'install';
|
245 |
+
switch ( $slug ) {
|
246 |
+
case 'neve':
|
247 |
+
if ( $this->check_theme_active( 'Neve' ) ) {
|
248 |
+
$state = 'deactivate';
|
249 |
+
} elseif ( $this->check_theme_installed( 'neve' ) ) {
|
250 |
+
$state = 'activate';
|
251 |
+
}
|
252 |
+
break;
|
253 |
+
case 'tpc':
|
254 |
+
if ( $this->check_plugin_active( 'templates-patterns-collection/templates-patterns-collection.php' ) ) {
|
255 |
+
$state = 'deactivate';
|
256 |
+
} elseif ( $this->check_plugin_installed( 'templates-patterns-collection/templates-patterns-collection.php' ) ) {
|
257 |
+
$state = 'activate';
|
258 |
+
}
|
259 |
+
break;
|
260 |
+
default:
|
261 |
+
break;
|
262 |
+
}
|
263 |
+
|
264 |
+
return $state;
|
265 |
+
}
|
266 |
|
267 |
/**
|
268 |
+
* Return true if the theme is installed
|
269 |
*
|
270 |
+
* @param $theme_slug string The theme slug
|
271 |
+
*
|
272 |
+
* @return bool
|
273 |
*/
|
274 |
+
private function check_theme_installed( $theme_slug ) {
|
275 |
+
$installed_themes = wp_get_themes();
|
276 |
+
return array_key_exists( $theme_slug, $installed_themes );
|
277 |
}
|
278 |
|
279 |
+
/**
|
280 |
+
* Returns true if the theme is active
|
281 |
+
*
|
282 |
+
* @param $theme_name string The theme slug
|
283 |
+
*
|
284 |
+
* @return bool
|
285 |
+
*/
|
286 |
+
private function check_theme_active( $theme_name ) {
|
287 |
+
$theme = wp_get_theme();
|
288 |
+
return $theme_name === $theme->name || $theme_name === $theme->parent_theme;
|
289 |
+
}
|
290 |
|
291 |
/**
|
292 |
+
* Check if plugin is installed by getting all plugins from the plugins dir.
|
293 |
+
*
|
294 |
+
* @param $plugin_slug
|
295 |
+
*
|
296 |
+
* @return bool
|
297 |
*/
|
298 |
+
private function check_plugin_installed( $plugin_slug ) {
|
299 |
+
$installed_plugins = get_plugins();
|
300 |
+
return array_key_exists( $plugin_slug, $installed_plugins ) || in_array( $plugin_slug, $installed_plugins, true );
|
|
|
301 |
}
|
302 |
|
303 |
/**
|
304 |
+
* Check if plugin is active.
|
305 |
+
*
|
306 |
+
* @param string $plugin_slug
|
307 |
+
*
|
308 |
+
* @return bool
|
309 |
*/
|
310 |
+
private function check_plugin_active( $plugin_slug ) {
|
311 |
+
if ( is_plugin_active( $plugin_slug ) ) {
|
312 |
+
return true;
|
313 |
}
|
314 |
+
|
315 |
+
return false;
|
316 |
}
|
317 |
|
318 |
+
|
319 |
/**
|
320 |
+
* Options array for the Orbit Fox module.
|
|
|
|
|
|
|
|
|
321 |
*
|
322 |
* @return array
|
323 |
*/
|
324 |
+
public function options() {
|
325 |
+
return array();
|
|
|
326 |
}
|
327 |
}
|
obfx_modules/template-directory/js/template-directory.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '43e8ab23a8f4cd6ac67811f39def2129');
|
obfx_modules/template-directory/js/template-directory.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,a),c.l=!0,c.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(n,c,function(t){return e[t]}.bind(null,c));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=4)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t,a){var n;!function(){"use strict";var a={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var i=c.apply(null,n);i&&e.push(i)}}else if("object"===r)if(n.toString===Object.prototype.toString)for(var l in n)a.call(n,l)&&n[l]&&e.push(l);else e.push(n.toString())}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(n=function(){return c}.apply(t,[]))||(e.exports=n)}()},function(e,t,a){"use strict";a.r(t);var n=a(0),c=a(2),r=a(1),i=a(3),l=a.n(i);var s=()=>{const{assets:e,neveData:t,tpcData:a,strings:i,tpcAdminURL:s}=template_directory,{themeNotInstalled:o,themeNotActive:u,tpcNotInstalled:m,tpcNotActive:p}=i,[d,b]=Object(n.useState)(!1),[v,g]=Object(n.useState)(!1),[j,O]=Object(n.useState)(t.cta),[f,y]=Object(n.useState)(!1),[h,_]=Object(n.useState)(!1),[E,S]=Object(n.useState)(a.cta),w={activating:b,installing:g,currentState:O},N={activating:y,installing:_,currentState:S},[x,A]=Object(n.useState)(!1),[P,T]=Object(n.useState)(!1);let C=o;"activate"===t.cta&&(C=u);let k=m;"activate"===a.cta&&(k=p);const I={install:{static:Object(r.__)("Install and Activate","neve"),progress:Object(r.__)("Installing","neve")},activate:{static:Object(r.__)("Activate","neve"),progress:Object(r.__)("Activating","neve")}},M=(e,t,a,i,l,s,o)=>{const u={install:Object(n.createElement)(c.Button,{disabled:e,isPrimary:!e,isSecondary:e,className:e&&"is-loading",icon:e&&"update",onClick:()=>B(i,l,s,o)},e?I.install.progress+"...":I.install.static),activate:Object(n.createElement)(c.Button,{disabled:t,isPrimary:!t,isSecondary:t,className:t&&"is-loading",icon:t&&"update",onClick:()=>L(i,o)},t?I.activate.progress+"...":I.activate.static),deactivate:Object(n.createElement)(c.Button,{disabled:!0,isSecondary:!0,className:"is-loading"},Object(r.__)("Activated"))};return Object(n.createElement)(n.Fragment,null,u[a])},B=(e,t,a,n)=>{e.installing(!0),wp.updates.ajax("install-"+t,{slug:a,success:()=>{L(e,n)},error:t=>{"folder_exists"===t.errorCode?L(e,n):(A(t.errorMessage?t.errorMessage:Object(r.__)("Something went wrong. Please try again.","themeisle-companion")),e.installing(!1),setTimeout(()=>A(!1),3e3))}})},L=(e,t)=>{e.installing(!1),e.activating(!0),e.currentState("activate"),(async e=>{const t={method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","x-wp-nonce":template_directory.nonce}};return await fetch(e,t).then(e=>e)})(t).then(t=>{t.ok?(e.activating(!1),e.currentState("deactivate"),T(!0)):(A(Object(r.__)("Something went wrong. Please try again.","themeisle-companion")),e.activating(!1),setTimeout(()=>A(!1),3e3))})},D="deactivate"!==a.cta,F="deactivate"!==t.cta;"deactivate"===E&&"deactivate"===j&&(window.location.href=s);const G=!D||!F;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"ss-background",style:{backgroundImage:`url(${e}/img/starter.jpg)`}}),Object(n.createElement)("div",{className:"unavailable-starter-sites"},Object(n.createElement)("div",{className:l()(["slider",{"move-right":P&&!G},{single:G}])},D&&Object(n.createElement)("div",{className:"content-wrap"},Object(n.createElement)("img",{src:e+"/img/tpc.svg",alt:Object(r.__)("Templates Cloud Logo","themeisle-companion")}),Object(n.createElement)("h1",null,I[a.cta].static+" Templates Cloud"),Object(n.createElement)("p",{className:"error"},k),M(h,f,E,N,"plugin","templates-patterns-collection",a.activate)),F&&Object(n.createElement)("div",{className:"content-wrap"},Object(n.createElement)("img",{src:e+"/img/neve.svg",alt:Object(r.__)("Neve Theme Logo","themeisle-companion")}),Object(n.createElement)("h1",null,I[t.cta].static+" Neve"),Object(n.createElement)("p",{className:"error"},C),M(v,d,j,w,"theme","neve",t.activate))),"deactivate"!==t.cta&&"deactivate"!==a.cta&&Object(n.createElement)("div",{className:"stepper"},Object(n.createElement)("button",{className:l()(["dot",{current:!P}]),onClick:()=>T(!P)}),Object(n.createElement)("button",{className:l()(["dot",{current:P}]),onClick:()=>T(!P)})),x&&Object(n.createElement)("div",{className:"error"}," ",x," ")))},o=()=>Object(n.createElement)("div",null,Object(n.createElement)(s,null));Object(n.render)(Object(n.createElement)(()=>Object(n.createElement)(o,null),null),document.getElementById("obfx-template-directory"))}]);
|
obfx_modules/template-directory/src/components/App.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import StarterSitesUnavailable from './StarterSitesUnavailable';
|
2 |
+
|
3 |
+
const App = () => {
|
4 |
+
return (
|
5 |
+
<div>
|
6 |
+
<StarterSitesUnavailable />
|
7 |
+
</div>
|
8 |
+
);
|
9 |
+
};
|
10 |
+
|
11 |
+
export default App;
|
obfx_modules/template-directory/src/components/StarterSitesUnavailable.js
ADDED
@@ -0,0 +1,250 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global template_directory, fetch */
|
2 |
+
import { useState } from '@wordpress/element';
|
3 |
+
import { Button } from '@wordpress/components';
|
4 |
+
import { __ } from '@wordpress/i18n';
|
5 |
+
import classnames from 'classnames';
|
6 |
+
|
7 |
+
const StarterSitesUnavailable = () => {
|
8 |
+
const { assets, neveData, tpcData, strings, tpcAdminURL } =
|
9 |
+
template_directory;
|
10 |
+
const { themeNotInstalled, themeNotActive, tpcNotInstalled, tpcNotActive } =
|
11 |
+
strings;
|
12 |
+
|
13 |
+
const [activatingNeve, setActivatingNeve] = useState(false);
|
14 |
+
const [installingNeve, setInstallingNeve] = useState(false);
|
15 |
+
const [currentStateNeve, setCurrentStateNeve] = useState(neveData.cta);
|
16 |
+
|
17 |
+
const [activatingTpc, setActivatingTpc] = useState(false);
|
18 |
+
const [installingTpc, setInstallingTpc] = useState(false);
|
19 |
+
const [currentStateTpc, setCurrentStateTpc] = useState(tpcData.cta);
|
20 |
+
|
21 |
+
const settersNeve = {
|
22 |
+
activating: setActivatingNeve,
|
23 |
+
installing: setInstallingNeve,
|
24 |
+
currentState: setCurrentStateNeve,
|
25 |
+
};
|
26 |
+
const settersTpc = {
|
27 |
+
activating: setActivatingTpc,
|
28 |
+
installing: setInstallingTpc,
|
29 |
+
currentState: setCurrentStateTpc,
|
30 |
+
};
|
31 |
+
|
32 |
+
const [error, setError] = useState(false);
|
33 |
+
const [slide, setSlide] = useState(false);
|
34 |
+
|
35 |
+
let themeError = themeNotInstalled;
|
36 |
+
if ('activate' === neveData.cta) themeError = themeNotActive;
|
37 |
+
|
38 |
+
let pluginError = tpcNotInstalled;
|
39 |
+
if ('activate' === tpcData.cta) pluginError = tpcNotActive;
|
40 |
+
|
41 |
+
const stringMap = {
|
42 |
+
install: {
|
43 |
+
static: __('Install and Activate', 'neve'),
|
44 |
+
progress: __('Installing', 'neve'),
|
45 |
+
},
|
46 |
+
activate: {
|
47 |
+
static: __('Activate', 'neve'),
|
48 |
+
progress: __('Activating', 'neve'),
|
49 |
+
},
|
50 |
+
};
|
51 |
+
|
52 |
+
const renderNoticeContent = (
|
53 |
+
installing,
|
54 |
+
activating,
|
55 |
+
currentState,
|
56 |
+
setters,
|
57 |
+
type,
|
58 |
+
slug,
|
59 |
+
activationURL
|
60 |
+
) => {
|
61 |
+
const buttonMap = {
|
62 |
+
install: (
|
63 |
+
<Button
|
64 |
+
disabled={installing}
|
65 |
+
isPrimary={!installing}
|
66 |
+
isSecondary={installing}
|
67 |
+
className={installing && 'is-loading'}
|
68 |
+
icon={installing && 'update'}
|
69 |
+
onClick={() => install(setters, type, slug, activationURL)}
|
70 |
+
>
|
71 |
+
{installing
|
72 |
+
? stringMap.install.progress + '...'
|
73 |
+
: stringMap.install.static}
|
74 |
+
</Button>
|
75 |
+
),
|
76 |
+
activate: (
|
77 |
+
<Button
|
78 |
+
disabled={activating}
|
79 |
+
isPrimary={!activating}
|
80 |
+
isSecondary={activating}
|
81 |
+
className={activating && 'is-loading'}
|
82 |
+
icon={activating && 'update'}
|
83 |
+
onClick={() => activate(setters, activationURL)}
|
84 |
+
>
|
85 |
+
{activating
|
86 |
+
? stringMap.activate.progress + '...'
|
87 |
+
: stringMap.activate.static}
|
88 |
+
</Button>
|
89 |
+
),
|
90 |
+
deactivate: (
|
91 |
+
<Button
|
92 |
+
disabled
|
93 |
+
isSecondary
|
94 |
+
className="is-loading"
|
95 |
+
>
|
96 |
+
{__('Activated')}
|
97 |
+
</Button>
|
98 |
+
),
|
99 |
+
};
|
100 |
+
return <>{buttonMap[currentState]}</>;
|
101 |
+
};
|
102 |
+
|
103 |
+
const install = (setters, type, slug, activationURL) => {
|
104 |
+
setters.installing(true);
|
105 |
+
wp.updates.ajax(`install-${type}`, {
|
106 |
+
slug,
|
107 |
+
success: () => {
|
108 |
+
activate(setters, activationURL);
|
109 |
+
},
|
110 |
+
error: (e) => {
|
111 |
+
if ('folder_exists' === e.errorCode) {
|
112 |
+
activate(setters, activationURL);
|
113 |
+
} else {
|
114 |
+
setError(
|
115 |
+
e.errorMessage
|
116 |
+
? e.errorMessage
|
117 |
+
: __(
|
118 |
+
'Something went wrong. Please try again.',
|
119 |
+
'themeisle-companion'
|
120 |
+
)
|
121 |
+
);
|
122 |
+
setters.installing(false);
|
123 |
+
setTimeout(() => setError(false), 3000);
|
124 |
+
}
|
125 |
+
},
|
126 |
+
});
|
127 |
+
};
|
128 |
+
|
129 |
+
const activate = (setters, activationURL) => {
|
130 |
+
setters.installing(false);
|
131 |
+
setters.activating(true);
|
132 |
+
setters.currentState('activate');
|
133 |
+
|
134 |
+
get(activationURL).then((r) => {
|
135 |
+
if (!r.ok) {
|
136 |
+
setError(
|
137 |
+
__(
|
138 |
+
'Something went wrong. Please try again.',
|
139 |
+
'themeisle-companion'
|
140 |
+
)
|
141 |
+
);
|
142 |
+
setters.activating(false);
|
143 |
+
setTimeout(() => setError(false), 3000);
|
144 |
+
} else {
|
145 |
+
setters.activating(false);
|
146 |
+
setters.currentState('deactivate');
|
147 |
+
setSlide(true);
|
148 |
+
}
|
149 |
+
});
|
150 |
+
};
|
151 |
+
|
152 |
+
const shouldDisplayTpc = 'deactivate' !== tpcData.cta;
|
153 |
+
const shouldDisplayNeve = 'deactivate' !== neveData.cta;
|
154 |
+
|
155 |
+
if ('deactivate' === currentStateTpc && 'deactivate' === currentStateNeve) {
|
156 |
+
window.location.href = tpcAdminURL;
|
157 |
+
}
|
158 |
+
|
159 |
+
const isSingle = !shouldDisplayTpc || !shouldDisplayNeve;
|
160 |
+
|
161 |
+
return (
|
162 |
+
<>
|
163 |
+
<div
|
164 |
+
className="ss-background"
|
165 |
+
style={{ backgroundImage: `url(${assets}/img/starter.jpg)` }}
|
166 |
+
/>
|
167 |
+
<div className="unavailable-starter-sites">
|
168 |
+
<div
|
169 |
+
className={classnames([
|
170 |
+
'slider',
|
171 |
+
{ 'move-right': slide && !isSingle },
|
172 |
+
{ single: isSingle },
|
173 |
+
])}
|
174 |
+
>
|
175 |
+
{shouldDisplayTpc && (
|
176 |
+
<div className="content-wrap">
|
177 |
+
<img
|
178 |
+
src={assets + '/img/tpc.svg'}
|
179 |
+
alt={__('Templates Cloud Logo', 'themeisle-companion')}
|
180 |
+
/>
|
181 |
+
<h1>
|
182 |
+
{stringMap[tpcData.cta].static +
|
183 |
+
' Templates Cloud'}
|
184 |
+
</h1>
|
185 |
+
<p className="error">{pluginError}</p>
|
186 |
+
{renderNoticeContent(
|
187 |
+
installingTpc,
|
188 |
+
activatingTpc,
|
189 |
+
currentStateTpc,
|
190 |
+
settersTpc,
|
191 |
+
'plugin',
|
192 |
+
'templates-patterns-collection',
|
193 |
+
tpcData.activate
|
194 |
+
)}
|
195 |
+
</div>
|
196 |
+
)}
|
197 |
+
{shouldDisplayNeve && (
|
198 |
+
<div className="content-wrap">
|
199 |
+
<img
|
200 |
+
src={assets + '/img/neve.svg'}
|
201 |
+
alt={__('Neve Theme Logo', 'themeisle-companion')}
|
202 |
+
/>
|
203 |
+
<h1>{stringMap[neveData.cta].static + ' Neve'}</h1>
|
204 |
+
<p className="error">{themeError}</p>
|
205 |
+
{renderNoticeContent(
|
206 |
+
installingNeve,
|
207 |
+
activatingNeve,
|
208 |
+
currentStateNeve,
|
209 |
+
settersNeve,
|
210 |
+
'theme',
|
211 |
+
'neve',
|
212 |
+
neveData.activate
|
213 |
+
)}
|
214 |
+
</div>
|
215 |
+
)}
|
216 |
+
</div>
|
217 |
+
{neveData.cta !== 'deactivate' && tpcData.cta !== 'deactivate' && (
|
218 |
+
<div className="stepper">
|
219 |
+
<button
|
220 |
+
className={classnames(['dot', { current: !slide }])}
|
221 |
+
onClick={() => setSlide(!slide)}
|
222 |
+
/>
|
223 |
+
<button
|
224 |
+
className={classnames(['dot', { current: slide }])}
|
225 |
+
onClick={() => setSlide(!slide)}
|
226 |
+
/>
|
227 |
+
</div>
|
228 |
+
)}
|
229 |
+
{error && <div className="error"> {error} </div>}
|
230 |
+
</div>
|
231 |
+
</>
|
232 |
+
);
|
233 |
+
};
|
234 |
+
|
235 |
+
const get = async (route) => {
|
236 |
+
const options = {
|
237 |
+
method: 'GET',
|
238 |
+
headers: {
|
239 |
+
Accept: 'application/json',
|
240 |
+
'Content-Type': 'application/json',
|
241 |
+
'x-wp-nonce': template_directory.nonce,
|
242 |
+
},
|
243 |
+
};
|
244 |
+
|
245 |
+
return await fetch(route, options).then((response) => {
|
246 |
+
return response;
|
247 |
+
});
|
248 |
+
};
|
249 |
+
|
250 |
+
export default StarterSitesUnavailable;
|
obfx_modules/template-directory/src/template-directory.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import App from './components/App';
|
2 |
+
import { render } from '@wordpress/element';
|
3 |
+
|
4 |
+
const Root = () => <App />;
|
5 |
+
render(<Root />, document.getElementById('obfx-template-directory'));
|
readme.md
CHANGED
@@ -107,6 +107,15 @@ Activating the Orbit Fox plugin is just like any other plugin. If you've uploade
|
|
107 |
|
108 |
## Changelog ##
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
##### [Version 2.10.10](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.9...v2.10.10) (2021-12-23)
|
111 |
|
112 |
- Fix error with gutenberg-blocks
|
107 |
|
108 |
## Changelog ##
|
109 |
|
110 |
+
##### [Version 2.10.11](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.10...v2.10.11) (2022-02-17)
|
111 |
+
|
112 |
+
- Replace the templates module with the one based on Neve and Cloud Templates & Patterns collection
|
113 |
+
- Fix warnings with PHP 8
|
114 |
+
- Update recommended plugins
|
115 |
+
|
116 |
+
|
117 |
+
|
118 |
+
|
119 |
##### [Version 2.10.10](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.9...v2.10.10) (2021-12-23)
|
120 |
|
121 |
- Fix error with gutenberg-blocks
|
readme.txt
CHANGED
@@ -107,6 +107,15 @@ Activating the Orbit Fox plugin is just like any other plugin. If you've uploade
|
|
107 |
|
108 |
== Changelog ==
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
##### [Version 2.10.10](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.9...v2.10.10) (2021-12-23)
|
111 |
|
112 |
- Fix error with gutenberg-blocks
|
107 |
|
108 |
== Changelog ==
|
109 |
|
110 |
+
##### [Version 2.10.11](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.10...v2.10.11) (2022-02-17)
|
111 |
+
|
112 |
+
- Replace the templates module with the one based on Neve and Cloud Templates & Patterns collection
|
113 |
+
- Fix warnings with PHP 8
|
114 |
+
- Update recommended plugins
|
115 |
+
|
116 |
+
|
117 |
+
|
118 |
+
|
119 |
##### [Version 2.10.10](https://github.com/Codeinwp/themeisle-companion/compare/v2.10.9...v2.10.10) (2021-12-23)
|
120 |
|
121 |
- Fix error with gutenberg-blocks
|
themeisle-companion.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: Orbit Fox Companion
|
16 |
* Plugin URI: https://orbitfox.com/
|
17 |
* Description: This swiss-knife plugin comes with a quality template library, menu/sharing icons modules, Gutenberg blocks, and newly added Elementor/BeaverBuilder page builder widgets on each release.
|
18 |
-
* Version: 2.10.
|
19 |
* Author: Themeisle
|
20 |
* Author URI: https://orbitfox.com/
|
21 |
* License: GPL-2.0+
|
15 |
* Plugin Name: Orbit Fox Companion
|
16 |
* Plugin URI: https://orbitfox.com/
|
17 |
* Description: This swiss-knife plugin comes with a quality template library, menu/sharing icons modules, Gutenberg blocks, and newly added Elementor/BeaverBuilder page builder widgets on each release.
|
18 |
+
* Version: 2.10.11
|
19 |
* Author: Themeisle
|
20 |
* Author URI: https://orbitfox.com/
|
21 |
* License: GPL-2.0+
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit1401fee286570c50a77b21979a87318c::getLoader();
|
vendor/codeinwp/templates-directory/LICENSE
DELETED
@@ -1,201 +0,0 @@
|
|
1 |
-
Apache License
|
2 |
-
Version 2.0, January 2004
|
3 |
-
http://www.apache.org/licenses/
|
4 |
-
|
5 |
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6 |
-
|
7 |
-
1. Definitions.
|
8 |
-
|
9 |
-
"License" shall mean the terms and conditions for use, reproduction,
|
10 |
-
and distribution as defined by Sections 1 through 9 of this document.
|
11 |
-
|
12 |
-
"Licensor" shall mean the copyright owner or entity authorized by
|
13 |
-
the copyright owner that is granting the License.
|
14 |
-
|
15 |
-
"Legal Entity" shall mean the union of the acting entity and all
|
16 |
-
other entities that control, are controlled by, or are under common
|
17 |
-
control with that entity. For the purposes of this definition,
|
18 |
-
"control" means (i) the power, direct or indirect, to cause the
|
19 |
-
direction or management of such entity, whether by contract or
|
20 |
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21 |
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
22 |
-
|
23 |
-
"You" (or "Your") shall mean an individual or Legal Entity
|
24 |
-
exercising permissions granted by this License.
|
25 |
-
|
26 |
-
"Source" form shall mean the preferred form for making modifications,
|
27 |
-
including but not limited to software source code, documentation
|
28 |
-
source, and configuration files.
|
29 |
-
|
30 |
-
"Object" form shall mean any form resulting from mechanical
|
31 |
-
transformation or translation of a Source form, including but
|
32 |
-
not limited to compiled object code, generated documentation,
|
33 |
-
and conversions to other media types.
|
34 |
-
|
35 |
-
"Work" shall mean the work of authorship, whether in Source or
|
36 |
-
Object form, made available under the License, as indicated by a
|
37 |
-
copyright notice that is included in or attached to the work
|
38 |
-
(an example is provided in the Appendix below).
|
39 |
-
|
40 |
-
"Derivative Works" shall mean any work, whether in Source or Object
|
41 |
-
form, that is based on (or derived from) the Work and for which the
|
42 |
-
editorial revisions, annotations, elaborations, or other modifications
|
43 |
-
represent, as a whole, an original work of authorship. For the purposes
|
44 |
-
of this License, Derivative Works shall not include works that remain
|
45 |
-
separable from, or merely link (or bind by name) to the interfaces of,
|
46 |
-
the Work and Derivative Works thereof.
|
47 |
-
|
48 |
-
"Contribution" shall mean any work of authorship, including
|
49 |
-
the original version of the Work and any modifications or additions
|
50 |
-
to that Work or Derivative Works thereof, that is intentionally
|
51 |
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
52 |
-
or by an individual or Legal Entity authorized to submit on behalf of
|
53 |
-
the copyright owner. For the purposes of this definition, "submitted"
|
54 |
-
means any form of electronic, verbal, or written communication sent
|
55 |
-
to the Licensor or its representatives, including but not limited to
|
56 |
-
communication on electronic mailing lists, source code control systems,
|
57 |
-
and issue tracking systems that are managed by, or on behalf of, the
|
58 |
-
Licensor for the purpose of discussing and improving the Work, but
|
59 |
-
excluding communication that is conspicuously marked or otherwise
|
60 |
-
designated in writing by the copyright owner as "Not a Contribution."
|
61 |
-
|
62 |
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63 |
-
on behalf of whom a Contribution has been received by Licensor and
|
64 |
-
subsequently incorporated within the Work.
|
65 |
-
|
66 |
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
67 |
-
this License, each Contributor hereby grants to You a perpetual,
|
68 |
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69 |
-
copyright license to reproduce, prepare Derivative Works of,
|
70 |
-
publicly display, publicly perform, sublicense, and distribute the
|
71 |
-
Work and such Derivative Works in Source or Object form.
|
72 |
-
|
73 |
-
3. Grant of Patent License. Subject to the terms and conditions of
|
74 |
-
this License, each Contributor hereby grants to You a perpetual,
|
75 |
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76 |
-
(except as stated in this section) patent license to make, have made,
|
77 |
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78 |
-
where such license applies only to those patent claims licensable
|
79 |
-
by such Contributor that are necessarily infringed by their
|
80 |
-
Contribution(s) alone or by combination of their Contribution(s)
|
81 |
-
with the Work to which such Contribution(s) was submitted. If You
|
82 |
-
institute patent litigation against any entity (including a
|
83 |
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84 |
-
or a Contribution incorporated within the Work constitutes direct
|
85 |
-
or contributory patent infringement, then any patent licenses
|
86 |
-
granted to You under this License for that Work shall terminate
|
87 |
-
as of the date such litigation is filed.
|
88 |
-
|
89 |
-
4. Redistribution. You may reproduce and distribute copies of the
|
90 |
-
Work or Derivative Works thereof in any medium, with or without
|
91 |
-
modifications, and in Source or Object form, provided that You
|
92 |
-
meet the following conditions:
|
93 |
-
|
94 |
-
(a) You must give any other recipients of the Work or
|
95 |
-
Derivative Works a copy of this License; and
|
96 |
-
|
97 |
-
(b) You must cause any modified files to carry prominent notices
|
98 |
-
stating that You changed the files; and
|
99 |
-
|
100 |
-
(c) You must retain, in the Source form of any Derivative Works
|
101 |
-
that You distribute, all copyright, patent, trademark, and
|
102 |
-
attribution notices from the Source form of the Work,
|
103 |
-
excluding those notices that do not pertain to any part of
|
104 |
-
the Derivative Works; and
|
105 |
-
|
106 |
-
(d) If the Work includes a "NOTICE" text file as part of its
|
107 |
-
distribution, then any Derivative Works that You distribute must
|
108 |
-
include a readable copy of the attribution notices contained
|
109 |
-
within such NOTICE file, excluding those notices that do not
|
110 |
-
pertain to any part of the Derivative Works, in at least one
|
111 |
-
of the following places: within a NOTICE text file distributed
|
112 |
-
as part of the Derivative Works; within the Source form or
|
113 |
-
documentation, if provided along with the Derivative Works; or,
|
114 |
-
within a display generated by the Derivative Works, if and
|
115 |
-
wherever such third-party notices normally appear. The contents
|
116 |
-
of the NOTICE file are for informational purposes only and
|
117 |
-
do not modify the License. You may add Your own attribution
|
118 |
-
notices within Derivative Works that You distribute, alongside
|
119 |
-
or as an addendum to the NOTICE text from the Work, provided
|
120 |
-
that such additional attribution notices cannot be construed
|
121 |
-
as modifying the License.
|
122 |
-
|
123 |
-
You may add Your own copyright statement to Your modifications and
|
124 |
-
may provide additional or different license terms and conditions
|
125 |
-
for use, reproduction, or distribution of Your modifications, or
|
126 |
-
for any such Derivative Works as a whole, provided Your use,
|
127 |
-
reproduction, and distribution of the Work otherwise complies with
|
128 |
-
the conditions stated in this License.
|
129 |
-
|
130 |
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131 |
-
any Contribution intentionally submitted for inclusion in the Work
|
132 |
-
by You to the Licensor shall be under the terms and conditions of
|
133 |
-
this License, without any additional terms or conditions.
|
134 |
-
Notwithstanding the above, nothing herein shall supersede or modify
|
135 |
-
the terms of any separate license agreement you may have executed
|
136 |
-
with Licensor regarding such Contributions.
|
137 |
-
|
138 |
-
6. Trademarks. This License does not grant permission to use the trade
|
139 |
-
names, trademarks, service marks, or product names of the Licensor,
|
140 |
-
except as required for reasonable and customary use in describing the
|
141 |
-
origin of the Work and reproducing the content of the NOTICE file.
|
142 |
-
|
143 |
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
144 |
-
agreed to in writing, Licensor provides the Work (and each
|
145 |
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146 |
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147 |
-
implied, including, without limitation, any warranties or conditions
|
148 |
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149 |
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150 |
-
appropriateness of using or redistributing the Work and assume any
|
151 |
-
risks associated with Your exercise of permissions under this License.
|
152 |
-
|
153 |
-
8. Limitation of Liability. In no event and under no legal theory,
|
154 |
-
whether in tort (including negligence), contract, or otherwise,
|
155 |
-
unless required by applicable law (such as deliberate and grossly
|
156 |
-
negligent acts) or agreed to in writing, shall any Contributor be
|
157 |
-
liable to You for damages, including any direct, indirect, special,
|
158 |
-
incidental, or consequential damages of any character arising as a
|
159 |
-
result of this License or out of the use or inability to use the
|
160 |
-
Work (including but not limited to damages for loss of goodwill,
|
161 |
-
work stoppage, computer failure or malfunction, or any and all
|
162 |
-
other commercial damages or losses), even if such Contributor
|
163 |
-
has been advised of the possibility of such damages.
|
164 |
-
|
165 |
-
9. Accepting Warranty or Additional Liability. While redistributing
|
166 |
-
the Work or Derivative Works thereof, You may choose to offer,
|
167 |
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
168 |
-
or other liability obligations and/or rights consistent with this
|
169 |
-
License. However, in accepting such obligations, You may act only
|
170 |
-
on Your own behalf and on Your sole responsibility, not on behalf
|
171 |
-
of any other Contributor, and only if You agree to indemnify,
|
172 |
-
defend, and hold each Contributor harmless for any liability
|
173 |
-
incurred by, or claims asserted against, such Contributor by reason
|
174 |
-
of your accepting any such warranty or additional liability.
|
175 |
-
|
176 |
-
END OF TERMS AND CONDITIONS
|
177 |
-
|
178 |
-
APPENDIX: How to apply the Apache License to your work.
|
179 |
-
|
180 |
-
To apply the Apache License to your work, attach the following
|
181 |
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
182 |
-
replaced with your own identifying information. (Don't include
|
183 |
-
the brackets!) The text should be enclosed in the appropriate
|
184 |
-
comment syntax for the file format. We also recommend that a
|
185 |
-
file or class name and description of purpose be included on the
|
186 |
-
same "printed page" as the copyright notice for easier
|
187 |
-
identification within third-party archives.
|
188 |
-
|
189 |
-
Copyright [yyyy] [name of copyright owner]
|
190 |
-
|
191 |
-
Licensed under the Apache License, Version 2.0 (the "License");
|
192 |
-
you may not use this file except in compliance with the License.
|
193 |
-
You may obtain a copy of the License at
|
194 |
-
|
195 |
-
http://www.apache.org/licenses/LICENSE-2.0
|
196 |
-
|
197 |
-
Unless required by applicable law or agreed to in writing, software
|
198 |
-
distributed under the License is distributed on an "AS IS" BASIS,
|
199 |
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200 |
-
See the License for the specific language governing permissions and
|
201 |
-
limitations under the License.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/templates-directory/class-page-templates-directory.php
DELETED
@@ -1,617 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace ThemeIsle;
|
4 |
-
|
5 |
-
if ( ! class_exists( '\ThemeIsle\PageTemplatesDirectory' ) ) {
|
6 |
-
class PageTemplatesDirectory {
|
7 |
-
|
8 |
-
/**
|
9 |
-
* @var PageTemplatesDirectory
|
10 |
-
*/
|
11 |
-
|
12 |
-
protected static $instance = null;
|
13 |
-
|
14 |
-
/**
|
15 |
-
* The version of this library
|
16 |
-
* @var string
|
17 |
-
*/
|
18 |
-
public static $version = '1.0.9';
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Holds the module slug.
|
22 |
-
*
|
23 |
-
* @since 1.0.0
|
24 |
-
* @access protected
|
25 |
-
* @var string $slug The module slug.
|
26 |
-
*/
|
27 |
-
protected $slug = 'templates-directory';
|
28 |
-
|
29 |
-
protected $source_url;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Defines the library behaviour
|
33 |
-
*/
|
34 |
-
protected function init() {
|
35 |
-
add_action( 'rest_api_init', array( $this, 'register_endpoints' ) );
|
36 |
-
//Add dashboard menu page.
|
37 |
-
add_action( 'admin_menu', array( $this, 'add_menu_page' ), 100 );
|
38 |
-
//Add rewrite endpoint.
|
39 |
-
add_action( 'init', array( $this, 'demo_listing_register' ) );
|
40 |
-
//Add template redirect.
|
41 |
-
add_action( 'template_redirect', array( $this, 'demo_listing' ) );
|
42 |
-
//Enqueue admin scripts.
|
43 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_template_dir_scripts' ) );
|
44 |
-
// Get the full-width pages feature
|
45 |
-
add_action( 'init', array( $this, 'load_full_width_page_templates' ), 11 );
|
46 |
-
// Remove the blank template from the page template selector
|
47 |
-
add_filter( 'fwpt_templates_list', array( $this, 'filter_fwpt_templates_list' ) );
|
48 |
-
// Filter to add fetched.
|
49 |
-
add_filter( 'template_directory_templates_list', array( $this, 'filter_templates' ), 99 );
|
50 |
-
|
51 |
-
|
52 |
-
$default_source_url = apply_filters( 'templates_directory_source_url', 'https://raw.githubusercontent.com/Codeinwp/obfx-templates/master/' );
|
53 |
-
$this->set_source_url( $default_source_url );
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Enqueue the scripts for the dashboard page of the
|
58 |
-
*/
|
59 |
-
public function enqueue_template_dir_scripts() {
|
60 |
-
$current_screen = get_current_screen();
|
61 |
-
if ( $current_screen->id === 'orbit-fox_page_obfx_template_dir' || $current_screen->id === 'sizzify_page_sizzify_template_dir' ) {
|
62 |
-
if ( $current_screen->id === 'orbit-fox_page_obfx_template_dir' ) {
|
63 |
-
$plugin_slug = 'obfx';
|
64 |
-
} else {
|
65 |
-
$plugin_slug = 'sizzify';
|
66 |
-
}
|
67 |
-
$script_handle = $this->slug . '-script';
|
68 |
-
wp_enqueue_script( 'plugin-install' );
|
69 |
-
wp_enqueue_script( 'updates' );
|
70 |
-
wp_register_script( $script_handle, plugin_dir_url( $this->get_dir() ) . $this->slug . '/js/script.js', array( 'jquery' ), $this::$version );
|
71 |
-
wp_localize_script( $script_handle, 'importer_endpoint',
|
72 |
-
array(
|
73 |
-
'url' => $this->get_endpoint_url( '/import_elementor' ),
|
74 |
-
'plugin_slug' => $plugin_slug,
|
75 |
-
'fetch_templates_url' => $this->get_endpoint_url( '/fetch_templates' ),
|
76 |
-
'nonce' => wp_create_nonce( 'wp_rest' ),
|
77 |
-
) );
|
78 |
-
wp_enqueue_script( $script_handle );
|
79 |
-
wp_enqueue_style( $this->slug . '-style', plugin_dir_url( $this->get_dir() ) . $this->slug . '/css/admin.css', array(), $this::$version );
|
80 |
-
}
|
81 |
-
}
|
82 |
-
|
83 |
-
/**
|
84 |
-
*
|
85 |
-
*
|
86 |
-
* @param string $path
|
87 |
-
*
|
88 |
-
* @return string
|
89 |
-
*/
|
90 |
-
public function get_endpoint_url( $path = '' ) {
|
91 |
-
return rest_url( $this->slug . $path );
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Register Rest endpoint for requests.
|
96 |
-
*/
|
97 |
-
public function register_endpoints() {
|
98 |
-
register_rest_route( $this->slug, '/import_elementor', array(
|
99 |
-
'methods' => 'POST',
|
100 |
-
'callback' => array( $this, 'import_elementor' ),
|
101 |
-
'permission_callback' => function () {
|
102 |
-
return current_user_can( 'manage_options' );
|
103 |
-
},
|
104 |
-
) );
|
105 |
-
register_rest_route( $this->slug, '/fetch_templates', array(
|
106 |
-
'methods' => 'POST',
|
107 |
-
'callback' => array( $this, 'fetch_templates' ),
|
108 |
-
'permission_callback' => function () {
|
109 |
-
return current_user_can( 'manage_options' );
|
110 |
-
},
|
111 |
-
) );
|
112 |
-
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Function to fetch templates.
|
116 |
-
*
|
117 |
-
* @return array|bool|\WP_Error
|
118 |
-
*/
|
119 |
-
public function fetch_templates( \WP_REST_Request $request ) {
|
120 |
-
if ( ! current_user_can( 'manage_options' ) ) {
|
121 |
-
return false;
|
122 |
-
}
|
123 |
-
|
124 |
-
$params = $request->get_params();
|
125 |
-
|
126 |
-
if ( empty ( $params['plugin_slug'] ) ) {
|
127 |
-
return false;
|
128 |
-
}
|
129 |
-
|
130 |
-
$plugin_slug = $params['plugin_slug'];
|
131 |
-
$query_args = array( 'license' => '', 'url' => get_home_url(), 'name' => $plugin_slug );
|
132 |
-
|
133 |
-
$license = get_option( 'eaw_premium_license_data', '' );
|
134 |
-
|
135 |
-
if ( ! empty ( $license ) ) {
|
136 |
-
$license = isset( $license->key ) ? $license->key : '';
|
137 |
-
$query_args['license'] = $license;
|
138 |
-
$query_args['_'] = time();
|
139 |
-
}
|
140 |
-
$url = add_query_arg( $query_args, 'https://themeisle.com/?edd_action=get_templates' );
|
141 |
-
|
142 |
-
$request = wp_remote_retrieve_body( wp_remote_post( esc_url_raw( $url ) ) );
|
143 |
-
$response = json_decode( $request, true );
|
144 |
-
|
145 |
-
if ( ! empty( $response ) ) {
|
146 |
-
update_option( $plugin_slug . '_synced_templates', $response );
|
147 |
-
}
|
148 |
-
die();
|
149 |
-
}
|
150 |
-
|
151 |
-
public function filter_templates( $templates ) {
|
152 |
-
$current_screen = get_current_screen();
|
153 |
-
if ( $current_screen->id === 'orbit-fox_page_obfx_template_dir' ) {
|
154 |
-
$fetched = get_option( 'obfx_synced_templates' );
|
155 |
-
} else {
|
156 |
-
$fetched = get_option( 'sizzify_synced_templates' );
|
157 |
-
}
|
158 |
-
if ( empty( $fetched ) ) {
|
159 |
-
return $templates;
|
160 |
-
}
|
161 |
-
if ( ! is_array( $fetched ) ) {
|
162 |
-
return $templates;
|
163 |
-
}
|
164 |
-
$new_templates = array_merge( $templates, $fetched['templates'] );
|
165 |
-
|
166 |
-
return $new_templates;
|
167 |
-
}
|
168 |
-
|
169 |
-
/**
|
170 |
-
* The templates list.
|
171 |
-
*
|
172 |
-
* @return array
|
173 |
-
*/
|
174 |
-
public function templates_list() {
|
175 |
-
$defaults_if_empty = array(
|
176 |
-
'title' => __( 'A new Orbit Fox Template', 'themeisle-companion' ),
|
177 |
-
'screenshot' => esc_url( 'https://raw.githubusercontent.com/Codeinwp/obfx-templates/master/placeholder.png' ),
|
178 |
-
'description' => __( 'This is an awesome Orbit Fox Template.', 'themeisle-companion' ),
|
179 |
-
'demo_url' => esc_url( 'https://demo.themeisle.com/hestia-pro-demo-content/demo-placeholder/' ),
|
180 |
-
'import_file' => '',
|
181 |
-
'required_plugins' => array( 'elementor' => array( 'title' => __( 'Elementor Page Builder', 'themeisle-companion' ) ) ),
|
182 |
-
);
|
183 |
-
|
184 |
-
$templates_list = array(
|
185 |
-
'about-our-business-elementor' => array(
|
186 |
-
'title' => __( 'About Our Business', 'themeisle-companion' ),
|
187 |
-
'description' => __( 'Use this layout to present your business in a fancy way. Add an interactive header, shwocase your services via progress bars, introduce your team members, and locate your headquarters on Google Maps. Last but not least, beautify the design by adding catchy images.', 'themeisle-companion' ),
|
188 |
-
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/about-our-business-elementor/',
|
189 |
-
'screenshot' => esc_url( $this->get_source_url() . 'about-our-business-elementor/screenshot.png' ),
|
190 |
-
'import_file' => esc_url( $this->get_source_url() . 'about-our-business-elementor/template.json' ),
|
191 |
-
),
|
192 |
-
'contact-us-elementor' => array(
|
193 |
-
'title' => __( 'Contact Us', 'themeisle-companion' ),
|
194 |
-
'description' => __( 'A clean and simple template for your Contact page, where we integrated our Pirate Forms plugin. It will let your customers send you a message using an intuitive form. A Google map, together with a few other details about your business, completes the section.', 'themeisle-companion' ),
|
195 |
-
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/contact-us-elementor/',
|
196 |
-
'screenshot' => esc_url( $this->get_source_url() . 'contact-us-elementor/screenshot.png' ),
|
197 |
-
'import_file' => esc_url( $this->get_source_url() . 'contact-us-elementor/template.json' ),
|
198 |
-
),
|
199 |
-
'pricing-elementor' => array(
|
200 |
-
'title' => __( 'Pricing', 'themeisle-companion' ),
|
201 |
-
'description' => __( 'If you plan to sell your products online, this layout offers you elegant pricing tables so you can differentiate the features and services for your clients. Also, for a better clarification, the template provides a FAQ area where you can answer people\'s questions.', 'themeisle-companion' ),
|
202 |
-
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/pricing-elementor/',
|
203 |
-
'screenshot' => esc_url( $this->get_source_url() . 'pricing-elementor/screenshot.png' ),
|
204 |
-
'import_file' => esc_url( $this->get_source_url() . 'pricing-elementor/template.json' ),
|
205 |
-
),
|
206 |
-
'material-homepage-elementor' => array(
|
207 |
-
'title' => __( 'Material Homepage', 'themeisle-companion' ),
|
208 |
-
'description' => __( 'This layout could be your main website homepage (or you can use it as an alternative homepage, if you wish). It was built on material design and comes with call to action, catchy icons, testimonials, blog posts, pricing plans, and other sections that you can add yourself by customizing it.', 'themeisle-companion' ),
|
209 |
-
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/material-homepage-elementor/',
|
210 |
-
'screenshot' => esc_url( $this->get_source_url() . 'material-homepage-elementor/screenshot.png' ),
|
211 |
-
'import_file' => esc_url( $this->get_source_url() . 'material-homepage-elementor/template.json' ),
|
212 |
-
),
|
213 |
-
'ether-elementor' => array(
|
214 |
-
'title' => __( 'Ether - Landing Page', 'themeisle-companion' ),
|
215 |
-
'description' => __( 'An elegant and modern landing page for e-commerce, coming with a clean interface, beautiful typography, photo galleries, and call to action. If you have an online shop and want to promote a certain product, use this layout to tell people why they should buy it.', 'themeisle-companion' ),
|
216 |
-
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/ether-elementor/',
|
217 |
-
'screenshot' => esc_url( $this->get_source_url() . 'ether-elementor/screenshot.png' ),
|
218 |
-
'import_file' => esc_url( $this->get_source_url() . 'ether-elementor/template.json' ),
|
219 |
-
),
|
220 |
-
'jason-elementor' => array(
|
221 |
-
'title' => __( 'Jason - Landing Page', 'themeisle-companion' ),
|
222 |
-
'description' => __( 'A classy template for freelancers, where you can put your skills and knowldge in the spotlight for potential clients. Talk about yourself, your projects, awards, and let people contact you easily. The template is designed to feature one-page scrolling.', 'themeisle-companion' ),
|
223 |
-
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/jason-elementor/',
|
224 |
-
'screenshot' => esc_url( $this->get_source_url() . 'jason-elementor/screenshot.png' ),
|
225 |
-
'import_file' => esc_url( $this->get_source_url() . 'jason-elementor/template.json' ),
|
226 |
-
),
|
227 |
-
'pulse-elementor' => array(
|
228 |
-
'title' => __( 'Pulse - Landing Page', 'themeisle-companion' ),
|
229 |
-
'description' => __( 'A good-looking landing page for products and apps, built to mark the features and services that they offer. The layout provides customer reviews, call to action, beautiful pricing tables, an About section, and a creative design. If you want to promote and sell your brand product, this template might help.', 'themeisle-companion' ),
|
230 |
-
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/pulse-elementor/',
|
231 |
-
'screenshot' => esc_url( $this->get_source_url() . 'pulse-elementor/screenshot.png' ),
|
232 |
-
'import_file' => esc_url( $this->get_source_url() . 'pulse-elementor/template.json' ),
|
233 |
-
),
|
234 |
-
'ascend-elementor' => array(
|
235 |
-
'title' => __( 'Ascend - Landing Page', 'themeisle-companion' ),
|
236 |
-
'description' => __( 'A resume-like template, built for outdoor enthusiasts and nature lovers. Its design and layout make it flexible for any other purpose too, so do not hesitate to showcase any kind of skills and activities, even business-oriented.', 'themeisle-companion' ),
|
237 |
-
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/ascend-elementor/',
|
238 |
-
'screenshot' => esc_url( $this->get_source_url() . 'ascend-elementor/screenshot.png' ),
|
239 |
-
'import_file' => esc_url( $this->get_source_url() . 'ascend-elementor/template.json' ),
|
240 |
-
),
|
241 |
-
'path-elementor' => array(
|
242 |
-
'title' => __( 'Path - Landing Page', 'themeisle-companion' ),
|
243 |
-
'description' => __( 'If you are a business consultant - agency or working on your own - have a look at this template! It comes with a clean design, call to action, statistics, and sections that put your services first.', 'themeisle-companion' ),
|
244 |
-
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/path-elementor/',
|
245 |
-
'screenshot' => esc_url( $this->get_source_url() . 'path-elementor/screenshot.png' ),
|
246 |
-
'import_file' => esc_url( $this->get_source_url() . 'path-elementor/template.json' ),
|
247 |
-
),
|
248 |
-
'mocha-elementor' => array(
|
249 |
-
'title' => __( 'Mocha - Landing Page', 'themeisle-companion' ),
|
250 |
-
'description' => __( 'An elegant and modern template for cafes and pubs, where you can display your menu in a mouth-watering way. Call to action, blog posts, attractive images, tabbed menus, and a catchy design will help you convince more people to stop by.', 'themeisle-companion' ),
|
251 |
-
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/mocha-elementor/',
|
252 |
-
'screenshot' => esc_url( $this->get_source_url() . 'mocha-elementor/screenshot.png' ),
|
253 |
-
'import_file' => esc_url( $this->get_source_url() . 'mocha-elementor/template.json' ),
|
254 |
-
),
|
255 |
-
'rik-landing' => array(
|
256 |
-
'title' => __( 'Rik - Landing Page', 'themeisle-companion' ),
|
257 |
-
'description' => __( 'This is a clean Landing page, ready to be used for an app presentation. It features beautiful gradients and great layouts for showcasing your product.', 'themeisle-companion' ),
|
258 |
-
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/rik-elementor/',
|
259 |
-
'screenshot' => esc_url( $this->get_source_url() . 'rik-elementor/screenshot.jpg' ),
|
260 |
-
'import_file' => esc_url( $this->get_source_url() . 'rik-elementor/template.json' ),
|
261 |
-
),
|
262 |
-
'zelle-lite' => array(
|
263 |
-
'title' => __( 'Zelle Lite - One Page Template', 'themeisle-companion' ),
|
264 |
-
'description' => __( 'A friendly one-page multipurpose page, with a full-width image in the background. It comes with an elegant and modern design, which could fit very well any kind of business. Zelle Lite has an interactive and colorful interface, with classy parallax effect and lively animations. You can use it for your online shop as well.', 'themeisle-companion' ),
|
265 |
-
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/zelle-lite/',
|
266 |
-
'screenshot' => esc_url( $this->get_source_url() . 'zelle-lite/screenshot.jpg' ),
|
267 |
-
'import_file' => esc_url( $this->get_source_url() . 'zelle-lite/template.json' ),
|
268 |
-
),
|
269 |
-
'notify' => array(
|
270 |
-
'title' => __( 'Notify - Landing Page', 'themeisle-companion' ),
|
271 |
-
'description' => __( 'A beautiful landing page to showcase your new application. It has a features section to present your app, a subscribe section where you can also add a video showcasing your new app and a testimonials section so you can present the feedback from your beta testers.', 'themeisle-companion' ),
|
272 |
-
'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/notify-elementor/',
|
273 |
-
'screenshot' => esc_url( $this->get_source_url() . 'notify-elementor/screenshot.jpg' ),
|
274 |
-
'import_file' => esc_url( $this->get_source_url() . 'notify-elementor/template.json' ),
|
275 |
-
)
|
276 |
-
);
|
277 |
-
|
278 |
-
foreach ( $templates_list as $template => $properties ) {
|
279 |
-
$templates_list[ $template ] = wp_parse_args( $properties, $defaults_if_empty );
|
280 |
-
}
|
281 |
-
|
282 |
-
return apply_filters( 'template_directory_templates_list', $templates_list );
|
283 |
-
}
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Register endpoint for themes page.
|
287 |
-
*/
|
288 |
-
public function demo_listing_register() {
|
289 |
-
add_rewrite_endpoint( 'obfx_templates', EP_ROOT );
|
290 |
-
}
|
291 |
-
|
292 |
-
/**
|
293 |
-
* Return template preview in customizer.
|
294 |
-
*
|
295 |
-
* @return bool|string
|
296 |
-
*/
|
297 |
-
public function demo_listing() {
|
298 |
-
$flag = get_query_var( 'obfx_templates', false );
|
299 |
-
|
300 |
-
if ( $flag !== '' ) {
|
301 |
-
return false;
|
302 |
-
}
|
303 |
-
if ( ! current_user_can( 'customize' ) ) {
|
304 |
-
return false;
|
305 |
-
}
|
306 |
-
if ( ! is_customize_preview() ) {
|
307 |
-
return false;
|
308 |
-
}
|
309 |
-
|
310 |
-
return $this->render_view( 'template-directory-render-template' );
|
311 |
-
}
|
312 |
-
|
313 |
-
/**
|
314 |
-
* Add the 'Template Directory' page to the dashboard menu.
|
315 |
-
*/
|
316 |
-
public function add_menu_page() {
|
317 |
-
$products = apply_filters( 'obfx_template_dir_products', array() );
|
318 |
-
foreach ( $products as $product ) {
|
319 |
-
add_submenu_page(
|
320 |
-
$product['parent_page_slug'], $product['directory_page_title'], __( 'Template Directory', 'themeisle-companion' ), 'manage_options', $product['page_slug'],
|
321 |
-
array( $this, 'render_admin_page' )
|
322 |
-
);
|
323 |
-
}
|
324 |
-
|
325 |
-
}
|
326 |
-
|
327 |
-
/**
|
328 |
-
* Render the template directory admin page.
|
329 |
-
*/
|
330 |
-
public function render_admin_page() {
|
331 |
-
$data = array(
|
332 |
-
'templates_array' => $this->templates_list(),
|
333 |
-
);
|
334 |
-
echo $this->render_view( 'template-directory-page', $data );
|
335 |
-
}
|
336 |
-
|
337 |
-
/**
|
338 |
-
* Utility method to call Elementor import routine.
|
339 |
-
*
|
340 |
-
* @param \WP_REST_Request $request the async request.
|
341 |
-
*
|
342 |
-
* @return string
|
343 |
-
*/
|
344 |
-
public function import_elementor( \WP_REST_Request $request ) {
|
345 |
-
if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
|
346 |
-
return 'no-elementor';
|
347 |
-
}
|
348 |
-
|
349 |
-
$params = $request->get_params();
|
350 |
-
$template_name = $params['template_name'];
|
351 |
-
$template_url = $params['template_url'];
|
352 |
-
|
353 |
-
require_once( ABSPATH . 'wp-admin' . '/includes/file.php' );
|
354 |
-
require_once( ABSPATH . 'wp-admin' . '/includes/image.php' );
|
355 |
-
|
356 |
-
// Mime a supported document type.
|
357 |
-
$elementor_plugin = \Elementor\Plugin::$instance;
|
358 |
-
$elementor_plugin->documents->register_document_type( 'not-supported', \Elementor\Modules\Library\Documents\Page::get_class_full_name() );
|
359 |
-
|
360 |
-
$template = download_url( esc_url( $template_url ) );
|
361 |
-
$name = $template_name;
|
362 |
-
$_FILES['file']['tmp_name'] = $template;
|
363 |
-
$elementor = new \Elementor\TemplateLibrary\Source_Local;
|
364 |
-
$elementor->import_template( $name, $template );
|
365 |
-
unlink( $template );
|
366 |
-
|
367 |
-
$args = array(
|
368 |
-
'post_type' => 'elementor_library',
|
369 |
-
'nopaging' => true,
|
370 |
-
'posts_per_page' => '1',
|
371 |
-
'orderby' => 'date',
|
372 |
-
'order' => 'DESC',
|
373 |
-
'suppress_filters' => true,
|
374 |
-
);
|
375 |
-
|
376 |
-
$query = new \WP_Query( $args );
|
377 |
-
|
378 |
-
$last_template_added = $query->posts[0];
|
379 |
-
//get template id
|
380 |
-
$template_id = $last_template_added->ID;
|
381 |
-
|
382 |
-
wp_reset_query();
|
383 |
-
wp_reset_postdata();
|
384 |
-
|
385 |
-
//page content
|
386 |
-
$page_content = $last_template_added->post_content;
|
387 |
-
//meta fields
|
388 |
-
$elementor_data_meta = get_post_meta( $template_id, '_elementor_data' );
|
389 |
-
$elementor_ver_meta = get_post_meta( $template_id, '_elementor_version' );
|
390 |
-
$elementor_edit_mode_meta = get_post_meta( $template_id, '_elementor_edit_mode' );
|
391 |
-
$elementor_css_meta = get_post_meta( $template_id, '_elementor_css' );
|
392 |
-
|
393 |
-
$elementor_metas = array(
|
394 |
-
'_elementor_data' => ! empty( $elementor_data_meta[0] ) ? wp_slash( $elementor_data_meta[0] ) : '',
|
395 |
-
'_elementor_version' => ! empty( $elementor_ver_meta[0] ) ? $elementor_ver_meta[0] : '',
|
396 |
-
'_elementor_edit_mode' => ! empty( $elementor_edit_mode_meta[0] ) ? $elementor_edit_mode_meta[0] : '',
|
397 |
-
'_elementor_css' => $elementor_css_meta,
|
398 |
-
);
|
399 |
-
|
400 |
-
// Create post object
|
401 |
-
$new_template_page = array(
|
402 |
-
'post_type' => 'page',
|
403 |
-
'post_title' => $template_name,
|
404 |
-
'post_status' => 'publish',
|
405 |
-
'post_content' => $page_content,
|
406 |
-
'meta_input' => $elementor_metas,
|
407 |
-
'page_template' => apply_filters( 'template_directory_default_template', 'templates/builder-fullwidth-std.php' )
|
408 |
-
);
|
409 |
-
|
410 |
-
$current_theme = wp_get_theme();
|
411 |
-
|
412 |
-
switch ( $current_theme->get_template() ) {
|
413 |
-
case 'hestia-pro':
|
414 |
-
case 'hestia':
|
415 |
-
$new_template_page['page_template'] = 'page-templates/template-pagebuilder-full-width.php';
|
416 |
-
break;
|
417 |
-
case 'zerif-lite':
|
418 |
-
case 'zerif-pro':
|
419 |
-
$new_template_page['page_template'] = 'template-fullwidth-no-title.php';
|
420 |
-
break;
|
421 |
-
}
|
422 |
-
|
423 |
-
$post_id = wp_insert_post( $new_template_page );
|
424 |
-
|
425 |
-
$redirect_url = add_query_arg( array(
|
426 |
-
'post' => $post_id,
|
427 |
-
'action' => 'elementor',
|
428 |
-
), admin_url( 'post.php' ) );
|
429 |
-
|
430 |
-
return ( $redirect_url );
|
431 |
-
}
|
432 |
-
|
433 |
-
/**
|
434 |
-
* Generate action button html.
|
435 |
-
*
|
436 |
-
* @param string $slug plugin slug.
|
437 |
-
*
|
438 |
-
* @return string
|
439 |
-
*/
|
440 |
-
public function get_button_html( $slug ) {
|
441 |
-
$button = '';
|
442 |
-
$state = $this->check_plugin_state( $slug );
|
443 |
-
if ( ! empty( $slug ) ) {
|
444 |
-
switch ( $state ) {
|
445 |
-
case 'install':
|
446 |
-
$nonce = wp_nonce_url(
|
447 |
-
add_query_arg(
|
448 |
-
array(
|
449 |
-
'action' => 'install-plugin',
|
450 |
-
'from' => 'import',
|
451 |
-
'plugin' => $slug,
|
452 |
-
),
|
453 |
-
network_admin_url( 'update.php' )
|
454 |
-
),
|
455 |
-
'install-plugin_' . $slug
|
456 |
-
);
|
457 |
-
$button .= '<a data-slug="' . $slug . '" class="install-now obfx-install-plugin button button-primary" href="' . esc_url( $nonce ) . '" data-name="' . $slug . '" aria-label="Install ' . $slug . '">' . __( 'Install and activate', 'themeisle-companion' ) . '</a>';
|
458 |
-
break;
|
459 |
-
case 'activate':
|
460 |
-
$plugin_link_suffix = $slug . '/' . $slug . '.php';
|
461 |
-
$nonce = add_query_arg(
|
462 |
-
array(
|
463 |
-
'action' => 'activate',
|
464 |
-
'plugin' => rawurlencode( $plugin_link_suffix ),
|
465 |
-
'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $plugin_link_suffix ),
|
466 |
-
), network_admin_url( 'plugins.php' )
|
467 |
-
);
|
468 |
-
$button .= '<a data-slug="' . $slug . '" class="activate-now button button-primary" href="' . esc_url( $nonce ) . '" aria-label="Activate ' . $slug . '">' . __( 'Activate', 'themeisle-companion' ) . '</a>';
|
469 |
-
break;
|
470 |
-
}// End switch().
|
471 |
-
}// End if().
|
472 |
-
return $button;
|
473 |
-
}
|
474 |
-
|
475 |
-
/**
|
476 |
-
* Getter method for the source url
|
477 |
-
* @return mixed
|
478 |
-
*/
|
479 |
-
public function get_source_url() {
|
480 |
-
return $this->source_url;
|
481 |
-
}
|
482 |
-
|
483 |
-
/**
|
484 |
-
* Setting method for source url
|
485 |
-
*
|
486 |
-
* @param $url
|
487 |
-
*/
|
488 |
-
protected function set_source_url( $url ) {
|
489 |
-
$this->source_url = $url;
|
490 |
-
}
|
491 |
-
|
492 |
-
/**
|
493 |
-
* Check plugin state.
|
494 |
-
*
|
495 |
-
* @param string $slug plugin slug.
|
496 |
-
*
|
497 |
-
* @return bool
|
498 |
-
*/
|
499 |
-
public function check_plugin_state( $slug ) {
|
500 |
-
if ( file_exists( WP_CONTENT_DIR . '/plugins/' . $slug . '/' . $slug . '.php' ) || file_exists( WP_CONTENT_DIR . '/plugins/' . $slug . '/index.php' ) ) {
|
501 |
-
require_once( ABSPATH . 'wp-admin' . '/includes/plugin.php' );
|
502 |
-
$needs = ( is_plugin_active( $slug . '/' . $slug . '.php' ) ||
|
503 |
-
is_plugin_active( $slug . '/index.php' ) ) ?
|
504 |
-
'deactivate' : 'activate';
|
505 |
-
|
506 |
-
return $needs;
|
507 |
-
} else {
|
508 |
-
return 'install';
|
509 |
-
}
|
510 |
-
}
|
511 |
-
|
512 |
-
/**
|
513 |
-
* If the composer library is present let's try to init.
|
514 |
-
*/
|
515 |
-
public function load_full_width_page_templates() {
|
516 |
-
if ( class_exists( '\ThemeIsle\FullWidthTemplates' ) ) {
|
517 |
-
\ThemeIsle\FullWidthTemplates::instance();
|
518 |
-
}
|
519 |
-
}
|
520 |
-
|
521 |
-
/**
|
522 |
-
* By default the composer library "Full Width Page Templates" comes with two page templates: a blank one and a full
|
523 |
-
* width one with the header and footer inherited from the active theme.
|
524 |
-
* OBFX Template directory doesn't need the blonk one, so we are going to ditch it.
|
525 |
-
*
|
526 |
-
* @param array $list
|
527 |
-
*
|
528 |
-
* @return array
|
529 |
-
*/
|
530 |
-
public function filter_fwpt_templates_list( $list ) {
|
531 |
-
unset( $list['templates/builder-fullwidth.php'] );
|
532 |
-
|
533 |
-
return $list;
|
534 |
-
}
|
535 |
-
|
536 |
-
/**
|
537 |
-
* Utility method to render a view from module.
|
538 |
-
*
|
539 |
-
* @codeCoverageIgnore
|
540 |
-
*
|
541 |
-
* @since 1.0.0
|
542 |
-
* @access protected
|
543 |
-
*
|
544 |
-
* @param string $view_name The view name w/o the `-tpl.php` part.
|
545 |
-
* @param array $args An array of arguments to be passed to the view.
|
546 |
-
*
|
547 |
-
* @return string
|
548 |
-
*/
|
549 |
-
protected function render_view( $view_name, $args = array() ) {
|
550 |
-
ob_start();
|
551 |
-
$file = $this->get_dir() . '/views/' . $view_name . '-tpl.php';
|
552 |
-
if ( ! empty( $args ) ) {
|
553 |
-
foreach ( $args as $obfx_rh_name => $obfx_rh_value ) {
|
554 |
-
$$obfx_rh_name = $obfx_rh_value;
|
555 |
-
}
|
556 |
-
}
|
557 |
-
if ( file_exists( $file ) ) {
|
558 |
-
include $file;
|
559 |
-
}
|
560 |
-
|
561 |
-
return ob_get_clean();
|
562 |
-
}
|
563 |
-
|
564 |
-
/**
|
565 |
-
* Method to return path to child class in a Reflective Way.
|
566 |
-
*
|
567 |
-
* @since 1.0.0
|
568 |
-
* @access protected
|
569 |
-
* @return string
|
570 |
-
*/
|
571 |
-
protected function get_dir() {
|
572 |
-
return dirname( __FILE__ );
|
573 |
-
}
|
574 |
-
|
575 |
-
/**
|
576 |
-
* @static
|
577 |
-
* @since 1.0.0
|
578 |
-
* @access public
|
579 |
-
* @return PageTemplatesDirectory
|
580 |
-
*/
|
581 |
-
public static function instance() {
|
582 |
-
if ( is_null( self::$instance ) ) {
|
583 |
-
self::$instance = new self();
|
584 |
-
self::$instance->init();
|
585 |
-
}
|
586 |
-
|
587 |
-
return self::$instance;
|
588 |
-
}
|
589 |
-
|
590 |
-
/**
|
591 |
-
* Throw error on object clone
|
592 |
-
*
|
593 |
-
* The whole idea of the singleton design pattern is that there is a single
|
594 |
-
* object therefore, we don't want the object to be cloned.
|
595 |
-
*
|
596 |
-
* @access public
|
597 |
-
* @since 1.0.0
|
598 |
-
* @return void
|
599 |
-
*/
|
600 |
-
public function __clone() {
|
601 |
-
// Cloning instances of the class is forbidden.
|
602 |
-
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'themeisle-companion' ), '1.0.0' );
|
603 |
-
}
|
604 |
-
|
605 |
-
/**
|
606 |
-
* Disable unserializing of the class
|
607 |
-
*
|
608 |
-
* @access public
|
609 |
-
* @since 1.0.0
|
610 |
-
* @return void
|
611 |
-
*/
|
612 |
-
public function __wakeup() {
|
613 |
-
// Unserializing instances of the class is forbidden.
|
614 |
-
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'themeisle-companion' ), '1.0.0' );
|
615 |
-
}
|
616 |
-
}
|
617 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/templates-directory/css/admin.css
DELETED
@@ -1,348 +0,0 @@
|
|
1 |
-
.obfx-template-browser {
|
2 |
-
display: grid;
|
3 |
-
padding: 35px 0 0;
|
4 |
-
grid-gap: 2em;
|
5 |
-
}
|
6 |
-
|
7 |
-
.obfx-template-browser .template-name {
|
8 |
-
float: left;
|
9 |
-
margin: 0;
|
10 |
-
padding: 15px;
|
11 |
-
font-size: 16px;
|
12 |
-
font-weight: 600;
|
13 |
-
}
|
14 |
-
|
15 |
-
.obfx-template {
|
16 |
-
position: relative;
|
17 |
-
box-sizing: border-box;
|
18 |
-
|
19 |
-
border: 1px solid #ddd;
|
20 |
-
background: #fff;
|
21 |
-
box-shadow: 0 1px 1px -1px rgba(0,0,0,0.1);
|
22 |
-
cursor: pointer;
|
23 |
-
}
|
24 |
-
.obfx-preview-wrap {
|
25 |
-
margin: 15px 0;
|
26 |
-
position: relative;
|
27 |
-
}
|
28 |
-
|
29 |
-
.obfx-preview-wrap .badge,
|
30 |
-
.obfx-template .badge {
|
31 |
-
position: absolute;
|
32 |
-
color: #fff;
|
33 |
-
z-index: 10;
|
34 |
-
background-color: #00a6e3;
|
35 |
-
padding: 7px 12px;
|
36 |
-
text-transform: uppercase;
|
37 |
-
border-radius: 0 0 3px 0;
|
38 |
-
top: 1px;
|
39 |
-
left: 0;
|
40 |
-
box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.25);
|
41 |
-
font-weight: 500;
|
42 |
-
font-size: 20px;
|
43 |
-
}
|
44 |
-
|
45 |
-
.obfx-template:nth-child(3n) {
|
46 |
-
margin-right: 0;
|
47 |
-
}
|
48 |
-
|
49 |
-
.obfx-template:hover .obfx-template-actions,
|
50 |
-
.obfx-template:hover .obfx-preview-template {
|
51 |
-
opacity: 1;
|
52 |
-
}
|
53 |
-
|
54 |
-
.obfx-template:hover .obfx-template-screenshot {
|
55 |
-
opacity: 0.4;
|
56 |
-
}
|
57 |
-
|
58 |
-
.obfx-template-actions {
|
59 |
-
float: right;
|
60 |
-
position: absolute;
|
61 |
-
right: 0;
|
62 |
-
bottom: 0;
|
63 |
-
padding: 10px 15px;
|
64 |
-
border-left: 1px solid rgba(0,0,0,0.05);
|
65 |
-
opacity: 0;
|
66 |
-
background: rgba(244,244,244,0.7);
|
67 |
-
-webkit-transition: 0.3s ease;
|
68 |
-
transition: 0.3s ease;
|
69 |
-
}
|
70 |
-
|
71 |
-
.obfx-template-actions .button .dashicons {
|
72 |
-
line-height: 27px;
|
73 |
-
}
|
74 |
-
|
75 |
-
.obfx-template-actions .button {
|
76 |
-
margin-left: 5px;
|
77 |
-
}
|
78 |
-
|
79 |
-
.obfx-template-screenshot {
|
80 |
-
display: inline-block;
|
81 |
-
float: left;
|
82 |
-
overflow: hidden;
|
83 |
-
position: relative;
|
84 |
-
width: 100%;
|
85 |
-
border: 1px solid #ddd;
|
86 |
-
border-right: none;
|
87 |
-
border-left: none;
|
88 |
-
background: #fff;
|
89 |
-
-webkit-transition: 0.3s ease;
|
90 |
-
transition: 0.3s ease;
|
91 |
-
}
|
92 |
-
|
93 |
-
.obfx-template img {
|
94 |
-
float: left;
|
95 |
-
width: 100%;
|
96 |
-
}
|
97 |
-
|
98 |
-
.obfx-template-browser.customizer {
|
99 |
-
display: block !important;
|
100 |
-
padding: 10px 20px 60px;
|
101 |
-
}
|
102 |
-
|
103 |
-
.obfx-next-prev {
|
104 |
-
position: absolute;
|
105 |
-
left: 45px;
|
106 |
-
}
|
107 |
-
|
108 |
-
.obfx-next-prev span:hover {
|
109 |
-
border-color: #ccc;
|
110 |
-
outline: 0;
|
111 |
-
color: #000;
|
112 |
-
background: #ddd;
|
113 |
-
box-shadow: none;
|
114 |
-
}
|
115 |
-
|
116 |
-
.obfx-next-prev .previous-template,
|
117 |
-
.obfx-next-prev .next-template {
|
118 |
-
display: block;
|
119 |
-
float: left;
|
120 |
-
position: relative;
|
121 |
-
width: 45px;
|
122 |
-
height: 45px;
|
123 |
-
padding-right: 2px;
|
124 |
-
border: none;
|
125 |
-
border-right: 1px solid #ddd;
|
126 |
-
color: #444;
|
127 |
-
background: #eee;
|
128 |
-
text-decoration: none;
|
129 |
-
cursor: pointer;
|
130 |
-
-webkit-transition: color 0.1s ease-in-out,background 0.1s ease-in-out;
|
131 |
-
transition: color 0.1s ease-in-out,background 0.1s ease-in-out;
|
132 |
-
}
|
133 |
-
|
134 |
-
.obfx-next-prev .previous-template {
|
135 |
-
border-left: 1px solid #ddd;
|
136 |
-
}
|
137 |
-
|
138 |
-
.obfx-next-prev .next-template:before {
|
139 |
-
position: relative;
|
140 |
-
top: 6px;
|
141 |
-
left: 14px;
|
142 |
-
font: 400 20px/1 dashicons;
|
143 |
-
content: "\f345";
|
144 |
-
}
|
145 |
-
|
146 |
-
.obfx-next-prev .previous-template:before {
|
147 |
-
position: relative;
|
148 |
-
top: 6px;
|
149 |
-
left: 14px;
|
150 |
-
font: 400 20px/1 dashicons;
|
151 |
-
content: "\f341";
|
152 |
-
}
|
153 |
-
|
154 |
-
.obfx-custom-customizer {
|
155 |
-
background: #fff;
|
156 |
-
}
|
157 |
-
|
158 |
-
.obfx-template-browser.customizer .obfx-template.active {
|
159 |
-
display: inline-block;
|
160 |
-
}
|
161 |
-
|
162 |
-
.customize-controls-preview-toggle {
|
163 |
-
float: left;
|
164 |
-
position: relative;
|
165 |
-
left: 120px;
|
166 |
-
}
|
167 |
-
|
168 |
-
.obfx-template-browser.customizer .template-name {
|
169 |
-
padding-left: 0;
|
170 |
-
}
|
171 |
-
|
172 |
-
.obfx-template-browser.customizer .obfx-template-screenshot {
|
173 |
-
border: 1px solid #ddd;
|
174 |
-
}
|
175 |
-
|
176 |
-
.obfx-hide {
|
177 |
-
display: none !important;
|
178 |
-
}
|
179 |
-
|
180 |
-
.obfx-import-elementor-hidden-form {
|
181 |
-
display: inline-block;
|
182 |
-
}
|
183 |
-
|
184 |
-
.obfx-done-import {
|
185 |
-
display: block;
|
186 |
-
margin: 0;
|
187 |
-
padding-top: 10px;
|
188 |
-
color: green;
|
189 |
-
text-align: center;
|
190 |
-
}
|
191 |
-
|
192 |
-
.obfx-done-import .dashicons {
|
193 |
-
font-size: 30px;
|
194 |
-
}
|
195 |
-
|
196 |
-
.obfx-updating.updating-message.button.button-primary {
|
197 |
-
padding: 0 4px 0 10px;
|
198 |
-
}
|
199 |
-
|
200 |
-
.obfx-no-elementor-modal-wrapper {
|
201 |
-
display: none;
|
202 |
-
position: fixed;
|
203 |
-
z-index: 900000;
|
204 |
-
top: 0;
|
205 |
-
right: 0;
|
206 |
-
bottom: 0;
|
207 |
-
left: 0;
|
208 |
-
margin: 0 auto;
|
209 |
-
background: rgba(0, 0, 0, 0.8);
|
210 |
-
}
|
211 |
-
|
212 |
-
.obfx-no-elementor-modal {
|
213 |
-
position: relative;
|
214 |
-
top: 50%;
|
215 |
-
width: auto;
|
216 |
-
max-width: 550px;
|
217 |
-
margin: 0 auto;
|
218 |
-
padding: 20px;
|
219 |
-
background-color: #fff;
|
220 |
-
text-align: right;
|
221 |
-
-webkit-transform: translateY(-50%);
|
222 |
-
-ms-transform: translateY(-50%);
|
223 |
-
transform: translateY(-50%);
|
224 |
-
}
|
225 |
-
|
226 |
-
.obfx-no-elementor-modal p {
|
227 |
-
margin: 30px 0 20px;
|
228 |
-
text-align: left;
|
229 |
-
}
|
230 |
-
|
231 |
-
.obfx-no-elementor-modal .modal-header {
|
232 |
-
display: inline-block;
|
233 |
-
position: absolute;
|
234 |
-
top: 0;
|
235 |
-
left: 0;
|
236 |
-
width: 100%;
|
237 |
-
height: 30px;
|
238 |
-
border-bottom: 1px solid #d4d4d4;
|
239 |
-
background: #e6e6e6;
|
240 |
-
}
|
241 |
-
|
242 |
-
.obfx-close-modal {
|
243 |
-
float: right;
|
244 |
-
position: absolute;
|
245 |
-
top: 5px;
|
246 |
-
right: 5px;
|
247 |
-
color: #7b7b7b;
|
248 |
-
cursor: pointer;
|
249 |
-
}
|
250 |
-
|
251 |
-
.obfx-template-preview.theme-install-overlay .install-theme-info.obfx-theme-info .theme-screenshot {
|
252 |
-
width: 100%;
|
253 |
-
margin: 0;
|
254 |
-
}
|
255 |
-
|
256 |
-
.obfx-template-preview.theme-install-overlay .install-theme-info.obfx-theme-info {
|
257 |
-
display: none;
|
258 |
-
}
|
259 |
-
|
260 |
-
.obfx-template-preview.theme-install-overlay .install-theme-info.obfx-theme-info.active {
|
261 |
-
display: block;
|
262 |
-
}
|
263 |
-
|
264 |
-
.more-details.obfx-preview-template {
|
265 |
-
position: absolute;
|
266 |
-
z-index: 100;
|
267 |
-
top: 0;
|
268 |
-
right: 0;
|
269 |
-
bottom: 51px;
|
270 |
-
left: 0;
|
271 |
-
opacity: 0;
|
272 |
-
text-align: center;
|
273 |
-
cursor: pointer;
|
274 |
-
-webkit-transition: 0.3s ease;
|
275 |
-
transition: 0.3s ease;
|
276 |
-
}
|
277 |
-
|
278 |
-
.more-details.obfx-preview-template span {
|
279 |
-
display: block;
|
280 |
-
position: relative;
|
281 |
-
top: 50%;
|
282 |
-
left: 50%;
|
283 |
-
width: 45%;
|
284 |
-
padding: 15px 12px;
|
285 |
-
border-radius: 3px;
|
286 |
-
color: #fff;
|
287 |
-
background: #23282d;
|
288 |
-
background: rgba(0,0,0,0.7);
|
289 |
-
text-shadow: 0 1px 0 rgba(0,0,0,0.6);
|
290 |
-
font-size: 15px;
|
291 |
-
font-weight: 600;
|
292 |
-
-webkit-font-smoothing: antialiased;
|
293 |
-
text-align: center;
|
294 |
-
-webkit-transform: translate(-50%, -50%);
|
295 |
-
-ms-transform: translate(-50%, -50%);
|
296 |
-
transform: translate(-50%, -50%);
|
297 |
-
}
|
298 |
-
|
299 |
-
.obfx-required-plugins > p {
|
300 |
-
margin-top: 20px;
|
301 |
-
color: #333;
|
302 |
-
font-weight: 800;
|
303 |
-
}
|
304 |
-
|
305 |
-
.obfx-required-plugins .button {
|
306 |
-
display: none;
|
307 |
-
}
|
308 |
-
|
309 |
-
#obfx-template-dir-fetch-templates {
|
310 |
-
display: block;
|
311 |
-
margin: 0 auto;
|
312 |
-
}
|
313 |
-
#obfx-template-dir-fetch-templates .dashicons {
|
314 |
-
margin: 3px 5px 0 -2px;
|
315 |
-
}
|
316 |
-
|
317 |
-
@media only screen and (max-width: 2000px) {
|
318 |
-
.obfx-template-browser {
|
319 |
-
grid-template-columns: 1fr 1fr 1fr 1fr;
|
320 |
-
}
|
321 |
-
}
|
322 |
-
|
323 |
-
@media only screen and (max-width: 1450px) {
|
324 |
-
.obfx-template-browser {
|
325 |
-
grid-template-columns: 1fr 1fr 1fr;
|
326 |
-
}
|
327 |
-
}
|
328 |
-
|
329 |
-
@media only screen and (max-width: 1000px) {
|
330 |
-
.obfx-template-browser {
|
331 |
-
grid-template-columns: 1fr 1fr;
|
332 |
-
}
|
333 |
-
}
|
334 |
-
|
335 |
-
@media only screen and (max-width: 600px) {
|
336 |
-
.obfx-template-preview .wp-full-overlay-sidebar {
|
337 |
-
width: 100%;
|
338 |
-
}
|
339 |
-
.obfx-template-browser {
|
340 |
-
grid-template-columns: 1fr;
|
341 |
-
}
|
342 |
-
}
|
343 |
-
|
344 |
-
@media only screen and (min-width: 2000px) {
|
345 |
-
.obfx-template-browser {
|
346 |
-
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
347 |
-
}
|
348 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/templates-directory/js/script.js
DELETED
@@ -1,254 +0,0 @@
|
|
1 |
-
/* global importer_endpoint, console */
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Template Directory Customizer Admin Dashboard Script
|
5 |
-
*
|
6 |
-
* This handles the template directory.
|
7 |
-
*
|
8 |
-
* @since 1.0.0
|
9 |
-
* @package obfx_modules/template-directory/js
|
10 |
-
*
|
11 |
-
* @author ThemeIsle
|
12 |
-
*/
|
13 |
-
|
14 |
-
var obfx_template_directory = function ( $ ) {
|
15 |
-
'use strict';
|
16 |
-
|
17 |
-
$(
|
18 |
-
function () {
|
19 |
-
|
20 |
-
// Handle import click.
|
21 |
-
$( '.wp-full-overlay-header' ).on(
|
22 |
-
'click', '.obfx-import-template', function () {
|
23 |
-
$( this ).addClass( 'obfx-import-queue updating-message obfx-updating' ).html( '' );
|
24 |
-
$( '.obfx-template-preview .close-full-overlay, .obfx-next-prev' ).remove();
|
25 |
-
var template_url = $( this ).data( 'template-file' );
|
26 |
-
var template_name = $( this ).data( 'template-title' );
|
27 |
-
if ( $( '.active .obfx-installable' ).length || $( '.active .obfx-activate' ).length ) {
|
28 |
-
checkAndInstallPlugins();
|
29 |
-
} else {
|
30 |
-
$.ajax(
|
31 |
-
{
|
32 |
-
url: importer_endpoint.url,
|
33 |
-
beforeSend: function ( xhr ) {
|
34 |
-
$( '.obfx-import-queue' ).addClass( 'obfx-updating' ).html( '' );
|
35 |
-
xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
|
36 |
-
},
|
37 |
-
data: {
|
38 |
-
template_url: template_url,
|
39 |
-
template_name: template_name
|
40 |
-
},
|
41 |
-
type: 'POST',
|
42 |
-
success: function ( data ) {
|
43 |
-
$( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
|
44 |
-
location.href = data;
|
45 |
-
},
|
46 |
-
error: function ( error ) {
|
47 |
-
console.error( error );
|
48 |
-
},
|
49 |
-
complete: function () {
|
50 |
-
$( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
|
51 |
-
}
|
52 |
-
}, 'json'
|
53 |
-
);
|
54 |
-
}
|
55 |
-
}
|
56 |
-
);
|
57 |
-
|
58 |
-
$( '#obfx-template-dir-fetch-templates' ).on( 'click', function ( e ) {
|
59 |
-
e.preventDefault();
|
60 |
-
$.ajax(
|
61 |
-
{
|
62 |
-
url: importer_endpoint.fetch_templates_url,
|
63 |
-
beforeSend: function ( xhr ) {
|
64 |
-
$( '#obfx-template-dir-fetch-templates .dashicons' ).hide();
|
65 |
-
$( '#obfx-template-dir-fetch-templates' ).addClass( 'updating-message' );
|
66 |
-
xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
|
67 |
-
},
|
68 |
-
data: {
|
69 |
-
plugin_slug: importer_endpoint.plugin_slug,
|
70 |
-
},
|
71 |
-
type: 'POST',
|
72 |
-
success: function () {
|
73 |
-
$( '#obfx-template-dir-fetch-templates' ).removeClass( 'updating-message' ).attr('disabled', 'true').empty().html('<i class="dashicons-yes dashicons" style="margin-right:0"></i>');
|
74 |
-
location.reload();
|
75 |
-
},
|
76 |
-
error: function( error ) {
|
77 |
-
console.log(error);
|
78 |
-
}
|
79 |
-
}, 'json'
|
80 |
-
);
|
81 |
-
} );
|
82 |
-
|
83 |
-
function checkAndInstallPlugins() {
|
84 |
-
var installable = $( '.active .obfx-installable' );
|
85 |
-
var toActivate = $( '.active .obfx-activate' );
|
86 |
-
if ( installable.length || toActivate.length ) {
|
87 |
-
|
88 |
-
$( installable ).each(
|
89 |
-
function () {
|
90 |
-
var plugin = $( this );
|
91 |
-
$( plugin ).removeClass( 'obfx-installable' ).addClass( 'obfx-installing' );
|
92 |
-
$( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
|
93 |
-
var slug = $( this ).find( '.obfx-install-plugin' ).attr( 'data-slug' );
|
94 |
-
wp.updates.installPlugin(
|
95 |
-
{
|
96 |
-
slug: slug,
|
97 |
-
success: function ( response ) {
|
98 |
-
activatePlugin( response.activateUrl, plugin );
|
99 |
-
}
|
100 |
-
}
|
101 |
-
);
|
102 |
-
}
|
103 |
-
);
|
104 |
-
|
105 |
-
$( toActivate ).each(
|
106 |
-
function () {
|
107 |
-
var plugin = $( this );
|
108 |
-
var activateUrl = $( plugin ).find( '.activate-now' ).attr( 'href' );
|
109 |
-
if ( typeof activateUrl !== 'undefined' ) {
|
110 |
-
activatePlugin( activateUrl, plugin );
|
111 |
-
}
|
112 |
-
}
|
113 |
-
);
|
114 |
-
}
|
115 |
-
}
|
116 |
-
|
117 |
-
function activatePlugin( activationUrl, plugin ) {
|
118 |
-
$.ajax(
|
119 |
-
{
|
120 |
-
type: 'GET',
|
121 |
-
url: activationUrl,
|
122 |
-
beforeSend: function () {
|
123 |
-
$( plugin ).removeClass( 'obfx-activate' ).addClass( 'obfx-installing' );
|
124 |
-
$( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
|
125 |
-
},
|
126 |
-
success: function () {
|
127 |
-
$( plugin ).find( '.dashicons' ).replaceWith( '<span class="dashicons dashicons-yes" style="color: #34a85e"></span>' );
|
128 |
-
$( plugin ).removeClass( 'obfx-installing' );
|
129 |
-
},
|
130 |
-
complete: function () {
|
131 |
-
if ( $( '.active .obfx-installing' ).length === 0 ) {
|
132 |
-
$( '.obfx-import-queue' ).trigger( 'click' );
|
133 |
-
}
|
134 |
-
}
|
135 |
-
}
|
136 |
-
);
|
137 |
-
}
|
138 |
-
|
139 |
-
// Handle sidebar collapse in preview.
|
140 |
-
$( '.obfx-template-preview' ).on(
|
141 |
-
'click', '.collapse-sidebar', function (event) {
|
142 |
-
event.preventDefault();
|
143 |
-
var overlay = $( '.obfx-template-preview' );
|
144 |
-
if ( overlay.hasClass( 'expanded' ) ) {
|
145 |
-
overlay.removeClass( 'expanded' );
|
146 |
-
overlay.addClass( 'collapsed' );
|
147 |
-
return false;
|
148 |
-
}
|
149 |
-
|
150 |
-
if ( overlay.hasClass( 'collapsed' ) ) {
|
151 |
-
overlay.removeClass( 'collapsed' );
|
152 |
-
overlay.addClass( 'expanded' );
|
153 |
-
return false;
|
154 |
-
}
|
155 |
-
}
|
156 |
-
);
|
157 |
-
|
158 |
-
// Handle responsive buttons.
|
159 |
-
$( '.obfx-responsive-preview' ).on(
|
160 |
-
'click', 'button', function () {
|
161 |
-
$( '.obfx-template-preview' ).removeClass( 'preview-mobile preview-tablet preview-desktop' );
|
162 |
-
var deviceClass = 'preview-' + $( this ).data( 'device' );
|
163 |
-
$( '.obfx-responsive-preview button' ).each(
|
164 |
-
function () {
|
165 |
-
$( this ).attr( 'aria-pressed', 'false' );
|
166 |
-
$( this ).removeClass( 'active' );
|
167 |
-
}
|
168 |
-
);
|
169 |
-
|
170 |
-
$( '.obfx-responsive-preview' ).removeClass( $( this ).attr( 'class' ).split( ' ' ).pop() );
|
171 |
-
$( '.obfx-template-preview' ).addClass( deviceClass );
|
172 |
-
$( this ).addClass( 'active' );
|
173 |
-
}
|
174 |
-
);
|
175 |
-
|
176 |
-
// Hide preview.
|
177 |
-
$( '.close-full-overlay' ).on(
|
178 |
-
'click', function () {
|
179 |
-
$( '.obfx-template-preview .obfx-theme-info.active' ).removeClass( 'active' );
|
180 |
-
$( '.obfx-template-preview' ).hide();
|
181 |
-
$( '.obfx-template-frame' ).attr( 'src', '' );
|
182 |
-
}
|
183 |
-
);
|
184 |
-
|
185 |
-
// Open preview routine.
|
186 |
-
$( '.obfx-preview-template' ).on(
|
187 |
-
'click', function () {
|
188 |
-
var templateSlug = $( this ).data( 'template-slug' );
|
189 |
-
var previewUrl = $( this ).data( 'demo-url' );
|
190 |
-
$( '.obfx-template-frame' ).attr( 'src', previewUrl );
|
191 |
-
$( '.obfx-theme-info.' + templateSlug ).addClass( 'active' );
|
192 |
-
setupImportButton();
|
193 |
-
$( '.obfx-template-preview' ).fadeIn();
|
194 |
-
}
|
195 |
-
);
|
196 |
-
|
197 |
-
// Handle left-right navigation between templates.
|
198 |
-
$( '.obfx-next-prev .next-theme' ).on(
|
199 |
-
'click', function () {
|
200 |
-
var active = $( '.obfx-theme-info.active' ).removeClass( 'active' );
|
201 |
-
if ( active.next() && active.next().length ) {
|
202 |
-
active.next().addClass( 'active' );
|
203 |
-
} else {
|
204 |
-
active.siblings( ':first' ).addClass( 'active' );
|
205 |
-
}
|
206 |
-
changePreviewSource();
|
207 |
-
setupImportButton();
|
208 |
-
}
|
209 |
-
);
|
210 |
-
$( '.obfx-next-prev .previous-theme' ).on(
|
211 |
-
'click', function () {
|
212 |
-
var active = $( '.obfx-theme-info.active' ).removeClass( 'active' );
|
213 |
-
if ( active.prev() && active.prev().length ) {
|
214 |
-
active.prev().addClass( 'active' );
|
215 |
-
} else {
|
216 |
-
active.siblings( ':last' ).addClass( 'active' );
|
217 |
-
}
|
218 |
-
changePreviewSource();
|
219 |
-
setupImportButton();
|
220 |
-
}
|
221 |
-
);
|
222 |
-
|
223 |
-
// Change preview source.
|
224 |
-
function changePreviewSource() {
|
225 |
-
var previewUrl = $( '.obfx-theme-info.active' ).data( 'demo-url' );
|
226 |
-
$( '.obfx-template-frame' ).attr( 'src', previewUrl );
|
227 |
-
}
|
228 |
-
|
229 |
-
function setupImportButton() {
|
230 |
-
var button = $( '.wp-full-overlay-header .obfx-import-template' );
|
231 |
-
var dataUpsell = $( '.active' ).data( 'upsell' );
|
232 |
-
var upsellButton = $( '.obfx-upsell-button' );
|
233 |
-
if ( dataUpsell === 'yes' ) {
|
234 |
-
$( button ).hide();
|
235 |
-
$( upsellButton ).show();
|
236 |
-
return false;
|
237 |
-
}
|
238 |
-
$( button ).show();
|
239 |
-
$( upsellButton ).hide();
|
240 |
-
var installable = $( '.active .obfx-installable' );
|
241 |
-
if ( installable.length > 0 ) {
|
242 |
-
$( '.wp-full-overlay-header .obfx-import-template' ).text( 'Install and Import' );
|
243 |
-
} else {
|
244 |
-
$( '.wp-full-overlay-header .obfx-import-template' ).text( 'Import' );
|
245 |
-
}
|
246 |
-
var activeTheme = $( '.obfx-theme-info.active' );
|
247 |
-
$( button ).attr( 'data-template-file', $( activeTheme ).data( 'template-file' ) );
|
248 |
-
$( button ).attr( 'data-template-title', $( activeTheme ).data( 'template-title' ) );
|
249 |
-
}
|
250 |
-
}
|
251 |
-
);
|
252 |
-
};
|
253 |
-
|
254 |
-
obfx_template_directory( jQuery );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/templates-directory/load.php
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Loader for the ThemeIsle\PageTemplatesDirectory
|
4 |
-
*
|
5 |
-
* @package ThemeIsle\PageTemplatesDirectory
|
6 |
-
* @copyright Copyright (c) 2017, Andrei Lupu
|
7 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
8 |
-
* @since 1.0.0
|
9 |
-
*/
|
10 |
-
|
11 |
-
require_once( dirname( __FILE__ ) . '/class-page-templates-directory.php' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php
DELETED
@@ -1,153 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The View for Rendering the Template Directory Main Dashboard Page.
|
4 |
-
*
|
5 |
-
* @link https://themeisle.com
|
6 |
-
* @since 2.0.0
|
7 |
-
*
|
8 |
-
* @package ThemeIsle
|
9 |
-
* @subpackage ThemeIsle/PageTemplatesDirectory
|
10 |
-
* @codeCoverageIgnore
|
11 |
-
*/
|
12 |
-
|
13 |
-
$preview_url = add_query_arg( 'obfx_templates', '', home_url() ); // Define query arg for custom endpoint.
|
14 |
-
|
15 |
-
$html = '';
|
16 |
-
|
17 |
-
if ( is_array( $templates_array ) ) { ?>
|
18 |
-
<div class="obfx-template-dir wrap">
|
19 |
-
|
20 |
-
<h2 class="wp-heading-inline"> <?php echo apply_filters( 'obfx_template_dir_page_title', __( 'Orbit Fox Template Directory', 'themeisle-companion' ) ); ?></h2>
|
21 |
-
<button id="obfx-template-dir-fetch-templates" class="button-primary button"><i class="dashicons dashicons-update"></i><?php echo __( 'Sync Templates', 'themeisle-companion' ); ?></button>
|
22 |
-
<div class="obfx-template-browser">
|
23 |
-
<?php
|
24 |
-
foreach ( $templates_array as $template => $properties ) {
|
25 |
-
?>
|
26 |
-
<div class="obfx-template">
|
27 |
-
<?php if ( isset( $properties['has_badge'] ) ) { ?>
|
28 |
-
<span class="badge"><?php echo esc_html( $properties['has_badge'] ); ?></span>
|
29 |
-
<?php } ?>
|
30 |
-
<div class="more-details obfx-preview-template"
|
31 |
-
data-demo-url="<?php echo esc_url( $properties['demo_url'] ); ?>"
|
32 |
-
data-template-slug="<?php echo esc_attr( $template ); ?>">
|
33 |
-
<span><?php echo __( 'More Details', 'themeisle-companion' ); ?></span></div>
|
34 |
-
<div class="obfx-template-screenshot">
|
35 |
-
<img src="<?php echo esc_url( $properties['screenshot'] ); ?>"
|
36 |
-
alt="<?php echo esc_html( $properties['title'] ); ?>">
|
37 |
-
</div>
|
38 |
-
<h2 class="template-name template-header"><?php echo esc_html( $properties['title'] ); ?></h2>
|
39 |
-
<div class="obfx-template-actions">
|
40 |
-
|
41 |
-
<?php if ( ! empty( $properties['demo_url'] ) ) { ?>
|
42 |
-
<a class="button obfx-preview-template"
|
43 |
-
data-demo-url="<?php echo esc_url( $properties['demo_url'] ); ?>"
|
44 |
-
data-template-slug="<?php echo esc_attr( $template ); ?>"><?php echo __( 'Preview', 'themeisle-companion' ); ?></a>
|
45 |
-
<?php } ?>
|
46 |
-
</div>
|
47 |
-
</div>
|
48 |
-
<?php } ?>
|
49 |
-
</div>
|
50 |
-
</div>
|
51 |
-
<div class="wp-clearfix clearfix"></div>
|
52 |
-
<?php } // End if().
|
53 |
-
?>
|
54 |
-
|
55 |
-
<div class="obfx-template-preview theme-install-overlay wp-full-overlay expanded" style="display: none;">
|
56 |
-
<div class="wp-full-overlay-sidebar">
|
57 |
-
<div class="wp-full-overlay-header">
|
58 |
-
<button class="close-full-overlay"><span
|
59 |
-
class="screen-reader-text"><?php esc_html_e( 'Close', 'themeisle-companion' ); ?></span></button>
|
60 |
-
<div class="obfx-next-prev">
|
61 |
-
<button class="previous-theme"><span
|
62 |
-
class="screen-reader-text"><?php esc_html_e( 'Previous', 'themeisle-companion' ); ?></span></button>
|
63 |
-
<button class="next-theme"><span
|
64 |
-
class="screen-reader-text"><?php esc_html_e( 'Next', 'themeisle-companion' ); ?></span></button>
|
65 |
-
</div>
|
66 |
-
<span class="obfx-import-template button button-primary"><?php esc_html_e( 'Import', 'themeisle-companion' ); ?></span>
|
67 |
-
<a href="https://themeisle.com/plugins/sizzify-elementor-addons-templates" target="_blank"
|
68 |
-
class="obfx-upsell-button button button-primary"><?php esc_html_e( 'See Pro Version', 'themeisle-companion' ); ?></a>
|
69 |
-
|
70 |
-
</div>
|
71 |
-
<div class="wp-full-overlay-sidebar-content">
|
72 |
-
<?php
|
73 |
-
foreach ( $templates_array as $template => $properties ) {
|
74 |
-
$upsell = 'no';
|
75 |
-
if ( isset( $properties['has_badge'] ) && ! isset( $properties['import_file'] ) ) {
|
76 |
-
$upsell = 'yes';
|
77 |
-
$properties['import_file'] = '';
|
78 |
-
}
|
79 |
-
?>
|
80 |
-
<div class="install-theme-info obfx-theme-info <?php echo esc_attr( $template ); ?>"
|
81 |
-
data-demo-url="<?php echo esc_url( $properties['demo_url'] ); ?>"
|
82 |
-
<?php if( isset( $properties['import_file'] ) ) { ?>
|
83 |
-
data-template-file="<?php echo esc_url( $properties['import_file'] ); ?>"
|
84 |
-
<?php } ?>
|
85 |
-
data-template-title="<?php echo esc_html( $properties['title'] ); ?>"
|
86 |
-
data-upsell="<?php echo esc_attr( $upsell ) ?>">
|
87 |
-
<h3 class="theme-name"><?php echo esc_html( $properties['title'] ); ?></h3>
|
88 |
-
<div class="obfx-preview-wrap">
|
89 |
-
<img class="theme-screenshot" src="<?php echo esc_url( $properties['screenshot'] ); ?>"
|
90 |
-
alt="<?php echo esc_html( $properties['title'] ); ?>">
|
91 |
-
<?php if ( isset( $properties['has_badge'] ) ) { ?>
|
92 |
-
<span class="badge"> <?php echo esc_html( $properties['has_badge'] ); ?></span>
|
93 |
-
<?php } ?>
|
94 |
-
</div>
|
95 |
-
<div class="theme-details">
|
96 |
-
<?php echo esc_html( $properties['description'] ); ?>
|
97 |
-
</div>
|
98 |
-
<?php
|
99 |
-
if ( ! empty( $properties['required_plugins'] ) && is_array( $properties['required_plugins'] ) ) { ?>
|
100 |
-
<div class="obfx-required-plugins">
|
101 |
-
<p><?php esc_html_e( 'Required Plugins', 'themeisle-companion' ); ?></p>
|
102 |
-
<?php
|
103 |
-
foreach ( $properties['required_plugins'] as $plugin_slug => $details ) {
|
104 |
-
if ( $this->check_plugin_state( $plugin_slug ) === 'install' ) {
|
105 |
-
echo '<div class="obfx-installable plugin-card-' . esc_attr( $plugin_slug ) . '">';
|
106 |
-
echo '<span class="dashicons dashicons-no-alt"></span>';
|
107 |
-
echo $details['title'];
|
108 |
-
echo $this->get_button_html( $plugin_slug );
|
109 |
-
echo '</div>';
|
110 |
-
} elseif ( $this->check_plugin_state( $plugin_slug ) === 'activate' ) {
|
111 |
-
echo '<div class="obfx-activate plugin-card-' . esc_attr( $plugin_slug ) . '">';
|
112 |
-
echo '<span class="dashicons dashicons-admin-plugins" style="color: #ffb227;"></span>';
|
113 |
-
echo $details['title'];
|
114 |
-
echo $this->get_button_html( $plugin_slug );
|
115 |
-
echo '</div>';
|
116 |
-
} else {
|
117 |
-
echo '<div class="obfx-installed plugin-card-' . esc_attr( $plugin_slug ) . '">';
|
118 |
-
echo '<span class="dashicons dashicons-yes" style="color: #34a85e"></span>';
|
119 |
-
echo $details['title'];
|
120 |
-
echo '</div>';
|
121 |
-
}
|
122 |
-
} ?>
|
123 |
-
</div>
|
124 |
-
<?php } ?>
|
125 |
-
</div><!-- /.install-theme-info -->
|
126 |
-
<?php } ?>
|
127 |
-
</div>
|
128 |
-
|
129 |
-
<div class="wp-full-overlay-footer">
|
130 |
-
<button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="Collapse Sidebar">
|
131 |
-
<span class="collapse-sidebar-arrow"></span>
|
132 |
-
<span class="collapse-sidebar-label"><?php esc_html_e( 'Collapse', 'themeisle-companion' ); ?></span>
|
133 |
-
</button>
|
134 |
-
<div class="devices-wrapper">
|
135 |
-
<div class="devices obfx-responsive-preview">
|
136 |
-
<button type="button" class="preview-desktop active" aria-pressed="true" data-device="desktop">
|
137 |
-
<span class="screen-reader-text"><?php esc_html_e( 'Enter desktop preview mode', 'themeisle-companion' ); ?></span>
|
138 |
-
</button>
|
139 |
-
<button type="button" class="preview-tablet" aria-pressed="false" data-device="tablet">
|
140 |
-
<span class="screen-reader-text"><?php esc_html_e( 'Enter tablet preview mode', 'themeisle-companion' ); ?></span>
|
141 |
-
</button>
|
142 |
-
<button type="button" class="preview-mobile" aria-pressed="false" data-device="mobile">
|
143 |
-
<span class="screen-reader-text"><?php esc_html_e( 'Enter mobile preview mode', 'themeisle-companion' ); ?></span>
|
144 |
-
</button>
|
145 |
-
</div>
|
146 |
-
</div>
|
147 |
-
|
148 |
-
</div>
|
149 |
-
</div>
|
150 |
-
<div class="wp-full-overlay-main obfx-main-preview">
|
151 |
-
<iframe src="" title="Preview" class="obfx-template-frame"></iframe>
|
152 |
-
</div>
|
153 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/templates-directory/views/template-directory-render-template-tpl.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* The View for Rendering the Template Directory Main Dashboard Page.
|
4 |
-
*
|
5 |
-
* @link https://themeisle.com
|
6 |
-
* @since 2.0.0
|
7 |
-
*
|
8 |
-
* @package ThemeIsle
|
9 |
-
* @subpackage ThemeIsle/PageTemplatesDirectory
|
10 |
-
* @codeCoverageIgnore
|
11 |
-
*/
|
12 |
-
|
13 |
-
die();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/codeinwp/themeisle-sdk/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 3.2.22](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.21...v3.2.22) (2021-10-27)
|
2 |
|
3 |
Fix edge case when reset failed checks was not working properly
|
1 |
+
##### [Version 3.2.24](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.23...v3.2.24) (2022-02-09)
|
2 |
+
|
3 |
+
Fix edge case issue on dismiss
|
4 |
+
Avoid issues with open_basedir restrictions
|
5 |
+
|
6 |
+
##### [Version 3.2.23](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.22...v3.2.23) (2022-02-02)
|
7 |
+
|
8 |
+
Fix php 8.1 issues
|
9 |
+
Fix edge case when update_themes site transient was empty and a fatal error was thrown
|
10 |
+
|
11 |
##### [Version 3.2.22](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.21...v3.2.22) (2021-10-27)
|
12 |
|
13 |
Fix edge case when reset failed checks was not working properly
|
vendor/codeinwp/themeisle-sdk/load.php
CHANGED
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
return;
|
15 |
}
|
16 |
// Current SDK version and path.
|
17 |
-
$themeisle_sdk_version = '3.2.
|
18 |
$themeisle_sdk_path = dirname( __FILE__ );
|
19 |
|
20 |
global $themeisle_sdk_max_version;
|
@@ -24,16 +24,17 @@ global $themeisle_sdk_max_path;
|
|
24 |
$themeisle_sdk_relative_licenser_path = '/src/Modules/Licenser.php';
|
25 |
|
26 |
global $themeisle_sdk_abs_licenser_path;
|
27 |
-
if ( ! is_file( $themeisle_sdk_path . $themeisle_sdk_relative_licenser_path ) && is_file( $themeisle_sdk_max_path . $themeisle_sdk_relative_licenser_path ) ) {
|
28 |
$themeisle_sdk_abs_licenser_path = $themeisle_sdk_max_path . $themeisle_sdk_relative_licenser_path;
|
29 |
add_filter( 'themeisle_sdk_required_files', 'themeisle_sdk_load_licenser_if_present' );
|
30 |
}
|
31 |
-
|
|
|
32 |
apply_filters( 'themeisle_sdk_should_overwrite_path', false, $themeisle_sdk_path, $themeisle_sdk_max_path ) ) {
|
33 |
$themeisle_sdk_max_path = $themeisle_sdk_path;
|
34 |
}
|
35 |
|
36 |
-
if ( version_compare( $themeisle_sdk_version, $themeisle_sdk_max_version ) > 0 ) {
|
37 |
$themeisle_sdk_max_version = $themeisle_sdk_version;
|
38 |
$themeisle_sdk_max_path = $themeisle_sdk_path;
|
39 |
}
|
14 |
return;
|
15 |
}
|
16 |
// Current SDK version and path.
|
17 |
+
$themeisle_sdk_version = '3.2.24';
|
18 |
$themeisle_sdk_path = dirname( __FILE__ );
|
19 |
|
20 |
global $themeisle_sdk_max_version;
|
24 |
$themeisle_sdk_relative_licenser_path = '/src/Modules/Licenser.php';
|
25 |
|
26 |
global $themeisle_sdk_abs_licenser_path;
|
27 |
+
if ( ! is_file( $themeisle_sdk_path . $themeisle_sdk_relative_licenser_path ) && ! empty( $themeisle_sdk_max_path ) && is_file( $themeisle_sdk_max_path . $themeisle_sdk_relative_licenser_path ) ) {
|
28 |
$themeisle_sdk_abs_licenser_path = $themeisle_sdk_max_path . $themeisle_sdk_relative_licenser_path;
|
29 |
add_filter( 'themeisle_sdk_required_files', 'themeisle_sdk_load_licenser_if_present' );
|
30 |
}
|
31 |
+
|
32 |
+
if ( ( is_null( $themeisle_sdk_max_path ) || version_compare( $themeisle_sdk_version, $themeisle_sdk_max_path ) == 0 ) &&
|
33 |
apply_filters( 'themeisle_sdk_should_overwrite_path', false, $themeisle_sdk_path, $themeisle_sdk_max_path ) ) {
|
34 |
$themeisle_sdk_max_path = $themeisle_sdk_path;
|
35 |
}
|
36 |
|
37 |
+
if ( is_null( $themeisle_sdk_max_version ) || version_compare( $themeisle_sdk_version, $themeisle_sdk_max_version ) > 0 ) {
|
38 |
$themeisle_sdk_max_version = $themeisle_sdk_version;
|
39 |
$themeisle_sdk_max_path = $themeisle_sdk_path;
|
40 |
}
|
vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php
CHANGED
@@ -629,10 +629,19 @@ class Licenser extends Abstract_Module {
|
|
629 |
*/
|
630 |
public function theme_update_transient( $value ) {
|
631 |
$update_data = $this->check_for_update();
|
632 |
-
if ( $
|
633 |
-
$value
|
634 |
}
|
635 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
636 |
return $value;
|
637 |
}
|
638 |
|
629 |
*/
|
630 |
public function theme_update_transient( $value ) {
|
631 |
$update_data = $this->check_for_update();
|
632 |
+
if ( empty( $value ) ) {
|
633 |
+
return $value;
|
634 |
}
|
635 |
|
636 |
+
if ( ! isset( $value->response ) ) {
|
637 |
+
return $value;
|
638 |
+
}
|
639 |
+
|
640 |
+
if ( ! $update_data ) {
|
641 |
+
return $value;
|
642 |
+
}
|
643 |
+
|
644 |
+
$value->response[ $this->product->get_slug() ] = $update_data;
|
645 |
return $value;
|
646 |
}
|
647 |
|
vendor/codeinwp/themeisle-sdk/src/Modules/Notification.php
CHANGED
@@ -269,8 +269,9 @@ class Notification extends Abstract_Module {
|
|
269 |
],
|
270 |
];
|
271 |
$notification_details = wp_parse_args( $notification_details, $default );
|
272 |
-
|
273 |
-
$
|
|
|
274 |
|
275 |
if ( ! empty( $notification_details['heading'] ) ) {
|
276 |
$notification_html .= sprintf( '<h4>%s</h4>', wp_kses_post( $notification_details['heading'] ) );
|
@@ -343,16 +344,18 @@ class Notification extends Abstract_Module {
|
|
343 |
'nonce': '<?php echo esc_attr( wp_create_nonce( (string) __CLASS__ ) ); ?>',
|
344 |
'action': 'themeisle_sdk_dismiss_notice',
|
345 |
'id': notification_id,
|
346 |
-
'confirm': confirm
|
347 |
-
}
|
348 |
-
)
|
|
|
|
|
349 |
if (confirm === 'yes') {
|
350 |
$(this).trigger('themeisle-sdk:confirmed');
|
351 |
} else {
|
352 |
$(this).trigger('themeisle-sdk:canceled');
|
353 |
}
|
354 |
container.hide();
|
355 |
-
if (link.attr('href') === '#') {
|
356 |
return false;
|
357 |
}
|
358 |
});
|
@@ -383,6 +386,31 @@ class Notification extends Abstract_Module {
|
|
383 |
do_action( $id . '_process_confirm', $confirm );
|
384 |
wp_send_json( [] );
|
385 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
386 |
|
387 |
/**
|
388 |
* Check if we should load the notification module.
|
@@ -456,6 +484,7 @@ class Notification extends Abstract_Module {
|
|
456 |
self::$notifications = $notifications;
|
457 |
add_action( 'admin_notices', array( __CLASS__, 'show_notification' ) );
|
458 |
add_action( 'wp_ajax_themeisle_sdk_dismiss_notice', array( __CLASS__, 'dismiss' ) );
|
|
|
459 |
add_action( 'admin_head', array( __CLASS__, 'setup_notifications' ) );
|
460 |
|
461 |
return $this;
|
269 |
],
|
270 |
];
|
271 |
$notification_details = wp_parse_args( $notification_details, $default );
|
272 |
+
global $pagenow;
|
273 |
+
$notification_details['ctas']['cancel']['link'] = wp_nonce_url( add_query_arg( [ 'nid' => $notification_details['id'] ], admin_url( $pagenow ) ), $notification_details['id'], 'tsdk_dismiss_nonce' );
|
274 |
+
$notification_html = '<div class="notice notice-success is-dismissible themeisle-sdk-notice" data-notification-id="' . esc_attr( $notification_details['id'] ) . '" id="' . esc_attr( $notification_details['id'] ) . '-notification"> <div class="themeisle-sdk-notification-box">';
|
275 |
|
276 |
if ( ! empty( $notification_details['heading'] ) ) {
|
277 |
$notification_html .= sprintf( '<h4>%s</h4>', wp_kses_post( $notification_details['heading'] ) );
|
344 |
'nonce': '<?php echo esc_attr( wp_create_nonce( (string) __CLASS__ ) ); ?>',
|
345 |
'action': 'themeisle_sdk_dismiss_notice',
|
346 |
'id': notification_id,
|
347 |
+
'confirm': confirm,
|
348 |
+
},
|
349 |
+
).fail(function() {
|
350 |
+
location.href = encodeURI(link.attr('href'));
|
351 |
+
});
|
352 |
if (confirm === 'yes') {
|
353 |
$(this).trigger('themeisle-sdk:confirmed');
|
354 |
} else {
|
355 |
$(this).trigger('themeisle-sdk:canceled');
|
356 |
}
|
357 |
container.hide();
|
358 |
+
if (confirm === 'no' || link.attr('href') === '#') {
|
359 |
return false;
|
360 |
}
|
361 |
});
|
386 |
do_action( $id . '_process_confirm', $confirm );
|
387 |
wp_send_json( [] );
|
388 |
}
|
389 |
+
/**
|
390 |
+
* Dismiss the notification.
|
391 |
+
*/
|
392 |
+
public static function dismiss_get() {
|
393 |
+
$is_nonce_dismiss = sanitize_text_field( isset( $_GET['tsdk_dismiss_nonce'] ) ? $_GET['tsdk_dismiss_nonce'] : '' );
|
394 |
+
if ( strlen( $is_nonce_dismiss ) < 5 ) {
|
395 |
+
return;
|
396 |
+
}
|
397 |
+
$id = sanitize_text_field( isset( $_GET['nid'] ) ? $_GET['nid'] : '' );
|
398 |
+
if ( empty( $id ) ) {
|
399 |
+
return;
|
400 |
+
}
|
401 |
+
$nonce = wp_verify_nonce( sanitize_text_field( $_GET['tsdk_dismiss_nonce'] ), $id );
|
402 |
+
if ( $nonce !== 1 ) {
|
403 |
+
return;
|
404 |
+
}
|
405 |
+
$ids = wp_list_pluck( self::$notifications, 'id' );
|
406 |
+
if ( ! in_array( $id, $ids, true ) ) {
|
407 |
+
return;
|
408 |
+
}
|
409 |
+
$confirm = 'no';
|
410 |
+
self::set_last_active_notification_timestamp();
|
411 |
+
update_option( $id, $confirm );
|
412 |
+
do_action( $id . '_process_confirm', $confirm );
|
413 |
+
}
|
414 |
|
415 |
/**
|
416 |
* Check if we should load the notification module.
|
484 |
self::$notifications = $notifications;
|
485 |
add_action( 'admin_notices', array( __CLASS__, 'show_notification' ) );
|
486 |
add_action( 'wp_ajax_themeisle_sdk_dismiss_notice', array( __CLASS__, 'dismiss' ) );
|
487 |
+
add_action( 'admin_head', array( __CLASS__, 'dismiss_get' ) );
|
488 |
add_action( 'admin_head', array( __CLASS__, 'setup_notifications' ) );
|
489 |
|
490 |
return $this;
|
vendor/composer/ClassLoader.php
CHANGED
@@ -149,7 +149,7 @@ class ClassLoader
|
|
149 |
|
150 |
/**
|
151 |
* @return string[] Array of classname => path
|
152 |
-
* @psalm-
|
153 |
*/
|
154 |
public function getClassMap()
|
155 |
{
|
149 |
|
150 |
/**
|
151 |
* @return string[] Array of classname => path
|
152 |
+
* @psalm-return array<string, string>
|
153 |
*/
|
154 |
public function getClassMap()
|
155 |
{
|
vendor/composer/autoload_files.php
CHANGED
@@ -10,9 +10,8 @@ return array(
|
|
10 |
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
11 |
'9c67151ae59aff4788964ce8eb2a0f43' => $vendorDir . '/clue/stream-filter/src/functions_include.php',
|
12 |
'8cff32064859f4559445b89279f3199c' => $vendorDir . '/php-http/message/src/filters.php',
|
13 |
-
'62bc7c35996f19a64625f7ff3ba2fb5e' => $vendorDir . '/codeinwp/full-width-page-templates/load.php',
|
14 |
'2e85745cdd367ff6e5579a8598f422b9' => $vendorDir . '/codeinwp/elementor-extra-widgets/load.php',
|
15 |
-
'
|
16 |
'7b1f4385ddfc86d120fe4380e8cb0fa6' => $vendorDir . '/codeinwp/themeisle-content-forms/load.php',
|
17 |
'4577ab960be90dedc8f8512147cf356d' => $vendorDir . '/codeinwp/themeisle-sdk/load.php',
|
18 |
'e5ea328e2edc5283d7a9134fc492f138' => $vendorDir . '/codeinwp/themeisle-content-forms/load.php',
|
10 |
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
|
11 |
'9c67151ae59aff4788964ce8eb2a0f43' => $vendorDir . '/clue/stream-filter/src/functions_include.php',
|
12 |
'8cff32064859f4559445b89279f3199c' => $vendorDir . '/php-http/message/src/filters.php',
|
|
|
13 |
'2e85745cdd367ff6e5579a8598f422b9' => $vendorDir . '/codeinwp/elementor-extra-widgets/load.php',
|
14 |
+
'62bc7c35996f19a64625f7ff3ba2fb5e' => $vendorDir . '/codeinwp/full-width-page-templates/load.php',
|
15 |
'7b1f4385ddfc86d120fe4380e8cb0fa6' => $vendorDir . '/codeinwp/themeisle-content-forms/load.php',
|
16 |
'4577ab960be90dedc8f8512147cf356d' => $vendorDir . '/codeinwp/themeisle-sdk/load.php',
|
17 |
'e5ea328e2edc5283d7a9134fc492f138' => $vendorDir . '/codeinwp/themeisle-content-forms/load.php',
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit0ca054ba5e51ac97ee5f7d3576f02f28
|
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
-
spl_autoload_register(array('
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
-
spl_autoload_unregister(array('
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
-
call_user_func(\Composer\Autoload\
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
@@ -53,23 +53,28 @@ class ComposerAutoloaderInit0ca054ba5e51ac97ee5f7d3576f02f28
|
|
53 |
$loader->register(true);
|
54 |
|
55 |
if ($useStaticLoader) {
|
56 |
-
$includeFiles = Composer\Autoload\
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
-
|
62 |
}
|
63 |
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
-
|
|
|
|
|
|
|
|
|
|
|
69 |
{
|
70 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
71 |
-
require $file;
|
72 |
-
|
73 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
|
|
|
|
74 |
}
|
75 |
}
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit1401fee286570c50a77b21979a87318c
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
24 |
|
25 |
require __DIR__ . '/platform_check.php';
|
26 |
|
27 |
+
spl_autoload_register(array('ComposerAutoloaderInit1401fee286570c50a77b21979a87318c', 'loadClassLoader'), true, true);
|
28 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
29 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit1401fee286570c50a77b21979a87318c', 'loadClassLoader'));
|
30 |
|
31 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
32 |
if ($useStaticLoader) {
|
33 |
require __DIR__ . '/autoload_static.php';
|
34 |
|
35 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit1401fee286570c50a77b21979a87318c::getInitializer($loader));
|
36 |
} else {
|
37 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
38 |
foreach ($map as $namespace => $path) {
|
53 |
$loader->register(true);
|
54 |
|
55 |
if ($useStaticLoader) {
|
56 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit1401fee286570c50a77b21979a87318c::$files;
|
57 |
} else {
|
58 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
59 |
}
|
60 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
61 |
+
composerRequire1401fee286570c50a77b21979a87318c($fileIdentifier, $file);
|
62 |
}
|
63 |
|
64 |
return $loader;
|
65 |
}
|
66 |
}
|
67 |
|
68 |
+
/**
|
69 |
+
* @param string $fileIdentifier
|
70 |
+
* @param string $file
|
71 |
+
* @return void
|
72 |
+
*/
|
73 |
+
function composerRequire1401fee286570c50a77b21979a87318c($fileIdentifier, $file)
|
74 |
{
|
75 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
|
|
|
|
76 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
77 |
+
|
78 |
+
require $file;
|
79 |
}
|
80 |
}
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,16 +4,15 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
11 |
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
12 |
'9c67151ae59aff4788964ce8eb2a0f43' => __DIR__ . '/..' . '/clue/stream-filter/src/functions_include.php',
|
13 |
'8cff32064859f4559445b89279f3199c' => __DIR__ . '/..' . '/php-http/message/src/filters.php',
|
14 |
-
'62bc7c35996f19a64625f7ff3ba2fb5e' => __DIR__ . '/..' . '/codeinwp/full-width-page-templates/load.php',
|
15 |
'2e85745cdd367ff6e5579a8598f422b9' => __DIR__ . '/..' . '/codeinwp/elementor-extra-widgets/load.php',
|
16 |
-
'
|
17 |
'7b1f4385ddfc86d120fe4380e8cb0fa6' => __DIR__ . '/..' . '/codeinwp/themeisle-content-forms/load.php',
|
18 |
'4577ab960be90dedc8f8512147cf356d' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
19 |
'e5ea328e2edc5283d7a9134fc492f138' => __DIR__ . '/..' . '/codeinwp/themeisle-content-forms/load.php',
|
@@ -269,9 +268,9 @@ class ComposerStaticInit0ca054ba5e51ac97ee5f7d3576f02f28
|
|
269 |
public static function getInitializer(ClassLoader $loader)
|
270 |
{
|
271 |
return \Closure::bind(function () use ($loader) {
|
272 |
-
$loader->prefixLengthsPsr4 =
|
273 |
-
$loader->prefixDirsPsr4 =
|
274 |
-
$loader->classMap =
|
275 |
|
276 |
}, null, ClassLoader::class);
|
277 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit1401fee286570c50a77b21979a87318c
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
|
11 |
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
|
12 |
'9c67151ae59aff4788964ce8eb2a0f43' => __DIR__ . '/..' . '/clue/stream-filter/src/functions_include.php',
|
13 |
'8cff32064859f4559445b89279f3199c' => __DIR__ . '/..' . '/php-http/message/src/filters.php',
|
|
|
14 |
'2e85745cdd367ff6e5579a8598f422b9' => __DIR__ . '/..' . '/codeinwp/elementor-extra-widgets/load.php',
|
15 |
+
'62bc7c35996f19a64625f7ff3ba2fb5e' => __DIR__ . '/..' . '/codeinwp/full-width-page-templates/load.php',
|
16 |
'7b1f4385ddfc86d120fe4380e8cb0fa6' => __DIR__ . '/..' . '/codeinwp/themeisle-content-forms/load.php',
|
17 |
'4577ab960be90dedc8f8512147cf356d' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
18 |
'e5ea328e2edc5283d7a9134fc492f138' => __DIR__ . '/..' . '/codeinwp/themeisle-content-forms/load.php',
|
268 |
public static function getInitializer(ClassLoader $loader)
|
269 |
{
|
270 |
return \Closure::bind(function () use ($loader) {
|
271 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit1401fee286570c50a77b21979a87318c::$prefixLengthsPsr4;
|
272 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit1401fee286570c50a77b21979a87318c::$prefixDirsPsr4;
|
273 |
+
$loader->classMap = ComposerStaticInit1401fee286570c50a77b21979a87318c::$classMap;
|
274 |
|
275 |
}, null, ClassLoader::class);
|
276 |
}
|
vendor/composer/installed.json
CHANGED
@@ -25,12 +25,12 @@
|
|
25 |
"type": "library",
|
26 |
"installation-source": "dist",
|
27 |
"autoload": {
|
28 |
-
"psr-4": {
|
29 |
-
"Clue\\StreamFilter\\": "src/"
|
30 |
-
},
|
31 |
"files": [
|
32 |
"src/functions_include.php"
|
33 |
-
]
|
|
|
|
|
|
|
34 |
},
|
35 |
"notification-url": "https://packagist.org/downloads/",
|
36 |
"license": [
|
@@ -207,52 +207,6 @@
|
|
207 |
"abandoned": true,
|
208 |
"install-path": "../codeinwp/gutenberg-blocks"
|
209 |
},
|
210 |
-
{
|
211 |
-
"name": "codeinwp/templates-directory",
|
212 |
-
"version": "dev-master",
|
213 |
-
"version_normalized": "dev-master",
|
214 |
-
"source": {
|
215 |
-
"type": "git",
|
216 |
-
"url": "https://github.com/Codeinwp/templates-directory.git",
|
217 |
-
"reference": "18e8b64784457e3851bc79203e1306b6057d4d69"
|
218 |
-
},
|
219 |
-
"dist": {
|
220 |
-
"type": "zip",
|
221 |
-
"url": "https://api.github.com/repos/Codeinwp/templates-directory/zipball/18e8b64784457e3851bc79203e1306b6057d4d69",
|
222 |
-
"reference": "18e8b64784457e3851bc79203e1306b6057d4d69",
|
223 |
-
"shasum": ""
|
224 |
-
},
|
225 |
-
"require": {
|
226 |
-
"codeinwp/full-width-page-templates": "master"
|
227 |
-
},
|
228 |
-
"time": "2018-12-12T21:50:20+00:00",
|
229 |
-
"default-branch": true,
|
230 |
-
"type": "library",
|
231 |
-
"installation-source": "dist",
|
232 |
-
"autoload": {
|
233 |
-
"files": [
|
234 |
-
"load.php"
|
235 |
-
]
|
236 |
-
},
|
237 |
-
"notification-url": "https://packagist.org/downloads/",
|
238 |
-
"license": [
|
239 |
-
"GPL-2.0-or-later"
|
240 |
-
],
|
241 |
-
"authors": [
|
242 |
-
{
|
243 |
-
"name": "ThemeIsle team",
|
244 |
-
"email": "friends@themeisle.com",
|
245 |
-
"homepage": "https://themeisle.com"
|
246 |
-
}
|
247 |
-
],
|
248 |
-
"description": "A WordPress library to manage page templates.",
|
249 |
-
"homepage": "https://github.com/Codeinwp/templates-directory",
|
250 |
-
"support": {
|
251 |
-
"issues": "https://github.com/Codeinwp/templates-directory/issues",
|
252 |
-
"source": "https://github.com/Codeinwp/templates-directory/tree/master"
|
253 |
-
},
|
254 |
-
"install-path": "../codeinwp/templates-directory"
|
255 |
-
},
|
256 |
{
|
257 |
"name": "codeinwp/themeisle-content-forms",
|
258 |
"version": "dev-master",
|
@@ -305,23 +259,23 @@
|
|
305 |
},
|
306 |
{
|
307 |
"name": "codeinwp/themeisle-sdk",
|
308 |
-
"version": "3.2.
|
309 |
-
"version_normalized": "3.2.
|
310 |
"source": {
|
311 |
"type": "git",
|
312 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
313 |
-
"reference": "
|
314 |
},
|
315 |
"dist": {
|
316 |
"type": "zip",
|
317 |
-
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/
|
318 |
-
"reference": "
|
319 |
"shasum": ""
|
320 |
},
|
321 |
"require-dev": {
|
322 |
"codeinwp/phpcs-ruleset": "dev-main"
|
323 |
},
|
324 |
-
"time": "
|
325 |
"type": "library",
|
326 |
"installation-source": "dist",
|
327 |
"notification-url": "https://packagist.org/downloads/",
|
@@ -342,7 +296,7 @@
|
|
342 |
],
|
343 |
"support": {
|
344 |
"issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
|
345 |
-
"source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.
|
346 |
},
|
347 |
"install-path": "../codeinwp/themeisle-sdk"
|
348 |
},
|
@@ -385,12 +339,12 @@
|
|
385 |
},
|
386 |
"installation-source": "dist",
|
387 |
"autoload": {
|
388 |
-
"psr-4": {
|
389 |
-
"GuzzleHttp\\Psr7\\": "src/"
|
390 |
-
},
|
391 |
"files": [
|
392 |
"src/functions_include.php"
|
393 |
-
]
|
|
|
|
|
|
|
394 |
},
|
395 |
"notification-url": "https://packagist.org/downloads/",
|
396 |
"license": [
|
@@ -830,12 +784,12 @@
|
|
830 |
},
|
831 |
"installation-source": "dist",
|
832 |
"autoload": {
|
833 |
-
"psr-4": {
|
834 |
-
"Http\\Message\\": "src/"
|
835 |
-
},
|
836 |
"files": [
|
837 |
"src/filters.php"
|
838 |
-
]
|
|
|
|
|
|
|
839 |
},
|
840 |
"notification-url": "https://packagist.org/downloads/",
|
841 |
"license": [
|
25 |
"type": "library",
|
26 |
"installation-source": "dist",
|
27 |
"autoload": {
|
|
|
|
|
|
|
28 |
"files": [
|
29 |
"src/functions_include.php"
|
30 |
+
],
|
31 |
+
"psr-4": {
|
32 |
+
"Clue\\StreamFilter\\": "src/"
|
33 |
+
}
|
34 |
},
|
35 |
"notification-url": "https://packagist.org/downloads/",
|
36 |
"license": [
|
207 |
"abandoned": true,
|
208 |
"install-path": "../codeinwp/gutenberg-blocks"
|
209 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
{
|
211 |
"name": "codeinwp/themeisle-content-forms",
|
212 |
"version": "dev-master",
|
259 |
},
|
260 |
{
|
261 |
"name": "codeinwp/themeisle-sdk",
|
262 |
+
"version": "3.2.24",
|
263 |
+
"version_normalized": "3.2.24.0",
|
264 |
"source": {
|
265 |
"type": "git",
|
266 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
267 |
+
"reference": "e5c171e33120fdf8ce6dd3a7bddad984583023f0"
|
268 |
},
|
269 |
"dist": {
|
270 |
"type": "zip",
|
271 |
+
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/e5c171e33120fdf8ce6dd3a7bddad984583023f0",
|
272 |
+
"reference": "e5c171e33120fdf8ce6dd3a7bddad984583023f0",
|
273 |
"shasum": ""
|
274 |
},
|
275 |
"require-dev": {
|
276 |
"codeinwp/phpcs-ruleset": "dev-main"
|
277 |
},
|
278 |
+
"time": "2022-02-09T21:11:37+00:00",
|
279 |
"type": "library",
|
280 |
"installation-source": "dist",
|
281 |
"notification-url": "https://packagist.org/downloads/",
|
296 |
],
|
297 |
"support": {
|
298 |
"issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
|
299 |
+
"source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.24"
|
300 |
},
|
301 |
"install-path": "../codeinwp/themeisle-sdk"
|
302 |
},
|
339 |
},
|
340 |
"installation-source": "dist",
|
341 |
"autoload": {
|
|
|
|
|
|
|
342 |
"files": [
|
343 |
"src/functions_include.php"
|
344 |
+
],
|
345 |
+
"psr-4": {
|
346 |
+
"GuzzleHttp\\Psr7\\": "src/"
|
347 |
+
}
|
348 |
},
|
349 |
"notification-url": "https://packagist.org/downloads/",
|
350 |
"license": [
|
784 |
},
|
785 |
"installation-source": "dist",
|
786 |
"autoload": {
|
|
|
|
|
|
|
787 |
"files": [
|
788 |
"src/filters.php"
|
789 |
+
],
|
790 |
+
"psr-4": {
|
791 |
+
"Http\\Message\\": "src/"
|
792 |
+
}
|
793 |
},
|
794 |
"notification-url": "https://packagist.org/downloads/",
|
795 |
"license": [
|
vendor/composer/installed.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
-
'pretty_version' => 'v2.10.
|
4 |
-
'version' => '2.10.
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'codeinwp/themeisle-companion',
|
10 |
'dev' => false,
|
11 |
),
|
@@ -50,24 +50,13 @@
|
|
50 |
'reference' => 'c58fc700fe616d8b4f6029c109a869257d6daeed',
|
51 |
'dev_requirement' => false,
|
52 |
),
|
53 |
-
'codeinwp/templates-directory' => array(
|
54 |
-
'pretty_version' => 'dev-master',
|
55 |
-
'version' => 'dev-master',
|
56 |
-
'type' => 'library',
|
57 |
-
'install_path' => __DIR__ . '/../codeinwp/templates-directory',
|
58 |
-
'aliases' => array(
|
59 |
-
0 => '9999999-dev',
|
60 |
-
),
|
61 |
-
'reference' => '18e8b64784457e3851bc79203e1306b6057d4d69',
|
62 |
-
'dev_requirement' => false,
|
63 |
-
),
|
64 |
'codeinwp/themeisle-companion' => array(
|
65 |
-
'pretty_version' => 'v2.10.
|
66 |
-
'version' => '2.10.
|
67 |
'type' => 'wordpress-plugin',
|
68 |
'install_path' => __DIR__ . '/../../',
|
69 |
'aliases' => array(),
|
70 |
-
'reference' => '
|
71 |
'dev_requirement' => false,
|
72 |
),
|
73 |
'codeinwp/themeisle-content-forms' => array(
|
@@ -82,12 +71,12 @@
|
|
82 |
'dev_requirement' => false,
|
83 |
),
|
84 |
'codeinwp/themeisle-sdk' => array(
|
85 |
-
'pretty_version' => '3.2.
|
86 |
-
'version' => '3.2.
|
87 |
'type' => 'library',
|
88 |
'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk',
|
89 |
'aliases' => array(),
|
90 |
-
'reference' => '
|
91 |
'dev_requirement' => false,
|
92 |
),
|
93 |
'guzzlehttp/psr7' => array(
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
+
'pretty_version' => 'v2.10.11',
|
4 |
+
'version' => '2.10.11.0',
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => 'cab147c0b8cf88ec32c6fc408b462e55e16388e3',
|
9 |
'name' => 'codeinwp/themeisle-companion',
|
10 |
'dev' => false,
|
11 |
),
|
50 |
'reference' => 'c58fc700fe616d8b4f6029c109a869257d6daeed',
|
51 |
'dev_requirement' => false,
|
52 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
'codeinwp/themeisle-companion' => array(
|
54 |
+
'pretty_version' => 'v2.10.11',
|
55 |
+
'version' => '2.10.11.0',
|
56 |
'type' => 'wordpress-plugin',
|
57 |
'install_path' => __DIR__ . '/../../',
|
58 |
'aliases' => array(),
|
59 |
+
'reference' => 'cab147c0b8cf88ec32c6fc408b462e55e16388e3',
|
60 |
'dev_requirement' => false,
|
61 |
),
|
62 |
'codeinwp/themeisle-content-forms' => array(
|
71 |
'dev_requirement' => false,
|
72 |
),
|
73 |
'codeinwp/themeisle-sdk' => array(
|
74 |
+
'pretty_version' => '3.2.24',
|
75 |
+
'version' => '3.2.24.0',
|
76 |
'type' => 'library',
|
77 |
'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk',
|
78 |
'aliases' => array(),
|
79 |
+
'reference' => 'e5c171e33120fdf8ce6dd3a7bddad984583023f0',
|
80 |
'dev_requirement' => false,
|
81 |
),
|
82 |
'guzzlehttp/psr7' => array(
|