PluginProbe ʕ •ᴥ•ʔ
Gallery : FooGallery / 3.3.0
Gallery : FooGallery v3.3.0
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 / extensions / default-templates / functions.php
foogallery / extensions / default-templates Last commit date
carousel 1 week ago default 1 week ago image-viewer 1 week ago justified 1 week ago masonry 1 week ago shared 1 week ago simple-portfolio 1 week ago thumbnail 1 week ago class-default-templates-extension.php 1 week ago class-default-templates.php 1 week ago functions.php 1 week ago
functions.php
51 lines
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 /**
8 * FooGallery default extensions common functions
9 */
10
11 /**
12 * Enqueue the core FooGallery stylesheet used by all default templates
13 */
14 function foogallery_enqueue_core_gallery_template_style() {
15 $filename = foogallery_is_debug() ? '' : '.min';
16 $css = apply_filters( 'foogallery_core_gallery_style', FOOGALLERY_DEFAULT_TEMPLATES_EXTENSION_SHARED_URL . 'css/foogallery' . $filename . '.css' );
17 foogallery_enqueue_style( 'foogallery-core', $css, array(), FOOGALLERY_VERSION );
18
19 $feature_deps = apply_filters( 'foogallery_feature_style_deps', array( 'foogallery-core' ) );
20
21 if ( foogallery_get_setting( 'custom_css', '' ) !== '' ) {
22 $custom_assets = get_option( FOOGALLERY_OPTION_CUSTOM_ASSETS );
23 if ( is_array( $custom_assets ) && array_key_exists( 'style', $custom_assets ) ) {
24 foogallery_enqueue_style( 'foogallery-custom', $custom_assets['style'], $feature_deps, FOOGALLERY_VERSION );
25 }
26 }
27 }
28
29 /**
30 * Enqueue the core FooGallery script used by all default templates
31 *
32 * @param string[] $deps
33 */
34 function foogallery_enqueue_core_gallery_template_script( $deps = null ) {
35 FooGallery_Delayed_Runtime_Loader::instance()->enqueue_core_gallery_template_script( $deps );
36 }
37
38 /**
39 * @return void
40 *
41 */
42 function foogallery_enqueue_polyfills() {
43 $suffix = foogallery_is_debug() ? '' : '.min';
44 $src = apply_filters( 'foogallery_polyfills_src', FOOGALLERY_DEFAULT_TEMPLATES_EXTENSION_SHARED_URL . 'js/foogallery.polyfills' . $suffix . '.js', $suffix );
45
46 //resolve the asset URL to a fingerprinted version if available.
47 $src = foogallery_resolve_asset_url( $src );
48
49 wp_enqueue_script( 'foogallery-polyfills', $src, array(), FOOGALLERY_VERSION );
50 }
51