Activation
8 months ago
Admin
8 months ago
Block
8 months ago
Compatibility
8 months ago
Container
8 months ago
Front
8 months ago
Rest
8 months ago
Shortcode
8 months ago
Traits
8 months ago
Widget
8 months ago
Bootstrap.php
8 months ago
Cache.php
8 months ago
Helper.php
8 months ago
Image.php
8 months ago
Output.php
8 months ago
Query.php
8 months ago
Settings.php
8 months ago
Themer.php
8 months ago
Translate.php
8 months ago
Upgrader.php
8 months ago
WordPressPopularPosts.php
8 months ago
deprecated.php
8 months ago
template-tags.php
8 months 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 |