Changeset 916205
- Timestamp:
- 05/17/2014 06:17:32 PM (12 years ago)
- Location:
- wp-emmet/trunk
- Files:
-
- 1 added
- 8 edited
-
WP/Emmet.php (modified) (1 diff)
-
WP/Emmet/Migration/0_2_5.php (added)
-
WP/Emmet/Options.php (modified) (2 diffs)
-
langs/default.pot (modified) (2 diffs)
-
langs/ja.mo (modified) (previous)
-
langs/ja.po (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
views/options.php (modified) (1 diff)
-
wp-emmet.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wp-emmet/trunk/WP/Emmet.php
r858784 r916205 106 106 public function isInScope() { 107 107 $screen = get_current_screen(); 108 return $screen->base === 'settings_page_' . WP_EMMET_DOMAIN 109 || $this->Options->get("scope.{$screen->base}") === '1'; 108 $type = "scope.{$screen->base}"; 109 110 if ($screen->base === 'settings_page_' . WP_EMMET_DOMAIN) { 111 return true; 112 } 113 114 if (!$this->Options->exists($type)) { 115 $type = 'scope.others'; 116 } 117 118 return $this->Options->get($type) === '1'; 110 119 } 111 120 -
wp-emmet/trunk/WP/Emmet/Options.php
r858784 r916205 71 71 'post' => '1', 72 72 'theme-editor' => '1', 73 'plugin-editor' => '1' 73 'plugin-editor' => '1', 74 'others' => '1' 74 75 ), 75 76 … … 163 164 164 165 /** 166 * Key exists 167 * 168 * @param string $key 169 * @return boolean 170 */ 171 public function exists($key) { 172 $keys = explode('.', $key); 173 $options = $this->options; 174 175 while (count($keys) > 0) { 176 $key = array_shift($keys); 177 178 if (!array_key_exists($key, $options)) { 179 return false; 180 } 181 182 $options = $options[$key]; 183 } 184 185 return true; 186 } 187 188 /** 165 189 * Option to JSON 166 190 * -
wp-emmet/trunk/langs/default.pot
r858784 r916205 2 2 msgstr "" 3 3 "Project-Id-Version: WP Emmet\n" 4 "POT-Creation-Date: 2014-0 2-16 18:23+0900\n"5 "PO-Revision-Date: 2014-0 2-16 18:23+0900\n"4 "POT-Creation-Date: 2014-05-18 00:32+0900\n" 5 "PO-Revision-Date: 2014-05-18 00:32+0900\n" 6 6 "Last-Translator: rewish <rewish.org@gmail.com>\n" 7 7 "Language-Team: \n" … … 191 191 msgstr "" 192 192 193 #: views/options.php:128 193 #: views/options.php:125 194 msgid "Others" 195 msgstr "" 196 197 #: views/options.php:133 194 198 msgid "Shortcuts" 195 199 msgstr "" 196 200 197 #: views/options.php:13 2201 #: views/options.php:137 198 202 msgid "Override shortcuts" 199 203 msgstr "" 200 204 201 #: views/options.php:1 46205 #: views/options.php:151 202 206 msgid "Save option" 203 207 msgstr "" 204 208 205 #: views/options.php:15 0209 #: views/options.php:155 206 210 msgid "Bug reports" 207 211 msgstr "" 208 212 209 #: views/options.php:15 1213 #: views/options.php:156 210 214 #, php-format 211 215 msgid "Please create an issue on %s." 212 216 msgstr "" 213 217 214 #: views/options.php:15 3218 #: views/options.php:158 215 219 msgid "Test the Emmet" 216 220 msgstr "" -
wp-emmet/trunk/langs/ja.po
r858784 r916205 2 2 msgstr "" 3 3 "Project-Id-Version: WP Emmet\n" 4 "POT-Creation-Date: 2014-0 2-16 18:26+0900\n"5 "PO-Revision-Date: 2014-0 2-16 18:26+0900\n"4 "POT-Creation-Date: 2014-05-18 00:31+0900\n" 5 "PO-Revision-Date: 2014-05-18 00:31+0900\n" 6 6 "Last-Translator: rewish <rewish.org@gmail.com>\n" 7 7 "Language-Team: \n" … … 191 191 msgstr "プラグインエディター" 192 192 193 #: views/options.php:128 193 #: views/options.php:125 194 msgid "Others" 195 msgstr "その他" 196 197 #: views/options.php:133 194 198 msgid "Shortcuts" 195 199 msgstr "ショートカット" 196 200 197 #: views/options.php:13 2201 #: views/options.php:137 198 202 msgid "Override shortcuts" 199 203 msgstr "ショートカットを上書き" 200 204 201 #: views/options.php:1 46205 #: views/options.php:151 202 206 msgid "Save option" 203 207 msgstr "オプションを保存" 204 208 205 #: views/options.php:15 0209 #: views/options.php:155 206 210 msgid "Bug reports" 207 211 msgstr "バグの報告" 208 212 209 #: views/options.php:15 1213 #: views/options.php:156 210 214 #, php-format 211 215 msgid "Please create an issue on %s." 212 216 msgstr "%sから報告してください。" 213 217 214 #: views/options.php:15 3218 #: views/options.php:158 215 219 msgid "Test the Emmet" 216 220 msgstr "Emmetをテスト" -
wp-emmet/trunk/readme.txt
r858784 r916205 3 3 Tags: emmet, zen-coding, editor, post, plugin, coding 4 4 Requires at least: 3.5 5 Tested up to: 3. 8.15 Tested up to: 3.9.1 6 6 Stable tag: trunk 7 7 License: GPLv2 or later … … 27 27 28 28 == Changelog == 29 30 = 0.2.5 = 31 * Add others scope 29 32 30 33 = 0.2.4 = -
wp-emmet/trunk/views/options.php
r858784 r916205 120 120 <?php _e('Plugin Editor', $domain); ?> 121 121 </label> 122 <br> 123 <label> 124 <?php echo $form->checkBoolean('scope.others'); ?> 125 <?php _e('Others', $domain); ?> 126 </label> 122 127 </fieldset> 123 128 </td> -
wp-emmet/trunk/wp-emmet.php
r858784 r916205 4 4 Plugin URI: https://github.com/rewish/wp-emmet 5 5 Description: Emmet (ex-Zen Coding) for WordPress. 6 Version: 0.2. 46 Version: 0.2.5 7 7 Author: rewish 8 8 Author URI: https://github.com/rewish
Note: See TracChangeset
for help on using the changeset viewer.