Plugin Directory

Changeset 916205


Ignore:
Timestamp:
05/17/2014 06:17:32 PM (12 years ago)
Author:
rewish
Message:

Version 0.2.5 Released

Location:
wp-emmet/trunk
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • wp-emmet/trunk/WP/Emmet.php

    r858784 r916205  
    106106    public function isInScope() {
    107107        $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';
    110119    }
    111120
  • wp-emmet/trunk/WP/Emmet/Options.php

    r858784 r916205  
    7171                'post' => '1',
    7272                'theme-editor' => '1',
    73                 'plugin-editor' => '1'
     73                'plugin-editor' => '1',
     74                'others' => '1'
    7475            ),
    7576
     
    163164
    164165    /**
     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    /**
    165189     * Option to JSON
    166190     *
  • wp-emmet/trunk/langs/default.pot

    r858784 r916205  
    22msgstr ""
    33"Project-Id-Version: WP Emmet\n"
    4 "POT-Creation-Date: 2014-02-16 18:23+0900\n"
    5 "PO-Revision-Date: 2014-02-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"
    66"Last-Translator: rewish <rewish.org@gmail.com>\n"
    77"Language-Team: \n"
     
    191191msgstr ""
    192192
    193 #: views/options.php:128
     193#: views/options.php:125
     194msgid "Others"
     195msgstr ""
     196
     197#: views/options.php:133
    194198msgid "Shortcuts"
    195199msgstr ""
    196200
    197 #: views/options.php:132
     201#: views/options.php:137
    198202msgid "Override shortcuts"
    199203msgstr ""
    200204
    201 #: views/options.php:146
     205#: views/options.php:151
    202206msgid "Save option"
    203207msgstr ""
    204208
    205 #: views/options.php:150
     209#: views/options.php:155
    206210msgid "Bug reports"
    207211msgstr ""
    208212
    209 #: views/options.php:151
     213#: views/options.php:156
    210214#, php-format
    211215msgid "Please create an issue on %s."
    212216msgstr ""
    213217
    214 #: views/options.php:153
     218#: views/options.php:158
    215219msgid "Test the Emmet"
    216220msgstr ""
  • wp-emmet/trunk/langs/ja.po

    r858784 r916205  
    22msgstr ""
    33"Project-Id-Version: WP Emmet\n"
    4 "POT-Creation-Date: 2014-02-16 18:26+0900\n"
    5 "PO-Revision-Date: 2014-02-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"
    66"Last-Translator: rewish <rewish.org@gmail.com>\n"
    77"Language-Team: \n"
     
    191191msgstr "プラグインエディター"
    192192
    193 #: views/options.php:128
     193#: views/options.php:125
     194msgid "Others"
     195msgstr "その他"
     196
     197#: views/options.php:133
    194198msgid "Shortcuts"
    195199msgstr "ショートカット"
    196200
    197 #: views/options.php:132
     201#: views/options.php:137
    198202msgid "Override shortcuts"
    199203msgstr "ショートカットを上書き"
    200204
    201 #: views/options.php:146
     205#: views/options.php:151
    202206msgid "Save option"
    203207msgstr "オプションを保存"
    204208
    205 #: views/options.php:150
     209#: views/options.php:155
    206210msgid "Bug reports"
    207211msgstr "バグの報告"
    208212
    209 #: views/options.php:151
     213#: views/options.php:156
    210214#, php-format
    211215msgid "Please create an issue on %s."
    212216msgstr "%sから報告してください。"
    213217
    214 #: views/options.php:153
     218#: views/options.php:158
    215219msgid "Test the Emmet"
    216220msgstr "Emmetをテスト"
  • wp-emmet/trunk/readme.txt

    r858784 r916205  
    33Tags: emmet, zen-coding, editor, post, plugin, coding
    44Requires at least: 3.5
    5 Tested up to: 3.8.1
     5Tested up to: 3.9.1
    66Stable tag: trunk
    77License: GPLv2 or later
     
    2727
    2828== Changelog ==
     29
     30= 0.2.5 =
     31* Add others scope
    2932
    3033= 0.2.4 =
  • wp-emmet/trunk/views/options.php

    r858784 r916205  
    120120                                <?php _e('Plugin Editor', $domain); ?>
    121121                            </label>
     122                            <br>
     123                            <label>
     124                                <?php echo $form->checkBoolean('scope.others'); ?>
     125                                <?php _e('Others', $domain); ?>
     126                            </label>
    122127                        </fieldset>
    123128                    </td>
  • wp-emmet/trunk/wp-emmet.php

    r858784 r916205  
    44Plugin URI: https://github.com/rewish/wp-emmet
    55Description: Emmet (ex-Zen Coding) for WordPress.
    6 Version: 0.2.4
     6Version: 0.2.5
    77Author: rewish
    88Author URI: https://github.com/rewish
Note: See TracChangeset for help on using the changeset viewer.