diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f932b0..5afe0f0 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ # Change Log All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). -## [Unreleased](https://github.com/bueltge/Adminimize/compare/1.11.6...HEAD) +## [Unreleased](https://github.com/bueltge/Adminimize/compare/1.11.7...HEAD) +* + +## [1.11.6](https://github.com/bueltge/Adminimize/compare/1.11.6...1.11.7) * Add Im-/Export possibility only for different roles, Probs @JulietNoth, #139 * Fix problems with plugins in menus, like WooCommerce, #130 * Fix UI topics on settings page diff --git a/adminimize.php b/adminimize.php index c4846da..622fd60 100755 --- a/adminimize.php +++ b/adminimize.php @@ -7,7 +7,7 @@ * Description: Visually compresses the administrative meta-boxes so that more admin page content can be initially seen. The plugin that lets you hide 'unnecessary' items from the WordPress administration menu, for all roles of your install. You can also hide post meta controls on the edit-area to simplify the interface. It is possible to simplify the admin in different for all roles. * Author: Frank Bültge * Author URI: http://bueltge.de/ - * Version: 1.11.7-dev + * Version: 1.11.7 * License: GPLv2+ * * Php Version 5.6 @@ -15,7 +15,7 @@ * @package WordPress * @author Frank Bültge * @license http://opensource.org/licenses/gpl-license.php GNU Public License - * @version 2020-01-27 + * @version 2020-07-15 */ /** @@ -163,7 +163,7 @@ function _mw_adminimize_get_all_user_roles() { $user_roles = array(); - if ( NULL !== $wp_roles->roles && is_array( $wp_roles->roles ) ) { + if ( null !== $wp_roles->roles && is_array( $wp_roles->roles ) ) { foreach ( $wp_roles->roles as $role => $data ) { $user_roles[] = $role; // The $data var contains caps, maybe for later use. @@ -1781,7 +1781,7 @@ function _mw_adminimize_install() { /** * Make sure adminimize option is complete when a role json file is imported - * + * * @param array $roles_options * * @return array @@ -1799,7 +1799,7 @@ function _mw_adminimize_roles_complete_options( $roles_options ){ /** * Check if options comes from roles adminimize settings export - * + * * @param array $options * * @return bool @@ -1820,10 +1820,10 @@ function _mw_adminimize_is_roles_options_import( $options ){ $roles_options = $role_options; } else { $roles_options = array_merge( $roles_options, $role_options ); - } + } } if ( count( $options ) === count( $roles_options ) ){ return true; - } + } } diff --git a/inc-options/im_export_options.php b/inc-options/im_export_options.php index dd34a24..09d0ea0 100755 --- a/inc-options/im_export_options.php +++ b/inc-options/im_export_options.php @@ -9,43 +9,43 @@ exit; } global $wp_roles; - ?> +
-

+

-

-

+

+

- +
-

+

+ submit_button( $submit_text, 'primary', '_mw_adminimize_save', false ); + ?>

-
+

-

-

+

+
- -

- -

- - - -

- -*/ ?> -

-
+

+

.json) file to upload, then click Upload file and import.', @@ -91,28 +72,27 @@ 'Choose a ".json" file from your computer:', 'adminimize' ) ?> - +

- +

- - -
+ + + +

diff --git a/inc-options/widget_options.php b/inc-options/widget_options.php index c90c8c7..2e8608d 100755 --- a/inc-options/widget_options.php +++ b/inc-options/widget_options.php @@ -9,7 +9,16 @@ echo "Hi there! I'm just a part of plugin, not much I can do when called directly."; exit; } + +if ( ! isset( $user_roles ) ) { + $user_roles = _mw_adminimize_get_all_user_roles(); +} + +if ( ! isset( $user_roles_names ) ) { + $user_roles_names = _mw_adminimize_get_all_user_roles_names(); +} ?> +

diff --git a/inc-options/write_cp_options.php b/inc-options/write_cp_options.php index b61eba7..130fcd9 100755 --- a/inc-options/write_cp_options.php +++ b/inc-options/write_cp_options.php @@ -42,7 +42,7 @@ echo ' - ' . $post_type_object->label ?> ' . esc_attr_e( 'Deactivate for', 'adminimize' ) + echo '' . esc_attr__( 'Deactivate for', 'adminimize' ) . '
' . esc_attr( $role_name ) . ''; } ?> diff --git a/inc-options/write_page_options.php b/inc-options/write_page_options.php index b4b019a..257e789 100755 --- a/inc-options/write_page_options.php +++ b/inc-options/write_page_options.php @@ -8,7 +8,16 @@ echo "Hi there! I'm just a part of plugin, not much I can do when called directly."; exit; } + +if ( ! isset( $user_roles ) ) { + $user_roles = _mw_adminimize_get_all_user_roles(); +} + +if ( ! isset( $user_roles_names ) ) { + $user_roles_names = _mw_adminimize_get_all_user_roles_names(); +} ?> +

@@ -29,8 +38,9 @@ ' . esc_attr_e( 'Deactivate for', 'adminimize' ) + echo '' . esc_attr__( 'Deactivate for', 'adminimize' ) . '
' . esc_attr( $role_name ) . ''; } ?> diff --git a/inc-options/write_post_options.php b/inc-options/write_post_options.php index d350bc9..530bf2d 100755 --- a/inc-options/write_post_options.php +++ b/inc-options/write_post_options.php @@ -8,6 +8,14 @@ echo "Hi there! I'm just a part of plugin, not much I can do when called directly."; exit; } + +if ( ! isset( $user_roles ) ) { + $user_roles = _mw_adminimize_get_all_user_roles(); +} + +if ( ! isset( $user_roles_names ) ) { + $user_roles_names = _mw_adminimize_get_all_user_roles_names(); +} ?>
@@ -33,8 +41,7 @@ - ' . $role_name; ?> + ' . $role_name; ?> @@ -42,7 +49,7 @@ ' . "\n"; + . esc_attr( $role_slug ) . '" type="checkbox" name="" value="" />' . "\n"; } ?> diff --git a/readme.txt b/readme.txt index 17ca65a..6289cdf 100755 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: Bueltge, inpsyde Donate link: https://www.paypal.me/FrankBueltge Tags: color, scheme, theme, admin, dashboard, color scheme, plugin, interface, ui, metabox, hide, editor, minimal, menu, customization, interface, administration, lite, light, usability, lightweight, layout, zen Requires at least: 4.0 -Tested up to: 5.3 -Stable tag: 1.11.6 +Tested up to: 5.5 +Stable tag: 1.11.7 Adminimize that lets you hide 'unnecessary' items from the WordPress backend @@ -40,6 +40,12 @@ Use the installer via back-end of your install or ... 4. Administrator can go to `Settings` > `Adminimize` menu and configure the plugin (Menu, Sub-menu, Meta boxes, ...) == Changelog == += 1.11.7 (2020-07-15) = +* Add Im-/Export possibility only for different roles, Probs @JulietNoth, #139 +* Fix problems with plugins in menus, like WooCommerce, #130 +* Fix UI topics on settings page +* Fix simple PHP warnings + = 1.11.6 (2019-12-23) = * Fixed to allow br, a, strong, em on admin footer hint. * Add new filter hook to change the options, like more or less options. `mw_adminimize_options_before_update`, Probs @g-kanoufi