PluginProbe ʕ •ᴥ•ʔ
ShortPixel Image Optimizer – Optimize Images, Convert WebP & AVIF / 6.5.3
ShortPixel Image Optimizer – Optimize Images, Convert WebP & AVIF v6.5.3
6.5.3 6.5.2 6.5.1 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.6 1.2.0 1.3.1 1.3.5 1.4.0 1.4.1 1.5.0 1.5.3 1.6.0 1.6.1 1.6.10 1.6.2 1.6.3 1.6.4 1.6.6 1.6.7 1.6.8 1.6.9 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.10 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.1.9 3.0.0 3.0.2 3.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 3.2.0 3.2.1 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 4.0.0 4.0.1 4.0.2 4.1.0 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.7 4.10.0 4.10.1 4.10.2 4.10.3 4.10.4 4.10.5 4.11.0 4.11.1 4.11.2 4.11.3 4.12.0 4.12.1 4.12.2 4.12.3 4.12.4 4.12.5 4.12.6 4.12.7 4.12.8 4.13.0 4.13.1 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.14.5 4.14.6 4.15.0 4.15.1 4.15.2 4.15.3 4.15.4 4.16.0 4.16.1 4.16.2 4.16.3 4.16.4 4.17.0 4.17.1 4.17.2 4.17.3 4.17.4 4.18.0 4.18.1 4.19.0 4.19.1 4.19.2 4.19.3 4.2.0 4.2.1 4.2.2 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.20.0 4.20.1 4.20.2 4.21.0 4.21.1 4.21.2 4.22.0 4.22.1 4.22.10 4.22.2 4.22.3 4.22.4 4.22.5 4.22.6 4.22.7 4.22.8 4.22.9 4.3.0 4.3.1 4.4.0 4.4.1 4.4.2 4.5.0 4.5.1 4.5.2 4.5.3 4.5.5 4.6.0 4.7.0 4.7.1 4.7.2 4.8.0 4.8.1 4.8.2 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 4.9.0 4.9.1 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.2.0 5.2.1 5.2.2 5.2.3 5.3.0 5.4.0 5.4.1 5.4.2 5.4.3 5.5.0 5.5.1 5.5.2 5.5.3 5.5.4 5.5.5 5.6.0 5.6.1 5.6.2 5.6.3 5.6.4 6.0.0 6.0.1 6.0.2 6.0.3 6.0.4 6.0.5 6.1.0 6.1.1 6.1.2 6.1.3 6.1.4 6.2.0 6.2.1 6.2.2 6.3.0 6.3.1 6.3.2 6.3.3 6.3.4 6.3.5 6.4.0 6.4.1 6.4.2 6.4.3 6.4.4 6.5.0
shortpixel-image-optimiser / class / BuildAutoLoader.php
shortpixel-image-optimiser / class Last commit date
Controller 6 days ago Helper 3 weeks ago Model 6 days ago external 6 days ago view 6 days ago .gitignore 5 years ago BuildAutoLoader.php 3 weeks ago Controller.php 3 weeks ago Model.php 3 weeks ago ViewController.php 3 weeks ago plugin.json 1 month ago
BuildAutoLoader.php
91 lines
1 <?php
2 namespace ShortPixel;
3
4 /**
5 * Utility class for generating the plugin's Composer-style autoloader JSON manifest.
6 *
7 * Used during development/build processes to regenerate the plugin.json file that
8 * maps namespaces and individual files for the PSR-4 autoloader.
9 *
10 * @package ShortPixel
11 */
12 class BuildAutoLoader
13 {
14
15 /**
16 * Builds and writes the plugin.json autoloader manifest to class/plugin.json.
17 *
18 * Constructs a Composer-style package descriptor with PSR-4 namespace mapping
19 * and the explicit file list returned by getFiles(), then serialises it as JSON.
20 *
21 * @return void
22 */
23 public static function buildJSON()
24 {
25 echo 'Building Plugin.JSON';
26 $plugin = array(
27 'name' => 'ShortPixel/Plugin',
28 'description' => 'ShortPixel AutoLoader',
29 'type' => 'function',
30 'autoload' => array('psr-4' => array('ShortPixel' => 'class'),
31 'files' => self::getFiles(),
32 ),
33 );
34
35 $f = fopen('class/plugin.json', 'w');
36 $result = fwrite($f, json_encode($plugin));
37
38 if ($result === false)
39 echo "!!! Error !!! Could not write Plugin.json";
40
41 fclose($f);
42 }
43
44 /**
45 * Returns the list of plugin PHP files that must be explicitly included by the autoloader.
46 *
47 * Combines main plugin files, model files, and external integration files into a
48 * single flat array. Entries for disabled integrations are commented out inline.
49 *
50 * @return string[] Array of relative file paths to include.
51 */
52 public static function getFiles()
53 {
54 $main = array(
55 );
56
57 $models = array(
58 );
59
60 $externals = array(
61 'class/external/cloudflare.php',
62 'class/external/nextgen/nextGenController.php',
63 'class/external/nextgen/nextGenViewController.php',
64 'class/external/visualcomposer.php',
65 'class/external/offload/Offloader.php',
66 'class/external/offload/wp-offload-media.php',
67 'class/external/offload/virtual-filesystem.php',
68 'class/external/offload/InfiniteUploads.php',
69 'class/external/wp-cli/wp-cli-base.php',
70 'class/external/wp-cli/wp-cli-single.php',
71 'class/external/wp-cli/wp-cli-bulk.php',
72 'class/external/image-galleries.php',
73 'class/external/pantheon.php',
74 'class/external/spai.php',
75 'class/external/cache.php',
76 'class/external/uncode.php',
77 'class/external/query-monitor.php',
78 'class/external/Woocommerce.php',
79 'class/external/themes/total-theme.php',
80 'class/external/MediaFileRenamer.php',
81 'class/external/formidable.php',
82 'class/external/wpml.php',
83
84 );
85
86 echo "Build Plugin.JSON ";
87 return array_merge($main,$models,$externals);
88 }
89
90 }
91