PluginProbe ʕ •ᴥ•ʔ
Gallery : FooGallery / 3.2.6
Gallery : FooGallery v3.2.6
3.3.2 3.3.3 3.3.0 3.1.31 3.1.32 3.1.34 3.1.36 3.2.0 3.2.6 trunk 1.10.3 2.0.24 2.1.34 2.2.44 2.3.3 2.4.32 3.0.6 3.1.11 3.1.12 3.1.13 3.1.20 3.1.25 3.1.26 3.1.26.1 3.1.26.2
foogallery / includes / class-foogallery-extensions-compatibility.php
foogallery / includes Last commit date
abilities 4 weeks ago admin 4 weeks ago compatibility 4 weeks ago extensions 4 weeks ago foopluginbase 4 weeks ago public 4 weeks ago thumbs 4 weeks ago asset-manifest.php 4 weeks ago class-attachment-filters.php 4 weeks ago class-command-palette.php 4 weeks ago class-foogallery-animated-gif-support.php 4 weeks ago class-foogallery-attachment-custom-class.php 4 weeks ago class-foogallery-attachment-filename.php 4 weeks ago class-foogallery-attachment-type.php 4 weeks ago class-foogallery-attachment.php 4 weeks ago class-foogallery-cache.php 4 weeks ago class-foogallery-common-fields.php 4 weeks ago class-foogallery-crop-position.php 4 weeks ago class-foogallery-datasource-media_library.php 4 weeks ago class-foogallery-debug.php 4 weeks ago class-foogallery-delayed-runtime-loader.php 4 weeks ago class-foogallery-extensions-compatibility.php 4 weeks ago class-foogallery-force-https.php 4 weeks ago class-foogallery-lazyload.php 4 weeks ago class-foogallery-license-constant-handler.php 4 weeks ago class-foogallery-lightbox.php 4 weeks ago class-foogallery-paging.php 4 weeks ago class-foogallery-password-protect.php 4 weeks ago class-foogallery-sitemaps.php 4 weeks ago class-foogallery-widget.php 4 weeks ago class-foogallery.php 4 weeks ago class-gallery-advanced-settings.php 4 weeks ago class-il8n.php 4 weeks ago class-override-thumbnail.php 4 weeks ago class-posttypes.php 4 weeks ago class-previews.php 4 weeks ago class-retina.php 4 weeks ago class-thumbnail-dimensions.php 4 weeks ago class-thumbnails.php 4 weeks ago class-version-check.php 4 weeks ago constants.php 4 weeks ago functions.php 4 weeks ago gallery-management-functions.php 4 weeks ago includes.php 4 weeks ago index.php 4 weeks ago render-functions.php 4 weeks ago
class-foogallery-extensions-compatibility.php
47 lines
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 /**
8 * FooGallery Extensions Compatibility Class
9 * Date: 20 Sep 2017
10 *
11 * This class is used to make any overrides that are needed in extensions when updating FooGallery.
12 * These are "hacks" that will make the upgrade process easier, and not have the requirement to upgrade the individual extensions.
13 *
14 */
15 if ( ! class_exists( 'FooGallery_Extensions_Compatibility' ) ) {
16
17 class FooGallery_Extensions_Compatibility {
18
19 function __construct() {
20 add_filter( 'foogallery_attachment_html_item_classes', array( $this, 'add_video_class_to_item' ), 10, 3 );
21 }
22
23 /**
24 * @param $classes
25 * @param $foogallery_attachment
26 * @param $args
27 *
28 * @return mixed
29 */
30 public function add_video_class_to_item( $classes, $foogallery_attachment, $args ) {
31 if ( class_exists( 'Foo_Video' ) ) {
32 $video_info = get_post_meta( $foogallery_attachment->ID, FOO_VIDEO_POST_META, true );
33 if ( $video_info && isset( $video_info['id'] ) ) {
34 //we are dealing with a video
35 $classes[] = 'fg-video';
36
37 //include a specific css file to override issues with video hover effects
38 $css = FOOGALLERY_URL . 'css/foogallery-foovideo-overrides.css';
39 foogallery_enqueue_style( 'foogallery_foovideo_overrides', $css, array(), FOOGALLERY_VERSION );
40 }
41 }
42
43 return $classes;
44 }
45 }
46 }
47