PluginProbe
Advanced Custom Fields (ACF®) / 4.1.4
Advanced Custom Fields (ACF®) v4.1.4
6.8.9 6.8.8 6.8.7 6.8.6 6.8.5 6.8.4 6.8.3 6.8.2 6.8.1 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9 5.9.0 5.9.1 5.9.2 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 6.0.0 All 230 releases
advanced-custom-fields / js / input.php
input.php
48 lines 800 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // vars
4 $expires_offset = 31536000; // 1 year
5 $out = '';
6 $prefix = 'input/';
7 $files = array(
8 'actions.js',
9 'color-picker.js',
10 'date-picker.js',
11 'file.js',
12 'image.js',
13 'relationship.js',
14 'tab.js',
15 'validation.js',
16 'wysiwyg.js'
17 );
18
19
20 // helpers
21 function get_file($path)
22 {
23 if ( function_exists('realpath') )
24 $path = realpath($path);
25
26 if ( ! $path || ! @is_file($path) )
27 return '';
28
29 return @file_get_contents($path);
30 }
31
32 if( $files )
33 {
34 foreach( $files as $file ) {
35 $out .= get_file( $prefix . $file ) . "\n";
36 }
37 }
38
39
40 // set headers to return a JS file
41 header('Content-Type: application/x-javascript; charset=UTF-8');
42 header('Expires: ' . gmdate( "D, d M Y H:i:s", time() + $expires_offset ) . ' GMT');
43 header("Cache-Control: public, max-age=$expires_offset");
44
45 echo $out;
46 exit;
47
48 ?>