PluginProbe
Embed Privacy / 1.10.0
Embed Privacy v1.10.0
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 1.10.0, at inc/integration/class-shortcodes-ultimate.php

43 lines 1.2 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 /**
5 * Shortcodes Ultimate integration for Embed Privacy.
6 *
7 * @author Epiphyt
8 * @license GPL2
9 * @package epiphyt\Embed_Privacy
10 * @since 1.10.0
11 */
12 final class Shortcodes_Ultimate {
13 /**
14 * Initialize functionality.
15 */
16 public static function init() {
17 \add_action( 'embed_privacy_print_assets', [ self::class, 'enqueue_assets' ] );
18 \add_action( 'embed_privacy_register_assets', [ self::class, 'register_assets' ], 10, 2 );
19 }
20
21 /**
22 * Enqueue assets.
23 */
24 public static function enqueue_assets() {
25 if ( \is_plugin_active( 'shortcodes-ultimate/shortcodes-ultimate.php' ) ) {
26 \wp_enqueue_style( 'embed-privacy-shortcodes-ultimate' );
27 }
28 }
29
30 /**
31 * Register assets.
32 *
33 * @param bool $is_debug Whether debug mode is enabled
34 * @param string $suffix A filename suffix
35 */
36 public static function register_assets( $is_debug, $suffix ) {
37 $css_file_url = \EPI_EMBED_PRIVACY_URL . 'assets/style/shortcodes-ultimate' . $suffix . '.css';
38 $file_version = $is_debug ? \filemtime( \EPI_EMBED_PRIVACY_BASE . 'assets/style/shortcodes-ultimate' . $suffix . '.css' ) : \EMBED_PRIVACY_VERSION;
39
40 \wp_register_style( 'embed-privacy-shortcodes-ultimate', $css_file_url, [], $file_version );
41 }
42 }
43