PluginProbe ʕ •ᴥ•ʔ
Responsive Lightbox & Gallery / 2.7.5
Responsive Lightbox & Gallery v2.7.5
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 / galleries / class-gallery-lightbox.php
responsive-lightbox / includes / galleries Last commit date
class-gallery-api.php 4 months ago class-gallery-base.php 3 months ago class-gallery-config.php 4 months ago class-gallery-design.php 4 months ago class-gallery-field-provider.php 4 months ago class-gallery-images.php 4 months ago class-gallery-lightbox.php 4 months ago class-gallery-misc.php 4 months ago class-gallery-paging.php 4 months ago trait-gallery-ajax.php 3 months ago trait-gallery-duplicate.php 4 months ago trait-gallery-image-methods.php 3 months ago trait-gallery-preview.php 4 months ago trait-gallery-sanitize.php 4 months ago
class-gallery-lightbox.php
100 lines
1 <?php
2 /**
3 * Responsive Lightbox Gallery Lightbox Settings
4 *
5 * Handles gallery lightbox options.
6 *
7 * @package Responsive_Lightbox
8 */
9
10 // exit if accessed directly
11 if ( ! defined( 'ABSPATH' ) )
12 exit;
13
14 /**
15 * Responsive_Lightbox_Gallery_Lightbox class.
16 *
17 * Gallery lightbox tab - implements lightbox settings.
18 *
19 * @class Responsive_Lightbox_Gallery_Lightbox
20 */
21 class Responsive_Lightbox_Gallery_Lightbox extends Responsive_Lightbox_Gallery_Base {
22
23 /**
24 * Tab key identifier.
25 *
26 * @var string
27 */
28 const TAB_KEY = 'lightbox';
29
30 /**
31 * Get tab data for rendering.
32 *
33 * @param string $menu_item Optional menu item (unused for this tab).
34 * @return array Tab data.
35 */
36 public function get_tab_data( $menu_item = '' ) {
37 $rl = Responsive_Lightbox();
38
39 // use sizes as keys and values
40 $sizes = array_combine( array_keys( $rl->galleries->get_data( 'sizes' ) ), array_keys( $rl->galleries->get_data( 'sizes' ) ) );
41
42 // add default, custom and full image size
43 $sizes['full'] = __( 'Full size', 'responsive-lightbox' );
44 $sizes['global'] = __( 'Global', 'responsive-lightbox' );
45 $sizes['rl_custom_size'] = __( 'Custom size', 'responsive-lightbox' );
46
47 // merge titles
48 $merged_titles = array( 'global' => __( 'Global', 'responsive-lightbox' ) ) + $rl->settings->get_data( 'image_titles' );
49
50 return [
51 'tab_key' => self::TAB_KEY,
52 'options' => [
53 'lightbox_enable' => [
54 'title' => __( 'Enable Lightbox', 'responsive-lightbox' ),
55 'type' => 'boolean',
56 'label' => __( 'Enable lightbox effect for the gallery.', 'responsive-lightbox' ),
57 'default' => true
58 ],
59 'lightbox_image_size' => [
60 'title' => __( 'Image Size', 'responsive-lightbox' ),
61 'type' => 'select',
62 'description' => __( 'Select image size for gallery lightbox.', 'responsive-lightbox' ),
63 'default' => 'global',
64 'options' => $sizes
65 ],
66 'lightbox_custom_size' => [
67 'title' => __( 'Custom Size', 'responsive-lightbox' ),
68 'type' => 'multiple',
69 'description' => __( 'Choose the custom image size for gallery lightbox (used if Custom Image size is selected).', 'responsive-lightbox' ),
70 'fields' => [
71 'lightbox_custom_size_width' => [
72 'type' => 'number',
73 'append' => __( 'width in px', 'responsive-lightbox' ),
74 'default' => (int) get_option( 'large_size_w' )
75 ],
76 'lightbox_custom_size_height' => [
77 'type' => 'number',
78 'append' => __( 'height in px', 'responsive-lightbox' ),
79 'default' => (int) get_option( 'large_size_h' )
80 ]
81 ]
82 ],
83 'lightbox_image_title' => [
84 'title' => __( 'Image Title', 'responsive-lightbox' ),
85 'type' => 'select',
86 'description' => __( 'Select image title for gallery lightbox.', 'responsive-lightbox' ),
87 'default' => 'global',
88 'options' => $merged_titles
89 ],
90 'lightbox_image_caption' => [
91 'title' => __( 'Image Caption', 'responsive-lightbox' ),
92 'type' => 'select',
93 'description' => __( 'Select image caption for gallery lightbox (used if supported by selected lightbox effect).', 'responsive-lightbox' ),
94 'default' => 'global',
95 'options' => $merged_titles
96 ]
97 ]
98 ];
99 }
100 }