PluginProbe
Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels / 1.1.0
Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels v1.1.0
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 / shortcode-builder.php

shortcode-builder.php in Automatic YouTube Gallery – Embed Auto-Updating YouTube Video Galleries, Feeds, Playlists & Channels 1.1.0, at admin/shortcode-builder.php

65 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Shortcode Builder.
5 *
6 * @link https://plugins360.com
7 * @since 1.0.0
8 *
9 * @package Automatic_YouTube_Gallery
10 * @subpackage Automatic_YouTube_Gallery/admin
11 */
12
13 // Exit if accessed directly
14 if ( ! defined( 'WPINC' ) ) {
15 die;
16 }
17
18 /**
19 * AYG_Admin_Shortcode_Builder class.
20 *
21 * @since 1.0.0
22 */
23 class AYG_Admin_Shortcode_Builder {
24
25 /**
26 * Adds an "Automatic YouTube Gallery" button above the classic TinyMCE Editor on add/edit screens.
27 *
28 * @since 1.0.0
29 */
30 public function media_buttons() {
31
32 global $pagenow;
33
34 // Only run in post/page creation and edit screens
35 if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) ) {
36 printf(
37 '<a href="javascript:void(0);" class="button button-primary" id="ayg-media-button"><span class="wp-media-buttons-icon dashicons dashicons-video-alt3"></span> %s</a>',
38 __( 'Automatic YouTube Gallery', 'automatic-youtube-gallery' )
39 );
40 }
41
42 }
43
44 /**
45 * Prints the footer code needed for the "Automatic YouTube Gallery" TinyMCE button.
46 *
47 * @since 1.0.0
48 */
49 public function admin_footer() {
50
51 global $pagenow;
52
53 // Only run in post/page creation and edit screens
54 if ( in_array( $pagenow, array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ) ) ) {
55
56 $fields = ayg_get_editor_fields();
57
58 require_once AYG_DIR . 'admin/templates/shortcode-builder.php';
59
60 }
61
62 }
63
64 }
65