Changeset 1806236
- Timestamp:
- 01/20/2018 01:44:09 PM (8 years ago)
- Location:
- maintenance-switch
- Files:
-
- 50 added
- 4 edited
-
tags/1.5.1 (added)
-
tags/1.5.1/LICENSE.txt (added)
-
tags/1.5.1/admin (added)
-
tags/1.5.1/admin/class-maintenance-switch-admin.php (added)
-
tags/1.5.1/admin/css (added)
-
tags/1.5.1/admin/css/maintenance-switch-admin.css (added)
-
tags/1.5.1/admin/css/maintenance-switch-admin.scss (added)
-
tags/1.5.1/admin/index.php (added)
-
tags/1.5.1/admin/js (added)
-
tags/1.5.1/admin/js/maintenance-switch-admin.js (added)
-
tags/1.5.1/admin/views (added)
-
tags/1.5.1/admin/views/maintenance-switch-admin-display.php (added)
-
tags/1.5.1/assets (added)
-
tags/1.5.1/assets/css (added)
-
tags/1.5.1/assets/css/maintenance-switch-button.css (added)
-
tags/1.5.1/assets/css/maintenance-switch-button.scss (added)
-
tags/1.5.1/assets/js (added)
-
tags/1.5.1/assets/js/maintenance-switch-button.js (added)
-
tags/1.5.1/gulpfile.js (added)
-
tags/1.5.1/includes (added)
-
tags/1.5.1/includes/class-maintenance-switch-activator.php (added)
-
tags/1.5.1/includes/class-maintenance-switch-deactivator.php (added)
-
tags/1.5.1/includes/class-maintenance-switch-i18n.php (added)
-
tags/1.5.1/includes/class-maintenance-switch-loader.php (added)
-
tags/1.5.1/includes/class-maintenance-switch.php (added)
-
tags/1.5.1/includes/config.php (added)
-
tags/1.5.1/includes/index.php (added)
-
tags/1.5.1/index.php (added)
-
tags/1.5.1/languages (added)
-
tags/1.5.1/languages/maintenance-switch-fr_FR.mo (added)
-
tags/1.5.1/languages/maintenance-switch-fr_FR.po (added)
-
tags/1.5.1/languages/maintenance-switch.pot (added)
-
tags/1.5.1/maintenance-switch.php (added)
-
tags/1.5.1/package-lock.json (added)
-
tags/1.5.1/package.json (added)
-
tags/1.5.1/preview.php (added)
-
tags/1.5.1/public (added)
-
tags/1.5.1/public/class-maintenance-switch-public.php (added)
-
tags/1.5.1/public/css (added)
-
tags/1.5.1/public/css/maintenance-switch-public.css (added)
-
tags/1.5.1/public/index.php (added)
-
tags/1.5.1/public/js (added)
-
tags/1.5.1/public/js/maintenance-switch-public.js (added)
-
tags/1.5.1/public/views (added)
-
tags/1.5.1/public/views/maintenance-switch-public-display.php (added)
-
tags/1.5.1/readme.txt (added)
-
tags/1.5.1/templates (added)
-
tags/1.5.1/templates/.maintenance (added)
-
tags/1.5.1/templates/maintenance.php (added)
-
tags/1.5.1/uninstall.php (added)
-
trunk/admin/class-maintenance-switch-admin.php (modified) (3 diffs)
-
trunk/admin/js/maintenance-switch-admin.js (modified) (1 diff)
-
trunk/maintenance-switch.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
maintenance-switch/trunk/admin/class-maintenance-switch-admin.php
r1805892 r1806236 87 87 */ 88 88 public function enqueue_styles() { 89 90 wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/maintenance-switch-admin.css', array(), $this->version, 'all' );91 89 if ($this->isSettingsPage()) { 90 wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/maintenance-switch-admin.css', array(), $this->version, 'all' ); 91 } 92 92 wp_enqueue_style( $this->plugin_name . '-button', plugin_dir_url( dirname( __FILE__ ) ) . 'assets/css/maintenance-switch-button.css', array(), $this->version, 'all' ); 93 94 93 } 95 94 … … 100 99 */ 101 100 public function enqueue_scripts() { 102 103 wp_enqueue_script( 'jquery-ui-tabs' );104 105 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/maintenance-switch-admin.js', array( 'jquery' ), $this->version, false);106 101 if ($this->isSettingsPage()) { 102 wp_enqueue_script( 'jquery-ui-tabs' ); 103 wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/maintenance-switch-admin.js', array( 'jquery' ), $this->version, false ); 104 wp_enqueue_code_editor( ['file' => $this->plugin_name.'.php'] ); 105 } 107 106 wp_enqueue_script( $this->plugin_name . '-button', plugin_dir_url( dirname( __FILE__ ) ) . 'assets/js/maintenance-switch-button.js', array( 'jquery' ), $this->version, false ); 108 109 wp_enqueue_code_editor( ['file' => $this->plugin_name.'.php'] );110 107 } 111 108 … … 145 142 ); 146 143 } 144 145 /** 146 * Check if the current screen is the settings page 147 * 148 * @since 1.5.1 149 * 150 * @return bool 151 */ 152 public function isSettingsPage() { 153 return get_current_screen()->base == 'settings_page_maintenance-switch'; 154 } 147 155 } -
maintenance-switch/trunk/admin/js/maintenance-switch-admin.js
r1805892 r1806236 24 24 25 25 function toggleTextareaReadonly(status) { 26 var checked = status || $('#ms_use_theme'). checked;26 var checked = status || $('#ms_use_theme').prop('checked'); 27 27 $('#ms_page_html').prop('readonly', checked); 28 28 $('#ms_page_html').next('.CodeMirror').toggleClass('readonly', checked); -
maintenance-switch/trunk/maintenance-switch.php
r1805892 r1806236 17 17 * Plugin URI: https://wordpress.org/plugins/maintenance-switch 18 18 * Description: Customize easily and switch in one-click to (native) maintenance mode from your backend or frontend. 19 * Version: 1.5. 019 * Version: 1.5.1 20 20 * Author: Fugu 21 21 * Author URI: http://www.fugu.fr … … 41 41 * @since 1.3.6 42 42 */ 43 define( 'PLUGIN_VERSION', '1.5. 0' );43 define( 'PLUGIN_VERSION', '1.5.1' ); 44 44 45 45 /** -
maintenance-switch/trunk/readme.txt
r1805892 r1806236 5 5 Requires at least: 3.5 6 6 Tested up to: 4.9 7 Stable tag: 1.5. 07 Stable tag: 1.5.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 109 109 == Changelog == 110 110 111 = 1.5.1 = 112 * Fix the disabled code field bug 113 * Enqueue admin assets only on settings page 114 111 115 = 1.5.0 = 112 116 * Add a gitignore and gulp files
Note: See TracChangeset
for help on using the changeset viewer.