Blocks
2 years ago
Contracts
5 years ago
Database
2 years ago
Integrations
2 years ago
Libraries
5 years ago
Models
2 years ago
Seeds
4 years ago
Services
2 years ago
Support
2 years ago
config
2 years ago
Activator.php
5 years ago
Attachment.php
4 years ago
Controller.php
5 years ago
Core.php
5 years ago
Deactivator.php
3 years ago
Factory.php
5 years ago
Files.php
5 years ago
Playlist.php
2 years ago
Plugin.php
5 years ago
Requirements.php
4 years ago
support.php
4 years ago
Activator.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | namespace PrestoPlayer; |
| 4 | |
| 5 | use PrestoPlayer\Files; |
| 6 | use PrestoPlayer\Database\Migrations; |
| 7 | |
| 8 | class Activator |
| 9 | { |
| 10 | public static function activate() |
| 11 | { |
| 12 | // run migrations |
| 13 | Migrations::run(); |
| 14 | |
| 15 | // file stuff |
| 16 | $activator = new Files(); |
| 17 | $activator->addPrivateFolder(); |
| 18 | |
| 19 | /** |
| 20 | * Reset rewrite rules to avoid go to permalinks page |
| 21 | * through deleting the database options to force WP to do it |
| 22 | * because of on activation not work well flush_rewrite_rules() |
| 23 | */ |
| 24 | delete_option('rewrite_rules'); |
| 25 | } |
| 26 | } |
| 27 |