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