PluginProbe
Embed Privacy / trunk
Embed Privacy vtrunk
1.14.0 1.13.0 trunk 0.1 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.1.3 1.10.0 1.10.1 1.10.10 1.10.2 1.10.3 1.10.4 1.10.5 1.10.6 1.10.7 1.10.8 1.10.9 1.11.0 1.11.1 1.11.2 All 68 releases
embed-privacy / inc / integration / class-shortcodes-ultimate.php

class-shortcodes-ultimate.php in Embed Privacy trunk, at inc/integration/class-shortcodes-ultimate.php

47 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace epiphyt\Embed_Privacy\integration;
3
4 use epiphyt\Embed_Privacy\System;
5
6 /**
7 * Shortcodes Ultimate integration for Embed Privacy.
8 *
9 * @author Epiphyt
10 * @license GPL2
11 * @package epiphyt\Embed_Privacy
12 * @since 1.10.0
13 */
14 final class Shortcodes_Ultimate {
15 /**
16 * Initialize functionality.
17 */
18 public static function init() {
19 \add_action( 'embed_privacy_print_assets', [ self::class, 'enqueue_assets' ] );
20 \add_action( 'embed_privacy_register_assets', [ self::class, 'register_assets' ], 10, 2 );
21 }
22
23 /**
24 * Enqueue assets.
25 */
26 public static function enqueue_assets() {
27 if ( System::is_plugin_active( 'shortcodes-ultimate/shortcodes-ultimate.php' ) ) {
28 \wp_enqueue_style( 'embed-privacy-shortcodes-ultimate' );
29 }
30 }
31
32 /**
33 * Register assets.
34 *
35 * @param bool $is_debug Whether debug mode is enabled
36 * @param string $suffix A filename suffix
37 */
38 public static function register_assets( $is_debug, $suffix ) {
39 if ( \file_exists( \EPI_EMBED_PRIVACY_BASE . 'assets/style/shortcodes-ultimate' . $suffix . '.css' ) ) {
40 $css_file_url = \EPI_EMBED_PRIVACY_URL . 'assets/style/shortcodes-ultimate' . $suffix . '.css';
41 $file_version = $is_debug ? \filemtime( \EPI_EMBED_PRIVACY_BASE . 'assets/style/shortcodes-ultimate' . $suffix . '.css' ) : \EMBED_PRIVACY_VERSION;
42
43 \wp_register_style( 'embed-privacy-shortcodes-ultimate', $css_file_url, [], $file_version );
44 }
45 }
46 }
47