PluginProbe
Page Builder: Pagelayer – Drag and Drop website builder / 2.2.0
Page Builder: Pagelayer – Drag and Drop website builder v2.2.0
2.2.1 2.2.0 2.1.9 2.1.8 2.1.7 2.1.6 2.1.5 2.1.4 2.1.3 trunk 0.9.0 0.9.1 0.9.2 0.9.3 0.9.4 0.9.5 0.9.6 0.9.7 0.9.8 0.9.9 1.0.0 1.0.2 1.0.3 1.0.4 1.0.5 All 129 releases
← All changes | css/givecss.php +42 -3 1.0.22.2.0 View file →
@@ -21,16 +21,16 @@
21 21
22 22
23 23 // Read the file
24 24 $data = '';
25 +$data_premium = '';
25 26 $self_path = dirname(__FILE__);
27 +$plugins_path = dirname(dirname($self_path));
26 28 $files = array(
27 29 // Admin CSS
28 30 'pagelayer-editor.css',
29 31 'pagelayer-icons.css',
30 32 'pagelayer-editor-frontend.css',
31 - 'trumbowyg.min.css',
32 - 'pen.css',
33 33 // Enduser CSS
34 34 'font-awesome5.min.css',
35 35 'font-awesome5-v4shims.css',
36 36 'nivo-lightbox.css',
@@ -39,13 +39,19 @@
39 39 'pagelayer-frontend.css',
40 40 'premium-frontend.css',
41 41 'animate.min.css',
42 42 'chartist.min.css',
43 + 'pagelayer-pen.css',
44 + 'pagelayer-ai.css'
43 45 );
44 46
45 47 // What files to give
46 48 $give = @$_REQUEST['give'];
47 49
50 +// Premium
51 +$premium = !empty($_REQUEST['premium']) ? $_REQUEST['premium'] : '';
52 +$premium_path = $plugins_path.'/pagelayer-pro/css';
53 +
48 54 if(!empty($give)){
49 55
50 56 $give = explode(',', $give);
51 57
@@ -57,9 +63,22 @@
57 63 }
58 64
59 65 }
60 66
67 +if(!empty($premium)){
68 +
69 + $premium = explode(',', trim($premium, ','));
70 +
71 + // Check all files are in the supported list
72 + foreach($premium as $file){
73 + if(in_array($file, $files)){
74 + $final_premium[md5($file)] = $file;
75 + }
76 + }
77 +
78 +}
61 79
80 +
62 81 // Give all
63 82 if(empty($final)){
64 83 $final = $files;
65 84 }
@@ -68,10 +87,19 @@
68 87 //echo $k.'<br>';
69 88 $data .= file_get_contents($self_path.'/'.$v)."\n\n";
70 89 }
71 90
91 +if(!empty($final_premium)){
92 +
93 + foreach($final_premium as $k => $v){
94 + //echo $k.'<br>';
95 + $data_premium .= file_get_contents($premium_path.'/'.$v)."\n\n";
96 + }
97 +
98 +}
99 +
72 100 // We are zipping if possible
73 -if(function_exists('ob_gzhandler')){
101 +if(function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')){
74 102 ob_start('ob_gzhandler');
75 103 }
76 104
77 105 // Type CSS
@@ -97,7 +125,18 @@
97 125 header('Last-Modified: '.gmdate('D, d M Y H:i:s', $filetime).' GMT', true, 200);
98 126
99 127 }
100 128
129 +if(defined('DOING_AJAX') && !defined('SITEPAD')){
130 + $data = str_replace('../fonts/', '../wp-content/plugins/'.(basename(dirname(dirname(__FILE__)))).'/fonts/', $data);
131 +}
132 +
101 133 echo $data;
134 +echo $data_premium;
102 135
136 +// Write if we are front-end only then
137 +$dev = dirname(dirname(__FILE__)).'/dev.php';
138 +if(!empty($_REQUEST['write']) && file_exists($dev)){
139 + include_once($dev);
140 + write_css();
141 +}
103 142