PluginProbe
Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels / 2.3.5
Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels v2.3.5
2.9.1 2.9.0 trunk 1.0.0 1.1.0 1.2.0 1.3.0 1.4.0 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 2.0.0 2.1.0 2.2.0 2.3.2 2.3.3 2.3.5 2.3.6 2.3.8 2.3.9 2.4.3 All 37 releases
automatic-youtube-gallery / includes / activator.php

activator.php in Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels 2.3.5, at includes/activator.php

46 lines 859 B
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 https://plugins360.com
7 * @since 1.0.0
8 *
9 * @package Automatic_YouTube_Gallery
10 */
11
12 // Exit if accessed directly
13 if ( ! defined( 'WPINC' ) ) {
14 die;
15 }
16
17 /**
18 * AYG_Activator class.
19 *
20 * @since 1.0.0
21 */
22 class AYG_Activator {
23
24 /**
25 * Called when the plugin is activated.
26 *
27 * @since 1.0.0
28 */
29 public static function activate() {
30 // Insert the plugin settings and default values for the first time
31 $defaults = ayg_get_default_settings();
32
33 foreach ( $defaults as $option_name => $values ) {
34 if ( false == get_option( $option_name ) ) {
35 add_option( $option_name, $values );
36 }
37 }
38
39 // Create a custom database table "{$wpdb->prefix}ayg_videos"
40 ayg_db_create_videos_table();
41
42 // Insert the plugin version
43 add_option( 'ayg_version', AYG_VERSION );
44 }
45
46 }