PluginProbe
WpStream – Live Streaming, Video on Demand, Pay Per View / 4.14.1
WpStream – Live Streaming, Video on Demand, Pay Per View v4.14.1
4.14.1 4.14.0 4.13.2 4.13.1 4.13 4.12.5 4.12.4 4.12.3 4.12.2 4.12.1 4.12 4.4.4 4.4.5 4.4.6 4.4.7 4.4.8 4.4.9 4.5 4.5.1 4.5.11 4.5.11.1 4.5.11.2 4.5.11.4 4.5.11.5 4.5.11.6 All 181 releases
wpstream / includes / class-wpstream-activator.php

class-wpstream-activator.php in WpStream – Live Streaming, Video on Demand, Pay Per View 4.14.1, at includes/class-wpstream-activator.php

56 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Fired during plugin activation
5 *
6 * @link http://wpstream.net
7 * @since 3.0.1
8 *
9 * @package Wpstream
10 * @subpackage Wpstream/includes
11 */
12
13
14 // Exit if accessed directly.
15 if ( ! defined( 'ABSPATH' ) ) {
16 exit;
17 }
18
19 /**
20 * Fired during plugin activation.
21 *
22 * This class defines all code necessary to run during the plugin's activation.
23 *
24 * @since 3.0.1
25 * @package Wpstream
26 * @subpackage Wpstream/includes
27 * @author wpstream <office@wpstream.net>
28 */
29 class Wpstream_Activator {
30
31 /**
32 * Run the one-time activation routine.
33 *
34 * Registers the plugin's custom post types and flushes the rewrite rules so
35 * their permalinks work immediately after the plugin is switched on.
36 *
37 * @since 3.0.1
38 */
39 public static function activate() {
40
41 // Load the class that declares WpStream's custom post types.
42 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wpstream-product.php';
43 // Instantiate the post-type registrar.
44 $plugin_post_types = new Wpstream_Product();
45 // Register the custom post types (channels, VODs, etc.).
46 $plugin_post_types->create_custom_post_type();
47
48 // Rebuild rewrite rules now that new post types exist, so their URLs resolve.
49 flush_rewrite_rules();
50
51 //
52
53 }
54
55 }
56