Activation
5 years ago
Admin
5 years ago
Container
5 years ago
Front
5 years ago
Moment
5 years ago
Rest
5 years ago
Widget
5 years ago
Bootstrap.php
5 years ago
Cache.php
5 years ago
Helper.php
5 years ago
I18N.php
5 years ago
Image.php
5 years ago
Output.php
5 years ago
Query.php
5 years ago
Settings.php
5 years ago
Themer.php
5 years ago
Translate.php
5 years ago
WordPressPopularPosts.php
5 years ago
deprecated.php
5 years ago
template-tags.php
5 years ago
Bootstrap.php
26 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin bootstrap file. |
| 4 | */ |
| 5 | namespace WordPressPopularPosts; |
| 6 | |
| 7 | /** Composer autoloder */ |
| 8 | require __DIR__ . '/../vendor/autoload.php'; |
| 9 | |
| 10 | register_activation_hook($wpp_main_plugin_file, [__NAMESPACE__ . '\Activation\Activator', 'activate']); |
| 11 | register_deactivation_hook($wpp_main_plugin_file, [__NAMESPACE__ . '\Activation\Deactivator', 'deactivate']); |
| 12 | |
| 13 | $container = new Container\Container(); |
| 14 | $container->configure([ |
| 15 | new Container\WordPressPopularPostsConfiguration() |
| 16 | ]); |
| 17 | |
| 18 | $WordPressPopularPosts = $container['wpp']; |
| 19 | add_action('plugins_loaded', [$WordPressPopularPosts, 'init']); |
| 20 | |
| 21 | // WPP's template tags |
| 22 | require __DIR__ . '/template-tags.php'; |
| 23 | |
| 24 | // Deprecated functions/classes |
| 25 | require __DIR__ . '/deprecated.php'; |
| 26 |