PluginProbe
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More / 2.6.1
Content Control – The Ultimate Content Restriction Plugin! Restrict Content, Create Conditional Blocks & More v2.6.1
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
← All changes | classes/Plugin/Autoloader.php +12 -4 2.0.42.6.1 View file →
@@ -38,9 +38,11 @@
38 38
39 39 return false;
40 40 }
41 41
42 - return require $autoloader;
42 + require_once $autoloader;
43 +
44 + return true;
43 45 }
44 46
45 47 /**
46 48 * If the autoloader is missing, add an admin notice.
@@ -45,18 +47,24 @@
45 47 /**
46 48 * If the autoloader is missing, add an admin notice.
47 49 *
48 50 * @param string $plugin_name Plugin name for error messaging.
51 + *
52 + * @return void
49 53 */
50 54 protected static function missing_autoloader( $plugin_name = '' ) {
51 55 /* translators: 1. Plugin name */
52 - $message = sprintf( esc_html__( 'Your installation of %1$s is incomplete. If you installed %1$s from GitHub, please refer to this document to set up your development environment.', 'content-control' ), $plugin_name );
56 + $text = __( 'Your installation of %1$s is incomplete. If you installed %1$s from GitHub, please refer to this document to set up your development environment.', 'content-control' );
53 57
58 + $message = sprintf( $text, $plugin_name );
59 +
54 60 if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
55 - error_log( // phpcs:ignore
56 - $message
61 + // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
62 + error_log(
63 + esc_html( $message )
57 64 );
58 65 }
66 +
59 67 add_action(
60 68 'admin_notices',
61 69 function () use ( $message ) {
62 70 ?>