PluginProbe
Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels / trunk
Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels vtrunk
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 / admin / templates / dashboard.php

dashboard.php in Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels trunk, at admin/templates/dashboard.php

56 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Plugin Dashboard.
5 *
6 * @link https://plugins360.com
7 * @since 1.3.0
8 *
9 * @package Automatic_YouTube_Gallery
10 */
11
12 // Exit if accessed directly
13 if ( ! defined( 'WPINC' ) ) {
14 die;
15 }
16
17 $general_settings = ayg_get_option( 'ayg_general_settings' );
18
19 $file = 'api-key';
20
21 if ( ! empty( $general_settings['api_key'] ) ) {
22 $action = isset( $_GET['action'] ) ? sanitize_text_field( $_GET['action'] ) : '';
23
24 if ( 'new' === $action || 'edit' === $action ) {
25 $file = 'gallery-form';
26 } else {
27 $file = 'gallery-list';
28 }
29 }
30 ?>
31
32 <div id="ayg-dashboard" class="ayg ayg-dashboard clear">
33 <?php if ( 'gallery-form' !== $file ) : ?>
34 <div class="wrap about-wrap">
35 <h1><?php esc_html_e( 'Automatic YouTube Gallery', 'automatic-youtube-gallery' ); ?></h1>
36
37 <p class="about-text">
38 <?php esc_html_e( 'Build beautiful, responsive YouTube galleries from a Channel, Playlist, Username, Search, Livestream, Single Video, or a custom list of videos — then keep them automatically up to date with scheduled imports.', 'automatic-youtube-gallery' ); ?>
39 </p>
40
41 <div class="wp-badge"><?php printf( esc_html__( 'Version %s', 'automatic-youtube-gallery' ), AYG_VERSION ); ?></div>
42
43 <?php if ( 'gallery-list' === $file ) : ?>
44 <a href="<?php echo esc_url( admin_url( 'admin.php?page=automatic-youtube-gallery&action=new' ) ); ?>" class="ayg-button button button-primary button-hero">
45 <svg xmlns="http://www.w3.org/2000/svg" fill="none" width="20" height="20" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
46 <path stroke-linecap="round" stroke-linejoin="round" d="M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z" />
47 </svg>
48 <?php esc_html_e( 'Add New Gallery', 'automatic-youtube-gallery' ); ?>
49 </a>
50 <?php endif; ?>
51 </div>
52 <?php endif; ?>
53
54 <?php require_once AYG_DIR . "admin/templates/{$file}.php"; ?>
55 </div>
56