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 / Installers / Install_Skin.php

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

36 lines 718 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Install_Skin class.
4 *
5 * @package ContentControl
6 * @subpackage Installers
7 * @since 2.0.0
8 */
9
10 namespace ContentControl\Installers;
11
12 /**
13 * Skin for on-the-fly addon installations.
14 *
15 * @since 1.0.0
16 * @since 2.0.0 Extend PluginSilentUpgraderSkin and clean up the class.
17 */
18 class Install_Skin extends PluginSilentUpgraderSkin {
19
20 /**
21 * Instead of outputting HTML for errors, json_encode the errors and send them
22 * back to the Ajax script for processing.
23 *
24 * @since 2.0.0
25 *
26 * @param string|\WP_Error $errors Array of errors with the install process.
27 */
28 public function error( $errors ) {
29 if ( ! empty( $errors ) ) {
30 return wp_send_json_error( $errors );
31 }
32
33 return $errors;
34 }
35 }
36