Blocks
6 months ago
Contracts
1 year ago
Database
4 months ago
Integrations
3 months ago
Libraries
3 months ago
Models
3 months ago
Seeds
1 year ago
Services
3 months ago
Support
4 months ago
config
4 months ago
lib
4 months ago
Activator.php
1 year ago
Attachment.php
4 months ago
Controller.php
1 year ago
Core.php
1 year ago
Deactivator.php
1 year ago
Factory.php
3 months ago
Files.php
1 year ago
Playlist.php
1 year ago
Plugin.php
9 months ago
Requirements.php
1 year ago
support.php
1 year ago
Activator.php
26 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 | // run migrations |
| 12 | Migrations::run(); |
| 13 | |
| 14 | // file stuff |
| 15 | $activator = new Files(); |
| 16 | $activator->addPrivateFolder(); |
| 17 | |
| 18 | /** |
| 19 | * Reset rewrite rules to avoid go to permalinks page |
| 20 | * through deleting the database options to force WP to do it |
| 21 | * because of on activation not work well flush_rewrite_rules() |
| 22 | */ |
| 23 | delete_option( 'rewrite_rules' ); |
| 24 | } |
| 25 | } |
| 26 |