PluginProbe
Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels / 1.6.3
Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels v1.6.3
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 1.6.3, at includes/activator.php

82 lines 1.8 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 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 general settings
31 if ( false == get_option( 'ayg_general_settings' ) ) {
32 $defaults = array(
33 'api_key' => ''
34 );
35
36 add_option( 'ayg_general_settings', $defaults );
37 }
38
39 // Insert the gallery settings
40 if ( false == get_option( 'ayg_gallery_settings' ) ) {
41 $defaults = array(
42 'theme' => 'classic',
43 'columns' => 3,
44 'per_page' => 12,
45 'thumb_ratio' => 56.25,
46 'thumb_title' => 1,
47 'thumb_title_length' => 0,
48 'thumb_excerpt' => 1,
49 'thumb_excerpt_length' => 75,
50 'pagination' => 1,
51 'pagination_type' => 'load_more'
52 );
53
54 add_option( 'ayg_gallery_settings', $defaults );
55 }
56
57 // Insert the player settings
58 if ( false == get_option( 'ayg_player_settings' ) ) {
59 $defaults = array(
60 'player_ratio' => 56.25,
61 'player_title' => 1,
62 'player_description' => 1,
63 'autoplay' => 0,
64 'autoadvance' => 0,
65 'loop' => 0,
66 'controls' => 1,
67 'modestbranding' => 1,
68 'cc_load_policy' => 0,
69 'iv_load_policy' => 0,
70 'hl' => '',
71 'cc_lang_pref' => ''
72 );
73
74 add_option( 'ayg_player_settings', $defaults );
75 }
76
77 // Insert the plugin version
78 add_option( 'ayg_version', AYG_VERSION );
79 }
80
81 }
82