PluginProbe ʕ •ᴥ•ʔ
Responsive Lightbox & Gallery / 2.6.0
Responsive Lightbox & Gallery v2.6.0
2.7.8 trunk 1.0.0 1.0.1 1.0.1.1 1.0.2 1.0.3 1.0.4 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.4.0 1.4.0.1 1.4.1 1.4.11 1.4.12 1.4.13 1.4.14 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.6.0 1.6.1 1.6.10 1.6.11 1.6.12 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 2.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.3.1 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.6.0 2.6.1 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7
responsive-lightbox / includes / class-welcome.php
responsive-lightbox / includes Last commit date
providers 1 year ago class-fast-image.php 2 years ago class-folders.php 6 months ago class-frontend.php 6 months ago class-galleries.php 6 months ago class-multilang.php 2 years ago class-remote-library-api.php 1 year ago class-remote-library.php 6 months ago class-settings.php 6 months ago class-tour.php 2 years ago class-welcome.php 2 years ago class-widgets.php 2 years ago functions.php 3 years ago
class-welcome.php
148 lines
1 <?php
2 // exit if accessed directly
3 if ( ! defined( 'ABSPATH' ) )
4 exit;
5
6 new Responsive_Lightbox_Welcome_Page();
7
8 /**
9 * Responsive_Lightbox_Welcome_Page class.
10 *
11 * @class Responsive_Lightbox_Welcome_Page
12 */
13 class Responsive_Lightbox_Welcome_Page {
14
15 /**
16 * Class constructor.
17 *
18 * @return void
19 */
20 public function __construct() {
21 // actions
22 add_action( 'admin_menu', [ $this, 'admin_menus' ] );
23 add_action( 'admin_head', [ $this, 'admin_head' ] );
24 add_action( 'admin_init', [ $this, 'welcome' ] );
25 }
26
27 /**
28 * Add admin menus/screens.
29 *
30 * @return void
31 */
32 public function admin_menus() {
33 $welcome_page_title = __( 'Welcome to Responsive Lightbox & Gallery', 'responsive-lightbox' );
34
35 // about
36 $about = add_dashboard_page( $welcome_page_title, $welcome_page_title, 'manage_options', 'responsive-lightbox-about', [ $this, 'about_screen' ] );
37 }
38
39 /**
40 * Add styles just for this page, and remove dashboard page links.
41 *
42 * @return void
43 */
44 public function admin_head() {
45 remove_submenu_page( 'index.php', 'responsive-lightbox-about' );
46 }
47
48 /**
49 * Intro text/links shown on all about pages.
50 *
51 * @return void
52 */
53 private function intro() {
54 // get plugin version
55 $plugin_version = substr( get_option( 'responsive_lightbox_version' ), 0, 3 );
56 ?>
57 <h2 style="text-align: left; font-size: 29px; padding-bottom: 0;"><?php esc_html_e( 'Welcome to', 'responsive-lightbox' ); ?></h2>
58 <h1 style="margin-top: 0;"><?php printf( esc_html__( 'Responsive Lightbox & Gallery %s', 'responsive-lightbox' ), $plugin_version ); ?></h1>
59
60 <div class="about-text">
61 <?php esc_html__( 'Thank you for choosing Responsive Lightbox & Gallery - the most popular lightbox plugin and a powerful gallery builder for WordPress.', 'responsive-lightbox' ); ?>
62 </div>
63
64 <div class="rl-badge" style="position: absolute; top: 0; right: 0; box-shadow: 0 1px 3px rgba(0,0,0,.1); max-width: 180px;"><img src="<?php echo esc_url( RESPONSIVE_LIGHTBOX_URL . '/images/logo-rl.png' ); ?>" width="180" height="180" /></div>
65
66 <div class="changelog">
67 <a href="<?php echo esc_url( admin_url( 'admin.php?page=responsive-lightbox-tour' ) ); ?>" class="button button-primary button-hero"><?php esc_html_e( 'Start Tour', 'responsive-lightbox' ); ?></a>
68 <a href="<?php echo esc_url( admin_url( 'admin.php?page=responsive-lightbox-settings' ) ); ?>" class="button button-hero"><?php esc_html_e( 'Settings', 'responsive-lightbox' ); ?></a>
69 <a href="http://www.dfactory.co/products/responsive-lightbox-gallery-extensions/?utm_source=responsive-lightbox-welcome&utm_medium=button&utm_campaign=dfactory-plugins" class="button button-hero" target="_blank"><?php esc_html_e( 'Addons', 'responsive-lightbox' ); ?></a>
70 </div>
71
72 <hr />
73 <?php
74 }
75
76 /**
77 * Ootput the about screen.
78 *
79 * @return void
80 */
81 public function about_screen() {
82 ?>
83 <div class="wrap about-wrap full-width-layout">
84
85 <?php $this->intro(); ?>
86
87 <div class="feature-section">
88 <h2><?php esc_html_e( 'Advanced Gallery Builder', 'responsive-lightbox' ); ?></h2>
89 <p><?php esc_html_e( 'Responsive Lightbox & Gallery comes with a powerful gallery builder right out of the box that lets you manage galleries the same way you manage posts and pages on your WordPress website. You can add images to your gallery, adjust its settings and lightbox scripts, and configure its display options.', 'responsive-lightbox' ); ?></p>
90 <img src="<?php echo esc_url( RESPONSIVE_LIGHTBOX_URL . '/images/welcome.png' ); ?>" />
91 </div>
92
93 <div class="feature-section">
94 <h2><?php esc_html_e( 'Multiple Lightbox Effects', 'responsive-lightbox' ); ?></h2>
95 <p><?php esc_html_e( "Responsive Lightbox & Gallery gives you the control to beautify your images, videos, and galleries using lightbox scripts that look great on all devices. We've got everything from lightweight, functional lightboxes to heavy-customizable, fancy ones.", 'responsive-lightbox' ); ?></p>
96 </div>
97
98 <div class="feature-section">
99 <h2><?php esc_html_e( 'Easy Setup', 'responsive-lightbox' ); ?></h2>
100 <p><?php esc_html_e( 'A lot goes into making a good first impression - especially when your site is doing all the talking. Responsive Lightbox & Gallery automatically adds lightbox effects to all of your image galleries, image links, and video links so you can sit back and relax while we make sure your website looks its best.', 'responsive-lightbox' ); ?></p>
101 </div>
102
103 <div class="feature-section">
104 <h2><?php esc_html_e( 'Powerful Addons', 'responsive-lightbox' ); ?></h2>
105 <p><?php printf( __( 'Responsive Lightbox & Gallery enhances your site by making its images and galleries look visually appealing to your site users. And when you want to kick things up a notch you can pair the free, core plugin with %sone of 10%s one of 13 %spremium extensions.%s', 'responsive-lightbox' ), '<del>', '</del>', '<a href="http://www.dfactory.co/products/responsive-lightbox-gallery-extensions/?utm_source=responsive-lightbox-welcome&utm_medium=link&utm_campaign=dfactory-plugins" target="_blank">', '</a>' ); ?></p>
106 </div>
107
108 <hr />
109
110 <div class="return-to-dashboard">
111 <a href="<?php echo esc_url( admin_url( 'admin.php?page=responsive-lightbox-settings' ) ); ?>"><?php esc_html_e( 'Go to Settings', 'responsive-lightbox' ); ?></a>
112 </div>
113
114 </div>
115 <?php
116 }
117
118 /**
119 * Send user to the welcome page on first activation.
120 *
121 * @return void
122 */
123 public function welcome() {
124 // bail if no activation redirect transient is set
125 if ( ! get_transient( 'rl_activation_redirect' ) )
126 return;
127
128 // delete the redirect transient
129 delete_transient( 'rl_activation_redirect' );
130
131 // bail if activating from network, or bulk, or within an iFrame
132 if ( is_network_admin() || isset( $_GET['activate-multi'] ) || defined( 'IFRAME_REQUEST' ) )
133 return;
134
135 // get action
136 $action = isset( $_GET['action'] ) ? sanitize_key( $_GET['action'] ) : '';
137
138 // get plugin
139 $plugin = isset( $_GET['plugin'] ) ? sanitize_file_name( $_GET['plugin'] ) : '';
140
141 if ( $action === 'upgrade-plugin' && strstr( $plugin, 'responsive-lightbox.php' ) )
142 return;
143
144 wp_safe_redirect( admin_url( 'index.php?page=responsive-lightbox-about' ) );
145 exit;
146 }
147 }
148