diff --git a/CHANGES.md b/CHANGES.md index 1978377..4750514 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,8 @@ +#### Version 0.1.3 - 2016/02/22 +* modified CSS rules to fix media bulk actions bar from disappearing +* moved `airplane_mode_status_change` action to run before redirect, and now includes the status being run. + #### Version 0.1.2 - 2016/01/09 * added back HTTP count when inactive * removed HTTP count completely when Query Monitor is active diff --git a/airplane-mode.php b/airplane-mode.php index ba13fae..a452adb 100644 --- a/airplane-mode.php +++ b/airplane-mode.php @@ -5,7 +5,7 @@ * Description: Control loading of external files when developing locally * Author: Andrew Norcross * Author URI: http://reaktivstudios.com/ - * Version: 0.1.2 + * Version: 0.1.3 * Text Domain: airplane-mode * Requires WP: 4.0 * Domain Path: languages @@ -45,7 +45,7 @@ } if ( ! defined( 'AIRMDE_VER' ) ) { - define( 'AIRMDE_VER', '0.1.2' ); + define( 'AIRMDE_VER', '0.1.3' ); } if ( ! class_exists( 'Airplane_Mode_Core' ) ) { @@ -482,6 +482,9 @@ public function toggle_check() { // Update the setting. update_site_option( 'airplane-mode', sanitize_key( $_REQUEST['airplane-mode'] ) ); + // Fire action to allow for functions to run on status change. + do_action( 'airplane_mode_status_change', $switch ); + // And go about our business. wp_redirect( self::get_redirect() ); exit; @@ -494,9 +497,6 @@ public function toggle_check() { */ protected static function get_redirect() { - // Fire action to allow for functions to run on status change. - do_action( 'airplane_mode_status_change' ); - // Return the args for the actual redirect. $redirect = remove_query_arg( array( 'airplane-mode', diff --git a/lib/css/airplane-mode.css b/lib/css/airplane-mode.css index 71e8860..949d09a 100644 --- a/lib/css/airplane-mode.css +++ b/lib/css/airplane-mode.css @@ -42,9 +42,10 @@ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZW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gjAMhYsTMAIjMAIjMIIbuAIb4Aa4gW4gG9ANZAPdIKZnfsRcW1Na7nx373oHTb5LSK9UAGD21MHsrBTAgAZa1aoSWsQ3VlsraNF3dF2sR64C5hk+WtC1eMdltJYPXFIbgBQBxCCXUgANJBvwC3JFN7kA54G1RUKe6NNWQEsJpXztWmi/eopGiCv04UfPaH8BOvTDk/AlEsUgLr4PAbhW9Fls1lYCIYClpKF+cvmmq6V4mzJFIUDsxJsSAKOF5ABUEE1iFzQJwMSSSUgywEbOg6zkKOM1N9qKvqFnWnt0R2tT8sr8z7+KtwADADqdBvUNABi9AAAAAElFTkSuQmCC'); } -.airplane-mode-enabled .plugin-install-php a.upload.add-new-h2, -.airplane-mode-enabled .wp-filter, +.airplane-mode-enabled.plugin-install-php h1 a.upload, +.airplane-mode-enabled.plugin-install-php .wp-filter, +.airplane-mode-enabled.theme-install-php .wp-filter, .airplane-mode-enabled .theme-browser.content-filterable.rendered, -.airplane-mode-enabled a.browse-themes.add-new-h2 { +.airplane-mode-enabled.theme-install-php a.browse-themes { display: none !important; } diff --git a/lib/css/airplane-mode.min.css b/lib/css/airplane-mode.min.css index af85ab3..ca9224b 100644 --- a/lib/css/airplane-mode.min.css +++ b/lib/css/airplane-mode.min.css @@ -1 +1 @@ -#wp-admin-bar-airplane-mode-toggle span.airplane-toggle-count{height:18px;width:18px;border-radius:50%;background:#ccc;font-weight:700;display:inline-block;vertical-align:middle;margin:0;position:relative;bottom:2px;color:#000;text-align:center;line-height:19px}#wp-admin-bar-airplane-mode-toggle span.airplane-toggle-text{font-variant:small-caps;padding:0 7px;text-align:center}#wp-admin-bar-airplane-mode-toggle span.airplane-toggle-icon{background-repeat:no-repeat;background-position:center;height:24px;width:24px;display:inline-block;vertical-align:middle;margin:0;position:relative;bottom:2px;text-align:center;line-height:1}#wp-admin-bar-airplane-mode-toggle span.airplane-toggle-icon-on{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AA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ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpBOEY2RUY4Nzk1M0MxMUU1ODY2Q0RBQTA5MkNGQjVDRCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpBOEY2RUY4ODk1M0MxMUU1ODY2Q0RBQTA5MkNGQjVDRCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4RjZFRjg1OTUzQzExRTU4NjZDREFBMDkyQ0ZCNUNEIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4RjZFRjg2OTUzQzExRTU4NjZDREFBMDkyQ0ZCNUNEIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+VVKSowAAAPVJREFUeNrMluERgjAMhYsTMAIjMAIjMIIbuAIb4Aa4gW4gG9ANZAPdIKZnfsRcW1Na7nx373oHTb5LSK9UAGD21MHsrBTAgAZa1aoSWsQ3VlsraNF3dF2sR64C5hk+WtC1eMdltJYPXFIbgBQBxCCXUgANJBvwC3JFN7kA54G1RUKe6NNWQEsJpXztWmi/eopGiCv04UfPaH8BOvTDk/AlEsUgLr4PAbhW9Fls1lYCIYClpKF+cvmmq6V4mzJFIUDsxJsSAKOF5ABUEE1iFzQJwMSSSUgywEbOg6zkKOM1N9qKvqFnWnt0R2tT8sr8z7+KtwADADqdBvUNABi9AAAAAElFTkSuQmCC')}.airplane-mode-enabled .plugin-install-php a.upload.add-new-h2,.airplane-mode-enabled .theme-browser.content-filterable.rendered,.airplane-mode-enabled .wp-filter,.airplane-mode-enabled a.browse-themes.add-new-h2{display:none!important} +#wp-admin-bar-airplane-mode-toggle span.airplane-toggle-count{height:18px;width:18px;border-radius:50%;background:#ccc;font-weight:700;display:inline-block;vertical-align:middle;margin:0;position:relative;bottom:2px;color:#000;text-align:center;line-height:19px}#wp-admin-bar-airplane-mode-toggle span.airplane-toggle-text{font-variant:small-caps;padding:0 7px;text-align:center}#wp-admin-bar-airplane-mode-toggle span.airplane-toggle-icon{background-repeat:no-repeat;background-position:center;height:24px;width:24px;display:inline-block;vertical-align:middle;margin:0;position:relative;bottom:2px;text-align:center;line-height:1}#wp-admin-bar-airplane-mode-toggle span.airplane-toggle-icon-on{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoTWFjaW50b3NoKSIge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WtC1eMdltJYPXFIbgBQBxCCXUgANJBvwC3JFN7kA54G1RUKe6NNWQEsJpXztWmi/eopGiCv04UfPaH8BOvTDk/AlEsUgLr4PAbhW9Fls1lYCIYClpKF+cvmmq6V4mzJFIUDsxJsSAKOF5ABUEE1iFzQJwMSSSUgywEbOg6zkKOM1N9qKvqFnWnt0R2tT8sr8z7+KtwADADqdBvUNABi9AAAAAElFTkSuQmCC)}.airplane-mode-enabled .theme-browser.content-filterable.rendered,.airplane-mode-enabled.plugin-install-php .wp-filter,.airplane-mode-enabled.plugin-install-php h1 a.upload,.airplane-mode-enabled.theme-install-php .wp-filter,.airplane-mode-enabled.theme-install-php a.browse-themes{display:none!important} \ No newline at end of file diff --git a/readme.txt b/readme.txt index 04791fb..a15aa8a 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Donate link: https://andrewnorcross.com/donate Tags: external calls, HTTP Requires at least: 4.0 Tested up to: 4.4 -Stable tag: 0.1.2 +Stable tag: 0.1.3 License: MIT License URI: http://norcross.mit-license.org/ @@ -43,6 +43,10 @@ Because you are a jet set developer who needs to work without internet. == Changelog == += 0.1.3 - 2016/02/22 +* modified CSS rules to fix media bulk actions bar from disappearing +* moved `airplane_mode_status_change` action to run before redirect, and now includes the status being run. + = 0.1.2 - 2016/01/09 * added back HTTP count when inactive * removed HTTP count completely when Query Monitor is active