Responsive Add Ons - Version 2.0.5

Version Description

  • 9th September 2019 =
  • Added Pro Templates, Support Links
Download this release

Release Info

Developer cyberchimps
Plugin Icon 128x128 Responsive Add Ons
Version 2.0.5
Comparing to
See all releases

Code changes from version 2.0.4 to 2.0.5

admin/css/responsive-ready-sites-admin.css CHANGED
@@ -74,7 +74,12 @@
74
  .wp-full-overlay-header .button.responsive-addons{
75
  float: none;
76
  }
77
- .wp-full-overlay-header .button.responsive-demo-import-options{
 
 
 
 
 
78
  margin: 20px 20px 20px 20px;
79
  font-size: 14px;
80
  height: 30px;
@@ -121,15 +126,15 @@
121
  .responsive-ready-sites-tooltip-message{
122
  margin-left: 20px;
123
  }
124
- responsive-ready-site-import.button.updating-message:before,
125
- responsive-ready-site-import.button.installing:before {
126
  -webkit-animation: cssAnimation .72s ease infinite;
127
  -moz-animation: cssAnimation .72s ease infinite;
128
  -o-animation: cssAnimation .72s ease infinite;
129
  -ms-animation: cssAnimation .72s ease infinite;
130
  animation: cssAnimation .72s ease infinite;
131
  }
132
- .button.updating-message.responsive-ready-site-import:before {
133
  vertical-align: text-bottom;
134
  margin: 10px 5px 0 -2px;
135
  }
@@ -260,11 +265,119 @@ responsive-ready-site-import.button.installing:before {
260
  text-align: center;
261
  }
262
  #responsive-ready-sites-admin-page {
263
- margin-top: 25px;
264
- margin-right: 25px;
265
  padding: 20px 35px 20px 35px;
266
  background: #ffffff;
267
  }
268
  .responsive-ready-sites-advanced-options-wrap .result_preview {
269
  margin-top: 15%;
270
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  .wp-full-overlay-header .button.responsive-addons{
75
  float: none;
76
  }
77
+ .wp-full-overlay-header .button.responsive-demo-import-options-free{
78
+ margin: 20px 20px 20px 20px;
79
+ font-size: 14px;
80
+ height: 30px;
81
+ }
82
+ .wp-full-overlay-header .button.responsive-buy-pro{
83
  margin: 20px 20px 20px 20px;
84
  font-size: 14px;
85
  height: 30px;
126
  .responsive-ready-sites-tooltip-message{
127
  margin-left: 20px;
128
  }
129
+ responsive-ready-site-import-free.button.updating-message:before,
130
+ responsive-ready-site-import-free.button.installing:before {
131
  -webkit-animation: cssAnimation .72s ease infinite;
132
  -moz-animation: cssAnimation .72s ease infinite;
133
  -o-animation: cssAnimation .72s ease infinite;
134
  -ms-animation: cssAnimation .72s ease infinite;
135
  animation: cssAnimation .72s ease infinite;
136
  }
137
+ .button.updating-message.responsive-ready-site-import-free:before {
138
  vertical-align: text-bottom;
139
  margin: 10px 5px 0 -2px;
140
  }
265
  text-align: center;
266
  }
267
  #responsive-ready-sites-admin-page {
 
 
268
  padding: 20px 35px 20px 35px;
269
  background: #ffffff;
270
  }
271
  .responsive-ready-sites-advanced-options-wrap .result_preview {
272
  margin-top: 15%;
273
  }
274
+ .demo-type.pro{
275
+ position: absolute;
276
+ right: -0.5em;
277
+ top: -0.5em;
278
+ background: #0073aa;
279
+ z-index: 1;
280
+ color: #fff;
281
+ padding: 0.5em 1em;
282
+ text-transform: uppercase;
283
+ }
284
+ .demo-type.free{
285
+ display:none;
286
+ }
287
+
288
+ #responsive-addons-go-pro{
289
+ background: #fff;
290
+ display: flex;
291
+ flex-direction: row;
292
+ }
293
+
294
+ #responsive-addons-go-pro .column-4 {
295
+ display: inline-block;
296
+ padding: 40px;
297
+ width: 35%;
298
+ }
299
+ #responsive-addons-go-pro .column-8 {
300
+ display: inline-block;
301
+ width:50%;
302
+ padding-top: 20px;
303
+ padding-bottom: 20px;
304
+ }
305
+
306
+ @media screen and ( max-width : 768px ){
307
+
308
+ #responsive-addons-go-pro {
309
+ padding: 20px;
310
+ display: block;
311
+ }
312
+
313
+ #responsive-addons-go-pro .column-4 {
314
+ width: auto;
315
+ padding: 20px;
316
+ }
317
+
318
+ #responsive-addons-go-pro .column-8 {
319
+ width: auto;
320
+ }
321
+
322
+ }
323
+ #responsive-addons-support{
324
+ background: #fff;
325
+ display: flex;
326
+ flex-direction: row;
327
+ }
328
+
329
+ #responsive-addons-support .column-4 {
330
+ display: inline-block;
331
+ padding: 40px;
332
+ width: 35%;
333
+ }
334
+
335
+ @media screen and ( max-width : 768px ){
336
+
337
+ #responsive-addons-support {
338
+ padding: 20px;
339
+ display: block;
340
+ }
341
+
342
+ #responsive-addons-support .column-4 {
343
+ width: auto;
344
+ padding: 20px;
345
+ }
346
+ }
347
+
348
+ .features-table{
349
+ width: 100%;
350
+ border-collapse: collapse;
351
+ }
352
+ .features th{
353
+ text-align: center;
354
+ font-size: 20px;
355
+ font-weight: bold;
356
+ padding: 10px;
357
+ }
358
+ .featureyes{
359
+ text-align: center;
360
+ }
361
+ .features-table .feature{
362
+ font-size: 15px;
363
+ }
364
+ .features-table td{
365
+ padding: 10px;
366
+ }
367
+
368
+ .featureno{
369
+ text-align: center;
370
+ }
371
+ .features-table .dashicons-yes{
372
+ color: #259e58;
373
+ }
374
+ .features-table .dashicons-yes:before{
375
+ font-size: 30px;
376
+ }
377
+ .spinner-wrap{
378
+ text-align: center;
379
+ margin-top: 20%;
380
+ }
381
+ .spinner-wrap .spinner.is-active{
382
+ float:none;
383
+ }
admin/js/render-responsive-ready-sites.js CHANGED
@@ -125,6 +125,7 @@
125
  }
126
  );
127
 
 
128
  jQuery( '#responsive-ready-sites-admin-page' ).show();
129
  jQuery( '#responsive-sites' ).show().html( template( data ) );
130
  },
125
  }
126
  );
127
 
128
+ jQuery( '.spinner-wrap' ).hide();
129
  jQuery( '#responsive-ready-sites-admin-page' ).show();
130
  jQuery( '#responsive-sites' ).show().html( template( data ) );
131
  },
admin/js/responsive-ready-sites-admin.js CHANGED
@@ -188,11 +188,11 @@ var ResponsiveSitesAjaxQueue = (function() {
188
  */
189
  _bind: function()
190
  {
191
- $( document ).on( 'click' , '.import-demo-data, .responsive-ready-site-import', ResponsiveSitesAdmin._importDemo );
192
  $( document ).on( 'click' , '.theme-browser .inactive.ra-site-single .theme-screenshot, .theme-browser .inactive.ra-site-single .more-details, .theme-browser .inactive.ra-site-single .install-theme-preview', ResponsiveSitesAdmin._preview );
193
  $( document ).on( 'click' , '.theme-browser .active.ra-site-single .theme-screenshot, .theme-browser .active.ra-site-single .more-details, .theme-browser .active.ra-site-single .install-theme-preview', ResponsiveSitesAdmin._doNothing );
194
  $( document ).on( 'click' , '.close-full-overlay', ResponsiveSitesAdmin._closeFullOverlay );
195
- $( document ).on( 'click', '.responsive-demo-import-options', ResponsiveSitesAdmin._importSiteOptionsScreen );
196
  $( document ).on( 'click', '.responsive-ready-sites-tooltip-icon', ResponsiveSitesAdmin._toggle_tooltip );
197
 
198
  $( document ).on( 'responsive-ready-sites-install-start' , ResponsiveSitesAdmin._process_import );
@@ -371,7 +371,6 @@ var ResponsiveSitesAjaxQueue = (function() {
371
  * List of not inactive required plugins.
372
  */
373
  if ( typeof required_plugins.inactive !== 'undefined' ) {
374
-
375
  // Add inactive plugins count.
376
  remaining_plugins += parseInt( required_plugins.inactive.length );
377
 
@@ -566,12 +565,12 @@ var ResponsiveSitesAjaxQueue = (function() {
566
  var not_installed = responsiveSitesAdmin.required_plugins.notinstalled || '';
567
  var activate_plugins = responsiveSitesAdmin.required_plugins.inactive || '';
568
 
569
- // First Install Bulk.
570
  if ( not_installed.length > 0 ) {
571
  ResponsiveSitesAdmin._installAllPlugins( not_installed );
572
  }
573
 
574
- // Second Activate Bulk.
575
  if ( activate_plugins.length > 0 ) {
576
  ResponsiveSitesAdmin._activateAllPlugins( activate_plugins );
577
  }
@@ -586,11 +585,21 @@ var ResponsiveSitesAjaxQueue = (function() {
586
  var notinstalled = responsiveSitesAdmin.required_plugins.notinstalled || 0;
587
  var inactive = responsiveSitesAdmin.required_plugins.inactive || 0;
588
 
589
- if ( notinstalled.length === inactive.length ) {
590
  $( document ).trigger( 'responsive-ready-sites-install-and-activate-required-plugins-done' );
591
  }
592
  },
593
 
 
 
 
 
 
 
 
 
 
 
594
  /**
595
  * Individual Site Preview
596
  *
@@ -621,21 +630,22 @@ var ResponsiveSitesAjaxQueue = (function() {
621
  */
622
  _renderDemoPreview: function(anchor) {
623
 
624
- var demoId = anchor.data( 'demo-id' ) || '',
625
- apiURL = anchor.data( 'demo-api' ) || '',
626
- demoType = anchor.data( 'demo-type' ) || '',
627
- demoURL = anchor.data( 'demo-url' ) || '',
628
- screenshot = anchor.data( 'screenshot' ) || '',
629
- demo_name = anchor.data( 'demo-name' ) || '',
630
- demo_slug = anchor.data( 'demo-slug' ) || '',
631
- requiredPlugins = anchor.data( 'required-plugins' ) || '',
632
- responsiveSiteOptions = anchor.find( '.responsive-site-options' ).val() || '';
 
 
633
 
634
  var template = wp.template( 'responsive-ready-site-preview' );
635
 
636
  templateData = [{
637
  id: demoId,
638
- responsive_demo_type: demoType,
639
  demo_url: demoURL,
640
  demo_api: apiURL,
641
  screenshot: screenshot,
@@ -643,12 +653,69 @@ var ResponsiveSitesAjaxQueue = (function() {
643
  slug: demo_slug,
644
  required_plugins: JSON.stringify( requiredPlugins ),
645
  responsive_site_options: responsiveSiteOptions,
 
 
646
  }];
647
  $( '#responsive-ready-site-preview' ).append( template( templateData[0] ) );
648
  $( '.theme-install-overlay' ).css( 'display', 'block' );
649
 
650
  },
651
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
652
  /**
653
  * Activate All Plugins.
654
  */
@@ -826,9 +893,9 @@ var ResponsiveSitesAjaxQueue = (function() {
826
  $( '.sites-import-process-errors .current-importing-status-error-title' ).html( '' );
827
 
828
  $( '.sites-import-process-errors' ).hide();
829
- $( '.responsive-ready-site-import' ).addClass( 'updating-message installing' )
830
  .text( "Importing.." );
831
- $( '.responsive-ready-site-import' ).addClass( 'disabled not-click-able' );
832
 
833
  var output = '<div class="current-importing-status-title"></div><div class="current-importing-status-description"></div>';
834
  $( '.current-importing-status' ).html( output );
@@ -851,9 +918,9 @@ var ResponsiveSitesAjaxQueue = (function() {
851
  $( '.current-importing-status-error-title' ).html( markup );
852
  }
853
 
854
- $( '.responsive-ready-site-import' ).removeClass( 'updating-message installing' )
855
  .text( "Import Site" );
856
- $( '.responsive-ready-site-import' ).removeClass( 'disabled not-click-able' );
857
  $( '.responsive-ready-sites-tooltip-icon' ).removeClass( 'processed-import' );
858
  $( '.responsive-ready-sites-tooltip-icon' ).removeClass( 'processing-import' );
859
  $( '.responsive-ready-sites-import-process-wrap' ).hide();
@@ -908,7 +975,7 @@ var ResponsiveSitesAjaxQueue = (function() {
908
  type : 'POST',
909
  dataType: 'json',
910
  data : {
911
- 'action' : 'responsive-ready-sites-import-set-site-data',
912
  'api_url' : apiURL,
913
  },
914
  }
@@ -933,12 +1000,12 @@ var ResponsiveSitesAjaxQueue = (function() {
933
  ResponsiveSitesAdmin.active_site = demo_data.data['slug'] || '';
934
  ResponsiveSitesAdmin.site_customizer_data = JSON.stringify( demo_data.data['site_customizer_data'] ) || '';
935
  ResponsiveSitesAdmin.required_plugins = JSON.stringify( demo_data.data['required_plugins'] ) || '';
 
936
  ResponsiveSitesAdmin.widgets_data = JSON.stringify( demo_data.data['site_widgets_data'] ) || '';
937
  ResponsiveSitesAdmin.site_options_data = JSON.stringify( demo_data.data['site_options_data'] ) || '';
938
 
939
  $( document ).trigger( 'responsive-ready-sites-import-set-site-data-done' );
940
  }
941
-
942
  }
943
  );
944
  },
@@ -1009,15 +1076,16 @@ var ResponsiveSitesAjaxQueue = (function() {
1009
  */
1010
  _installSuccess: function( event, response ) {
1011
 
1012
- event.preventDefault();
 
1013
 
1014
- // Reset not installed plugins list.
1015
- var pluginsList = responsiveSitesAdmin.required_plugins.notinstalled;
1016
- responsiveSitesAdmin.required_plugins.notinstalled = ResponsiveSitesAdmin._removePluginFromQueue( response.slug, pluginsList );
1017
 
1018
- // WordPress adds "Activate" button after waiting for 1000ms. So we will run our activation after that.
1019
- setTimeout(
1020
- function() {
1021
 
1022
  var $init = $( '.plugin-card-' + response.slug ).data( 'init' );
1023
 
@@ -1026,30 +1094,30 @@ var ResponsiveSitesAjaxQueue = (function() {
1026
  url: responsiveSitesAdmin.ajaxurl,
1027
  type: 'POST',
1028
  data: {
1029
- 'action' : 'responsive-ready-sites-required-plugin-activate',
1030
- 'init' : $init,
1031
  },
1032
  }
1033
  )
1034
- .done(
1035
- function (result) {
1036
 
1037
- if ( result.success ) {
1038
- var pluginsList = responsiveSitesAdmin.required_plugins.inactive;
1039
 
1040
- // Reset not installed plugins list.
1041
- responsiveSitesAdmin.required_plugins.inactive = ResponsiveSitesAdmin._removePluginFromQueue( response.slug, pluginsList );
1042
 
1043
- $( '.responsive-ready-sites-import-plugins .responsive-ready-sites-tooltip-icon' ).addClass( 'processed-import' );
1044
- ResponsiveSitesAdmin._ready_for_import_site();
 
1045
  }
1046
- }
1047
- );
1048
-
1049
- },
1050
- 1200
1051
- );
1052
 
 
 
 
 
1053
  },
1054
 
1055
  _backup_before_rest_options: function() {
188
  */
189
  _bind: function()
190
  {
191
+ $( document ).on( 'click' , '.import-demo-data, .responsive-ready-site-import-free', ResponsiveSitesAdmin._importDemo );
192
  $( document ).on( 'click' , '.theme-browser .inactive.ra-site-single .theme-screenshot, .theme-browser .inactive.ra-site-single .more-details, .theme-browser .inactive.ra-site-single .install-theme-preview', ResponsiveSitesAdmin._preview );
193
  $( document ).on( 'click' , '.theme-browser .active.ra-site-single .theme-screenshot, .theme-browser .active.ra-site-single .more-details, .theme-browser .active.ra-site-single .install-theme-preview', ResponsiveSitesAdmin._doNothing );
194
  $( document ).on( 'click' , '.close-full-overlay', ResponsiveSitesAdmin._closeFullOverlay );
195
+ $( document ).on( 'click', '.responsive-demo-import-options-free', ResponsiveSitesAdmin._importSiteOptionsScreen );
196
  $( document ).on( 'click', '.responsive-ready-sites-tooltip-icon', ResponsiveSitesAdmin._toggle_tooltip );
197
 
198
  $( document ).on( 'responsive-ready-sites-install-start' , ResponsiveSitesAdmin._process_import );
371
  * List of not inactive required plugins.
372
  */
373
  if ( typeof required_plugins.inactive !== 'undefined' ) {
 
374
  // Add inactive plugins count.
375
  remaining_plugins += parseInt( required_plugins.inactive.length );
376
 
565
  var not_installed = responsiveSitesAdmin.required_plugins.notinstalled || '';
566
  var activate_plugins = responsiveSitesAdmin.required_plugins.inactive || '';
567
 
568
+ // Install wordpress.org plugins.
569
  if ( not_installed.length > 0 ) {
570
  ResponsiveSitesAdmin._installAllPlugins( not_installed );
571
  }
572
 
573
+ // Activate wordpress.org plugins.
574
  if ( activate_plugins.length > 0 ) {
575
  ResponsiveSitesAdmin._activateAllPlugins( activate_plugins );
576
  }
585
  var notinstalled = responsiveSitesAdmin.required_plugins.notinstalled || 0;
586
  var inactive = responsiveSitesAdmin.required_plugins.inactive || 0;
587
 
588
+ if ( ResponsiveSitesAdmin._areEqual( notinstalled.length, inactive.length ) ) {
589
  $( document ).trigger( 'responsive-ready-sites-install-and-activate-required-plugins-done' );
590
  }
591
  },
592
 
593
+ _areEqual:function () {
594
+ var len = arguments.length;
595
+ for (var i = 1; i < len; i++) {
596
+ if (arguments[i] === null || arguments[i] !== arguments[i - 1]) {
597
+ return false;
598
+ }
599
+ }
600
+ return true;
601
+ },
602
+
603
  /**
604
  * Individual Site Preview
605
  *
630
  */
631
  _renderDemoPreview: function(anchor) {
632
 
633
+ var demoId = anchor.data( 'demo-id' ) || '',
634
+ apiURL = anchor.data( 'demo-api' ) || '',
635
+ demoURL = anchor.data( 'demo-url' ) || '',
636
+ screenshot = anchor.data( 'screenshot' ) || '',
637
+ demo_name = anchor.data( 'demo-name' ) || '',
638
+ demo_slug = anchor.data( 'demo-slug' ) || '',
639
+ requiredPlugins = anchor.data( 'required-plugins' ) || '',
640
+ responsiveSiteOptions = anchor.find( '.responsive-site-options' ).val() || '',
641
+ demo_type = anchor.data( 'demo-type' ) || '',
642
+ isResponsiveAddonsProInstalled = ResponsiveSitesAdmin._checkResponsiveAddonsProInstalled(),
643
+ isResponsiceAddonsProLicenseActive = ResponsiveSitesAdmin._checkRespomsiveAddonsProLicenseActive();
644
 
645
  var template = wp.template( 'responsive-ready-site-preview' );
646
 
647
  templateData = [{
648
  id: demoId,
 
649
  demo_url: demoURL,
650
  demo_api: apiURL,
651
  screenshot: screenshot,
653
  slug: demo_slug,
654
  required_plugins: JSON.stringify( requiredPlugins ),
655
  responsive_site_options: responsiveSiteOptions,
656
+ demo_type: demo_type,
657
+ is_responsive_addons_pro_installed: isResponsiveAddonsProInstalled,
658
  }];
659
  $( '#responsive-ready-site-preview' ).append( template( templateData[0] ) );
660
  $( '.theme-install-overlay' ).css( 'display', 'block' );
661
 
662
  },
663
 
664
+ /**
665
+ * Check if Responsive Addons Pro is installed or not
666
+ */
667
+ _checkResponsiveAddonsProInstalled: function() {
668
+ var is_pro_license_active;
669
+ $.ajax(
670
+ {
671
+ url: responsiveSitesAdmin.ajaxurl,
672
+ async: false,
673
+ type : 'POST',
674
+ dataType: 'json',
675
+ data: {
676
+ 'action': 'check-responsive-add-ons-pro-license-active',
677
+ }
678
+ }
679
+ )
680
+ .done(
681
+ function ( response ) {
682
+ is_pro_license_active = response;
683
+ }
684
+ );
685
+
686
+ if (is_pro_license_active.success) {
687
+ return true;
688
+ } else {
689
+ return false;
690
+ }
691
+ },
692
+
693
+ _checkRespomsiveAddonsProLicenseActive: function() {
694
+ var is_pro_installed;
695
+ $.ajax(
696
+ {
697
+ url: responsiveSitesAdmin.ajaxurl,
698
+ async: false,
699
+ type : 'POST',
700
+ dataType: 'json',
701
+ data: {
702
+ 'action': 'check-responsive-add-ons-pro-installed',
703
+ }
704
+ }
705
+ )
706
+ .done(
707
+ function ( response ) {
708
+ is_pro_installed = response;
709
+ }
710
+ );
711
+
712
+ if (is_pro_installed.success) {
713
+ return true;
714
+ } else {
715
+ return false;
716
+ }
717
+ },
718
+
719
  /**
720
  * Activate All Plugins.
721
  */
893
  $( '.sites-import-process-errors .current-importing-status-error-title' ).html( '' );
894
 
895
  $( '.sites-import-process-errors' ).hide();
896
+ $( '.responsive-ready-site-import-free' ).addClass( 'updating-message installing' )
897
  .text( "Importing.." );
898
+ $( '.responsive-ready-site-import-free' ).addClass( 'disabled not-click-able' );
899
 
900
  var output = '<div class="current-importing-status-title"></div><div class="current-importing-status-description"></div>';
901
  $( '.current-importing-status' ).html( output );
918
  $( '.current-importing-status-error-title' ).html( markup );
919
  }
920
 
921
+ $( '.responsive-ready-site-import-free' ).removeClass( 'updating-message installing' )
922
  .text( "Import Site" );
923
+ $( '.responsive-ready-site-import-free' ).removeClass( 'disabled not-click-able' );
924
  $( '.responsive-ready-sites-tooltip-icon' ).removeClass( 'processed-import' );
925
  $( '.responsive-ready-sites-tooltip-icon' ).removeClass( 'processing-import' );
926
  $( '.responsive-ready-sites-import-process-wrap' ).hide();
975
  type : 'POST',
976
  dataType: 'json',
977
  data : {
978
+ 'action' : 'responsive-ready-sites-import-set-site-data-free',
979
  'api_url' : apiURL,
980
  },
981
  }
1000
  ResponsiveSitesAdmin.active_site = demo_data.data['slug'] || '';
1001
  ResponsiveSitesAdmin.site_customizer_data = JSON.stringify( demo_data.data['site_customizer_data'] ) || '';
1002
  ResponsiveSitesAdmin.required_plugins = JSON.stringify( demo_data.data['required_plugins'] ) || '';
1003
+ ResponsiveSitesAdmin.required_pro_plugins = JSON.stringify( demo_data.data['required_pro_plugins'] || '' );
1004
  ResponsiveSitesAdmin.widgets_data = JSON.stringify( demo_data.data['site_widgets_data'] ) || '';
1005
  ResponsiveSitesAdmin.site_options_data = JSON.stringify( demo_data.data['site_options_data'] ) || '';
1006
 
1007
  $( document ).trigger( 'responsive-ready-sites-import-set-site-data-done' );
1008
  }
 
1009
  }
1010
  );
1011
  },
1076
  */
1077
  _installSuccess: function( event, response ) {
1078
 
1079
+ if ( typeof responsiveSitesAdmin.required_plugins.notinstalled !== 'undefined' && responsiveSitesAdmin.required_plugins.notinstalled ) {
1080
+ event.preventDefault();
1081
 
1082
+ // Reset not installed plugins list.
1083
+ var pluginsList = responsiveSitesAdmin.required_plugins.notinstalled;
1084
+ responsiveSitesAdmin.required_plugins.notinstalled = ResponsiveSitesAdmin._removePluginFromQueue( response.slug, pluginsList );
1085
 
1086
+ // WordPress adds "Activate" button after waiting for 1000ms. So we will run our activation after that.
1087
+ setTimeout(
1088
+ function () {
1089
 
1090
  var $init = $( '.plugin-card-' + response.slug ).data( 'init' );
1091
 
1094
  url: responsiveSitesAdmin.ajaxurl,
1095
  type: 'POST',
1096
  data: {
1097
+ 'action': 'responsive-ready-sites-required-plugin-activate',
1098
+ 'init': $init,
1099
  },
1100
  }
1101
  )
1102
+ .done(
1103
+ function (result) {
1104
 
1105
+ if (result.success) {
1106
+ var pluginsList = responsiveSitesAdmin.required_plugins.inactive;
1107
 
1108
+ // Reset not installed plugins list.
1109
+ responsiveSitesAdmin.required_plugins.inactive = ResponsiveSitesAdmin._removePluginFromQueue( response.slug, pluginsList );
1110
 
1111
+ $( '.responsive-ready-sites-import-plugins .responsive-ready-sites-tooltip-icon' ).addClass( 'processed-import' );
1112
+ ResponsiveSitesAdmin._ready_for_import_site();
1113
+ }
1114
  }
1115
+ );
 
 
 
 
 
1116
 
1117
+ },
1118
+ 1200
1119
+ );
1120
+ }
1121
  },
1122
 
1123
  _backup_before_rest_options: function() {
admin/partials/responsive-ready-sites-admin-display.php CHANGED
@@ -15,7 +15,10 @@
15
  <!-- This file should primarily consist of HTML with a little bit of PHP. -->
16
  <div id="responsive-ready-site-preview"></div>
17
  <div id="responsive-ready-sites-import-options"></div>
18
- <div class="wrap" id="responsive-ready-sites-admin-page" style="display: none;">
 
 
 
19
  <div class="responsive-sites-header">
20
  <span class="ready-site-list-title">Responsive Ready Websites</span>
21
  <p class="ready-site-list-intro">Build your Responsive website in 3 simple steps - import a ready website, change content and launch.</p>
@@ -37,13 +40,14 @@
37
  <# for ( key in data.items ) { #>
38
 
39
  <# if (data.items[ key ].active ) { #>
40
- <div class="theme active ra-site-single {{ data.items[ key ].status }}" tabindex="0" aria-describedby="responsive-theme-action responsive-theme-name"
41
- data-demo-id="{{{ data.items[ key ].id }}}"
42
  data-demo-url="{{{ data.items[ key ]['site_url'] }}}"
43
  data-demo-slug="{{{ data.items[ key ].slug }}}"
44
  data-demo-name="{{{ data.items[ key ].title.rendered }}}"
 
45
  data-screenshot="{{{ data.items[ key ]['featured_image_url'] }}}"
46
- data-required-plugins="{{ JSON.stringify(data.items[ key ]['required_plugins']) }}">
 
47
 
48
  <# } else { #>
49
 
@@ -52,14 +56,17 @@
52
  data-demo-url="{{{ data.items[ key ]['site_url'] }}}"
53
  data-demo-slug="{{{ data.items[ key ].slug }}}"
54
  data-demo-name="{{{ data.items[ key ].title.rendered }}}"
 
55
  data-screenshot="{{{ data.items[ key ]['featured_image_url'] }}}"
56
- data-required-plugins="{{ JSON.stringify(data.items[ key ]['required_plugins']) }}">
 
57
  <# } #>
58
  <input type="hidden" class="site_options_data" value="{{ JSON.stringify(data.items[ key ][ 'site_options_data' ]) }}">
59
  <div class="inner">
60
  <span class="site-preview" data-href="{{ data.items[ key ]['responsive-site-url'] }}?TB_iframe=true&width=600&height=550" data-title="data title">
61
  <div class="theme-screenshot" style="background-image: url('{{ data.items[ key ]['featured_image_url'] }}');"></div>
62
  </span>
 
63
  <div class="theme-id-container">
64
  <# if (data.items[ key ].active ) { #>
65
  <h3 class="theme-name" id="responsive-theme-name">Active : {{{ data.items[ key ].title.rendered }}}</h3>
@@ -105,14 +112,24 @@
105
  data-demo-url="{{{data.demo_url}}}"
106
  data-demo-api="{{{data.demo_api}}}"
107
  data-demo-name="{{{data.name}}}"
 
108
  data-demo-slug="{{{data.slug}}}"
109
  data-screenshot="{{{data.screenshot}}}"
110
- data-required-plugins="{{data.required_plugins}}">
 
111
  <input type="hidden" class="responsive-site-options" value="{{data.site_options_data}}" >
112
  <div class="wp-full-overlay-header">
113
  <div>
114
  <span class="responsive-site-demo-name">{{data.name}}</span>
115
- <a class="button hide-if-no-customize button-primary responsive-addons responsive-demo-import-options" href="#"><?php esc_html_e( 'Import Site', 'responsive-addons' ); ?></a>
 
 
 
 
 
 
 
 
116
  <button class="close-full-overlay responsive-addons"><span class="screen-reader-text"><?php esc_html_e( 'Close', 'responsive-addons' ); ?></span></button>
117
  </div>
118
  </div>
@@ -131,9 +148,11 @@
131
  data-demo-url="{{{data.demo_url}}}"
132
  data-demo-api="{{{data.demo_api}}}"
133
  data-demo-name="{{{data.name}}}"
 
134
  data-demo-slug="{{{data.slug}}}"
135
  data-screenshot="{{{data.screenshot}}}"
136
- data-required-plugins="{{data.required_plugins}}">
 
137
  <input type="hidden" class="responsive-site-options" value="{{data.site_options_data}}" >
138
  <input type="hidden" class="demo_site_id" value="{{{ data.id }}}">
139
  <div class="wp-full-overlay-header">
@@ -197,7 +216,7 @@
197
  </ul>
198
  </div>
199
  <div class="responsive-ready-sites-import-button-wrap">
200
- <a class="button button-hero hide-if-no-customize button-primary responsive-ready-site-import" href="#">
201
  <?php esc_html_e( 'Import Site', 'responsive-addons' ); ?>
202
  </a>
203
  </div>
15
  <!-- This file should primarily consist of HTML with a little bit of PHP. -->
16
  <div id="responsive-ready-site-preview"></div>
17
  <div id="responsive-ready-sites-import-options"></div>
18
+ <div class="spinner-wrap">
19
+ <span class="spinner is-active"></span>
20
+ </div>
21
+ <div id="responsive-ready-sites-admin-page" style="display: none;">
22
  <div class="responsive-sites-header">
23
  <span class="ready-site-list-title">Responsive Ready Websites</span>
24
  <p class="ready-site-list-intro">Build your Responsive website in 3 simple steps - import a ready website, change content and launch.</p>
40
  <# for ( key in data.items ) { #>
41
 
42
  <# if (data.items[ key ].active ) { #>
43
+ <div class="theme active ra-site-single {{ data.items[ key ].status }}" tabindex="0" aria-describedby="responsive-theme-action responsive-theme-name" data-demo-id="{{{ data.items[ key ].id }}}"
 
44
  data-demo-url="{{{ data.items[ key ]['site_url'] }}}"
45
  data-demo-slug="{{{ data.items[ key ].slug }}}"
46
  data-demo-name="{{{ data.items[ key ].title.rendered }}}"
47
+ data-demo-type="{{{ data.items[ key ].demo_type }}}"
48
  data-screenshot="{{{ data.items[ key ]['featured_image_url'] }}}"
49
+ data-required-plugins="{{ JSON.stringify(data.items[ key ]['required_plugins']) }}"
50
+ data-required-pro-plugins="{{ JSON.stringify(data.items[ key ]['required_pro_plugins']) }}">
51
 
52
  <# } else { #>
53
 
56
  data-demo-url="{{{ data.items[ key ]['site_url'] }}}"
57
  data-demo-slug="{{{ data.items[ key ].slug }}}"
58
  data-demo-name="{{{ data.items[ key ].title.rendered }}}"
59
+ data-demo-type="{{{ data.items[ key ].demo_type }}}"
60
  data-screenshot="{{{ data.items[ key ]['featured_image_url'] }}}"
61
+ data-required-plugins="{{ JSON.stringify(data.items[ key ]['required_plugins']) }}"
62
+ data-required-pro-plugins="{{ JSON.stringify(data.items[ key ]['required_pro_plugins']) }}">
63
  <# } #>
64
  <input type="hidden" class="site_options_data" value="{{ JSON.stringify(data.items[ key ][ 'site_options_data' ]) }}">
65
  <div class="inner">
66
  <span class="site-preview" data-href="{{ data.items[ key ]['responsive-site-url'] }}?TB_iframe=true&width=600&height=550" data-title="data title">
67
  <div class="theme-screenshot" style="background-image: url('{{ data.items[ key ]['featured_image_url'] }}');"></div>
68
  </span>
69
+ <span class="demo-type {{{ data.items[ key ].demo_type }}}">{{{ data.items[ key ].demo_type }}}</span>
70
  <div class="theme-id-container">
71
  <# if (data.items[ key ].active ) { #>
72
  <h3 class="theme-name" id="responsive-theme-name">Active : {{{ data.items[ key ].title.rendered }}}</h3>
112
  data-demo-url="{{{data.demo_url}}}"
113
  data-demo-api="{{{data.demo_api}}}"
114
  data-demo-name="{{{data.name}}}"
115
+ data-demo-type="{{{data.demo_type}}}"
116
  data-demo-slug="{{{data.slug}}}"
117
  data-screenshot="{{{data.screenshot}}}"
118
+ data-required-plugins="{{data.required_plugins}}"
119
+ data-required-pro-plugins="{{data.required_pro_plugins}}">
120
  <input type="hidden" class="responsive-site-options" value="{{data.site_options_data}}" >
121
  <div class="wp-full-overlay-header">
122
  <div>
123
  <span class="responsive-site-demo-name">{{data.name}}</span>
124
+ <# if ( data.demo_type == "free" || ( data.is_responsive_addons_pro_installed && data.is_responsive_addons_pro_license_active ) ) { #>
125
+
126
+ <a class="button button-primary responsive-addons responsive-demo-import-options-{{{data.demo_type}}}" href="#"><?php esc_html_e( 'Import Site', 'responsive-addons' ); ?></a>
127
+
128
+ <# } else { #>
129
+
130
+ <a class="button button-primary responsive-addons responsive-buy-pro" href="https://cyberchimps.com/responsive-pricing/?utm_source=responsive-add-ons&utm_medium=buy-responsive-pro&utm_campaign=upgrade-to-responsive-pro" target="_blank"><?php esc_html_e( 'Buy Responsive Pro', 'responsive-addons' ); ?></a>
131
+
132
+ <# } #>
133
  <button class="close-full-overlay responsive-addons"><span class="screen-reader-text"><?php esc_html_e( 'Close', 'responsive-addons' ); ?></span></button>
134
  </div>
135
  </div>
148
  data-demo-url="{{{data.demo_url}}}"
149
  data-demo-api="{{{data.demo_api}}}"
150
  data-demo-name="{{{data.name}}}"
151
+ data-demo-type="{{{data.demo_type}}}"
152
  data-demo-slug="{{{data.slug}}}"
153
  data-screenshot="{{{data.screenshot}}}"
154
+ data-required-plugins="{{data.required_plugins}}"
155
+ data-required-pro-plugins="{{data.required_pro_plugins}}">
156
  <input type="hidden" class="responsive-site-options" value="{{data.site_options_data}}" >
157
  <input type="hidden" class="demo_site_id" value="{{{ data.id }}}">
158
  <div class="wp-full-overlay-header">
216
  </ul>
217
  </div>
218
  <div class="responsive-ready-sites-import-button-wrap">
219
+ <a class="button button-hero button-primary responsive-ready-site-import-{{{data.demo_type}}}" href="#">
220
  <?php esc_html_e( 'Import Site', 'responsive-addons' ); ?>
221
  </a>
222
  </div>
admin/templates/responsive-addons-go-pro.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Responsive Options
4
+ *
5
+ * @package responsive
6
+ */
7
+
8
+ ?>
9
+ <div class="responsive-addons-tabs">
10
+ <div id="responsive-addons-go-pro" class="tab-content active">
11
+ <div class="column-4">
12
+ <h3><?php esc_html_e( 'Get Responsive Add Ons Pro' ); ?></h3>
13
+ <p><?php esc_html_e( 'Upgrade to Responsive Add Ons Pro and get Pro Ready sites, more customizer options & premium support.' ); ?></p>
14
+ <a href="https://cyberchimps.com/responsive-pricing/?utm_source=responsive-add-ons&utm_medium=upgrade-pro&utm_campaign=upgrade-to-responsive-pro" target="_blank" class='button button-primary'><?php esc_html_e( 'Upgrade To Pro' ); ?></a>
15
+ </div>
16
+ <div class="column-8 features">
17
+ <table class="features-table" border="1">
18
+ <thead>
19
+ <tr>
20
+ <th></th>
21
+ <th>Free</th>
22
+ <th>Pro</th>
23
+ </tr>
24
+ </thead>
25
+ <tbody>
26
+ <tr>
27
+ <td class="feature">Ready Sites</td>
28
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
29
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
30
+ </tr>
31
+ <tr>
32
+ <td class="feature">Compatible with Elementor Page Builder</td>
33
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
34
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
35
+ </tr>
36
+ <tr>
37
+ <td class="feature">Mobile Friendly</td>
38
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
39
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
40
+ </tr>
41
+ <tr>
42
+ <td class="feature">WooCommerce Compatible</td>
43
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
44
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
45
+ </tr>
46
+ <tr>
47
+ <td class="feature">Layout Customizer</td>
48
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
49
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
50
+ </tr>
51
+ <tr>
52
+ <td class="feature">Color Customizer</td>
53
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
54
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
55
+ </tr>
56
+ <tr>
57
+ <td class="feature">Typography Customizer</td>
58
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
59
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
60
+ </tr>
61
+ <tr>
62
+ <td class="feature">Premium Support</td>
63
+ <td class="featureno">-</td>
64
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
65
+ </tr>
66
+ <tr>
67
+ <td class="feature">Pro Ready Sites</td>
68
+ <td class="featureno">-</td>
69
+ <td class="featureyes"><span class='dashicons-before dashicons-yes'></span></td>
70
+ </tr>
71
+ </tbody>
72
+ </table>
73
+ </div>
74
+ </div>
75
+ </div>
admin/templates/responsive-addons-support.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Responsive Add Ons
4
+ *
5
+ * @package Responsive Add Ons
6
+ */
7
+
8
+ ?>
9
+ <div class="responsive-addons-tabs">
10
+ <div id="responsive-addons-support" class="tab-content active">
11
+ <div class="column-4">
12
+ <h3><?php esc_html_e( 'Community Support' ); ?></h3>
13
+ <p><?php esc_html_e( 'Free Responsive user? Use the WordPress.org support forums to get help from our experts and other Responsive users.' ); ?></p>
14
+ <a href="https://wordpress.org/support/theme/responsive/" target="_blank"><?php esc_html_e( 'WordPress.org Support' ); ?></a>
15
+ </div>
16
+ <div class="column-4">
17
+ <h3><?php esc_html_e( 'Premium Support' ); ?></h3>
18
+ <p><?php esc_html_e( 'Free Responsive user? Use the WordPress.org support forums to get help from our experts and other Responsive users.' ); ?></p>
19
+ <?php if ( is_resp_pro_license_is_active() ) { ?>
20
+ <a href="https://cyberchimps.com/my-account/orders/?utm_source=responsive-add-ons&utm_medium=request-support&utm_campaign=responsive-support" target="_blank"><?php esc_html_e( 'Request Support' ); ?></a>
21
+ <?php } else { ?>
22
+ <a href="https://cyberchimps.com/responsive-pricing/?utm_source=responsive-add-ons&utm_medium=upgrade-to-responsive-pro&utm_campaign=upgrade-to-responsive-pro" target="_blank"><?php esc_html_e( 'Upgrade To Responsive Pro' ); ?></a>
23
+ <?php } ?>
24
+ </div>
25
+ <div class="column-4">
26
+ <h3><?php esc_html_e( 'Documentation' ); ?></h3>
27
+ <p><?php esc_html_e( 'Free Responsive user? Use the WordPress.org support forums to get help from our experts and other Responsive users.' ); ?></p>
28
+ <a href="https://docs.cyberchimps.com/responsive/?utm_source=responsive-add-ons&utm_medium=see-documentation&utm_campaign=responsive-documentation" target="_blank"><?php esc_html_e( 'See Documentation' ); ?></a>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ <?php
33
+ /**
34
+ * Check if Responsive Addons Pro License is Active.
35
+ */
36
+ function is_resp_pro_license_is_active() {
37
+ global $wcam_lib;
38
+ if ( is_null( $wcam_lib ) ) {
39
+ return false;
40
+ }
41
+ $license_status = $wcam_lib->license_key_status();
42
+
43
+ if ( ! empty( $license_status['data']['activated'] ) && $license_status['data']['activated'] ) {
44
+ return true;
45
+ } else {
46
+ return false;
47
+ }
48
+ }
49
+ ?>
includes/importers/class-responsive-ready-sites-importer.php CHANGED
@@ -6,696 +6,655 @@
6
  * @package Responsive Ready Sites
7
  */
8
 
9
- defined('ABSPATH') || exit;
10
-
11
- if (! class_exists('Responsive_Ready_Sites_Importer') ) :
12
-
13
- /**
14
- * Responsive Ready Sites Importer
15
- */
16
- class Responsive_Ready_Sites_Importer
17
- {
18
-
19
- /**
20
- * Instance
21
- *
22
- * @since 1.0.0
23
- * @var (Object) Class object
24
- */
25
- public static $instance = null;
26
-
27
- /**
28
- * Set Instance
29
- *
30
- * @since 1.0.0
31
- *
32
- * @return object Class object.
33
- */
34
- public static function get_instance()
35
- {
36
- if (! isset(self::$instance) ) {
37
- self::$instance = new self();
38
- }
39
-
40
- return self::$instance;
41
- }
42
-
43
- /**
44
- * Constructor.
45
- *
46
- * @since 1.0.0
47
- */
48
- public function __construct()
49
- {
50
-
51
- add_action('init', array( $this, 'load_importer' ));
52
-
53
- $responsive_ready_sites_importers_dir = plugin_dir_path(__FILE__);
54
- include_once $responsive_ready_sites_importers_dir . 'class-responsive-ready-sites-plugin-installer.php';
55
- include_once $responsive_ready_sites_importers_dir . 'class-responsive-ready-sites-widgets-importer.php';
56
- include_once $responsive_ready_sites_importers_dir . 'class-responsive-ready-sites-options-importer.php';
57
-
58
- // Import AJAX.
59
- add_action('wp_ajax_responsive-ready-sites-import-set-site-data', array( $this, 'import_start' ));
60
- add_action('wp_ajax_responsive-ready-sites-install-required-plugins', array( $this, 'install_required_plugins' ));
61
- add_action('wp_ajax_responsive-ready-sites-import-xml', array( $this, 'import_xml_data' ));
62
- add_action('wp_ajax_responsive-ready-sites-import-wpforms', array( $this, 'import_wpforms' ));
63
- add_action('wp_ajax_responsive-ready-sites-import-customizer-settings', array( $this, 'import_customizer_settings' ));
64
- add_action('wp_ajax_responsive-ready-sites-import-widgets', array( $this, 'import_widgets' ));
65
- add_action('wp_ajax_responsive-ready-sites-import-options', array( $this, 'import_options' ));
66
- add_action('wp_ajax_responsive-ready-sites-import-end', array( $this, 'import_end' ));
67
-
68
- add_action('responsive_ready_sites_import_complete', array( $this, 'clear_cache'));
69
-
70
- include_once $responsive_ready_sites_importers_dir . 'batch-processing/class-responsive-ready-sites-batch-processing.php';
71
-
72
- // Reset Customizer Data.
73
- add_action('wp_ajax_responsive-ready-sites-reset-customizer-data', array( $this, 'reset_customizer_data' ));
74
- add_action('wp_ajax_responsive-ready-sites-reset-site-options', array( $this, 'reset_site_options' ));
75
- add_action('wp_ajax_responsive-ready-sites-reset-widgets-data', array( $this, 'reset_widgets_data' ));
76
-
77
- // Reset Post & Terms.
78
- add_action('wp_ajax_responsive-ready-sites-delete-posts', array( $this, 'delete_imported_posts' ));
79
- add_action('wp_ajax_responsive-ready-sites-delete-wp-forms', array( $this, 'delete_imported_wp_forms' ));
80
- add_action('wp_ajax_responsive-ready-sites-delete-terms', array( $this, 'delete_imported_terms' ));
81
-
82
- if ( version_compare( get_bloginfo( 'version' ), '5.0.0', '>=' ) ) {
83
- add_filter( 'http_request_timeout', array( $this, 'set_timeout_for_images' ), 10, 2 );
84
- }
85
- }
86
-
87
- /**
88
- * Clear Cache.
89
- *
90
- * @since 2.0.3
91
- */
92
- public function clear_cache() {
93
- // Clear 'Elementor' file cache.
94
- if ( class_exists( '\Elementor\Plugin' ) ) {
95
- Elementor\Plugin::$instance->posts_css_manager->clear_cache();
96
- }
97
- }
98
-
99
- /**
100
- * Set the timeout for the HTTP request by request URL.
101
- *
102
- * E.g. If URL is images (jpg|png|gif|jpeg) are from the domain `https://websitedemos.net` then we have set the timeout by 30 seconds. Default 5 seconds.
103
- *
104
- * @since 2.0.3
105
- *
106
- * @param int $timeout_value Time in seconds until a request times out. Default 5.
107
- * @param string $url The request URL.
108
- */
109
- function set_timeout_for_images( $timeout_value, $url ) {
110
-
111
- // URL not contain `https://ccreadysites.cyberchimps.com` then return $timeout_value.
112
- if ( strpos( $url, 'ccreadysites.cyberchimps.com' ) === false ) {
113
- return $timeout_value;
114
- }
115
-
116
- // Check is image URL of type jpg|png|gif|jpeg.
117
- if ( self::is_image_url( $url ) ) {
118
- $timeout_value = 30;
119
- }
120
- return $timeout_value;
121
- }
122
-
123
- /**
124
- * Is Image URL
125
- *
126
- * @since 2.0.3
127
- *
128
- * @param string $url URL.
129
- * @return boolean
130
- */
131
- function is_image_url( $url = '' ) {
132
- if ( empty( $url ) ) {
133
- return false;
134
- }
135
-
136
- if ( preg_match( '/^((http?:\/\/)|(https?:\/\/)|(www\.))([a-z0-9-].?)+(:[0-9]+)?\/[\w\-]+\.(jpg|png|svg|gif|jpeg)\/?$/i', $url ) ) {
137
- return true;
138
- }
139
-
140
- return false;
141
- }
142
-
143
- /**
144
- * Load WordPress Plugin Installer and WordPress Importer.
145
- */
146
- public function load_importer()
147
- {
148
- include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
149
- $responsive_ready_sites_importers_dir = plugin_dir_path(__FILE__);
150
-
151
- include_once $responsive_ready_sites_importers_dir . 'wxr-importer/class-responsive-ready-sites-wxr-importer.php';
152
- }
153
-
154
- /**
155
- * Start Site Import
156
- *
157
- * @since 1.0.0
158
- * @return void
159
- */
160
- public function import_start()
161
- {
162
 
163
  $demo_api_uri = isset( $_POST['api_url'] ) ? esc_url( $_POST['api_url'] ) : ''; //phpcs:ignore
164
 
165
- if (! empty($demo_api_uri) ) {
166
 
167
- $demo_data = self::get_responsive_single_demo($demo_api_uri);
168
 
169
- update_option('responsive_ready_sites_import_data', $demo_data);
170
 
171
- if (is_wp_error($demo_data) ) {
172
- wp_send_json_error($demo_data->get_error_message());
173
- } else {
174
- do_action('responsive_ready_sites_import_start', $demo_data, $demo_api_uri);
175
- }
176
 
177
- wp_send_json_success($demo_data);
178
 
179
- } else {
180
- wp_send_json_error(__('Request site API URL is empty. Try again!', 'responsive-addons'));
181
- }
182
 
183
- }
184
 
185
 
186
- /**
187
- * Import XML Data.
188
- *
189
- * @since 1.0.0
190
- * @return void
191
- */
192
- public function import_xml_data()
193
- {
194
 
195
- if (! class_exists('XMLReader') ) {
196
- wp_send_json_error(__('If XMLReader is not available, it imports all other settings and only skips XML import. This creates an incomplete website. We should bail early and not import anything if this is not present.', 'responsive-addons'));
197
- }
198
 
199
  $wxr_url = ( isset( $_REQUEST['xml_path'] ) ) ? urldecode( $_REQUEST['xml_path'] ) : ''; //phpcs:ignore
200
 
201
- if (isset($wxr_url) ) {
202
-
203
- // Download XML file.
204
- $xml_path = self::download_file($wxr_url);
205
-
206
- if ($xml_path['success'] ) {
207
- if (isset($xml_path['data']['file']) ) {
208
- $data = Responsive_Ready_Sites_WXR_Importer::instance()->get_xml_data($xml_path['data']['file']);
209
- $data['xml'] = $xml_path['data'];
210
- wp_send_json_success($data);
211
- } else {
212
- wp_send_json_error(__('There was an error downloading the XML file.', 'responsive-addons'));
213
- }
214
- } else {
215
- wp_send_json_error($xml_path['data']);
216
- }
217
- } else {
218
- wp_send_json_error(__('Invalid site XML file!', 'responsive-addons'));
219
- }
220
-
221
- }
222
-
223
- /**
224
- * Import WP Forms
225
- *
226
- * @since 1.0.0
227
- *
228
- * @return void
229
- */
230
- public function import_wpforms()
231
- {
232
 
233
  $site_wpforms_url = ( isset( $_REQUEST['wpforms_path'] ) ) ? urldecode( $_REQUEST['wpforms_path'] ) : ''; //phpcs:ignore
234
- $ids_mapping = array();
235
 
236
- if (! empty($site_wpforms_url) && function_exists('wpforms_encode') ) {
237
 
238
- // Download XML file.
239
- $xml_path = self::download_file($site_wpforms_url);
240
 
241
- if ($xml_path['success'] ) {
242
- if (isset($xml_path['data']['file']) ) {
243
 
244
- $ext = strtolower(pathinfo($xml_path['data']['file'], PATHINFO_EXTENSION));
245
 
246
- if ('json' === $ext ) {
247
  $forms = json_decode( file_get_contents( $xml_path['data']['file'] ), true ); //phpcs:ignore
248
 
249
- if (! empty($forms) ) {
250
-
251
- foreach ( $forms as $form ) {
252
- $title = ! empty($form['settings']['form_title']) ? $form['settings']['form_title'] : '';
253
- $desc = ! empty($form['settings']['form_desc']) ? $form['settings']['form_desc'] : '';
254
-
255
- $new_id = post_exists($title);
256
-
257
- if (! $new_id ) {
258
- $new_id = wp_insert_post(
259
- array(
260
- 'post_title' => $title,
261
- 'post_status' => 'publish',
262
- 'post_type' => 'wpforms',
263
- 'post_excerpt' => $desc,
264
- )
265
- );
266
-
267
- // Set meta for tracking the form imported from demo site.
268
- update_post_meta($new_id, '_responsive_ready_sites_imported_wp_forms', true);
269
- }
270
-
271
- if ($new_id ) {
272
-
273
- // ID mapping.
274
- $ids_mapping[ $form['id'] ] = $new_id;
275
-
276
- $form['id'] = $new_id;
277
- wp_update_post(
278
- array(
279
- 'ID' => $new_id,
280
- 'post_content' => wpforms_encode($form),
281
- )
282
- );
283
- }
284
- }
285
- }
286
- }
287
- }
288
- }
289
- }
290
-
291
- update_option('responsive_sites_wpforms_ids_mapping', $ids_mapping);
292
-
293
- wp_send_json_success($ids_mapping);
294
- }
295
-
296
- /**
297
- * Import Customizer Settings
298
- *
299
- * @since 1.0.0
300
- *
301
- * @return void
302
- */
303
- public function import_customizer_settings()
304
- {
305
 
306
  $customizer_data = ( isset( $_POST['site_customizer_data'] ) ) ? (array) json_decode( stripcslashes( $_POST['site_customizer_data'] ), 1 ) : array(); //phpcs:ignore
307
 
308
- if (! empty($customizer_data) ) {
309
 
310
- // Set meta for tracking the post.
311
- update_option('_responsive_sites_old_customizer_data', $customizer_data);
312
 
313
- if (isset($customizer_data['responsive_settings']) ) {
314
- update_option('responsive_theme_options', $customizer_data['responsive_settings']);
315
- }
316
 
317
- if(isset($customizer_data['theme_mods_responsive']) ) {
318
- update_option('theme_mods_responsive', $customizer_data['theme_mods_responsive']);
319
- }
320
 
321
- // Add Custom CSS.
322
- if (isset($options['custom_css']) ) {
323
- wp_update_custom_css_post($customizer_data['custom_css']);
324
- }
325
 
326
- wp_send_json_success($customizer_data);
327
 
328
- } else {
329
- wp_send_json_error(__('Customizer data is empty!', 'responsive-addons'));
330
- }
331
- }
332
 
333
 
334
- /**
335
- * Import Widgets.
336
- *
337
- * @since 1.0.0
338
- * @return void
339
- */
340
- public function import_widgets()
341
- {
342
 
343
  $widgets_data = ( isset( $_POST['widgets_data'] ) ) ? (object) json_decode( stripcslashes( $_POST['widgets_data'] ) ) : ''; //phpcs:ignore
344
 
345
- if (! empty($widgets_data) ) {
346
-
347
- $widgets_importer = Responsive_Ready_Sites_Widgets_Importer::instance();
348
- $status = $widgets_importer->import_widgets_data($widgets_data);
349
-
350
- // Set meta for tracking the post.
351
- if (is_object($widgets_data) ) {
352
- $widgets_data = (array) $widgets_data;
353
- update_option('_responsive_sites_old_widgets_data', $widgets_data);
354
- }
355
-
356
- wp_send_json_success($widgets_data);
357
- } else {
358
- wp_send_json_error(__('Widget data is empty!', 'responsive-addons'));
359
- }
360
-
361
- }
362
-
363
- /**
364
- * Import Options.
365
- *
366
- * @since 1.0.0
367
- * @return void
368
- */
369
- public function import_options()
370
- {
371
-
372
- $options_data = ( isset($_POST['options_data']) ) ? (array) json_decode(stripcslashes($_POST['options_data']), 1) : '';
373
-
374
- if (! empty($options_data) ) {
375
-
376
- // Set meta for tracking the post.
377
- if (is_array($options_data) ) {
378
- update_option('_responsive_ready_sites_old_site_options', $options_data);
379
- }
380
-
381
- $options_importer = Responsive_Ready_Sites_Options_Importer::instance();
382
- $options_importer->import_options($options_data);
383
- wp_send_json_success($options_data);
384
- } else {
385
- wp_send_json_error(__('Site options are empty!', 'responsive-addons'));
386
- }
387
-
388
- }
389
-
390
- /**
391
- * Install required plugins
392
- *
393
- * @since 1.0.0
394
- *
395
- * @return void
396
- */
397
- public function install_required_plugins()
398
- {
399
- $required_plugins = ( isset( $_POST['required_plugins'] ) ) ? (array) json_decode( stripcslashes( $_POST['required_plugins'] ), 1 ) : array(); //phpcs:ignore
400
- if (! empty($required_plugins) ) {
401
-
402
- Responsive_Ready_Sites_Plugin_Installer::instance()->install_plugins($required_plugins);
403
-
404
- wp_send_json_success($required_plugins);
405
- } else {
406
- wp_send_json_error($required_plugins);
407
- }
408
- }
409
-
410
- /**
411
- * Download File Into Uploads Directory
412
- *
413
- * @param string $file Download File URL.
414
- * @return array Downloaded file data.
415
- */
416
- public static function download_file( $file = '' )
417
- {
418
-
419
- // Gives us access to the download_url() and wp_handle_sideload() functions.
420
- include_once ABSPATH . 'wp-admin/includes/file.php';
421
-
422
- $timeout_seconds = 20;
423
-
424
- // Download file to temp dir.
425
- $temp_file = download_url($file, $timeout_seconds);
426
-
427
- // WP Error.
428
- if (is_wp_error($temp_file) ) {
429
- return array(
430
- 'success' => false,
431
- 'data' => $temp_file->get_error_message(),
432
- );
433
- }
434
-
435
- // Array based on $_FILE as seen in PHP file uploads.
436
- $file_args = array(
437
- 'name' => basename($file),
438
- 'tmp_name' => $temp_file,
439
- 'error' => 0,
440
- 'size' => filesize($temp_file),
441
- );
442
-
443
- $overrides = array(
444
-
445
- // Tells WordPress to not look for the POST form
446
- // fields that would normally be present as
447
- // we downloaded the file from a remote server, so there
448
- // will be no form fields
449
- // Default is true.
450
- 'test_form' => false,
451
-
452
- // Setting this to false lets WordPress allow empty files, not recommended.
453
- // Default is true.
454
- 'test_size' => true,
455
-
456
- // A properly uploaded file will pass this test. There should be no reason to override this one.
457
- 'test_upload' => true,
458
-
459
- 'mimes' => array(
460
- 'xml' => 'text/xml',
461
- 'json' => 'text/plain',
462
- ),
463
- );
464
-
465
- // Move the temporary file into the uploads directory.
466
- $results = wp_handle_sideload($file_args, $overrides);
467
-
468
- if (isset($results['error']) ) {
469
- return array(
470
- 'success' => false,
471
- 'data' => $results,
472
- );
473
- }
474
-
475
- // Success.
476
- return array(
477
- 'success' => true,
478
- 'data' => $results,
479
- );
480
- }
481
-
482
- /**
483
- * Import End.
484
- *
485
- * @since 1.0.0
486
- * @return void
487
- */
488
- public function import_end()
489
- {
490
-
491
- $current_active_site = isset($_REQUEST['slug']) ? $_REQUEST['slug'] : '';
492
- update_option('responsive_current_active_site', $current_active_site);
493
-
494
- do_action('responsive_ready_sites_import_complete');
495
- }
496
-
497
-
498
- /**
499
- * Get single demo.
500
- *
501
- * @since 1.0.0
502
- *
503
- * @param (String) $demo_api_uri API URL of a demo.
504
- *
505
- * @return (Array) $responsive_demo_data demo data for the demo.
506
- */
507
- public static function get_responsive_single_demo( $demo_api_uri )
508
- {
509
-
510
- // default values.
511
- $remote_args = array();
512
- $defaults = array(
513
- 'id' => '',
514
- 'xml_path' => '',
515
- 'wpforms_path' => '',
516
- 'site_customizer_data' => '',
517
- 'required_plugins' => '',
518
- 'site_widgets_data' => '',
519
- 'slug' => '',
520
- 'site_options_data' => '',
521
- );
522
-
523
- $api_args = apply_filters(
524
- 'responsive_sites_api_args',
525
- array(
526
- 'timeout' => 15,
527
- )
528
- );
529
-
530
- // Use this for premium demos.
531
- $request_params = apply_filters(
532
- 'responsive_sites_api_params',
533
- array(
534
- 'site_url' => '',
535
- )
536
- );
537
-
538
- $demo_api_uri = add_query_arg($request_params, $demo_api_uri);
539
-
540
- // API Call.
541
- $response = wp_remote_get($demo_api_uri, $api_args);
542
-
543
- if (is_wp_error($response) || ( isset($response->status) && 0 === $response->status ) ) {
544
- if (isset($response->status) ) {
545
- $data = json_decode($response, true);
546
- } else {
547
- return new WP_Error('api_invalid_response_code', $response->get_error_message());
548
- }
549
- } else {
550
- $data = json_decode(wp_remote_retrieve_body($response), true);
551
- }
552
-
553
- if (! isset($data['code']) ) {
554
- $remote_args['id'] = $data['id'];
555
- $remote_args['xml_path'] = $data['xml_path'];
556
- $remote_args['wpforms_path'] = $data['wpforms_path'];
557
- $remote_args['site_customizer_data'] = $data['site_customizer_data'];
558
- $remote_args['required_plugins'] = $data['required_plugins'];
559
- $remote_args['site_widgets_data'] = $data['site_widgets_data'];
560
- $remote_args['site_options_data'] = $data['site_options_data'];
561
- $remote_args['slug'] = $data['slug'];
562
- }
563
-
564
- // Merge remote demo and defaults.
565
- return wp_parse_args($remote_args, $defaults);
566
- }
567
-
568
- /**
569
- * Reset customizer data
570
- *
571
- * @since 1.3.0
572
- * @return void
573
- */
574
- public function reset_customizer_data()
575
- {
576
-
577
- delete_option('responsive_theme_options');
578
-
579
- wp_send_json_success();
580
- }
581
-
582
- /**
583
- * Reset site options
584
- *
585
- * @since 1.3.0
586
- * @return void
587
- */
588
- public function reset_site_options()
589
- {
590
-
591
- $options = get_option('_responsive_ready_sites_old_site_options', array());
592
-
593
- if ($options ) {
594
- foreach ( $options as $option_key => $option_value ) {
595
- delete_option($option_key);
596
- }
597
- }
598
-
599
- wp_send_json_success();
600
- }
601
-
602
- /**
603
- * Reset widgets data
604
- *
605
- * @since 1.3.0
606
- * @return void
607
- */
608
- public function reset_widgets_data()
609
- {
610
- $old_widgets = get_option('_responsive_ready_sites_old_widgets_data', array());
611
-
612
- if ($old_widgets ) {
613
- $sidebars_widgets = get_option('sidebars_widgets', array());
614
-
615
- foreach ( $old_widgets as $sidebar_id => $widgets ) {
616
-
617
- if ($widgets ) {
618
- foreach ( $widgets as $widget_key => $widget_data ) {
619
-
620
- if (isset($sidebars_widgets['wp_inactive_widgets']) ) {
621
- if (! in_array($widget_key, $sidebars_widgets['wp_inactive_widgets'], true) ) {
622
- $sidebars_widgets['wp_inactive_widgets'][] = $widget_key;
623
- }
624
- }
625
- }
626
- }
627
- }
628
-
629
- update_option('sidebars_widgets', $sidebars_widgets);
630
- }
631
- wp_send_json_success();
632
- }
633
-
634
-
635
- /**
636
- * Delete imported posts
637
- *
638
- * @since 1.3.0
639
- * @return void
640
- */
641
- public function delete_imported_posts()
642
- {
643
- $post_id = isset($_REQUEST['post_id']) ? absint($_REQUEST['post_id']) : '';
644
- $message = 'Deleted - Post ID ' . $post_id . ' - ' . get_post_type($post_id) . ' - ' . get_the_title($post_id);
645
-
646
- wp_delete_post($post_id, true);
647
-
648
- /* translators: %s is the post ID */
649
- wp_send_json_success($message);
650
- }
651
-
652
- /**
653
- * Delete imported WP forms
654
- *
655
- * @since 1.3.0
656
- * @return void
657
- */
658
- public function delete_imported_wp_forms()
659
- {
660
- $post_id = isset($_REQUEST['post_id']) ? absint($_REQUEST['post_id']) : '';
661
-
662
- $message = 'Deleted - Form ID ' . $post_id . ' - ' . get_post_type($post_id) . ' - ' . get_the_title($post_id);
663
-
664
- wp_delete_post($post_id, true);
665
-
666
- /* translators: %s is the form ID */
667
- wp_send_json_success($message);
668
- }
669
-
670
- /**
671
- * Delete imported terms
672
- *
673
- * @since 1.3.0
674
- * @return void
675
- */
676
- public function delete_imported_terms()
677
- {
678
-
679
- $term_id = isset($_REQUEST['term_id']) ? absint($_REQUEST['term_id']) : '';
680
-
681
- $message = '';
682
-
683
- if ($term_id ) {
684
- $term = get_term($term_id);
685
- if ($term ) {
686
- $message = 'Deleted - Term ' . $term_id . ' - ' . $term->name . ' ' . $term->taxonomy;
687
- wp_delete_term($term_id, $term->taxonomy);
688
- }
689
- }
690
-
691
- /* translators: %s is the term ID */
692
- wp_send_json_success($message);
693
- }
694
- }
695
-
696
- /**
697
- * Initialized by calling 'get_instance()' method
698
- */
699
- Responsive_Ready_Sites_Importer::get_instance();
700
 
701
  endif;
6
  * @package Responsive Ready Sites
7
  */
8
 
9
+ defined( 'ABSPATH' ) || exit;
10
+
11
+ if ( ! class_exists( 'Responsive_Ready_Sites_Importer' ) ) :
12
+
13
+ /**
14
+ * Responsive Ready Sites Importer
15
+ */
16
+ class Responsive_Ready_Sites_Importer {
17
+
18
+
19
+ /**
20
+ * Instance
21
+ *
22
+ * @since 1.0.0
23
+ * @var (Object) Class object
24
+ */
25
+ public static $instance = null;
26
+
27
+ /**
28
+ * Set Instance
29
+ *
30
+ * @since 1.0.0
31
+ *
32
+ * @return object Class object.
33
+ */
34
+ public static function get_instance() {
35
+ if ( ! isset( self::$instance ) ) {
36
+ self::$instance = new self();
37
+ }
38
+
39
+ return self::$instance;
40
+ }
41
+
42
+ /**
43
+ * Constructor.
44
+ *
45
+ * @since 1.0.0
46
+ */
47
+ public function __construct() {
48
+
49
+ add_action( 'init', array( $this, 'load_importer' ) );
50
+
51
+ $responsive_ready_sites_importers_dir = plugin_dir_path( __FILE__ );
52
+ include_once $responsive_ready_sites_importers_dir . 'class-responsive-ready-sites-widgets-importer.php';
53
+ include_once $responsive_ready_sites_importers_dir . 'class-responsive-ready-sites-options-importer.php';
54
+
55
+ // Import AJAX.
56
+ add_action( 'wp_ajax_responsive-ready-sites-import-set-site-data-free', array( $this, 'import_start' ) );
57
+ add_action( 'wp_ajax_responsive-ready-sites-import-xml', array( $this, 'import_xml_data' ) );
58
+ add_action( 'wp_ajax_responsive-ready-sites-import-wpforms', array( $this, 'import_wpforms' ) );
59
+ add_action( 'wp_ajax_responsive-ready-sites-import-customizer-settings', array( $this, 'import_customizer_settings' ) );
60
+ add_action( 'wp_ajax_responsive-ready-sites-import-widgets', array( $this, 'import_widgets' ) );
61
+ add_action( 'wp_ajax_responsive-ready-sites-import-options', array( $this, 'import_options' ) );
62
+ add_action( 'wp_ajax_responsive-ready-sites-import-end', array( $this, 'import_end' ) );
63
+
64
+ add_action( 'responsive_ready_sites_import_complete', array( $this, 'clear_cache' ) );
65
+
66
+ include_once $responsive_ready_sites_importers_dir . 'batch-processing/class-responsive-ready-sites-batch-processing.php';
67
+
68
+ // Reset Customizer Data.
69
+ add_action( 'wp_ajax_responsive-ready-sites-reset-customizer-data', array( $this, 'reset_customizer_data' ) );
70
+ add_action( 'wp_ajax_responsive-ready-sites-reset-site-options', array( $this, 'reset_site_options' ) );
71
+ add_action( 'wp_ajax_responsive-ready-sites-reset-widgets-data', array( $this, 'reset_widgets_data' ) );
72
+
73
+ // Reset Post & Terms.
74
+ add_action( 'wp_ajax_responsive-ready-sites-delete-posts', array( $this, 'delete_imported_posts' ) );
75
+ add_action( 'wp_ajax_responsive-ready-sites-delete-wp-forms', array( $this, 'delete_imported_wp_forms' ) );
76
+ add_action( 'wp_ajax_responsive-ready-sites-delete-terms', array( $this, 'delete_imported_terms' ) );
77
+
78
+ if ( version_compare( get_bloginfo( 'version' ), '5.0.0', '>=' ) ) {
79
+ add_filter( 'http_request_timeout', array( $this, 'set_timeout_for_images' ), 10, 2 );
80
+ }
81
+ }
82
+
83
+ /**
84
+ * Clear Cache.
85
+ *
86
+ * @since 2.0.3
87
+ */
88
+ public function clear_cache() {
89
+ // Clear 'Elementor' file cache.
90
+ if ( class_exists( '\Elementor\Plugin' ) ) {
91
+ Elementor\Plugin::$instance->posts_css_manager->clear_cache();
92
+ }
93
+ }
94
+
95
+ /**
96
+ * Set the timeout for the HTTP request by request URL.
97
+ *
98
+ * E.g. If URL is images (jpg|png|gif|jpeg) are from the domain `https://websitedemos.net` then we have set the timeout by 30 seconds. Default 5 seconds.
99
+ *
100
+ * @since 2.0.3
101
+ *
102
+ * @param int $timeout_value Time in seconds until a request times out. Default 5.
103
+ * @param string $url The request URL.
104
+ */
105
+ public function set_timeout_for_images( $timeout_value, $url ) {
106
+
107
+ // URL not contain `https://ccreadysites.cyberchimps.com` then return $timeout_value.
108
+ if ( strpos( $url, 'ccreadysites.cyberchimps.com' ) === false ) {
109
+ return $timeout_value;
110
+ }
111
+
112
+ // Check is image URL of type jpg|png|gif|jpeg.
113
+ if ( self::is_image_url( $url ) ) {
114
+ $timeout_value = 30;
115
+ }
116
+ return $timeout_value;
117
+ }
118
+
119
+ /**
120
+ * Is Image URL
121
+ *
122
+ * @since 2.0.3
123
+ *
124
+ * @param string $url URL.
125
+ * @return boolean
126
+ */
127
+ public function is_image_url( $url = '' ) {
128
+ if ( empty( $url ) ) {
129
+ return false;
130
+ }
131
+
132
+ if ( preg_match( '/^((http?:\/\/)|(https?:\/\/)|(www\.))([a-z0-9-].?)+(:[0-9]+)?\/[\w\-]+\.(jpg|png|svg|gif|jpeg)\/?$/i', $url ) ) {
133
+ return true;
134
+ }
135
+
136
+ return false;
137
+ }
138
+
139
+ /**
140
+ * Load WordPress Plugin Installer and WordPress Importer.
141
+ */
142
+ public function load_importer() {
143
+ include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
144
+ $responsive_ready_sites_importers_dir = plugin_dir_path( __FILE__ );
145
+
146
+ include_once $responsive_ready_sites_importers_dir . 'wxr-importer/class-responsive-ready-sites-wxr-importer.php';
147
+ }
148
+
149
+ /**
150
+ * Start Site Import
151
+ *
152
+ * @since 1.0.0
153
+ * @return void
154
+ */
155
+ public function import_start() {
 
 
 
 
 
 
156
 
157
  $demo_api_uri = isset( $_POST['api_url'] ) ? esc_url( $_POST['api_url'] ) : ''; //phpcs:ignore
158
 
159
+ if ( ! empty( $demo_api_uri ) ) {
160
 
161
+ $demo_data = self::get_responsive_single_demo( $demo_api_uri );
162
 
163
+ update_option( 'responsive_ready_sites_import_data', $demo_data );
164
 
165
+ if ( is_wp_error( $demo_data ) ) {
166
+ wp_send_json_error( $demo_data->get_error_message() );
167
+ } else {
168
+ do_action( 'responsive_ready_sites_import_start', $demo_data, $demo_api_uri );
169
+ }
170
 
171
+ wp_send_json_success( $demo_data );
172
 
173
+ } else {
174
+ wp_send_json_error( __( 'Request site API URL is empty. Try again!', 'responsive-addons' ) );
175
+ }
176
 
177
+ }
178
 
179
 
180
+ /**
181
+ * Import XML Data.
182
+ *
183
+ * @since 1.0.0
184
+ * @return void
185
+ */
186
+ public function import_xml_data() {
 
187
 
188
+ if ( ! class_exists( 'XMLReader' ) ) {
189
+ wp_send_json_error( __( 'If XMLReader is not available, it imports all other settings and only skips XML import. This creates an incomplete website. We should bail early and not import anything if this is not present.', 'responsive-addons' ) );
190
+ }
191
 
192
  $wxr_url = ( isset( $_REQUEST['xml_path'] ) ) ? urldecode( $_REQUEST['xml_path'] ) : ''; //phpcs:ignore
193
 
194
+ if ( isset( $wxr_url ) ) {
195
+
196
+ // Download XML file.
197
+ $xml_path = self::download_file( $wxr_url );
198
+
199
+ if ( $xml_path['success'] ) {
200
+ if ( isset( $xml_path['data']['file'] ) ) {
201
+ $data = Responsive_Ready_Sites_WXR_Importer::instance()->get_xml_data( $xml_path['data']['file'] );
202
+ $data['xml'] = $xml_path['data'];
203
+ wp_send_json_success( $data );
204
+ } else {
205
+ wp_send_json_error( __( 'There was an error downloading the XML file.', 'responsive-addons' ) );
206
+ }
207
+ } else {
208
+ wp_send_json_error( $xml_path['data'] );
209
+ }
210
+ } else {
211
+ wp_send_json_error( __( 'Invalid site XML file!', 'responsive-addons' ) );
212
+ }
213
+
214
+ }
215
+
216
+ /**
217
+ * Import WP Forms
218
+ *
219
+ * @since 1.0.0
220
+ *
221
+ * @return void
222
+ */
223
+ public function import_wpforms() {
 
224
 
225
  $site_wpforms_url = ( isset( $_REQUEST['wpforms_path'] ) ) ? urldecode( $_REQUEST['wpforms_path'] ) : ''; //phpcs:ignore
226
+ $ids_mapping = array();
227
 
228
+ if ( ! empty( $site_wpforms_url ) && function_exists( 'wpforms_encode' ) ) {
229
 
230
+ // Download XML file.
231
+ $xml_path = self::download_file( $site_wpforms_url );
232
 
233
+ if ( $xml_path['success'] ) {
234
+ if ( isset( $xml_path['data']['file'] ) ) {
235
 
236
+ $ext = strtolower( pathinfo( $xml_path['data']['file'], PATHINFO_EXTENSION ) );
237
 
238
+ if ( 'json' === $ext ) {
239
  $forms = json_decode( file_get_contents( $xml_path['data']['file'] ), true ); //phpcs:ignore
240
 
241
+ if ( ! empty( $forms ) ) {
242
+
243
+ foreach ( $forms as $form ) {
244
+ $title = ! empty( $form['settings']['form_title'] ) ? $form['settings']['form_title'] : '';
245
+ $desc = ! empty( $form['settings']['form_desc'] ) ? $form['settings']['form_desc'] : '';
246
+ $new_id = post_exists( $title );
247
+
248
+ if ( ! $new_id ) {
249
+ $new_id = wp_insert_post(
250
+ array(
251
+ 'post_title' => $title,
252
+ 'post_status' => 'publish',
253
+ 'post_type' => 'wpforms',
254
+ 'post_excerpt' => $desc,
255
+ )
256
+ );
257
+
258
+ // Set meta for tracking the form imported from demo site.
259
+ update_post_meta( $new_id, '_responsive_ready_sites_imported_wp_forms', true );
260
+ }
261
+
262
+ if ( $new_id ) {
263
+
264
+ // ID mapping.
265
+ $ids_mapping[ $form['id'] ] = $new_id;
266
+
267
+ $form['id'] = $new_id;
268
+ wp_update_post(
269
+ array(
270
+ 'ID' => $new_id,
271
+ 'post_content' => wpforms_encode( $form ),
272
+ )
273
+ );
274
+ }
275
+ }
276
+ }
277
+ }
278
+ }
279
+ }
280
+ }
281
+
282
+ update_option( 'responsive_sites_wpforms_ids_mapping', $ids_mapping );
283
+
284
+ wp_send_json_success( $ids_mapping );
285
+ }
286
+
287
+ /**
288
+ * Import Customizer Settings
289
+ *
290
+ * @since 1.0.0
291
+ *
292
+ * @return void
293
+ */
294
+ public function import_customizer_settings() {
 
 
295
 
296
  $customizer_data = ( isset( $_POST['site_customizer_data'] ) ) ? (array) json_decode( stripcslashes( $_POST['site_customizer_data'] ), 1 ) : array(); //phpcs:ignore
297
 
298
+ if ( ! empty( $customizer_data ) ) {
299
 
300
+ // Set meta for tracking the post.
301
+ update_option( '_responsive_sites_old_customizer_data', $customizer_data );
302
 
303
+ if ( isset( $customizer_data['responsive_settings'] ) ) {
304
+ update_option( 'responsive_theme_options', $customizer_data['responsive_settings'] );
305
+ }
306
 
307
+ if ( isset( $customizer_data['theme_mods_responsive'] ) ) {
308
+ update_option( 'theme_mods_responsive', $customizer_data['theme_mods_responsive'] );
309
+ }
310
 
311
+ // Add Custom CSS.
312
+ if ( isset( $options['custom_css'] ) ) {
313
+ wp_update_custom_css_post( $customizer_data['custom_css'] );
314
+ }
315
 
316
+ wp_send_json_success( $customizer_data );
317
 
318
+ } else {
319
+ wp_send_json_error( __( 'Customizer data is empty!', 'responsive-addons' ) );
320
+ }
321
+ }
322
 
323
 
324
+ /**
325
+ * Import Widgets.
326
+ *
327
+ * @since 1.0.0
328
+ * @return void
329
+ */
330
+ public function import_widgets() {
 
331
 
332
  $widgets_data = ( isset( $_POST['widgets_data'] ) ) ? (object) json_decode( stripcslashes( $_POST['widgets_data'] ) ) : ''; //phpcs:ignore
333
 
334
+ if ( ! empty( $widgets_data ) ) {
335
+
336
+ $widgets_importer = Responsive_Ready_Sites_Widgets_Importer::instance();
337
+ $status = $widgets_importer->import_widgets_data( $widgets_data );
338
+
339
+ // Set meta for tracking the post.
340
+ if ( is_object( $widgets_data ) ) {
341
+ $widgets_data = (array) $widgets_data;
342
+ update_option( '_responsive_sites_old_widgets_data', $widgets_data );
343
+ }
344
+
345
+ wp_send_json_success( $widgets_data );
346
+ } else {
347
+ wp_send_json_error( __( 'Widget data is empty!', 'responsive-addons' ) );
348
+ }
349
+
350
+ }
351
+
352
+ /**
353
+ * Import Options.
354
+ *
355
+ * @since 1.0.0
356
+ * @return void
357
+ */
358
+ public function import_options() {
359
+
360
+ $options_data = ( isset( $_POST['options_data'] ) ) ? (array) json_decode( stripcslashes( $_POST['options_data'] ), 1 ) : '';
361
+
362
+ if ( ! empty( $options_data ) ) {
363
+
364
+ // Set meta for tracking the post.
365
+ if ( is_array( $options_data ) ) {
366
+ update_option( '_responsive_ready_sites_old_site_options', $options_data );
367
+ }
368
+
369
+ $options_importer = Responsive_Ready_Sites_Options_Importer::instance();
370
+ $options_importer->import_options( $options_data );
371
+ wp_send_json_success( $options_data );
372
+ } else {
373
+ wp_send_json_error( __( 'Site options are empty!', 'responsive-addons' ) );
374
+ }
375
+
376
+ }
377
+
378
+ /**
379
+ * Download File Into Uploads Directory
380
+ *
381
+ * @param string $file Download File URL.
382
+ * @return array Downloaded file data.
383
+ */
384
+ public static function download_file( $file = '' ) {
385
+
386
+ // Gives us access to the download_url() and wp_handle_sideload() functions.
387
+ include_once ABSPATH . 'wp-admin/includes/file.php';
388
+
389
+ $timeout_seconds = 20;
390
+
391
+ // Download file to temp dir.
392
+ $temp_file = download_url( $file, $timeout_seconds );
393
+
394
+ // WP Error.
395
+ if ( is_wp_error( $temp_file ) ) {
396
+ return array(
397
+ 'success' => false,
398
+ 'data' => $temp_file->get_error_message(),
399
+ );
400
+ }
401
+
402
+ // Array based on $_FILE as seen in PHP file uploads.
403
+ $file_args = array(
404
+ 'name' => basename( $file ),
405
+ 'tmp_name' => $temp_file,
406
+ 'error' => 0,
407
+ 'size' => filesize( $temp_file ),
408
+ );
409
+
410
+ $overrides = array(
411
+
412
+ // Tells WordPress to not look for the POST form
413
+ // fields that would normally be present as
414
+ // we downloaded the file from a remote server, so there
415
+ // will be no form fields
416
+ // Default is true.
417
+ 'test_form' => false,
418
+
419
+ // Setting this to false lets WordPress allow empty files, not recommended.
420
+ // Default is true.
421
+ 'test_size' => true,
422
+
423
+ // A properly uploaded file will pass this test. There should be no reason to override this one.
424
+ 'test_upload' => true,
425
+
426
+ 'mimes' => array(
427
+ 'xml' => 'text/xml',
428
+ 'json' => 'text/plain',
429
+ ),
430
+ );
431
+
432
+ // Move the temporary file into the uploads directory.
433
+ $results = wp_handle_sideload( $file_args, $overrides );
434
+
435
+ if ( isset( $results['error'] ) ) {
436
+ return array(
437
+ 'success' => false,
438
+ 'data' => $results,
439
+ );
440
+ }
441
+
442
+ // Success.
443
+ return array(
444
+ 'success' => true,
445
+ 'data' => $results,
446
+ );
447
+ }
448
+
449
+ /**
450
+ * Import End.
451
+ *
452
+ * @since 1.0.0
453
+ * @return void
454
+ */
455
+ public function import_end() {
456
+
457
+ $current_active_site = isset( $_REQUEST['slug'] ) ? $_REQUEST['slug'] : '';
458
+ update_option( 'responsive_current_active_site', $current_active_site );
459
+
460
+ do_action( 'responsive_ready_sites_import_complete' );
461
+ }
462
+
463
+
464
+ /**
465
+ * Get single demo.
466
+ *
467
+ * @since 1.0.0
468
+ *
469
+ * @param (String) $demo_api_uri API URL of a demo.
470
+ *
471
+ * @return (Array) $responsive_demo_data demo data for the demo.
472
+ */
473
+ public static function get_responsive_single_demo( $demo_api_uri ) {
474
+
475
+ // default values.
476
+ $remote_args = array();
477
+ $defaults = array(
478
+ 'id' => '',
479
+ 'xml_path' => '',
480
+ 'wpforms_path' => '',
481
+ 'site_customizer_data' => '',
482
+ 'required_plugins' => '',
483
+ 'site_widgets_data' => '',
484
+ 'slug' => '',
485
+ 'site_options_data' => '',
486
+ );
487
+
488
+ $api_args = apply_filters(
489
+ 'responsive_sites_api_args',
490
+ array(
491
+ 'timeout' => 15,
492
+ )
493
+ );
494
+
495
+ // Use this for premium demos.
496
+ $request_params = apply_filters(
497
+ 'responsive_sites_api_params',
498
+ array(
499
+ 'site_url' => '',
500
+ )
501
+ );
502
+
503
+ $demo_api_uri = add_query_arg( $request_params, $demo_api_uri );
504
+
505
+ // API Call.
506
+ $response = wp_remote_get( $demo_api_uri, $api_args );
507
+
508
+ if ( is_wp_error( $response ) || ( isset( $response->status ) && 0 === $response->status ) ) {
509
+ if ( isset( $response->status ) ) {
510
+ $data = json_decode( $response, true );
511
+ } else {
512
+ return new WP_Error( 'api_invalid_response_code', $response->get_error_message() );
513
+ }
514
+ } else {
515
+ $data = json_decode( wp_remote_retrieve_body( $response ), true );
516
+ }
517
+
518
+ if ( ! isset( $data['code'] ) ) {
519
+ $remote_args['id'] = $data['id'];
520
+ $remote_args['xml_path'] = $data['xml_path'];
521
+ $remote_args['wpforms_path'] = $data['wpforms_path'];
522
+ $remote_args['site_customizer_data'] = $data['site_customizer_data'];
523
+ $remote_args['required_plugins'] = $data['required_plugins'];
524
+ $remote_args['site_widgets_data'] = json_decode( $data['site_widgets_data'] );
525
+ $remote_args['site_options_data'] = $data['site_options_data'];
526
+ $remote_args['slug'] = $data['slug'];
527
+ }
528
+
529
+ // Merge remote demo and defaults.
530
+ return wp_parse_args( $remote_args, $defaults );
531
+ }
532
+
533
+ /**
534
+ * Reset customizer data
535
+ *
536
+ * @since 1.3.0
537
+ * @return void
538
+ */
539
+ public function reset_customizer_data() {
540
+
541
+ delete_option( 'responsive_theme_options' );
542
+
543
+ wp_send_json_success();
544
+ }
545
+
546
+ /**
547
+ * Reset site options
548
+ *
549
+ * @since 1.3.0
550
+ * @return void
551
+ */
552
+ public function reset_site_options() {
553
+
554
+ $options = get_option( '_responsive_ready_sites_old_site_options', array() );
555
+
556
+ if ( $options ) {
557
+ foreach ( $options as $option_key => $option_value ) {
558
+ delete_option( $option_key );
559
+ }
560
+ }
561
+
562
+ wp_send_json_success();
563
+ }
564
+
565
+ /**
566
+ * Reset widgets data
567
+ *
568
+ * @since 1.3.0
569
+ * @return void
570
+ */
571
+ public function reset_widgets_data() {
572
+ $old_widgets = get_option( '_responsive_ready_sites_old_widgets_data', array() );
573
+
574
+ if ( $old_widgets ) {
575
+ $sidebars_widgets = get_option( 'sidebars_widgets', array() );
576
+
577
+ foreach ( $old_widgets as $sidebar_id => $widgets ) {
578
+
579
+ if ( $widgets ) {
580
+ foreach ( $widgets as $widget_key => $widget_data ) {
581
+
582
+ if ( isset( $sidebars_widgets['wp_inactive_widgets'] ) ) {
583
+ if ( ! in_array( $widget_key, $sidebars_widgets['wp_inactive_widgets'], true ) ) {
584
+ $sidebars_widgets['wp_inactive_widgets'][] = $widget_key;
585
+ }
586
+ }
587
+ }
588
+ }
589
+ }
590
+
591
+ update_option( 'sidebars_widgets', $sidebars_widgets );
592
+ }
593
+ wp_send_json_success();
594
+ }
595
+
596
+
597
+ /**
598
+ * Delete imported posts
599
+ *
600
+ * @since 1.3.0
601
+ * @return void
602
+ */
603
+ public function delete_imported_posts() {
604
+ $post_id = isset( $_REQUEST['post_id'] ) ? absint( $_REQUEST['post_id'] ) : '';
605
+ $message = 'Deleted - Post ID ' . $post_id . ' - ' . get_post_type( $post_id ) . ' - ' . get_the_title( $post_id );
606
+
607
+ wp_delete_post( $post_id, true );
608
+
609
+ /* translators: %s is the post ID */
610
+ wp_send_json_success( $message );
611
+ }
612
+
613
+ /**
614
+ * Delete imported WP forms
615
+ *
616
+ * @since 1.3.0
617
+ * @return void
618
+ */
619
+ public function delete_imported_wp_forms() {
620
+ $post_id = isset( $_REQUEST['post_id'] ) ? absint( $_REQUEST['post_id'] ) : '';
621
+
622
+ $message = 'Deleted - Form ID ' . $post_id . ' - ' . get_post_type( $post_id ) . ' - ' . get_the_title( $post_id );
623
+
624
+ wp_delete_post( $post_id, true );
625
+
626
+ /* translators: %s is the form ID */
627
+ wp_send_json_success( $message );
628
+ }
629
+
630
+ /**
631
+ * Delete imported terms
632
+ *
633
+ * @since 1.3.0
634
+ * @return void
635
+ */
636
+ public function delete_imported_terms() {
637
+
638
+ $term_id = isset( $_REQUEST['term_id'] ) ? absint( $_REQUEST['term_id'] ) : '';
639
+
640
+ $message = '';
641
+
642
+ if ( $term_id ) {
643
+ $term = get_term( $term_id );
644
+ if ( $term ) {
645
+ $message = 'Deleted - Term ' . $term_id . ' - ' . $term->name . ' ' . $term->taxonomy;
646
+ wp_delete_term( $term_id, $term->taxonomy );
647
+ }
648
+ }
649
+
650
+ /* translators: %s is the term ID */
651
+ wp_send_json_success( $message );
652
+ }
653
+ }
654
+
655
+ /**
656
+ * Initialized by calling 'get_instance()' method
657
+ */
658
+ Responsive_Ready_Sites_Importer::get_instance();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
659
 
660
  endif;
includes/importers/class-responsive-ready-sites-options-importer.php CHANGED
@@ -72,6 +72,27 @@ class Responsive_Ready_Sites_Options_Importer {
72
  'elementor_space_between_widgets',
73
  'elementor_stretched_section_container',
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  );
76
  }
77
 
@@ -103,17 +124,29 @@ class Responsive_Ready_Sites_Options_Importer {
103
  $this->update_page_id_by_option_value( $option_name, $option_value );
104
  break;
105
 
106
- // nav menu locations.
107
- // case 'nav_menu_locations':
108
- // $this->set_nav_menu_locations( $option_value );
109
- // break;
110
-
111
  // insert logo.
112
  case 'custom_logo':
113
  $post_guid = get_post_field( 'guid', $option_value );
114
  $this->insert_logo( $post_guid );
115
  break;
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  default:
118
  update_option( $option_name, $option_value );
119
  break;
@@ -253,4 +286,52 @@ class Responsive_Ready_Sites_Options_Importer {
253
  return $data;
254
  }
255
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
256
  }
72
  'elementor_space_between_widgets',
73
  'elementor_stretched_section_container',
74
 
75
+ // Plugin: WooCommerce.
76
+ // Pages.
77
+ 'woocommerce_shop_page_title',
78
+ 'woocommerce_cart_page_title',
79
+ 'woocommerce_checkout_page_title',
80
+ 'woocommerce_myaccount_page_title',
81
+ 'woocommerce_edit_address_page_title',
82
+ 'woocommerce_view_order_page_title',
83
+ 'woocommerce_change_password_page_title',
84
+ 'woocommerce_logout_page_title',
85
+
86
+ // Account & Privacy.
87
+ 'woocommerce_enable_guest_checkout',
88
+ 'woocommerce_enable_checkout_login_reminder',
89
+ 'woocommerce_enable_signup_and_login_from_checkout',
90
+ 'woocommerce_enable_myaccount_registration',
91
+ 'woocommerce_registration_generate_username',
92
+
93
+ // Categories.
94
+ 'woocommerce_product_cat',
95
+
96
  );
97
  }
98
 
124
  $this->update_page_id_by_option_value( $option_name, $option_value );
125
  break;
126
 
 
 
 
 
 
127
  // insert logo.
128
  case 'custom_logo':
129
  $post_guid = get_post_field( 'guid', $option_value );
130
  $this->insert_logo( $post_guid );
131
  break;
132
 
133
+ // Set WooCommerce page ID by page Title.
134
+ case 'woocommerce_shop_page_title':
135
+ case 'woocommerce_cart_page_title':
136
+ case 'woocommerce_checkout_page_title':
137
+ case 'woocommerce_myaccount_page_title':
138
+ case 'woocommerce_edit_address_page_title':
139
+ case 'woocommerce_view_order_page_title':
140
+ case 'woocommerce_change_password_page_title':
141
+ case 'woocommerce_logout_page_title':
142
+ $this->update_woocommerce_page_id_by_option_value( $option_name, $option_value );
143
+ break;
144
+
145
+ // import WooCommerce category images.
146
+ case 'woocommerce_product_cat':
147
+ $this->set_woocommerce_product_cat( $option_value );
148
+ break;
149
+
150
  default:
151
  update_option( $option_name, $option_value );
152
  break;
286
  return $data;
287
  }
288
 
289
+ /**
290
+ * Update WooCommerce page ids.
291
+ *
292
+ * @since 2.0.5
293
+ *
294
+ * @param string $option_name Option name.
295
+ * @param mixed $option_value Option value.
296
+ * @return void
297
+ */
298
+ private function update_woocommerce_page_id_by_option_value( $option_name, $option_value ) {
299
+ $option_name = str_replace( '_title', '_id', $option_name );
300
+ $this->update_page_id_by_option_value( $option_name, $option_value );
301
+ }
302
+
303
+ /**
304
+ * Set WooCommerce category images.
305
+ *
306
+ * @since 2.0.5
307
+ *
308
+ * @param array $cats Array of categories.
309
+ */
310
+ private function set_woocommerce_product_cat( $cats = array() ) {
311
+
312
+ $menu_locations = array();
313
+
314
+ if ( isset( $cats ) && is_array( $cats ) ) {
315
+
316
+ foreach ( $cats as $key => $cat ) {
317
+
318
+ if ( ! empty( $cat['slug'] ) && ! empty( $cat['thumbnail_src'] ) ) {
319
+
320
+ $image = (object) self::_sideload_image( $cat['thumbnail_src'] );
321
+
322
+ if ( ! is_wp_error( $image ) ) {
323
+
324
+ if ( isset( $image->attachment_id ) && ! empty( $image->attachment_id ) ) {
325
+
326
+ $term = get_term_by( 'slug', $cat['slug'], 'product_cat' );
327
+
328
+ if ( is_object( $term ) ) {
329
+ update_term_meta( $term->term_id, 'thumbnail_id', $image->attachment_id );
330
+ }
331
+ }
332
+ }
333
+ }
334
+ }
335
+ }
336
+ }
337
  }
includes/importers/class-responsive-ready-sites-plugin-installer.php DELETED
@@ -1,196 +0,0 @@
1
- <?php
2
- /**
3
- * Class Responsive_Ready_Sites_Plugin_Installer
4
- *
5
- * @since 1.0.0
6
- * @package Responsive Ready Sites Plugin Installer
7
- */
8
-
9
- defined( 'ABSPATH' ) || exit;
10
-
11
- /**
12
- * Class Responsive Sites Plugin Installer
13
- *
14
- * @since 1.0.0
15
- */
16
- class Responsive_Ready_Sites_Plugin_Installer {
17
-
18
- /**
19
- * Instance of Responsive_Ready_Sites_Plugin_Installer
20
- *
21
- * @since 1.0.0
22
- * @var Responsive_Ready_Sites_Plugin_Installer
23
- */
24
- private static $instance = null;
25
-
26
- /**
27
- * Instantiate Responsive_Ready_Sites_Plugin_Installer
28
- *
29
- * @since 1.0.0
30
- * @return (Object) Responsive_Ready_Sites_Plugin_Installer.
31
- */
32
- public static function instance() {
33
- if ( ! isset( self::$instance ) ) {
34
- self::$instance = new self();
35
- }
36
-
37
- return self::$instance;
38
- }
39
-
40
- /**
41
- * Install required plugins
42
- *
43
- * @since 1.0.0
44
- * @param array $required_plugins Array of Required Plugins.
45
- * @return void
46
- */
47
- public function install_plugins( $required_plugins ) {
48
-
49
- foreach ( $required_plugins as $plugin ) {
50
- self::install_activate_plugins( $plugin );
51
- }
52
- }
53
-
54
- /**
55
- * Download, install and activate a plugin
56
- *
57
- * If the plugin directory already exists, this will only try to activate the plugin
58
- *
59
- * @param string $plugin The plugin array.
60
- */
61
- public function install_activate_plugins( $plugin ) {
62
-
63
- $plugin_path = WP_PLUGIN_DIR . '/' . $plugin['init'];
64
-
65
- /*
66
- * Don't try installing plugins that already exist (wastes time downloading files that
67
- * won't be used
68
- */
69
- if ( ! file_exists( $plugin_path ) ) {
70
- $api = plugins_api(
71
- 'plugin_information',
72
- array(
73
- 'slug' => $plugin['slug'],
74
- 'fields' => array(
75
- 'short_description' => false,
76
- 'sections' => false,
77
- 'requires' => false,
78
- 'rating' => false,
79
- 'ratings' => false,
80
- 'downloaded' => false,
81
- 'last_updated' => false,
82
- 'added' => false,
83
- 'tags' => false,
84
- 'compatibility' => false,
85
- 'homepage' => false,
86
- 'donate_link' => false,
87
- ),
88
- )
89
- );
90
-
91
- // Replace with new QuietSkin for no output.
92
- $skin = new Plugin_Installer_Skin( array( 'api' => $api ) );
93
- $upgrader = new Plugin_Upgrader( $skin );
94
- $install = $upgrader->install( $api->download_link );
95
- }
96
-
97
- /*
98
- * The install results don't indicate what the main plugin file is, so we just try to
99
- * activate based on the slug. It may fail, in which case the plugin will have to be activated
100
- * manually from the admin screen.
101
- */
102
-
103
- if ( file_exists( $plugin_path ) ) {
104
- activate_plugin( $plugin_path );
105
- }
106
- }
107
-
108
-
109
- /**
110
- * Install Plugin Test.
111
- *
112
- * @param string $plugin Plugin.
113
- * @return void
114
- */
115
- public function install_plugins_test( $plugin ) {
116
-
117
- $api = plugins_api(
118
- 'plugin_information',
119
- array(
120
- 'slug' => $plugin['slug'],
121
- 'fields' => array(
122
- 'short_description' => false,
123
- 'sections' => false,
124
- 'requires' => false,
125
- 'rating' => false,
126
- 'ratings' => false,
127
- 'downloaded' => false,
128
- 'last_updated' => false,
129
- 'added' => false,
130
- 'tags' => false,
131
- 'compatibility' => false,
132
- 'homepage' => false,
133
- 'donate_link' => false,
134
- ),
135
- )
136
- );
137
- if ( self::is_plugin_installed( $plugin['slug'] ) ) {
138
- self::upgrade_plugin( $plugin['slug'] );
139
- } else {
140
- self::install_plugin( $api->download_link );
141
- }
142
- }
143
-
144
- /**
145
- * Check if plugin is Installed or Not.
146
- *
147
- * @since 1.0.0
148
- * @param string $slug Slug.
149
- * @return bool
150
- */
151
- public function is_plugin_installed( $slug ) {
152
- if ( ! function_exists( 'get_plugins' ) ) {
153
- require_once ABSPATH . 'wp-admin/includes/plugin.php';
154
- }
155
- $all_plugins = get_plugins();
156
-
157
- if ( ! empty( $all_plugins[ $slug ] ) ) {
158
- return true;
159
- } else {
160
- return false;
161
- }
162
- }
163
-
164
- /**
165
- * Install required plugins
166
- *
167
- * @since 1.0.0
168
- * @param string $plugin_zip Plugin Zip.
169
- * @return string
170
- */
171
- public function install_plugin( $plugin_zip ) {
172
- include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
173
- wp_cache_flush();
174
-
175
- $upgrader = new Plugin_Upgrader();
176
- $installed = $upgrader->install( $plugin_zip );
177
-
178
- return $installed;
179
- }
180
-
181
- /**
182
- * Update Plugin
183
- *
184
- * @param string $plugin_slug Plugin Slug.
185
- * @return bool|WP_Error
186
- */
187
- public function upgrade_plugin( $plugin_slug ) {
188
- include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
189
- wp_cache_flush();
190
-
191
- $upgrader = new Plugin_Upgrader();
192
- $upgraded = $upgrader->upgrade( $plugin_slug );
193
-
194
- return $upgraded;
195
- }
196
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/importers/class-responsive-ready-sites-widgets-importer.php CHANGED
@@ -140,138 +140,136 @@ class Responsive_Ready_Sites_Widgets_Importer {
140
  $results[ $sidebar_id ]['widgets'] = array();
141
 
142
  // Loop widgets.
143
- if ( is_array( $widgets ) ) {
144
- foreach ( $widgets as $widget_instance_id => $widget ) {
145
 
146
- $fail = false;
147
 
148
- // Get id_base (remove -# from end) and instance ID number.
149
- $id_base = preg_replace( '/-[0-9]+$/', '', $widget_instance_id );
150
- $instance_id_number = str_replace( $id_base . '-', '', $widget_instance_id );
151
 
152
- // Does site support this widget?
153
- if ( ! $fail && ! isset( $available_widgets[ $id_base ] ) ) {
154
- $fail = true;
155
- $widget_message_type = 'error';
156
- $widget_message = esc_html__( 'Site does not support widget', 'responsive-addons' ); // explain why widget not imported.
157
- }
158
 
159
- // Filter to modify settings object before conversion to array and import
160
- // Leave this filter here for backwards compatibility with manipulating objects (before conversion to array below)
161
- // Ideally the newer wie_widget_settings_array below will be used instead of this.
162
- $widget = apply_filters( 'wie_widget_settings', $widget ); // object.
163
 
164
- // Convert multidimensional objects to multidimensional arrays
165
- // Some plugins like Jetpack Widget Visibility store settings as multidimensional arrays
166
- // Without this, they are imported as objects and cause fatal error on Widgets page
167
- // If this creates problems for plugins that do actually intend settings in objects then may need to consider other approach: https://wordpress.org/support/topic/problem-with-array-of-arrays
168
- // It is probably much more likely that arrays are used than objects, however.
169
- $widget = json_decode( wp_json_encode( $widget ), true );
170
 
171
- // Filter to modify settings array
172
- // This is preferred over the older wie_widget_settings filter above
173
- // Do before identical check because changes may make it identical to end result (such as URL replacements).
174
- $widget = apply_filters( 'wie_widget_settings_array', $widget );
175
 
176
- // Does widget with identical settings already exist in same sidebar?
177
- if ( ! $fail && isset( $widget_instances[ $id_base ] ) ) {
178
 
179
- // Get existing widgets in this sidebar.
180
- $sidebars_widgets = get_option( 'sidebars_widgets' );
181
- $sidebar_widgets = isset( $sidebars_widgets[ $use_sidebar_id ] ) ? $sidebars_widgets[ $use_sidebar_id ] : array(); // check Inactive if that's where will go.
182
 
183
- // Loop widgets with ID base.
184
- $single_widget_instances = ! empty( $widget_instances[ $id_base ] ) ? $widget_instances[ $id_base ] : array();
185
- foreach ( $single_widget_instances as $check_id => $check_widget ) {
186
 
187
- // Is widget in same sidebar and has identical settings?
188
- if ( in_array( "$id_base-$check_id", $sidebar_widgets, true ) && (array) $widget === $check_widget ) {
189
 
190
- $fail = true;
191
- $widget_message_type = 'warning';
192
- $widget_message = esc_html__( 'Widget already exists', 'responsive-addons' ); // explain why widget not imported.
193
 
194
- break;
195
 
196
- }
197
  }
198
  }
 
199
 
200
- // No failure.
201
- if ( ! $fail ) {
202
-
203
- // Add widget instance.
204
- $single_widget_instances = get_option( 'widget_' . $id_base ); // all instances for that widget ID base, get fresh every time.
205
- $single_widget_instances = ! empty( $single_widget_instances ) ? $single_widget_instances : array(
206
- '_multiwidget' => 1,
207
- ); // start fresh if have to.
208
- $single_widget_instances[] = $widget; // add it.
209
-
210
- // Get the key it was given.
211
- end( $single_widget_instances );
212
- $new_instance_id_number = key( $single_widget_instances );
213
-
214
- // If key is 0, make it 1
215
- // When 0, an issue can occur where adding a widget causes data from other widget to load, and the widget doesn't stick (reload wipes it).
216
- if ( '0' === strval( $new_instance_id_number ) ) {
217
- $new_instance_id_number = 1;
218
- $single_widget_instances[ $new_instance_id_number ] = $single_widget_instances[0];
219
- unset( $single_widget_instances[0] );
220
- }
221
 
222
- // Move _multiwidget to end of array for uniformity.
223
- if ( isset( $single_widget_instances['_multiwidget'] ) ) {
224
- $multiwidget = $single_widget_instances['_multiwidget'];
225
- unset( $single_widget_instances['_multiwidget'] );
226
- $single_widget_instances['_multiwidget'] = $multiwidget;
227
- }
228
 
229
- // Update option with new widget.
230
- $result = update_option( 'widget_' . $id_base, $single_widget_instances );
231
 
232
- // Assign widget instance to sidebar.
233
- $sidebars_widgets = get_option( 'sidebars_widgets' ); // which sidebars have which widgets, get fresh every time.
234
 
235
- // Avoid rarely fatal error when the option is an empty string
236
- // https://github.com/churchthemes/widget-importer-exporter/pull/11.
237
- if ( ! $sidebars_widgets ) {
238
- $sidebars_widgets = array();
239
- }
240
 
241
- $new_instance_id = $id_base . '-' . $new_instance_id_number; // use ID number from new widget instance.
242
- $sidebars_widgets[ $use_sidebar_id ][] = $new_instance_id; // add new instance to sidebar.
243
- update_option( 'sidebars_widgets', $sidebars_widgets ); // save the amended data.
244
-
245
- // After widget import action.
246
- $after_widget_import = array(
247
- 'sidebar' => $use_sidebar_id,
248
- 'sidebar_old' => $sidebar_id,
249
- 'widget' => $widget,
250
- 'widget_type' => $id_base,
251
- 'widget_id' => $new_instance_id,
252
- 'widget_id_old' => $widget_instance_id,
253
- 'widget_id_num' => $new_instance_id_number,
254
- 'widget_id_num_old' => $instance_id_number,
255
- );
256
- do_action( 'wie_after_widget_import', $after_widget_import );
257
-
258
- // Success message.
259
- if ( $sidebar_available ) {
260
- $widget_message_type = 'success';
261
- $widget_message = esc_html__( 'Imported', 'responsive-addons' );
262
- } else {
263
- $widget_message_type = 'warning';
264
- $widget_message = esc_html__( 'Imported to Inactive', 'responsive-addons' );
265
- }
266
  }
 
267
 
268
- // Result for widget instance.
269
- $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['name'] = isset( $available_widgets[ $id_base ]['name'] ) ? $available_widgets[ $id_base ]['name'] : $id_base; // widget name or ID if name not available (not supported by site).
270
- $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['title'] = ! empty( $widget['title'] ) ? $widget['title'] : esc_html__( 'No Title', 'responsive-addons' ); // show "No Title" if widget instance is untitled.
271
- $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['message_type'] = $widget_message_type;
272
- $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['message'] = $widget_message;
273
 
274
- }
275
  }
276
  }
277
 
140
  $results[ $sidebar_id ]['widgets'] = array();
141
 
142
  // Loop widgets.
143
+ foreach ( $widgets as $widget_instance_id => $widget ) {
 
144
 
145
+ $fail = false;
146
 
147
+ // Get id_base (remove -# from end) and instance ID number.
148
+ $id_base = preg_replace( '/-[0-9]+$/', '', $widget_instance_id );
149
+ $instance_id_number = str_replace( $id_base . '-', '', $widget_instance_id );
150
 
151
+ // Does site support this widget?
152
+ if ( ! $fail && ! isset( $available_widgets[ $id_base ] ) ) {
153
+ $fail = true;
154
+ $widget_message_type = 'error';
155
+ $widget_message = esc_html__( 'Site does not support widget', 'responsive-addons' ); // explain why widget not imported.
156
+ }
157
 
158
+ // Filter to modify settings object before conversion to array and import
159
+ // Leave this filter here for backwards compatibility with manipulating objects (before conversion to array below)
160
+ // Ideally the newer wie_widget_settings_array below will be used instead of this.
161
+ $widget = apply_filters( 'wie_widget_settings', $widget ); // object.
162
 
163
+ // Convert multidimensional objects to multidimensional arrays
164
+ // Some plugins like Jetpack Widget Visibility store settings as multidimensional arrays
165
+ // Without this, they are imported as objects and cause fatal error on Widgets page
166
+ // If this creates problems for plugins that do actually intend settings in objects then may need to consider other approach: https://wordpress.org/support/topic/problem-with-array-of-arrays
167
+ // It is probably much more likely that arrays are used than objects, however.
168
+ $widget = json_decode( wp_json_encode( $widget ), true );
169
 
170
+ // Filter to modify settings array
171
+ // This is preferred over the older wie_widget_settings filter above
172
+ // Do before identical check because changes may make it identical to end result (such as URL replacements).
173
+ $widget = apply_filters( 'wie_widget_settings_array', $widget );
174
 
175
+ // Does widget with identical settings already exist in same sidebar?
176
+ if ( ! $fail && isset( $widget_instances[ $id_base ] ) ) {
177
 
178
+ // Get existing widgets in this sidebar.
179
+ $sidebars_widgets = get_option( 'sidebars_widgets' );
180
+ $sidebar_widgets = isset( $sidebars_widgets[ $use_sidebar_id ] ) ? $sidebars_widgets[ $use_sidebar_id ] : array(); // check Inactive if that's where will go.
181
 
182
+ // Loop widgets with ID base.
183
+ $single_widget_instances = ! empty( $widget_instances[ $id_base ] ) ? $widget_instances[ $id_base ] : array();
184
+ foreach ( $single_widget_instances as $check_id => $check_widget ) {
185
 
186
+ // Is widget in same sidebar and has identical settings?
187
+ if ( in_array( "$id_base-$check_id", $sidebar_widgets, true ) && (array) $widget === $check_widget ) {
188
 
189
+ $fail = true;
190
+ $widget_message_type = 'warning';
191
+ $widget_message = esc_html__( 'Widget already exists', 'responsive-addons' ); // explain why widget not imported.
192
 
193
+ break;
194
 
 
195
  }
196
  }
197
+ }
198
 
199
+ // No failure.
200
+ if ( ! $fail ) {
201
+
202
+ // Add widget instance.
203
+ $single_widget_instances = get_option( 'widget_' . $id_base ); // all instances for that widget ID base, get fresh every time.
204
+ $single_widget_instances = ! empty( $single_widget_instances ) ? $single_widget_instances : array(
205
+ '_multiwidget' => 1,
206
+ ); // start fresh if have to.
207
+ $single_widget_instances[] = $widget; // add it.
208
+
209
+ // Get the key it was given.
210
+ end( $single_widget_instances );
211
+ $new_instance_id_number = key( $single_widget_instances );
212
+
213
+ // If key is 0, make it 1
214
+ // When 0, an issue can occur where adding a widget causes data from other widget to load, and the widget doesn't stick (reload wipes it).
215
+ if ( '0' === strval( $new_instance_id_number ) ) {
216
+ $new_instance_id_number = 1;
217
+ $single_widget_instances[ $new_instance_id_number ] = $single_widget_instances[0];
218
+ unset( $single_widget_instances[0] );
219
+ }
220
 
221
+ // Move _multiwidget to end of array for uniformity.
222
+ if ( isset( $single_widget_instances['_multiwidget'] ) ) {
223
+ $multiwidget = $single_widget_instances['_multiwidget'];
224
+ unset( $single_widget_instances['_multiwidget'] );
225
+ $single_widget_instances['_multiwidget'] = $multiwidget;
226
+ }
227
 
228
+ // Update option with new widget.
229
+ $result = update_option( 'widget_' . $id_base, $single_widget_instances );
230
 
231
+ // Assign widget instance to sidebar.
232
+ $sidebars_widgets = get_option( 'sidebars_widgets' ); // which sidebars have which widgets, get fresh every time.
233
 
234
+ // Avoid rarely fatal error when the option is an empty string
235
+ // https://github.com/churchthemes/widget-importer-exporter/pull/11.
236
+ if ( ! $sidebars_widgets ) {
237
+ $sidebars_widgets = array();
238
+ }
239
 
240
+ $new_instance_id = $id_base . '-' . $new_instance_id_number; // use ID number from new widget instance.
241
+ $sidebars_widgets[ $use_sidebar_id ][] = $new_instance_id; // add new instance to sidebar.
242
+ update_option( 'sidebars_widgets', $sidebars_widgets ); // save the amended data.
243
+
244
+ // After widget import action.
245
+ $after_widget_import = array(
246
+ 'sidebar' => $use_sidebar_id,
247
+ 'sidebar_old' => $sidebar_id,
248
+ 'widget' => $widget,
249
+ 'widget_type' => $id_base,
250
+ 'widget_id' => $new_instance_id,
251
+ 'widget_id_old' => $widget_instance_id,
252
+ 'widget_id_num' => $new_instance_id_number,
253
+ 'widget_id_num_old' => $instance_id_number,
254
+ );
255
+ do_action( 'wie_after_widget_import', $after_widget_import );
256
+
257
+ // Success message.
258
+ if ( $sidebar_available ) {
259
+ $widget_message_type = 'success';
260
+ $widget_message = esc_html__( 'Imported', 'responsive-addons' );
261
+ } else {
262
+ $widget_message_type = 'warning';
263
+ $widget_message = esc_html__( 'Imported to Inactive', 'responsive-addons' );
 
264
  }
265
+ }
266
 
267
+ // Result for widget instance.
268
+ $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['name'] = isset( $available_widgets[ $id_base ]['name'] ) ? $available_widgets[ $id_base ]['name'] : $id_base; // widget name or ID if name not available (not supported by site).
269
+ $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['title'] = ! empty( $widget['title'] ) ? $widget['title'] : esc_html__( 'No Title', 'responsive-addons' ); // show "No Title" if widget instance is untitled.
270
+ $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['message_type'] = $widget_message_type;
271
+ $results[ $sidebar_id ]['widgets'][ $widget_instance_id ]['message'] = $widget_message;
272
 
 
273
  }
274
  }
275
 
languages/atomic-blocks.pot DELETED
@@ -1,35 +0,0 @@
1
- # Copyright (C) 2019 CyberChimps
2
- # This file is distributed under the same license as the Responsive Add Ons plugin.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: Responsive Add Ons 1.0.7\n"
6
- "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/responsiveaddons\n"
7
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
- "Language-Team: LANGUAGE <LL@li.org>\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2019-06-21T05:03:36+00:00\n"
13
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
- "X-Generator: WP-CLI 2.2.0\n"
15
- "X-Domain: responsiveaddons\n"
16
-
17
- #. Plugin Name of the plugin
18
- msgid "Responsive Add Ons"
19
- msgstr ""
20
-
21
- #. Plugin URI of the plugin
22
- msgid "http://wordpress.org/plugins/responsive-add-ons/"
23
- msgstr ""
24
-
25
- #. Description of the plugin
26
- msgid "Added functionality for the responsive theme"
27
- msgstr ""
28
-
29
- #. Author of the plugin
30
- msgid "CyberChimps"
31
- msgstr ""
32
-
33
- #. Author URI of the plugin
34
- msgid "http://www.cyberchimps.com"
35
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/responsive-addons.pot CHANGED
@@ -1,61 +1,562 @@
 
 
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Responsive Addons\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-08-01 15:16:04 UTC\n"
6
- "PO-Revision-Date: 2013-10-10 14:07-0000\n"
7
- "Last-Translator: CyberChimps <support@cyberchimps.com>\n"
8
- "Language-Team: English, United States\n"
9
  "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.5.7\n"
13
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
- #: ../responsive-addons.php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  msgid "You do not have sufficient permissions to access this page."
17
- msgstr "You do not have sufficient permissions to access this page."
18
 
19
- #: ../responsive-addons.php
20
  msgid "Webmaster Tools"
21
- msgstr "Webmaster Tools"
22
 
23
- #: ../responsive-addons.php ../templates/settings.php
 
24
  msgid "Google Site Verification"
25
- msgstr "Google Site Verification"
26
 
27
- #: ../responsive-addons.php ../templates/settings.php
 
28
  msgid "Enter your Google ID number only"
29
- msgstr "Enter your Google ID number only"
30
 
31
- #: ../responsive-addons.php ../templates/settings.php
 
32
  msgid "Bing Site Verification"
33
- msgstr "Bing Site Verification"
34
 
35
- #: ../responsive-addons.php ../templates/settings.php
 
36
  msgid "Enter your Bing ID number only"
37
- msgstr "Enter your Bing ID number only"
38
 
39
- #: ../responsive-addons.php ../templates/settings.php
 
40
  msgid "Yahoo Site Verification"
41
- msgstr "Yahoo Site Verification"
42
 
43
- #: ../responsive-addons.php ../templates/settings.php
 
44
  msgid "Enter your Yahoo ID number only"
45
- msgstr "Enter your Yahoo ID number only"
46
 
47
- #: ../responsive-addons.php ../templates/settings.php
 
48
  msgid "Site Statistics Tracker"
49
- msgstr "Site Statistics Tracker"
50
 
51
- #: ../responsive-addons.php
52
  msgid "Leave blank if plugin handles your webmaster tools"
53
- msgstr "Leave blank if plugin handles your webmaster tools"
54
 
55
- #: ../responsive-addons.php ../templates/settings.php
 
 
 
 
 
56
  msgid "Google Analytics, StatCounter, any other or all of them."
57
- msgstr "Google Analytics, StatCounter, any other or all of them."
58
 
59
- #: ../responsive-addons.php
60
  msgid "Settings"
61
- msgstr "Settings"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2019 CyberChimps
2
+ # This file is distributed under the GPL2.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Responsive Add Ons 2.0.4\n"
6
+ "Report-Msgid-Bugs-To: "
7
+ "https://wordpress.org/support/plugin/responsive-add-ons\n"
8
+ "POT-Creation-Date: 2019-08-29 09:24:57+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: 2019-MO-DA HO:MI+ZONE\n"
13
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
+ "Language-Team: LANGUAGE <LL@li.org>\n"
15
+ "X-Generator: grunt-wp-i18n 0.5.4\n"
16
+ "X-Poedit-KeywordsList: "
17
+ "__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
18
+ "attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
19
+ "Language: en\n"
20
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
21
+ "X-Poedit-Country: United States\n"
22
+ "X-Poedit-SourceCharset: UTF-8\n"
23
+ "X-Poedit-Basepath: ../\n"
24
+ "X-Poedit-SearchPath-0: .\n"
25
+ "X-Poedit-Bookmarks: \n"
26
+ "X-Textdomain-Support: yes\n"
27
 
28
+ #: admin/partials/responsive-ready-sites-admin-display.php:70
29
+ #: admin/partials/responsive-ready-sites-admin-display.php:130
30
+ msgid "Preview"
31
+ msgstr ""
32
+
33
+ #: admin/partials/responsive-ready-sites-admin-display.php:79
34
+ msgid "No Demos found"
35
+ msgstr ""
36
+
37
+ #: admin/partials/responsive-ready-sites-admin-display.php:83
38
+ #. translators: %1$s External Link
39
+ msgid "No More Sites"
40
+ msgstr ""
41
+
42
+ #: admin/partials/responsive-ready-sites-admin-display.php:93
43
+ #. translators: %1$s External Link
44
+ msgid ""
45
+ "Can't find a Responsive Ready Site that suits your purpose ?<br><a "
46
+ "target=\"_blank\" href=\"%1$s\">Suggest A Site</a>"
47
+ msgstr ""
48
+
49
+ #: admin/partials/responsive-ready-sites-admin-display.php:119
50
+ #: admin/partials/responsive-ready-sites-admin-display.php:212
51
+ msgid "Import Site"
52
+ msgstr ""
53
+
54
+ #: admin/partials/responsive-ready-sites-admin-display.php:123
55
+ msgid "Buy Responsive Pro"
56
+ msgstr ""
57
+
58
+ #: admin/partials/responsive-ready-sites-admin-display.php:126
59
+ #: admin/partials/responsive-ready-sites-admin-display.php:153
60
+ msgid "Close"
61
+ msgstr ""
62
+
63
+ #: admin/partials/responsive-ready-sites-admin-display.php:169
64
+ msgid "Install Required Plugins"
65
+ msgstr ""
66
+
67
+ #: admin/partials/responsive-ready-sites-admin-display.php:181
68
+ msgid ""
69
+ "Deletes previous import including customizer settings and content. Plugins "
70
+ "are not deleted."
71
+ msgstr ""
72
+
73
+ #: admin/partials/responsive-ready-sites-admin-display.php:190
74
+ msgid ""
75
+ "Imports sample pages, posts, images and menus. Depending on your internet "
76
+ "speed this may take 2-10 minutes."
77
+ msgstr ""
78
+
79
+ #: admin/partials/responsive-ready-sites-admin-display.php:202
80
+ msgid ""
81
+ "Imports sample customizer settings including site identity, typography, "
82
+ "colors and other theme options."
83
+ msgstr ""
84
+
85
+ #: includes/importers/batch-processing/helpers/class-wp-background-process.php:435
86
+ msgid "Every %d Minutes"
87
+ msgstr ""
88
+
89
+ #: includes/importers/class-responsive-ready-sites-importer.php:178
90
+ msgid "Request site API URL is empty. Try again!"
91
+ msgstr ""
92
+
93
+ #: includes/importers/class-responsive-ready-sites-importer.php:194
94
+ msgid ""
95
+ "If XMLReader is not available, it imports all other settings and only skips "
96
+ "XML import. This creates an incomplete website. We should bail early and "
97
+ "not import anything if this is not present."
98
+ msgstr ""
99
+
100
+ #: includes/importers/class-responsive-ready-sites-importer.php:210
101
+ msgid "There was an error downloading the XML file."
102
+ msgstr ""
103
+
104
+ #: includes/importers/class-responsive-ready-sites-importer.php:216
105
+ msgid "Invalid site XML file!"
106
+ msgstr ""
107
+
108
+ #: includes/importers/class-responsive-ready-sites-importer.php:327
109
+ msgid "Customizer data is empty!"
110
+ msgstr ""
111
+
112
+ #: includes/importers/class-responsive-ready-sites-importer.php:356
113
+ msgid "Widget data is empty!"
114
+ msgstr ""
115
+
116
+ #: includes/importers/class-responsive-ready-sites-importer.php:383
117
+ msgid "Site options are empty!"
118
+ msgstr ""
119
+
120
+ #: includes/importers/class-responsive-ready-sites-widgets-importer.php:89
121
+ msgid "Import data could not be read. Please try a different file."
122
+ msgstr ""
123
+
124
+ #: includes/importers/class-responsive-ready-sites-widgets-importer.php:133
125
+ msgid "Widget area does not exist in theme (using Inactive)"
126
+ msgstr ""
127
+
128
+ #: includes/importers/class-responsive-ready-sites-widgets-importer.php:156
129
+ msgid "Site does not support widget"
130
+ msgstr ""
131
+
132
+ #: includes/importers/class-responsive-ready-sites-widgets-importer.php:192
133
+ msgid "Widget already exists"
134
+ msgstr ""
135
+
136
+ #: includes/importers/class-responsive-ready-sites-widgets-importer.php:261
137
+ msgid "Imported"
138
+ msgstr ""
139
+
140
+ #: includes/importers/class-responsive-ready-sites-widgets-importer.php:264
141
+ msgid "Imported to Inactive"
142
+ msgstr ""
143
+
144
+ #: includes/importers/class-responsive-ready-sites-widgets-importer.php:270
145
+ msgid "No Title"
146
+ msgstr ""
147
+
148
+ #: includes/importers/wxr-importer/class-responsive-ready-sites-wxr-importer.php:248
149
+ msgid "Import complete!"
150
+ msgstr ""
151
+
152
+ #: includes/importers/wxr-importer/class-wxr-importer.php:131
153
+ msgid "Could not open the file for parsing"
154
+ msgstr ""
155
+
156
+ #: includes/importers/wxr-importer/class-wxr-importer.php:167
157
+ #: includes/importers/wxr-importer/class-wxr-importer.php:283
158
+ #: includes/importers/wxr-importer/class-wxr-importer.php:356
159
+ msgid ""
160
+ "This WXR file (version %1$s) is newer than the importer (version %2$s) and "
161
+ "may not be supported. Please consider updating."
162
+ msgstr ""
163
+
164
+ #: includes/importers/wxr-importer/class-wxr-importer.php:504
165
+ msgid "The file does not exist, please try again."
166
+ msgstr ""
167
+
168
+ #: includes/importers/wxr-importer/class-wxr-importer.php:564
169
+ msgid "Invalid author mapping"
170
+ msgstr ""
171
+
172
+ #: includes/importers/wxr-importer/class-wxr-importer.php:665
173
+ msgid "Cannot import auto-draft posts"
174
+ msgstr ""
175
+
176
+ #: includes/importers/wxr-importer/class-wxr-importer.php:753
177
+ msgid "Failed to import \"%1$s\": Invalid post type %2$s"
178
+ msgstr ""
179
+
180
+ #: includes/importers/wxr-importer/class-wxr-importer.php:763
181
+ msgid "%1$s \"%2$s\" already exists."
182
+ msgstr ""
183
+
184
+ #: includes/importers/wxr-importer/class-wxr-importer.php:857
185
+ msgid "Skipping attachment \"%s\", fetching attachments disabled"
186
+ msgstr ""
187
+
188
+ #: includes/importers/wxr-importer/class-wxr-importer.php:878
189
+ msgid "Failed to import \"%1$s\" (%2$s)"
190
+ msgstr ""
191
+
192
+ #: includes/importers/wxr-importer/class-wxr-importer.php:910
193
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1755
194
+ msgid "Imported \"%1$s\" (%2$s)"
195
+ msgstr ""
196
+
197
+ #: includes/importers/wxr-importer/class-wxr-importer.php:915
198
+ msgid "Post %1$d remapped to %2$d"
199
+ msgstr ""
200
+
201
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1062
202
+ msgid "Invalid file type"
203
+ msgstr ""
204
+
205
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1560
206
+ msgid "Failed to import user \"%s\""
207
+ msgstr ""
208
+
209
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1581
210
+ msgid "Imported user \"%s\""
211
+ msgstr ""
212
+
213
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1585
214
+ msgid "User %1$d remapped to %2$d"
215
+ msgstr ""
216
+
217
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1731
218
+ msgid "Failed to import %1$s %2$s"
219
+ msgstr ""
220
+
221
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1760
222
+ msgid "Term %1$d remapped to %2$d"
223
+ msgstr ""
224
+
225
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1813
226
+ msgid "Remote server returned %1$d %2$s for %3$s"
227
+ msgstr ""
228
+
229
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1826
230
+ msgid "Remote file is incorrect size"
231
+ msgstr ""
232
+
233
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1831
234
+ msgid "Zero size file downloaded"
235
+ msgstr ""
236
+
237
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1837
238
+ msgid "Remote file is too large, limit is %s"
239
+ msgstr ""
240
+
241
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1859
242
+ msgid "Running post-processing for post %d"
243
+ msgstr ""
244
+
245
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1872
246
+ msgid "Could not find the post parent for \"%1$s\" (post #%2$d)"
247
+ msgstr ""
248
+
249
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1877
250
+ msgid "Post %1$d was imported with parent %2$d, but could not be found"
251
+ msgstr ""
252
+
253
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1891
254
+ msgid "Could not find the author for \"%1$s\" (post #%2$d)"
255
+ msgstr ""
256
+
257
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1896
258
+ msgid "Post %1$d was imported with author \"%2$s\", but could not be found"
259
+ msgstr ""
260
+
261
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1922
262
+ msgid "Post %d was marked for post-processing, but none was required."
263
+ msgstr ""
264
+
265
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1933
266
+ msgid "Could not update \"%1$s\" (post #%2$d) with mapped data"
267
+ msgstr ""
268
+
269
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1978
270
+ msgid "Could not find the menu object for \"%1$s\" (post #%2$d)"
271
+ msgstr ""
272
+
273
+ #: includes/importers/wxr-importer/class-wxr-importer.php:1983
274
+ msgid ""
275
+ "Post %1$d was imported with object \"%2$d\" of type \"%3$s\", but could not "
276
+ "be found"
277
+ msgstr ""
278
+
279
+ #: includes/importers/wxr-importer/class-wxr-importer.php:2005
280
+ msgid "Could not find the comment parent for comment #%d"
281
+ msgstr ""
282
+
283
+ #: includes/importers/wxr-importer/class-wxr-importer.php:2009
284
+ msgid "Comment %1$d was imported with parent %2$d, but could not be found"
285
+ msgstr ""
286
+
287
+ #: includes/importers/wxr-importer/class-wxr-importer.php:2023
288
+ msgid "Could not find the author for comment #%d"
289
+ msgstr ""
290
+
291
+ #: includes/importers/wxr-importer/class-wxr-importer.php:2027
292
+ msgid "Comment %1$d was imported with author %2$d, but could not be found"
293
+ msgstr ""
294
+
295
+ #: includes/importers/wxr-importer/class-wxr-importer.php:2044
296
+ msgid "Could not update comment #%d with mapped data"
297
+ msgstr ""
298
+
299
+ #: responsive-add-ons.php:159
300
+ msgid "Theme Activated"
301
+ msgstr ""
302
+
303
+ #: responsive-add-ons.php:304 responsive-add-ons.php:305
304
+ #: responsive-add-ons.php:314
305
+ msgid "Responsive Add-Ons"
306
+ msgstr ""
307
+
308
+ #: responsive-add-ons.php:315
309
+ msgid "Ready Websites"
310
+ msgstr ""
311
+
312
+ #: responsive-add-ons.php:333
313
  msgid "You do not have sufficient permissions to access this page."
314
+ msgstr ""
315
 
316
+ #: responsive-add-ons.php:358 responsive-add-ons.php:439
317
  msgid "Webmaster Tools"
318
+ msgstr ""
319
 
320
+ #: responsive-add-ons.php:376 responsive-add-ons.php:442
321
+ #: templates/settings.php:35
322
  msgid "Google Site Verification"
323
+ msgstr ""
324
 
325
+ #: responsive-add-ons.php:381 responsive-add-ons.php:447
326
+ #: templates/settings.php:38
327
  msgid "Enter your Google ID number only"
328
+ msgstr ""
329
 
330
+ #: responsive-add-ons.php:385 responsive-add-ons.php:453
331
+ #: templates/settings.php:42
332
  msgid "Bing Site Verification"
333
+ msgstr ""
334
 
335
+ #: responsive-add-ons.php:390 responsive-add-ons.php:458
336
+ #: templates/settings.php:45
337
  msgid "Enter your Bing ID number only"
338
+ msgstr ""
339
 
340
+ #: responsive-add-ons.php:394 responsive-add-ons.php:464
341
+ #: templates/settings.php:49
342
  msgid "Yahoo Site Verification"
343
+ msgstr ""
344
 
345
+ #: responsive-add-ons.php:399 responsive-add-ons.php:469
346
+ #: templates/settings.php:52
347
  msgid "Enter your Yahoo ID number only"
348
+ msgstr ""
349
 
350
+ #: responsive-add-ons.php:403 responsive-add-ons.php:475
351
+ #: templates/settings.php:57
352
  msgid "Site Statistics Tracker"
353
+ msgstr ""
354
 
355
+ #: responsive-add-ons.php:404 responsive-add-ons.php:476
356
  msgid "Leave blank if plugin handles your webmaster tools"
357
+ msgstr ""
358
 
359
+ #: responsive-add-ons.php:404 responsive-add-ons.php:476
360
+ msgid "Guide"
361
+ msgstr ""
362
+
363
+ #: responsive-add-ons.php:409 responsive-add-ons.php:481
364
+ #: templates/settings.php:63
365
  msgid "Google Analytics, StatCounter, any other or all of them."
366
+ msgstr ""
367
 
368
+ #: responsive-add-ons.php:555 responsive-add-ons.php:557
369
  msgid "Settings"
370
+ msgstr ""
371
+
372
+ #: responsive-add-ons.php:570
373
+ msgid "Responsive Ready Sites"
374
+ msgstr ""
375
+
376
+ #: responsive-add-ons.php:611
377
+ msgid "Installed! Activating.."
378
+ msgstr ""
379
+
380
+ #: responsive-add-ons.php:612
381
+ msgid "Activating.."
382
+ msgstr ""
383
+
384
+ #: responsive-add-ons.php:613
385
+ msgid "Activated! Reloading.."
386
+ msgstr ""
387
+
388
+ #: responsive-add-ons.php:614
389
+ msgid "Installing.."
390
+ msgstr ""
391
+
392
+ #: responsive-add-ons.php:793
393
+ msgid "No plugin specified"
394
+ msgstr ""
395
+
396
+ #: responsive-add-ons.php:815
397
+ msgid "Plugin Activated"
398
+ msgstr ""
399
+
400
+ #: templates/getting-started.php:12
401
+ msgid "Responsive Gutenberg Block Add-ons"
402
+ msgstr ""
403
+
404
+ #: templates/getting-started.php:17
405
+ msgid ""
406
+ "Responsive Addon also has a collection of ready-to-use blocks for the new "
407
+ "WordPress editor(aka Gutenberg)."
408
+ msgstr ""
409
+
410
+ #: templates/getting-started.php:26
411
+ msgid "Available blocks"
412
+ msgstr ""
413
+
414
+ #: templates/getting-started.php:27
415
+ msgid "The following editor blocks are available in Responsive Add-ons."
416
+ msgstr ""
417
+
418
+ #: templates/getting-started.php:33
419
+ msgid "Post Grid Block"
420
+ msgstr ""
421
+
422
+ #: templates/getting-started.php:34 templates/getting-started.php:50
423
+ msgid ""
424
+ "Add an eye-catching, full-width section with a big title, paragraph text, "
425
+ "and a customizable button."
426
+ msgstr ""
427
+
428
+ #: templates/getting-started.php:41
429
+ msgid "Container Block"
430
+ msgstr ""
431
+
432
+ #: templates/getting-started.php:42
433
+ msgid ""
434
+ "Wrap several blocks into a section and add padding, margins, background "
435
+ "colors and images."
436
+ msgstr ""
437
+
438
+ #: templates/getting-started.php:49
439
+ msgid "Call-To-Action Block"
440
+ msgstr ""
441
+
442
+ #: templates/getting-started.php:57
443
+ msgid "Testimonial Block"
444
+ msgstr ""
445
+
446
+ #: templates/getting-started.php:58
447
+ msgid ""
448
+ "Add a customer or client testimonial to your site with an avatar, text, "
449
+ "citation and more."
450
+ msgstr ""
451
+
452
+ #: templates/getting-started.php:65
453
+ msgid "Inline Notice Block"
454
+ msgstr ""
455
+
456
+ #: templates/getting-started.php:66
457
+ msgid ""
458
+ "Add a colorful notice or message to your site with text, a title and a "
459
+ "dismiss icon."
460
+ msgstr ""
461
+
462
+ #: templates/getting-started.php:73
463
+ msgid "Sharing Icons Block"
464
+ msgstr ""
465
+
466
+ #: templates/getting-started.php:74
467
+ msgid ""
468
+ "Add social sharing icons to your page with size, shape, color and style "
469
+ "options."
470
+ msgstr ""
471
+
472
+ #: templates/getting-started.php:81
473
+ msgid "Author Profile Block"
474
+ msgstr ""
475
+
476
+ #: templates/getting-started.php:82
477
+ msgid ""
478
+ "Add a user profile box to your site with a title, bio info, an avatar and "
479
+ "social media links."
480
+ msgstr ""
481
+
482
+ #: templates/getting-started.php:89
483
+ msgid "Accordion Block"
484
+ msgstr ""
485
+
486
+ #: templates/getting-started.php:90
487
+ msgid ""
488
+ "Add an accordion text toggle with a title and descriptive text. Includes "
489
+ "font size and toggle options."
490
+ msgstr ""
491
+
492
+ #: templates/getting-started.php:97
493
+ msgid "Customizable Button"
494
+ msgstr ""
495
+
496
+ #: templates/getting-started.php:98
497
+ msgid ""
498
+ "Add a fancy stylized button to your post or page with size, shape, target, "
499
+ "and color options."
500
+ msgstr ""
501
+
502
+ #: templates/getting-started.php:105
503
+ msgid "Drop Cap Block"
504
+ msgstr ""
505
+
506
+ #: templates/getting-started.php:106
507
+ msgid ""
508
+ "Add a stylized drop cap to the beginning of your paragraph. Choose from "
509
+ "three different styles."
510
+ msgstr ""
511
+
512
+ #: templates/getting-started.php:113
513
+ msgid "Spacer & Divider"
514
+ msgstr ""
515
+
516
+ #: templates/getting-started.php:114
517
+ msgid ""
518
+ "Add an adjustable spacer between your blocks with an optional divider with "
519
+ "styling options."
520
+ msgstr ""
521
+
522
+ #: templates/getting-started.php:131
523
+ msgid "Get more block"
524
+ msgstr ""
525
+
526
+ #: templates/getting-started.php:134
527
+ msgid ""
528
+ "Join our newsletter to receive emails when we add new blocks, release "
529
+ "updates."
530
+ msgstr ""
531
+
532
+ #: templates/getting-started.php:135
533
+ msgid "Subscribe"
534
+ msgstr ""
535
+
536
+ #: templates/settings.php:24
537
+ msgid "Responsive Settings"
538
+ msgstr ""
539
+
540
+ #: templates/settings.php:32
541
+ msgid "Webmaster Settings"
542
+ msgstr ""
543
+
544
+ #. Plugin Name of the plugin/theme
545
+ msgid "Responsive Add Ons"
546
+ msgstr ""
547
+
548
+ #. Plugin URI of the plugin/theme
549
+ msgid "http://wordpress.org/plugins/responsive-add-ons/"
550
+ msgstr ""
551
+
552
+ #. Description of the plugin/theme
553
+ msgid "Added functionality for the responsive theme"
554
+ msgstr ""
555
+
556
+ #. Author of the plugin/theme
557
+ msgid "CyberChimps"
558
+ msgstr ""
559
+
560
+ #. Author URI of the plugin/theme
561
+ msgid "http://www.cyberchimps.com"
562
+ msgstr ""
languages/responsive-blocks-fr_FR.mo DELETED
Binary file
languages/responsive-blocks-fr_FR.po DELETED
@@ -1,587 +0,0 @@
1
- # Translation of Plugins - Responsive Blocks &#8211; Gutenberg Blocks Collection - Stable (latest release) in French (France)
2
- # This file is distributed under the same license as the Plugins - Responsive Blocks &#8211; Gutenberg Blocks Collection - Stable (latest release) package.
3
- msgid ""
4
- msgstr ""
5
- "PO-Revision-Date: 2018-11-13 20:55+0100\n"
6
- "MIME-Version: 1.0\n"
7
- "Content-Type: text/plain; charset=UTF-8\n"
8
- "Content-Transfer-Encoding: 8bit\n"
9
- "Plural-Forms: nplurals=2; plural=n > 1;\n"
10
- "X-Generator: Poedit 2.2\n"
11
- "Language: fr\n"
12
- "Project-Id-Version: Plugins - Responsive Blocks &#8211; Gutenberg Blocks Collection - Stable (latest release)\n"
13
- "POT-Creation-Date: \n"
14
- "Last-Translator: \n"
15
- "Language-Team: \n"
16
-
17
- #: dist/getting-started/getting-started.php:416
18
- msgid "Twitter"
19
- msgstr "Twitter"
20
-
21
- #: dist/getting-started/getting-started.php:415
22
- msgid "Docs"
23
- msgstr "Documentation"
24
-
25
- #: dist/getting-started/getting-started.php:414
26
- msgid "Blog"
27
- msgstr "Blog"
28
-
29
- #: dist/getting-started/getting-started.php:413
30
- msgid "ResponsiveBlocks.com"
31
- msgstr "ResponsiveBlocks.com"
32
-
33
- #: dist/getting-started/getting-started.php:411
34
- msgid "Made by the fine folks at %1$s and %2$s."
35
- msgstr "Réalisé par les gens formidables de %1$s et %2$s."
36
-
37
- #: dist/getting-started/getting-started.php:406
38
- msgid "Visit Gutenberg News"
39
- msgstr "Visiter Gutenberg News"
40
-
41
- #: dist/getting-started/getting-started.php:405
42
- msgid "Stay up to date with the new WordPress editor. Gutenberg News curates Gutenberg articles, tutorials, videos and more free resources."
43
- msgstr "Être informé.e sur le nouvel éditeur de WordPress. Gutenberg News procure des articles, des tutoriels, des vidéos et d&rsquo;autres ressources gratuites sur Gutenberg. "
44
-
45
- #: dist/getting-started/getting-started.php:404
46
- msgid "Gutenberg News"
47
- msgstr "Gutenberg News"
48
-
49
- #: dist/getting-started/getting-started.php:399
50
- msgid "Visit the Blog"
51
- msgstr "Visiter le blog"
52
-
53
- #: dist/getting-started/getting-started.php:397
54
- msgid "Articles & Tutorials"
55
- msgstr "Articles & Tutoriels"
56
-
57
- #: dist/getting-started/getting-started.php:392
58
- msgid "Subscribe Today"
59
- msgstr "S&rsquo;abonner aujourd&rsquo;hui"
60
-
61
- #: dist/getting-started/getting-started.php:390
62
- msgid "Blocks In Your Inbox"
63
- msgstr "Des blocs dans votre boîte de réception"
64
-
65
- #: dist/getting-started/getting-started.php:385
66
- msgid "Free Blocks and Resources"
67
- msgstr "Blocs gratuits et ressources"
68
-
69
- #: dist/getting-started/getting-started.php:345
70
- msgid "Install Now"
71
- msgstr "Installer maintenant"
72
-
73
- #: dist/getting-started/getting-started.php:237
74
- msgid "Add an adjustable spacer between your blocks with an optional divider with styling options."
75
- msgstr "Ajoutez un espacement ajustable entre vos blocs et un séparateur facultatif avec ses options de style."
76
-
77
- #: dist/getting-started/getting-started.php:236
78
- msgid "Spacer & Divider"
79
- msgstr "Espacement et Séparateur"
80
-
81
- #: dist/getting-started/getting-started.php:234
82
- msgid "Spacer and Divider Block"
83
- msgstr "Bloc Espacement et Séparateur"
84
-
85
- #: dist/getting-started/getting-started.php:229
86
- msgid "Add a stylized drop cap to the beginning of your paragraph. Choose from three different styles."
87
- msgstr "Ajoutez une lettrine stylisé au début de votre paragraphe. Choisissez entre trois styles différents."
88
-
89
- #: dist/getting-started/getting-started.php:226
90
- #: dist/getting-started/getting-started.php:228
91
- msgid "Drop Cap Block"
92
- msgstr "Bloc Lettrine"
93
-
94
- #: dist/getting-started/getting-started.php:221
95
- msgid "Add a fancy stylized button to your post or page with size, shape, target, and color options."
96
- msgstr "Ajoutez un bouton stylisé et raffiné à votre article ou à votre page avec des options de taille, de forme, de lien et de couleur."
97
-
98
- #: dist/getting-started/getting-started.php:220
99
- msgid "Customizable Button"
100
- msgstr "Bouton personnalisable"
101
-
102
- #: dist/getting-started/getting-started.php:218
103
- msgid "Customizable Button Block"
104
- msgstr "Bloc Bouton personnalisable"
105
-
106
- #: dist/getting-started/getting-started.php:213
107
- msgid "Add an accordion text toggle with a title and descriptive text. Includes font size and toggle options."
108
- msgstr "Ajoutez un texte en accordéon avec un titre et un texte descriptif. Inclut des options de taille de police et d&rsquo;ouverture/fermeture."
109
-
110
- #: dist/getting-started/getting-started.php:212
111
- msgid "Accordion Block"
112
- msgstr "Bloc Accordéon"
113
-
114
- #: dist/getting-started/getting-started.php:210
115
- msgid "Accordion Toggle"
116
- msgstr "Ouverture/Fermeture de l&rsquo;accordéon"
117
-
118
- #: dist/getting-started/getting-started.php:205
119
- msgid "Add a user profile box to your site with a title, bio info, an avatar and social media links."
120
- msgstr "Ajoutez une case de profil utilisateur à votre site avec un titre, une bio, un avatar et des liens de réseaux sociaux."
121
-
122
- #: dist/getting-started/getting-started.php:202
123
- #: dist/getting-started/getting-started.php:204
124
- msgid "Author Profile Block"
125
- msgstr "Bloc Profil d&rsquo;auteur"
126
-
127
- #: dist/getting-started/getting-started.php:197
128
- msgid "Add social sharing icons to your page with size, shape, color and style options."
129
- msgstr "Ajoutez des icônes de partage social à votre page avec des options de taille, de forme, de couleur et de style."
130
-
131
- #: dist/getting-started/getting-started.php:194
132
- #: dist/getting-started/getting-started.php:196
133
- msgid "Sharing Icons Block"
134
- msgstr "Bloc Icônes de partage"
135
-
136
- #: dist/getting-started/getting-started.php:189
137
- msgid "Add a colorful notice or message to your site with text, a title and a dismiss icon."
138
- msgstr "Ajoutez une notification ou un message colorés à votre site avec du texte, un titre et une icône pour l&rsquo;ignorer."
139
-
140
- #: dist/getting-started/getting-started.php:188
141
- msgid "Inline Notice Block"
142
- msgstr "Bloc Notification en ligne"
143
-
144
- #: dist/getting-started/getting-started.php:186
145
- msgid "Inline Notices Block"
146
- msgstr "Bloc Notifications en ligne"
147
-
148
- #: dist/getting-started/getting-started.php:181
149
- msgid "Add a customer or client testimonial to your site with an avatar, text, citation and more."
150
- msgstr "Ajoutez un témoignage client à votre site avec un avatar, un texte, une citation et plus encore."
151
-
152
- #: dist/getting-started/getting-started.php:180
153
- msgid "Testimonial Block"
154
- msgstr "Bloc Témoignage"
155
-
156
- #: dist/getting-started/getting-started.php:178
157
- msgid "Testimonials Block"
158
- msgstr "Bloc Témoignages"
159
-
160
- #: dist/getting-started/getting-started.php:172
161
- msgid "Call-To-Action Block"
162
- msgstr "Bloc Appel à l&rsquo;action"
163
-
164
- #: dist/getting-started/getting-started.php:170
165
- msgid "Call To Action Block"
166
- msgstr "Bloc Appel à l&rsquo;action"
167
-
168
- #: dist/getting-started/getting-started.php:165
169
- msgid "Wrap several blocks into a section and add padding, margins, background colors and images."
170
- msgstr "Intégrez plusieurs blocs dans une section et ajoutez de l&rsquo;espace, des marges, des couleurs d&rsquo;arrière-plan et des images."
171
-
172
- #: dist/getting-started/getting-started.php:164
173
- msgid "Container Block"
174
- msgstr "Bloc Conteneur"
175
-
176
- #: dist/getting-started/getting-started.php:157
177
- #: dist/getting-started/getting-started.php:173
178
- msgid "Add an eye-catching, full-width section with a big title, paragraph text, and a customizable button."
179
- msgstr "Ajoutez une rubrique attrayante, pleine largeur avec un grand titre, un paragraphe de texte et un bouton personnalisable. "
180
-
181
- #: dist/getting-started/getting-started.php:156
182
- msgid "Post Grid Block"
183
- msgstr "Bloc Grille de publication"
184
-
185
- #: dist/getting-started/getting-started.php:150
186
- msgid "The following blocks are available in Responsive Blocks. More blocks are on the way so stay tuned!"
187
- msgstr "Les blocs suivants sont disponibles dans Responsive Blocks. Plus de blocs sont en cours alors restez branchés&nbsp;! "
188
-
189
- #: dist/getting-started/getting-started.php:149
190
- msgid "Available Responsive Blocks"
191
- msgstr "Responsive Blocks disponible"
192
-
193
- #: dist/getting-started/getting-started.php:142
194
- msgid "Responsive Blocks Theme"
195
- msgstr "Thème Responsive Blocks"
196
-
197
- #: dist/getting-started/getting-started.php:137
198
- msgid "The Responsive Blocks collection is now ready to use in your posts and pages. Simply search for \"responsive\" or \"ab\" in the block inserter to display the Responsive Blocks collection. Check out the help file link above for detailed instructions!"
199
- msgstr "La collection Responsive Blocks est maintenant prête à être utilisée dans vos publications et vos pages. Il suffit de rechercher \"responsive\" ou \"ab\" dans l&rsquo;insertion de blocs pour afficher la collection Responsive Blocks. Consultez le lien du fichier d&rsquo;aide ci-dessus pour des instructions détaillées&nbsp;!"
200
-
201
- #: dist/getting-started/getting-started.php:136
202
- msgid "Welcome to the future of site building with Gutenberg and Responsive Blocks!"
203
- msgstr "Bienvenue dans le futur de la construction de sites avec Gutenberg et Responsive Blocks&nbsp;!"
204
-
205
- #: dist/getting-started/getting-started.php:127
206
- msgid "You need to install the Gutenberg editor before using Responsive Blocks!"
207
- msgstr "Vous devez installer l&rsquo;éditeur Gutenberg avant d&rsquo;utiliser Responsive Blocks&nbsp;!"
208
-
209
- #: dist/getting-started/getting-started.php:114
210
- msgid "Getting Started"
211
- msgstr "Démarrez"
212
-
213
- #: src/blocks/block-post-grid/index.php:67
214
- msgid "Untitled"
215
- msgstr "Sans titre"
216
-
217
- #: src/blocks/block-sharing/index.php:238
218
- msgid "Share via Email"
219
- msgstr "Partager par e-mail"
220
-
221
- #: src/blocks/block-sharing/index.php:223
222
- msgid "Share on Reddit"
223
- msgstr "Partager sur Reddit"
224
-
225
- #: src/blocks/block-sharing/index.php:207
226
- msgid "Share on LinkedIn"
227
- msgstr "Partager sur LinkedIn"
228
-
229
- #: src/blocks/block-sharing/index.php:191
230
- msgid "Share on Pinterest"
231
- msgstr "Partager sur Pinterest"
232
-
233
- #: src/blocks/block-sharing/index.php:175
234
- msgid "Share on Google"
235
- msgstr "Partager sur Google"
236
-
237
- #: src/blocks/block-sharing/index.php:159
238
- msgid "Share on Facebook"
239
- msgstr "Partager sur Facebook"
240
-
241
- #: src/blocks/block-sharing/index.php:143
242
- msgid "Share on Twitter"
243
- msgstr "Partager sur Twitter"
244
-
245
- #: dist/getting-started/getting-started.php:336
246
- msgid "Free Theme Download"
247
- msgstr "Téléchargement gratuit du thème"
248
-
249
- #: dist/getting-started/getting-started.php:360
250
- #: dist/getting-started/getting-started.php:391
251
- msgid "Join the newsletter to receive emails when we add new blocks, release plugin and theme updates, send out free resources, and more!"
252
- msgstr "Inscrivez-vous à la newsletter pour recevoir des e-mails lorsque nous ajoutons de nouveaux blocs, publions des mises à jour de l’extension et du thème, envoyons des ressources gratuites, et plus !"
253
-
254
- #: dist/getting-started/getting-started.php:316
255
- msgid "Responsive Blocks adds several handy content blocks to the Gutenberg block editor."
256
- msgstr "Responsive Blocks ajoute au nouvel éditeur plusieurs blocs de contenu utiles."
257
-
258
- #: dist/getting-started/getting-started.php:308
259
- #: dist/getting-started/getting-started.php:310
260
- #: dist/getting-started/getting-started.php:322
261
- #: dist/getting-started/getting-started.php:324
262
- msgid "Plugin activated!"
263
- msgstr "Extension activée !"
264
-
265
- #: dist/getting-started/getting-started.php:302
266
- msgid "Gutenberg adds the new block-based editor to WordPress. You will need this to work with the Responsive Blocks plugin."
267
- msgstr "Gutenberg ajoute à WordPress le nouvel éditeur basé sur des blocs. Vous en aurez besoin pour travailler avec l’extension Responsive Blocks."
268
-
269
- #: dist/getting-started/getting-started.php:109
270
- #: dist/getting-started/getting-started.php:341
271
- msgid "Visit Responsive Blocks"
272
- msgstr "Visiter Responsive Blocks"
273
-
274
- #. Description of the plugin/theme
275
- msgid "A beautiful collection of handy Gutenberg blocks to help you get started with the new WordPress editor."
276
- msgstr "Une belle collection de blocs Gutenberg utiles pour vous aider à démarrer avec le nouvel éditeur de WordPress."
277
-
278
- #. Plugin Name of the plugin/theme
279
- msgid "Responsive Blocks - Gutenberg Blocks Collection"
280
- msgstr "Responsive Blocks - Collection de blocs Gutenberg"
281
-
282
- #. Author URI of the plugin/theme
283
- msgid "http://arraythemes.com"
284
- msgstr "http://arraythemes.com"
285
-
286
- #. Author of the plugin/theme
287
- msgid "responsiveblocks"
288
- msgstr "responsiveblocks"
289
-
290
- #. Plugin URI of the plugin/theme
291
- msgid "https://responsiveblocks.com"
292
- msgstr "https://responsiveblocks.com"
293
-
294
- #: dist/init.php:138
295
- msgid "No posts"
296
- msgstr "Aucune publication"
297
-
298
- #: dist/getting-started/getting-started.php:377
299
- msgid "Visit ResponsiveBlocks.com"
300
- msgstr "Visiter ResponsiveBlocks.com"
301
-
302
- #: dist/getting-started/getting-started.php:376
303
- #: dist/getting-started/getting-started.php:398
304
- msgid "Check out the Responsive Blocks site to find block editor tutorials, free blocks and updates about the Responsive Blocks plugin and theme!"
305
- msgstr "Consultez le site Responsive Blocks pour trouver des tutoriels sur le nouvel éditeur, des blocs gratuits et des mises à jour de l’extension et du thème Responsive Blocks !"
306
-
307
- #: dist/getting-started/getting-started.php:371
308
- msgid "Free Blocks & Tutorials"
309
- msgstr "Blocs et tutoriels gratuits"
310
-
311
- #: dist/getting-started/getting-started.php:362
312
- msgid "Subscribe Now"
313
- msgstr "S’abonner"
314
-
315
- #: dist/getting-started/getting-started.php:355
316
- msgid "Stay Updated"
317
- msgstr "Restez informé·e"
318
-
319
- #: dist/getting-started/getting-started.php:343
320
- msgid "Download our FREE Responsive Blocks theme to help you get started with the Responsive Blocks plugin and the new WordPress block editor."
321
- msgstr "Téléchargez notre thème gratuit Responsive Blocks pour vous aider à démarrer avec l’extension Responsive Blocks et le nouvel éditeur de bloc de WordPress."
322
-
323
- #: dist/getting-started/getting-started.php:319
324
- msgid "Install Responsive Blocks now"
325
- msgstr "Installer Responsive Blocks maintenant"
326
-
327
- #: dist/getting-started/getting-started.php:315
328
- msgid "2. Install the Responsive Blocks plugin."
329
- msgstr "2. Installer l’extension Responsive Blocks."
330
-
331
- #: dist/getting-started/getting-started.php:128
332
- #: dist/getting-started/getting-started.php:305
333
- msgid "Install Gutenberg now"
334
- msgstr "Installer Gutenberg maintenant"
335
-
336
- #: dist/getting-started/getting-started.php:301
337
- msgid "1. Install the Gutenberg plugin."
338
- msgstr "1. Installer l’extension Gutenberg."
339
-
340
- #: dist/getting-started/getting-started.php:296
341
- msgid "Quick Start Checklist"
342
- msgstr "Checklist de démarrage rapide"
343
-
344
- #: dist/getting-started/getting-started.php:257
345
- #: dist/getting-started/getting-started.php:280
346
- msgid "This help file feed seems to be temporarily down. You can always view the help file on the Responsive Blocks site in the meantime."
347
- msgstr "Le flux de ce fichier d’aide semble être temporairement indisponible. Vous pouvez toujours consulter le fichier d’aide sur le site Responsive Blocks en attendant (en anglais)."
348
-
349
- #: dist/getting-started/getting-started.php:117
350
- msgid "Theme Help File"
351
- msgstr "Fichier d’aide du thème"
352
-
353
- #: dist/getting-started/getting-started.php:115
354
- msgid "Plugin Help File"
355
- msgstr "Fichier d’aide de l’extension"
356
-
357
- #: dist/getting-started/getting-started.php:110
358
- msgid "Getting started with"
359
- msgstr "Démarrer avec"
360
-
361
- #: dist/getting-started/getting-started.php:49
362
- #: dist/getting-started/getting-started.php:50
363
- #: dist/getting-started/getting-started.php:110 dist/init.php:103
364
- msgid "Responsive Blocks"
365
- msgstr "Responsive Blocks"
366
-
367
- #: dist/custom-post-types/testimonials.php:100
368
- msgid "Testimonial Category"
369
- msgstr "Catégorie Témoignage"
370
-
371
- #: dist/custom-post-types/testimonials.php:99
372
- msgid "Testimonial Categories"
373
- msgstr "Catégories Témoignage"
374
-
375
- #: dist/custom-post-types/testimonials.php:66
376
- msgid "No testimonials found in trash"
377
- msgstr "Aucun témoignage dans la corbeille"
378
-
379
- #: dist/custom-post-types/testimonials.php:65
380
- msgid "No testimonials found"
381
- msgstr "Aucun témoignage trouvé"
382
-
383
- #: dist/custom-post-types/testimonials.php:64
384
- msgid "Search Testimonials"
385
- msgstr "Rechercher parmi les témoignages"
386
-
387
- #: dist/custom-post-types/testimonials.php:63
388
- msgid "View Testimonial"
389
- msgstr "Voir le témoignage"
390
-
391
- #: dist/custom-post-types/testimonials.php:62
392
- msgid "New Testimonial"
393
- msgstr "Nouveau témoignage"
394
-
395
- #: dist/custom-post-types/testimonials.php:61
396
- msgid "Edit Testimonial"
397
- msgstr "Modifier le témoignage"
398
-
399
- #: dist/custom-post-types/testimonials.php:60
400
- msgid "Add New Testimonial"
401
- msgstr "Ajouter un témoignage"
402
-
403
- #: dist/custom-post-types/testimonials.php:56
404
- #: dist/custom-post-types/testimonials.php:58
405
- msgid "Testimonial"
406
- msgstr "Témoignage"
407
-
408
- #: dist/custom-post-types/testimonials.php:55
409
- #: dist/custom-post-types/testimonials.php:57
410
- #: dist/custom-post-types/testimonials.php:67
411
- msgid "Testimonials"
412
- msgstr "Témoignages"
413
-
414
- #: dist/custom-post-types/team-members.php:100
415
- msgid "Team Member Category"
416
- msgstr "Catégorie membre d’équipe"
417
-
418
- #: dist/custom-post-types/team-members.php:99
419
- msgid "Team Member Categories"
420
- msgstr "Catégories membre d’équipe"
421
-
422
- #: dist/custom-post-types/team-members.php:66
423
- msgid "No team members found in trash"
424
- msgstr "Aucuns membre d’équipe dans la corbeille"
425
-
426
- #: dist/custom-post-types/team-members.php:65
427
- msgid "No team members found"
428
- msgstr "Aucun membre d’équipe trouvé"
429
-
430
- #: dist/custom-post-types/team-members.php:64
431
- msgid "Search Team Members"
432
- msgstr "Rechercher parmi les membres d’équipe"
433
-
434
- #: dist/custom-post-types/team-members.php:63
435
- msgid "View Team Member"
436
- msgstr "Voir les membres d’équipe"
437
-
438
- #: dist/custom-post-types/team-members.php:62
439
- msgid "New Team Member"
440
- msgstr "Nouveau membre d’équipe"
441
-
442
- #: dist/custom-post-types/team-members.php:61
443
- msgid "Edit Team Member"
444
- msgstr "Modifier le membre d’équipe"
445
-
446
- #: dist/custom-post-types/team-members.php:60
447
- msgid "Add New Team Member"
448
- msgstr "Ajouter un membre d’équipe"
449
-
450
- #: dist/custom-post-types/team-members.php:56
451
- msgid "Team Member"
452
- msgstr "Membre d’équipe"
453
-
454
- #: dist/custom-post-types/team-members.php:55
455
- #: dist/custom-post-types/team-members.php:57
456
- #: dist/custom-post-types/team-members.php:58
457
- #: dist/custom-post-types/team-members.php:67
458
- msgid "Team Members"
459
- msgstr "Membres d’équipe"
460
-
461
- #: dist/custom-post-types/pricing-tables.php:112
462
- #: dist/custom-post-types/team-members.php:112
463
- #: dist/custom-post-types/testimonials.php:112
464
- msgid "Parent Category:"
465
- msgstr "Catégorie parente :"
466
-
467
- #: dist/custom-post-types/pricing-tables.php:111
468
- #: dist/custom-post-types/team-members.php:111
469
- #: dist/custom-post-types/testimonials.php:111
470
- msgid "Parent Category"
471
- msgstr "Catégorie parente"
472
-
473
- #: dist/custom-post-types/pricing-tables.php:110
474
- #: dist/custom-post-types/team-members.php:110
475
- #: dist/custom-post-types/testimonials.php:110
476
- msgid "New Category Name"
477
- msgstr "Nom de la nouvelle catégorie"
478
-
479
- #: dist/custom-post-types/pricing-tables.php:109
480
- #: dist/custom-post-types/team-members.php:109
481
- #: dist/custom-post-types/testimonials.php:109
482
- msgid "Add New Category"
483
- msgstr "Ajouter une catégorie"
484
-
485
- #: dist/custom-post-types/pricing-tables.php:108
486
- #: dist/custom-post-types/team-members.php:108
487
- #: dist/custom-post-types/testimonials.php:108
488
- msgid "Update Category"
489
- msgstr "Mettre à jour la catégorie"
490
-
491
- #: dist/custom-post-types/pricing-tables.php:107
492
- #: dist/custom-post-types/team-members.php:107
493
- #: dist/custom-post-types/testimonials.php:107
494
- msgid "View Category"
495
- msgstr "Voir la catégorie"
496
-
497
- #: dist/custom-post-types/pricing-tables.php:106
498
- #: dist/custom-post-types/team-members.php:106
499
- #: dist/custom-post-types/testimonials.php:106
500
- msgid "Edit Category"
501
- msgstr "Modifier la catégorie"
502
-
503
- #: dist/custom-post-types/pricing-tables.php:105
504
- #: dist/custom-post-types/team-members.php:105
505
- #: dist/custom-post-types/testimonials.php:105
506
- msgid "All Categories"
507
- msgstr "Toutes les catégories"
508
-
509
- #: dist/custom-post-types/pricing-tables.php:104
510
- #: dist/custom-post-types/team-members.php:104
511
- #: dist/custom-post-types/testimonials.php:104
512
- msgid "Popular Categories"
513
- msgstr "Catégories populaires"
514
-
515
- #: dist/custom-post-types/pricing-tables.php:103
516
- #: dist/custom-post-types/team-members.php:103
517
- #: dist/custom-post-types/testimonials.php:103
518
- msgid "Search Categories"
519
- msgstr "Rechercher parmi les catégories"
520
-
521
- #: dist/custom-post-types/pricing-tables.php:102
522
- #: dist/custom-post-types/team-members.php:102
523
- #: dist/custom-post-types/testimonials.php:102
524
- msgid "Category"
525
- msgstr "Catégorie"
526
-
527
- #: dist/custom-post-types/pricing-tables.php:101
528
- #: dist/custom-post-types/team-members.php:101
529
- #: dist/custom-post-types/testimonials.php:101
530
- msgid "Categories"
531
- msgstr "Catégories"
532
-
533
- #: dist/custom-post-types/pricing-tables.php:100
534
- msgid "Pricing Table Category"
535
- msgstr "Catégorie de tableau de prix"
536
-
537
- #: dist/custom-post-types/pricing-tables.php:99
538
- msgid "Pricing Tables Categories"
539
- msgstr "Catégories de tableau de prix"
540
-
541
- #: dist/custom-post-types/pricing-tables.php:66
542
- msgid "No pricing tables found in trash"
543
- msgstr "Aucun tableau de prix dans la corbeille"
544
-
545
- #: dist/custom-post-types/pricing-tables.php:65
546
- msgid "No pricing tables found"
547
- msgstr "Aucun tableau de prix trouvé"
548
-
549
- #: dist/custom-post-types/pricing-tables.php:64
550
- msgid "Search Pricing Tables"
551
- msgstr "Rechercher parmi les tableaux de prix"
552
-
553
- #: dist/custom-post-types/pricing-tables.php:63
554
- msgid "View Pricing Table"
555
- msgstr "Voir le tableau de prix"
556
-
557
- #: dist/custom-post-types/pricing-tables.php:62
558
- msgid "New Pricing Table"
559
- msgstr "Nouveau tableau de prix"
560
-
561
- #: dist/custom-post-types/pricing-tables.php:61
562
- msgid "Edit Pricing Table"
563
- msgstr "Modifier le tableau de prix"
564
-
565
- #: dist/custom-post-types/pricing-tables.php:60
566
- msgid "Add New Pricing Table"
567
- msgstr "Ajouter un tableau de prix"
568
-
569
- #: dist/custom-post-types/pricing-tables.php:59
570
- #: dist/custom-post-types/team-members.php:59
571
- #: dist/custom-post-types/testimonials.php:59
572
- msgid "Add New"
573
- msgstr "Ajouter"
574
-
575
- #: dist/custom-post-types/pricing-tables.php:58
576
- msgid "Pricing"
577
- msgstr "Prix"
578
-
579
- #: dist/custom-post-types/pricing-tables.php:56
580
- msgid "Pricing Table"
581
- msgstr "Tableau de prix"
582
-
583
- #: dist/custom-post-types/pricing-tables.php:55
584
- #: dist/custom-post-types/pricing-tables.php:57
585
- #: dist/custom-post-types/pricing-tables.php:67
586
- msgid "Pricing Tables"
587
- msgstr "Tableaux de prix"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -33,6 +33,9 @@ The Ready Site Importer feature allows you to import ready-made website demos, c
33
  1. Responsive Ready Site importer in action
34
 
35
  == Changelog ==
 
 
 
36
  = 2.0.4 - 31st July 2019 =
37
  * Removed guttenberg blocks
38
 
33
  1. Responsive Ready Site importer in action
34
 
35
  == Changelog ==
36
+ = 2.0.5 - 9th September 2019 =
37
+ * Added Pro Templates, Support Links
38
+
39
  = 2.0.4 - 31st July 2019 =
40
  * Removed guttenberg blocks
41
 
responsive-add-ons.php CHANGED
@@ -2,8 +2,8 @@
2
  /*
3
  Plugin Name: Responsive Add Ons
4
  Plugin URI: http://wordpress.org/plugins/responsive-add-ons/
5
- Description: Added functionality for the responsive theme
6
- Version: 2.0.4
7
  Author: CyberChimps
8
  Author URI: http://www.cyberchimps.com
9
  License: GPL2
@@ -54,14 +54,12 @@ if( !class_exists( 'Responsive_Addons' ) ) {
54
  add_action('admin_notices', array( &$this, 'add_theme_installation_notice'), 1);
55
  add_action( 'wp_ajax_responsive-ready-sites-activate-theme', array( $this, 'activate_theme' ) );
56
  add_action( 'after_setup_theme', array( &$this, 'after_setup_theme' ) );
57
- add_action( 'admin_menu', array( &$this, 'add_menu' ) );
58
  add_action( 'wp_head', array( &$this, 'responsive_head' ) );
59
  add_action( 'plugins_loaded', array( &$this, 'responsive_addons_translations' ) );
60
  $plugin = plugin_basename( __FILE__ );
61
  add_filter( "plugin_action_links_$plugin", array( &$this, 'plugin_settings_link' ) );
62
 
63
  // Responsive Ready Site Importer Menu
64
- //add_action('admin_menu', array( &$this, 'add_responsive_ready_sites_menu' ) );
65
  add_action('admin_enqueue_scripts', array( &$this, 'responsive_ready_sites_admin_enqueue_scripts' ) );
66
 
67
  add_action('admin_enqueue_scripts', array( &$this, 'responsive_ready_sites_admin_enqueue_styles' ) );
@@ -76,12 +74,23 @@ if( !class_exists( 'Responsive_Addons' ) ) {
76
 
77
  //get Active Site
78
  add_action( 'wp_ajax_responsive-ready-sites-get-active-site', array( $this, 'get_active_site' ) );
79
-
 
 
 
 
 
 
 
 
 
80
  $this->options = get_option( 'responsive_theme_options' );
81
  $this->plugin_options = get_option( 'responsive_addons_options' );
82
 
83
  $this->load_responsive_sites_importer();
84
 
 
 
85
  self::set_api_url();
86
  }
87
 
@@ -291,31 +300,6 @@ if( !class_exists( 'Responsive_Addons' ) ) {
291
 
292
  }
293
 
294
- /**
295
- * Add the menu
296
- */
297
- public function add_menu() {
298
- // Hides Menu options if the current theme is responsive
299
-
300
- add_menu_page(
301
- __( 'Responsive Add-Ons', 'responsive-addons' ),
302
- __( 'Responsive Add-Ons', 'responsive-addons' ),
303
- 'manage_options',
304
- 'responsive-blocks-ready-sites',
305
- array( &$this, 'menu_callback' ),
306
- 'dashicons-admin-generic'
307
- );
308
-
309
- add_submenu_page(
310
- 'responsive-blocks-ready-sites',
311
- esc_html__( 'Responsive Add-Ons', 'responsive-addons' ),
312
- esc_html__( 'Ready Websites', 'responsive-addons' ),
313
- 'manage_options',
314
- 'responsive-blocks-ready-sites',
315
- array( &$this, 'menu_callback' )
316
- );
317
- }
318
-
319
  function responsive_blocks_getting_started_page() {
320
  $pages_dir = trailingslashit( dirname( __FILE__ ) ) . 'templates/';
321
 
@@ -548,11 +532,7 @@ if( !class_exists( 'Responsive_Addons' ) ) {
548
  * @return mixed
549
  */
550
  public function plugin_settings_link( $links ) {
551
- if ( $this->is_responsive() ) {
552
- $settings_link = '<a href="themes.php?page=theme_options">' . __( 'Settings', 'responsive-addons' ) . '</a>';
553
- } else {
554
- $settings_link = '<a href="options-general.php?page=responsive_addons">' . __( 'Settings', 'responsive-addons' ) . '</a>';
555
- }
556
  array_unshift( $links, $settings_link );
557
 
558
  return $links;
@@ -614,57 +594,57 @@ if( !class_exists( 'Responsive_Addons' ) ) {
614
  );
615
  wp_localize_script( 'install-responsive-theme', 'ResponsiveInstallThemeVars', $data );
616
 
617
- if( 'toplevel_page_responsive-blocks-ready-sites' !== $hook ){
618
- return;
619
- }
620
- wp_enqueue_script( 'responsive-ready-sites-fetch', RESPONSIVE_ADDONS_URI . 'admin/js/fetch.umd.js', array( 'jquery' ), '2.0.0', true );
621
 
622
- wp_enqueue_script( 'responsive-ready-sites-api', RESPONSIVE_ADDONS_URI . 'admin/js/responsive-ready-sites-api.js', array( 'jquery', 'responsive-ready-sites-fetch' ), '2.0.0', true );
623
 
624
- wp_enqueue_script( 'responsive-ready-sites-admin-js', RESPONSIVE_ADDONS_URI.'/admin/js/responsive-ready-sites-admin.js', array( 'jquery', 'wp-util', 'updates' ), '2.0.0', true );
625
 
626
- wp_enqueue_script( 'render-responsive-ready-sites', RESPONSIVE_ADDONS_URI. 'admin/js/render-responsive-ready-sites.js', array( 'wp-util', 'responsive-ready-sites-api', 'jquery' ), '2.0.0', true );
627
 
628
- $data = apply_filters(
629
- 'responsive_sites_localize_vars',
630
- array(
631
- 'debug' => ( ( defined( 'WP_DEBUG' ) && WP_DEBUG ) || isset( $_GET['debug'] ) ) ? true : false, //phpcs:ignore
632
- 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php' ) ),
633
- 'siteURL' => site_url(),
634
- '_ajax_nonce' => wp_create_nonce( 'responsive-addons' ),
635
- 'XMLReaderDisabled' => ! class_exists( 'XMLReader' ) ? true : false,
636
- 'required_plugins' => array(),
637
- 'ApiURL' => self::$api_url,
638
- )
639
- );
640
 
641
- wp_localize_script( 'responsive-ready-sites-admin-js', 'responsiveSitesAdmin', $data );
 
 
 
 
 
 
 
 
 
 
 
642
 
643
- $data = apply_filters(
644
- 'responsive_sites_localize_vars',
645
- array(
646
- 'ApiURL' => self::$api_url,
647
- )
648
- );
649
 
650
- // Use this for premium demos.
651
- $request_params = apply_filters(
652
- 'responsive_sites_api_params',
653
- array(
654
- 'site_url' => '',
655
- )
656
- );
657
 
658
- wp_localize_script( 'responsive-ready-sites-api', 'responsiveSitesApi', $data );
659
- $data = apply_filters(
660
- 'responsive_sites_render_localize_vars',
661
- array(
662
- 'sites' => $request_params,
663
- 'settings' => array(),
664
- )
665
- );
 
 
 
 
 
 
 
 
666
 
667
- wp_localize_script( 'render-responsive-ready-sites', 'responsiveSitesRender', $data );
 
668
  }
669
 
670
  /**
@@ -753,17 +733,14 @@ if( !class_exists( 'Responsive_Addons' ) ) {
753
  if ( count( $required_plugins ) > 0 ) {
754
  foreach ( $required_plugins as $key => $plugin ) {
755
 
756
- // Lite - Installed but Inactive.
757
  if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin['init'] ) && is_plugin_inactive( $plugin['init'] ) ) {
758
 
759
  $response['inactive'][] = $plugin;
760
 
761
- // Lite - Not Installed.
762
  } elseif ( ! file_exists( WP_PLUGIN_DIR . '/' . $plugin['init'] ) ) {
763
 
764
  $response['notinstalled'][] = $plugin;
765
 
766
- // Lite - Active.
767
  } else {
768
  $response['active'][] = $plugin;
769
  }
@@ -817,6 +794,120 @@ if( !class_exists( 'Responsive_Addons' ) ) {
817
  );
818
 
819
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
820
  }
821
  }
822
 
2
  /*
3
  Plugin Name: Responsive Add Ons
4
  Plugin URI: http://wordpress.org/plugins/responsive-add-ons/
5
+ Description: Import Responsive Ready Sites that help you launch your website quickly. Just import, update & hit the launch button.
6
+ Version: 2.0.5
7
  Author: CyberChimps
8
  Author URI: http://www.cyberchimps.com
9
  License: GPL2
54
  add_action('admin_notices', array( &$this, 'add_theme_installation_notice'), 1);
55
  add_action( 'wp_ajax_responsive-ready-sites-activate-theme', array( $this, 'activate_theme' ) );
56
  add_action( 'after_setup_theme', array( &$this, 'after_setup_theme' ) );
 
57
  add_action( 'wp_head', array( &$this, 'responsive_head' ) );
58
  add_action( 'plugins_loaded', array( &$this, 'responsive_addons_translations' ) );
59
  $plugin = plugin_basename( __FILE__ );
60
  add_filter( "plugin_action_links_$plugin", array( &$this, 'plugin_settings_link' ) );
61
 
62
  // Responsive Ready Site Importer Menu
 
63
  add_action('admin_enqueue_scripts', array( &$this, 'responsive_ready_sites_admin_enqueue_scripts' ) );
64
 
65
  add_action('admin_enqueue_scripts', array( &$this, 'responsive_ready_sites_admin_enqueue_styles' ) );
74
 
75
  //get Active Site
76
  add_action( 'wp_ajax_responsive-ready-sites-get-active-site', array( $this, 'get_active_site' ) );
77
+
78
+ //Check if Responsive Addons pro plugin is active
79
+ add_action( 'wp_ajax_check-responsive-add-ons-pro-installed', array( $this, 'is_responsive_pro_is_installed') );
80
+
81
+ //Check if Responsive Addons pro license is active
82
+ add_action('wp_ajax_check-responsive-add-ons-pro-license-active', array( $this, 'is_responsive_pro_license_is_active'));
83
+
84
+ //Responsive Addons Page
85
+ add_action( 'admin_menu', array( $this, 'responsive_addons_admin_page' ), 100 );
86
+
87
  $this->options = get_option( 'responsive_theme_options' );
88
  $this->plugin_options = get_option( 'responsive_addons_options' );
89
 
90
  $this->load_responsive_sites_importer();
91
 
92
+ add_action( 'responsive_addons_importer_page', array($this, 'menu_callback'));
93
+
94
  self::set_api_url();
95
  }
96
 
300
 
301
  }
302
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  function responsive_blocks_getting_started_page() {
304
  $pages_dir = trailingslashit( dirname( __FILE__ ) ) . 'templates/';
305
 
532
  * @return mixed
533
  */
534
  public function plugin_settings_link( $links ) {
535
+ $settings_link = '<a href="themes.php?page=responsive-add-ons">' . __( 'Settings', 'responsive-addons' ) . '</a>';
 
 
 
 
536
  array_unshift( $links, $settings_link );
537
 
538
  return $links;
594
  );
595
  wp_localize_script( 'install-responsive-theme', 'ResponsiveInstallThemeVars', $data );
596
 
597
+ if( 'appearance_page_responsive-add-ons' === $hook && empty($_GET['action'] ) ) {
 
 
 
598
 
599
+ wp_enqueue_script('responsive-ready-sites-fetch', RESPONSIVE_ADDONS_URI . 'admin/js/fetch.umd.js', array('jquery'), '2.0.0', true);
600
 
601
+ wp_enqueue_script('responsive-ready-sites-api', RESPONSIVE_ADDONS_URI . 'admin/js/responsive-ready-sites-api.js', array('jquery', 'responsive-ready-sites-fetch'), '2.0.0', true);
602
 
603
+ wp_enqueue_script('responsive-ready-sites-admin-js', RESPONSIVE_ADDONS_URI . 'admin/js/responsive-ready-sites-admin.js', array('jquery', 'wp-util', 'updates'), '2.0.0', true);
604
 
605
+ wp_enqueue_script('render-responsive-ready-sites', RESPONSIVE_ADDONS_URI . 'admin/js/render-responsive-ready-sites.js', array('wp-util', 'responsive-ready-sites-api', 'jquery'), '2.0.0', true);
 
 
 
 
 
 
 
 
 
 
 
606
 
607
+ $data = apply_filters(
608
+ 'responsive_sites_localize_vars',
609
+ array(
610
+ 'debug' => ((defined('WP_DEBUG') && WP_DEBUG) || isset($_GET['debug'])) ? true : false, //phpcs:ignore
611
+ 'ajaxurl' => esc_url(admin_url('admin-ajax.php')),
612
+ 'siteURL' => site_url(),
613
+ '_ajax_nonce' => wp_create_nonce('responsive-addons'),
614
+ 'XMLReaderDisabled' => !class_exists('XMLReader') ? true : false,
615
+ 'required_plugins' => array(),
616
+ 'ApiURL' => self::$api_url,
617
+ )
618
+ );
619
 
620
+ wp_localize_script('responsive-ready-sites-admin-js', 'responsiveSitesAdmin', $data);
 
 
 
 
 
621
 
622
+ $data = apply_filters(
623
+ 'responsive_sites_localize_vars',
624
+ array(
625
+ 'ApiURL' => self::$api_url,
626
+ )
627
+ );
 
628
 
629
+ // Use this for premium demos.
630
+ $request_params = apply_filters(
631
+ 'responsive_sites_api_params',
632
+ array(
633
+ 'site_url' => '',
634
+ )
635
+ );
636
+
637
+ wp_localize_script('responsive-ready-sites-api', 'responsiveSitesApi', $data);
638
+ $data = apply_filters(
639
+ 'responsive_sites_render_localize_vars',
640
+ array(
641
+ 'sites' => $request_params,
642
+ 'settings' => array(),
643
+ )
644
+ );
645
 
646
+ wp_localize_script('render-responsive-ready-sites', 'responsiveSitesRender', $data);
647
+ }
648
  }
649
 
650
  /**
733
  if ( count( $required_plugins ) > 0 ) {
734
  foreach ( $required_plugins as $key => $plugin ) {
735
 
 
736
  if ( file_exists( WP_PLUGIN_DIR . '/' . $plugin['init'] ) && is_plugin_inactive( $plugin['init'] ) ) {
737
 
738
  $response['inactive'][] = $plugin;
739
 
 
740
  } elseif ( ! file_exists( WP_PLUGIN_DIR . '/' . $plugin['init'] ) ) {
741
 
742
  $response['notinstalled'][] = $plugin;
743
 
 
744
  } else {
745
  $response['active'][] = $plugin;
746
  }
794
  );
795
 
796
  }
797
+
798
+ /**
799
+ * Check if Responsive Addons Pro is installed.
800
+ */
801
+ public function is_responsive_pro_is_installed() {
802
+ $responsive_pro_slug = 'responsive-addons-pro/responsive-addons-pro.php';
803
+ if ( ! function_exists( 'get_plugins' ) ) {
804
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
805
+ }
806
+ $all_plugins = get_plugins();
807
+
808
+ if ( ! empty( $all_plugins[ $responsive_pro_slug ] ) ) {
809
+ wp_send_json_success();
810
+ } else {
811
+ wp_send_json_error();
812
+ }
813
+ }
814
+
815
+ /**
816
+ * Check if Responsive Addons Pro License is Active.
817
+ */
818
+ public function is_responsive_pro_license_is_active() {
819
+ global $wcam_lib;
820
+ if( is_null( $wcam_lib ) ){
821
+ wp_send_json_error();
822
+ }
823
+ $license_status = $wcam_lib->license_key_status();
824
+
825
+ if ( ! empty( $license_status[ 'data' ][ 'activated' ] ) && $license_status[ 'data' ][ 'activated' ] ) {
826
+ wp_send_json_success();
827
+ } else {
828
+ wp_send_json_error();
829
+ }
830
+ }
831
+
832
+ /**
833
+ * Adding the theme menu page
834
+ */
835
+ public function responsive_addons_admin_page() {
836
+
837
+ if( $this->is_responsive() ){
838
+ $menu_title = 'Add Ons';
839
+ } else {
840
+ $menu_title = 'Responsive Add Ons';
841
+ }
842
+
843
+ add_theme_page(
844
+ 'Responsive Add Ons',
845
+ $menu_title,
846
+ 'administrator',
847
+ 'responsive-add-ons',
848
+ array( $this, 'responsive_add_ons')
849
+ );
850
+ }
851
+
852
+ /**
853
+ * Responsive Addons Admin Page
854
+ */
855
+ public function responsive_add_ons() {
856
+
857
+ $responsive_addon_dir = plugin_dir_path( __FILE__ );
858
+ $responsive_addons_go_pro_screen = ( isset( $_GET['action'] ) && 'go_pro' === $_GET['action'] ) ? true : false; //phpcs:ignore
859
+
860
+ $responsive_addon_license_screen = ( isset( $_GET['action'] ) && 'license' === $_GET['action'] ) ? true : false; //phpcs:ignore
861
+ $responsive_addon_pro_support_screen = ( isset( $_GET['action'] ) && 'pro_support' === $_GET['action'] ) ? true : false; //phpcs:ignore?>
862
+ <div class="wrap">
863
+ <h1><?php esc_html_e( 'Responsive Options' ); ?></h1>
864
+ <h2 class="nav-tab-wrapper">
865
+ <a href="<?php echo esc_url( admin_url( 'admin.php?page=responsive-add-ons' ) ); ?>" class="nav-tab<?php if ( ! isset( $_GET['action'] ) || isset( $_GET['action'] ) && 'go_pro' != $_GET['action'] && 'license' != $_GET['action'] && 'pro_support' != $_GET['action'] ) echo ' nav-tab-active'; ?>"><?php esc_html_e( 'Ready Site Importer' ); ?></a>
866
+ <?php
867
+ if ( !$this->is_responsive_addons_pro_is_active( ) ) { ?>
868
+
869
+ <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'go_pro' ), admin_url( 'themes.php?page=responsive-add-ons' ) ) ); ?>" class="nav-tab<?php if ( $responsive_addons_go_pro_screen ) echo ' nav-tab-active'; ?>"><?php esc_html_e( 'Go Pro' ); ?></a>
870
+
871
+ <?php } ?>
872
+ <a href="<?php echo esc_url( add_query_arg( array( 'action' => 'pro_support' ), admin_url( 'themes.php?page=responsive-add-ons' ) ) ); ?>" class="nav-tab<?php if ( $responsive_addon_pro_support_screen ) echo ' nav-tab-active'; ?>"><?php esc_html_e( 'Support' ); ?></a>
873
+ </h2>
874
+ <?php
875
+ if ( $responsive_addons_go_pro_screen ) {
876
+
877
+ require_once $responsive_addon_dir.'admin/templates/responsive-addons-go-pro.php';
878
+
879
+ } elseif ( $responsive_addon_license_screen ) {
880
+
881
+ do_action('responsive_addons_pro_license_page');
882
+ } elseif ( $responsive_addon_pro_support_screen ) {
883
+
884
+ require_once $responsive_addon_dir.'admin/templates/responsive-addons-support.php';
885
+ } else {
886
+
887
+ do_action('responsive_addons_importer_page');
888
+ }
889
+ ?>
890
+ </div>
891
+
892
+ <?php
893
+ }
894
+
895
+ /**
896
+ * Check if Responsive Addons Pro is installed.
897
+ */
898
+ public function is_responsive_addons_pro_is_active() {
899
+ $responsive_pro_slug = 'responsive-addons-pro/responsive-addons-pro.php';
900
+ if ( ! function_exists( 'get_plugins' ) ) {
901
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
902
+ }
903
+
904
+ if ( is_plugin_active( $responsive_pro_slug ) ) {
905
+ return true;
906
+ } else {
907
+ return false;
908
+ }
909
+ }
910
+
911
  }
912
  }
913