PluginProbe
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More / 2.0.12
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More v2.0.12
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.10 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 2.0.0 2.0.1 2.0.10 2.0.11 2.0.12 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 47 releases
content-control / classes / Controllers / Compatibility / Divi.php

Divi.php in Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More 2.0.12, at classes/Controllers/Compatibility/Divi.php

42 lines 901 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Divi compatibility controller.
4 *
5 * @package ContentControl\Admin
6 * @copyright (c) 2023 Code Atlantic LLC
7 */
8
9 namespace ContentControl\Controllers\Compatibility;
10
11 use ContentControl\Base\Controller;
12
13 /**
14 * Divi controller class.
15 */
16 class Divi extends Controller {
17
18 /**
19 * Initialize widget editor UX.
20 *
21 * @return void
22 */
23 public function init() {
24 add_filter( 'content_control/protection_is_disabled', [ $this, 'protection_is_disabled' ] );
25 }
26
27 /**
28 * Conditionally disable Content Control for Divi builder.
29 *
30 * @param boolean $protection_is_disabled Whether protection is disabled.
31 * @return boolean
32 */
33 public function protection_is_disabled( $protection_is_disabled ) {
34 // phpcs:ignore WordPress.Security.NonceVerification.Recommended
35 if ( isset( $_GET['et_fb'] ) && ! empty( $_GET['et_fb'] ) ) {
36 return true;
37 }
38
39 return $protection_is_disabled;
40 }
41 }
42