PluginProbe
Jooosi Fon – Use Custom Fonts, Google Fonts or Adobe Fonts / trunk
Jooosi Fon – Use Custom Fonts, Google Fonts or Adobe Fonts vtrunk
1.1.2 1.1.3 1.1.0 1.1.1 trunk 1.0.100 1.0.114 1.0.30 1.0.31 1.0.32 1.0.33 1.0.34 1.0.35 1.0.36 1.0.37 1.0.38 1.0.39 1.0.40 1.0.41 1.0.42 1.0.45 1.0.46 1.0.47 1.0.48 1.0.49 All 74 releases
yabe-webfont / yabe-webfont.php

yabe-webfont.php in Jooosi Fon – Use Custom Fonts, Google Fonts or Adobe Fonts trunk, at yabe-webfont.php

38 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Compatibility loader for installations activated through the former plugin file.
5 *
6 * @todo Remove this compatibility loader completely in Jooosi Fon 3.0.0.
7 */
8 declare (strict_types=1);
9 namespace JooosiFonDeps;
10
11 \defined('ABSPATH') || exit;
12 $legacyPlugin = \plugin_basename(__FILE__);
13 $plugin = \plugin_basename(__DIR__ . '/jooosi-fon.php');
14 $activePlugins = \get_option('active_plugins', []);
15 if (\is_array($activePlugins)) {
16 $legacyPosition = \array_search($legacyPlugin, $activePlugins, \true);
17 if ($legacyPosition !== \false) {
18 if (!\in_array($plugin, $activePlugins, \true)) {
19 $activePlugins[$legacyPosition] = $plugin;
20 } else {
21 unset($activePlugins[$legacyPosition]);
22 }
23 \update_option('active_plugins', \array_values($activePlugins));
24 }
25 }
26 if (\is_multisite()) {
27 $networkPlugins = \get_site_option('active_sitewide_plugins', []);
28 if (\is_array($networkPlugins) && isset($networkPlugins[$legacyPlugin])) {
29 if (!isset($networkPlugins[$plugin])) {
30 $networkPlugins[$plugin] = $networkPlugins[$legacyPlugin];
31 }
32 unset($networkPlugins[$legacyPlugin]);
33 \update_site_option('active_sitewide_plugins', $networkPlugins);
34 }
35 }
36 unset($activePlugins, $legacyPlugin, $legacyPosition, $networkPlugins, $plugin);
37 require_once __DIR__ . '/jooosi-fon.php';
38