PluginProbe ʕ •ᴥ•ʔ
Secure Custom Fields / 6.5.7
Secure Custom Fields v6.5.7
6.9.0 6.8.9 6.8.7 6.8.8 6.8.6 6.8.4 6.8.5 trunk 6.4.0-beta1 6.4.0-beta2 6.4.1 6.4.1-beta3 6.4.1-beta4 6.4.1-beta5 6.4.1-beta6 6.4.1-beta7 6.4.2 6.5.0 6.5.1 6.5.2 6.5.3 6.5.4 6.5.5 6.5.6 6.5.7 6.6.0 6.7.0 6.7.1 6.8.0 6.8.1 6.8.2 6.8.3
secure-custom-fields / acf.php
secure-custom-fields Last commit date
assets 10 months ago includes 10 months ago lang 1 year ago pro 1 year ago vendor 10 months ago SECURITY.md 1 year ago acf.php 1 year ago composer.json 10 months ago index.php 1 year ago license.txt 1 year ago readme.txt 10 months ago secure-custom-fields.php 10 months ago
acf.php
38 lines
1 <?php
2 /**
3 * This file is for the converting of sites from acf.php to secure-custom-fields.php as the main plugin file.
4 *
5 * Under this slug, acf.php would have been the main plugin file in < 6.4.0-beta4.
6 *
7 * @package wordpress/secure-custom-fields
8 */
9
10 // Exit if accessed directly.
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit;
13 }
14
15 if ( is_admin() ) {
16 /** @phpstan-ignore-next-line */ // phpcs:ignore
17 include_once ABSPATH . 'wp-admin/includes/plugin.php';
18
19 // Network activations first since is_plugin_active will return true for network activated plugins, whereas this won't for single.
20 if ( is_plugin_active_for_network( 'secure-custom-fields/acf.php' ) ) {
21 if ( ! activate_plugin( 'secure-custom-fields/secure-custom-fields.php', '', true, true ) ) {
22 // activate_plugin returns null on success or WP_Error on failure.
23 deactivate_plugins( 'secure-custom-fields/acf.php', false, true );
24 }
25 }
26
27 // Single site activations.
28 if ( is_plugin_active( 'secure-custom-fields/acf.php' ) ) {
29 if ( ! activate_plugin( 'secure-custom-fields/secure-custom-fields.php', '', false, true ) ) {
30 // activate_plugin returns null on success or WP_Error on failure.
31 deactivate_plugins( 'secure-custom-fields/acf.php', false, false );
32 }
33 }
34 }
35
36 // Include the main plugin file to ensure it's loaded if the switch hasn't occurred.
37 require_once __DIR__ . '/secure-custom-fields.php';
38