class-gallery-api.php
4 months ago
class-gallery-base.php
4 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
4 months ago
trait-gallery-duplicate.php
4 months ago
trait-gallery-image-methods.php
2 weeks ago
trait-gallery-preview.php
4 months ago
trait-gallery-sanitize.php
4 months ago
class-gallery-misc.php
79 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Responsive Lightbox Gallery Misc Settings |
| 4 | * |
| 5 | * Handles miscellaneous gallery 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_Misc class. |
| 16 | * |
| 17 | * Gallery misc tab - implements miscellaneous settings. |
| 18 | * |
| 19 | * @class Responsive_Lightbox_Gallery_Misc |
| 20 | */ |
| 21 | class Responsive_Lightbox_Gallery_Misc extends Responsive_Lightbox_Gallery_Base { |
| 22 | |
| 23 | /** |
| 24 | * Tab key identifier. |
| 25 | * |
| 26 | * @var string |
| 27 | */ |
| 28 | const TAB_KEY = 'misc'; |
| 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 | return [ |
| 38 | 'tab_key' => self::TAB_KEY, |
| 39 | 'options' => [ |
| 40 | 'gallery_title_position' => [ |
| 41 | 'title' => __( 'Title Position', 'responsive-lightbox' ), |
| 42 | 'type' => 'select', |
| 43 | 'description' => __( 'Select where to display the title.', 'responsive-lightbox' ), |
| 44 | 'default' => 'none', |
| 45 | 'options' => [ |
| 46 | 'none' => __( 'None', 'responsive-lightbox' ), |
| 47 | 'top' => __( 'Top', 'responsive-lightbox' ), |
| 48 | 'bottom' => __( 'Bottom', 'responsive-lightbox' ) |
| 49 | ] |
| 50 | ], |
| 51 | 'gallery_description_position' => [ |
| 52 | 'title' => __( 'Description Position', 'responsive-lightbox' ), |
| 53 | 'type' => 'select', |
| 54 | 'description' => __( 'Select where to display the description.', 'responsive-lightbox' ), |
| 55 | 'default' => 'none', |
| 56 | 'options' => [ |
| 57 | 'none' => __( 'None', 'responsive-lightbox' ), |
| 58 | 'top' => __( 'Top', 'responsive-lightbox' ), |
| 59 | 'bottom' => __( 'Bottom', 'responsive-lightbox' ) |
| 60 | ] |
| 61 | ], |
| 62 | 'gallery_description' => [ |
| 63 | 'title' => __( 'Gallery Description', 'responsive-lightbox' ), |
| 64 | 'type' => 'textarea', |
| 65 | 'description' => __( 'Enter the gallery description (optional).', 'responsive-lightbox' ), |
| 66 | 'default' => '', |
| 67 | 'class' => 'large-text' |
| 68 | ], |
| 69 | 'gallery_custom_class' => [ |
| 70 | 'title' => __( 'Custom Classes', 'responsive-lightbox' ), |
| 71 | 'type' => 'textarea', |
| 72 | 'description' => __( 'Add custom, space separated CSS classes (optional).', 'responsive-lightbox' ), |
| 73 | 'default' => '', |
| 74 | 'class' => 'large-text' |
| 75 | ] |
| 76 | ] |
| 77 | ]; |
| 78 | } |
| 79 | } |