| @@ -9,14 +9,8 @@ | ||
| 9 | 9 | * @package Wpstream |
| 10 | 10 | * @subpackage Wpstream/includes |
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | - | |
| 14 | -// Exit if accessed directly. | |
| 15 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 16 | - exit; | |
| 17 | -} | |
| 18 | - | |
| 19 | 13 | /** |
| 20 | 14 | * Fired during plugin activation. |
| 21 | 15 | * |
| 22 | 16 | * This class defines all code necessary to run during the plugin's activation. |
| @@ -28,28 +22,23 @@ | ||
| 28 | 22 | */ |
| 29 | 23 | class Wpstream_Activator { |
| 30 | 24 | |
| 31 | 25 | /** |
| 32 | - * Run the one-time activation routine. | |
| 26 | + * Short Description. (use period) | |
| 33 | 27 | * |
| 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. | |
| 28 | + * Long Description. | |
| 36 | 29 | * |
| 37 | 30 | * @since 3.0.1 |
| 38 | 31 | */ |
| 39 | 32 | 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. | |
| 33 | + | |
| 34 | + require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wpstream_product.php'; | |
| 44 | 35 | $plugin_post_types = new Wpstream_Product(); |
| 45 | - // Register the custom post types (channels, VODs, etc.). | |
| 46 | 36 | $plugin_post_types->create_custom_post_type(); |
| 47 | - | |
| 48 | - // Rebuild rewrite rules now that new post types exist, so their URLs resolve. | |
| 37 | + | |
| 49 | 38 | flush_rewrite_rules(); |
| 50 | - | |
| 51 | -// | |
| 52 | - | |
| 39 | + | |
| 40 | +// | |
| 41 | + | |
| 53 | 42 | } |
| 54 | 43 | |
| 55 | 44 | } |