PluginProbe
WP Coder – Insert & Manage Code Snippets / 4.5.2
WP Coder – Insert & Manage Code Snippets v4.5.2
4.5.2 4.5.1 1.1 2.3.1 2.3.2 2.4.1 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 3.2 3.2.1 3.3 3.4 3.5 All 40 releases
← All changes | includes/snippets/class-tool-page-info.php +3 -3 4.5.1 → 4.5.2 View file →
@@ -9,15 +9,15 @@
9 9 public function __construct() {
10 10
11 11
12 12 add_action( 'template_redirect', static function () {
13 - if ( is_user_logged_in() && current_user_can( 'unfiltered_html' ) ) {
13 + if ( is_user_logged_in() && WPCoder::user_can_manage() ) {
14 14 $GLOBALS['wpcoder_render_start'] = microtime( true );
15 15 }
16 16 } );
17 17 add_action( 'init', static function () {
18 18 if ( ! defined( 'SAVEQUERIES' ) ) {
19 - if ( is_user_logged_in() && current_user_can( 'unfiltered_html' ) ) {
19 + if ( is_user_logged_in() && WPCoder::user_can_manage() ) {
20 20 define( 'SAVEQUERIES', true );
21 21 }
22 22 }
23 23 } );
@@ -24,9 +24,9 @@
24 24 add_action( 'admin_bar_menu', [ $this, 'add_admin_bar_template_info' ], 90 );
25 25 }
26 26
27 27 public function add_admin_bar_template_info( $wp_admin_bar ): void {
28 - if ( ! is_user_logged_in() || ! current_user_can( 'unfiltered_html' ) ) {
28 + if ( ! is_user_logged_in() || ! WPCoder::user_can_manage() ) {
29 29 return;
30 30 }
31 31 if ( is_admin() ) {
32 32 return;