From ed659e9fc0726321ea8f097b1cf610190f0ed8da Mon Sep 17 00:00:00 2001 From: Steve Taylor Date: Thu, 7 May 2015 09:50:53 +0100 Subject: [PATCH] Changed admin notices so they only show for admins --- readme.txt | 3 +++ slt-cf-admin.php | 2 +- slt-custom-fields.php | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/readme.txt b/readme.txt index 9bb0e81..ad60459 100644 --- a/readme.txt +++ b/readme.txt @@ -91,6 +91,9 @@ Please raise any issues via [GitHub](https://github.com/gyrus/WordPress-Develope **NOTE:** Some people have found compatibility issues between the [WPMU DEV Events+](http://premium.wpmudev.org/project/events-plus/) plugin and this plugin (see [here](https://github.com/gyrus/WordPress-Developers-Custom-Fields/issues/23) and [here](https://github.com/gyrus/WordPress-Developers-Custom-Fields/issues/24)). If you find an apparent issue with this plugin and you're also using WPMU DEV Events+, please check for incompatibilities before posting an issue. == Changelog == += 1.2.2 = +* Changed admin notices so they only show for admins + = 1.2.1 = * Better version suffixes for styles diff --git a/slt-cf-admin.php b/slt-cf-admin.php index ec7ec96..956c846 100644 --- a/slt-cf-admin.php +++ b/slt-cf-admin.php @@ -14,7 +14,7 @@ function slt_cf_admin_notices() { global $slt_cf_admin_notices; - if ( ! empty( $slt_cf_admin_notices ) ) { + if ( ! empty( $slt_cf_admin_notices ) && current_user_can( 'update_core' ) ) { foreach ( $slt_cf_admin_notices as $notice ) { ?>

:

diff --git a/slt-custom-fields.php b/slt-custom-fields.php index fd59feb..0b122c2 100644 --- a/slt-custom-fields.php +++ b/slt-custom-fields.php @@ -9,7 +9,7 @@ Plugin URI: http://wordpress.org/extend/plugins/developers-custom-fields/ Description: Provides theme developers with tools for managing custom fields. Author: Steve Taylor -Version: 1.2.1 +Version: 1.2.2 Author URI: http://sltaylor.co.uk License: GPLv2 Text Domain: slt-custom-fields @@ -50,7 +50,7 @@ define( 'SLT_CF_TITLE', "Developer's Custom Fields" ); define( 'SLT_CF_NO_OPTIONS', __( 'No options to choose from', SLT_CF_TEXT_DOMAIN ) ); define( 'SLT_CF_REQUEST_PROTOCOL', isset( $_SERVER[ 'HTTPS' ] ) ? 'https://' : 'http://' ); -define( 'SLT_CF_VERSION', '1.2.1' ); +define( 'SLT_CF_VERSION', '1.2.2' ); define( 'SLT_CF_PRIMARY_FILE_PATH', plugin_basename( __FILE__ ) ); $slt_custom_fields = array(); $slt_custom_fields['prefix'] = '_slt_';