| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: WP Stateless |
| 4 |
* Plugin URI: https://wordpress.org/plugins/wp-stateless/ |
| 5 |
* |
| 6 |
* Compatibility Description: Support for Google App Engine |
| 7 |
* |
| 8 |
*/ |
| 9 |
|
| 10 |
namespace wpCloud\StatelessMedia { |
| 11 |
|
| 12 |
if(!class_exists('wpCloud\StatelessMedia\GoogleAppEngine')) { |
| 13 |
|
| 14 |
class GoogleAppEngine extends ICompatibility { |
| 15 |
protected $id = 'google-app-engine'; |
| 16 |
protected $title = 'Google App Engine'; |
| 17 |
protected $constant = ['WP_STATELESS_COMPATIBILITY_GAE' => 'WP_STATELESS_COMPATIBILITY_GAE']; |
| 18 |
protected $description = 'Ensures compatibility between WordPress media and Google App Engine in Stateless mode.'; |
| 19 |
protected $server_constant = 'GAE_VERSION'; |
| 20 |
protected $sm_mode_required = 'stateless'; |
| 21 |
|
| 22 |
public function __construct(){ |
| 23 |
$modules = get_option('stateless-modules', array()); |
| 24 |
|
| 25 |
if (empty($modules[$this->id])) { |
| 26 |
// Legacy settings |
| 27 |
$this->enabled = get_option('sm_gae', false); |
| 28 |
} |
| 29 |
|
| 30 |
$this->init(); |
| 31 |
} |
| 32 |
|
| 33 |
public function module_init($sm){ |
| 34 |
|
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
} |
| 39 |
|
| 40 |
} |
| 41 |
|
| 42 |
} |
| 43 |
|