| 1 |
<?php |
| 2 |
|
| 3 |
class Nginx_Module extends Red_Module { |
| 4 |
const MODULE_ID = 3; |
| 5 |
|
| 6 |
private $location = ''; |
| 7 |
private $canonical = ''; |
| 8 |
|
| 9 |
public function get_id() { |
| 10 |
return self::MODULE_ID; |
| 11 |
} |
| 12 |
|
| 13 |
public function can_edit_config() { |
| 14 |
return false; |
| 15 |
} |
| 16 |
|
| 17 |
protected function load( $data ) { |
| 18 |
$mine = array( 'location', 'canonical' ); |
| 19 |
|
| 20 |
foreach ( $mine as $key ) { |
| 21 |
if ( isset( $data[ $key ] ) ) |
| 22 |
$this->$key = $data[ $key ]; |
| 23 |
} |
| 24 |
} |
| 25 |
|
| 26 |
protected function flush_module() { |
| 27 |
} |
| 28 |
|
| 29 |
public function update( $data ) { |
| 30 |
return false; |
| 31 |
} |
| 32 |
|
| 33 |
public function render_config() { |
| 34 |
} |
| 35 |
|
| 36 |
public function get_config() { |
| 37 |
return array(); |
| 38 |
} |
| 39 |
|
| 40 |
public function get_name() { |
| 41 |
return __( 'Nginx', 'redirection' ); |
| 42 |
} |
| 43 |
|
| 44 |
public function get_description() { |
| 45 |
return __( 'For use with Nginx server. Requires manual configuration. The redirect happens without loading WordPress. No tracking of hits. This is an experimental module.', 'redirection' ); |
| 46 |
} |
| 47 |
} |
| 48 |
|