Plugin Directory

Changeset 2088836


Ignore:
Timestamp:
05/16/2019 05:57:21 AM (7 years ago)
Author:
ejointjp
Message:

-v0.4.0

Location:
wp-applink/trunk
Files:
6 added
4 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • wp-applink/trunk/class/class-search.php

    r1859504 r2088836  
    3434        $html .= '<div class="' . $prefix . 'title">' . $this->name($item) . '</div>';
    3535
    36         $html .= '<div class="wpal-btn button button-small" onClick=" send_to_parent_editor(\'' . rawurlencode($this->generate_shortcode($this->id($item), $this->name($item))) . '\')">' . __('Shortcode', $this->textdomain) . '</div>';
    37         $html .= '<div class="wpal-btn button button-small" onClick=" send_to_parent_editor(\'' . rawurlencode($this->applink_html($item)) . '\')">' . __('HTML Tag', $this->textdomain) . '</div>';
     36        // $html .= '<div class="wpal-btn button button-small" onClick=" send_to_parent_editor(\'' . rawurlencode($this->generate_shortcode($this->id($item), $this->name($item))) . '\')">' . __('Shortcode', $this->textdomain) . '</div>';
     37        // $html .= '<div class="wpal-btn button button-small" onClick=" send_to_parent_editor(\'' . rawurlencode($this->applink_html($item)) . '\')">' . __('HTML Tag', $this->textdomain) . '</div>';
    3838
     39        $html .= '<div class="wpal-btn button button-small" onClick=" showCode(\'' . rawurlencode($this->generate_shortcode($this->id($item), $this->name($item))) . '\')">' . __('Shortcode', $this->textdomain) . '</div>';
     40        $html .= '<div class="wpal-btn button button-small" onClick=" showCode(\'' . rawurlencode($this->applink_html($item)) . '\')">' . __('HTML Tag', $this->textdomain) . '</div>';
     41       
    3942        $html .= '</div>';
    4043      }
  • wp-applink/trunk/languages/wp-applink-ja.po

    r1859504 r2088836  
    66"Project-Id-Version: WP Applink\n"
    77"Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
    8 "POT-Creation-Date: 2018-04-17 13:46+0900\n"
     8"POT-Creation-Date: 2019-05-16 13:29+0900\n"
    99"PO-Revision-Date: \n"
    1010"Last-Translator: \n"
     
    2525"X-Poedit-SearchPath-0: .\n"
    2626
    27 #: class/class-itunes.php:379
     27#: class/class-itunes.php:380
    2828msgid "Free"
    2929msgstr "無料"
    3030
    31 #: class/class-itunes.php:388
     31#: class/class-itunes.php:389
    3232msgid "iOS Universal"
    3333msgstr "iOSユニバーサル"
     
    3737msgstr "リンクが見つかりませんでした。"
    3838
    39 #: class/class-search.php:36
     39#: class/class-search.php:39
    4040msgid "Shortcode"
    4141msgstr "ショートコード"
    4242
    43 #: class/class-search.php:37
     43#: class/class-search.php:40
    4444msgid "HTML Tag"
    4545msgstr "HTMLタグ"
     
    101101msgstr "検索"
    102102
    103 #: wp-applink.php:143
     103#: views/view-metabox.php:62
     104msgid "Copy the code below and paste it"
     105msgstr "下のコードをコピーして貼り付けてください"
     106
     107#: wp-applink.php:147
    104108msgid "Please read this document for setting options."
    105109msgstr "オプションの設定についてはこちらのドキュメントをお読みください。"
    106110
    107 #: wp-applink.php:144
     111#: wp-applink.php:148
    108112msgid "Read the Document"
    109113msgstr "ドキュメントを読む"
    110114
    111 #: wp-applink.php:152
     115#: wp-applink.php:156
    112116msgid "PHG Token"
    113117msgstr "PHGトークン"
    114118
    115 #: wp-applink.php:153
     119#: wp-applink.php:157
    116120msgid "Do not use plugin's CSS"
    117121msgstr "プラグインのCSSを使わない"
    118122
    119 #: wp-applink.php:154
     123#: wp-applink.php:158
    120124msgid "Country"
    121125msgstr "国"
    122126
    123 #: wp-applink.php:155
     127#: wp-applink.php:159
    124128msgid "Cache limit"
    125129msgstr "キャッシュの保存期間"
    126130
    127 #: wp-applink.php:156
     131#: wp-applink.php:160
    128132msgid "Post type to use"
    129133msgstr "使用する投稿タイプ"
    130134
    131 #: wp-applink.php:157
     135#: wp-applink.php:161
    132136msgid "Clear Cache"
    133137msgstr "キャッシュを削除"
    134138
    135 #: wp-applink.php:173
     139#: wp-applink.php:177
    136140msgid "Please enter a token."
    137141msgstr "トークンを入力してください。"
    138142
    139 #: wp-applink.php:192
     143#: wp-applink.php:196
    140144msgid "Japan(Default)"
    141145msgstr "日本(デフォルト)"
    142146
    143 #: wp-applink.php:193
     147#: wp-applink.php:197
    144148msgid "United States"
    145149msgstr "米国"
    146150
    147 #: wp-applink.php:199
     151#: wp-applink.php:203
    148152msgid "1 day"
    149153msgstr "1日"
    150154
    151 #: wp-applink.php:200
     155#: wp-applink.php:204
    152156msgid "1 week"
    153157msgstr "1週間"
    154158
    155 #: wp-applink.php:201
     159#: wp-applink.php:205
    156160msgid "1 month(Default)"
    157161msgstr "1ヶ月(デフォルト)"
    158162
    159 #: wp-applink.php:202
     163#: wp-applink.php:206
    160164msgid "Indefinitely"
    161165msgstr "無期限"
    162166
    163 #: wp-applink.php:293
     167#: wp-applink.php:297
    164168msgid "Search result"
    165169msgstr "検索結果"
    166170
    167 #: wp-applink.php:293
     171#: wp-applink.php:297
    168172msgid "items."
    169173msgstr "件"
  • wp-applink/trunk/languages/wp-applink.pot

    r1859504 r2088836  
    44"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
    55"Project-Id-Version: WP Applink\n"
    6 "POT-Creation-Date: 2018-04-17 13:45+0900\n"
     6"POT-Creation-Date: 2019-05-16 13:29+0900\n"
    77"PO-Revision-Date: 2017-02-10 12:19+0900\n"
    88"Last-Translator: \n"
     
    2121"X-Poedit-SearchPathExcluded-0: *.js\n"
    2222
    23 #: class/class-itunes.php:379
     23#: class/class-itunes.php:380
    2424msgid "Free"
    2525msgstr ""
    2626
    27 #: class/class-itunes.php:388
     27#: class/class-itunes.php:389
    2828msgid "iOS Universal"
    2929msgstr ""
     
    3333msgstr ""
    3434
    35 #: class/class-search.php:36
     35#: class/class-search.php:39
    3636msgid "Shortcode"
    3737msgstr ""
    3838
    39 #: class/class-search.php:37
     39#: class/class-search.php:40
    4040msgid "HTML Tag"
    4141msgstr ""
     
    9797msgstr ""
    9898
    99 #: wp-applink.php:143
     99#: views/view-metabox.php:62
     100msgid "Copy the code below and paste it"
     101msgstr ""
     102
     103#: wp-applink.php:147
    100104msgid "Please read this document for setting options."
    101105msgstr ""
    102106
    103 #: wp-applink.php:144
     107#: wp-applink.php:148
    104108msgid "Read the Document"
    105109msgstr ""
    106110
    107 #: wp-applink.php:152
     111#: wp-applink.php:156
    108112msgid "PHG Token"
    109113msgstr ""
    110114
    111 #: wp-applink.php:153
     115#: wp-applink.php:157
    112116msgid "Do not use plugin's CSS"
    113117msgstr ""
    114118
    115 #: wp-applink.php:154
     119#: wp-applink.php:158
    116120msgid "Country"
    117121msgstr ""
    118122
    119 #: wp-applink.php:155
     123#: wp-applink.php:159
    120124msgid "Cache limit"
    121125msgstr ""
    122126
    123 #: wp-applink.php:156
     127#: wp-applink.php:160
    124128msgid "Post type to use"
    125129msgstr ""
    126130
    127 #: wp-applink.php:157
     131#: wp-applink.php:161
    128132msgid "Clear Cache"
    129133msgstr ""
    130134
    131 #: wp-applink.php:173
     135#: wp-applink.php:177
    132136msgid "Please enter a token."
    133137msgstr ""
    134138
    135 #: wp-applink.php:192
     139#: wp-applink.php:196
    136140msgid "Japan(Default)"
    137141msgstr ""
    138142
    139 #: wp-applink.php:193
     143#: wp-applink.php:197
    140144msgid "United States"
    141145msgstr ""
    142146
    143 #: wp-applink.php:199
     147#: wp-applink.php:203
    144148msgid "1 day"
    145149msgstr ""
    146150
    147 #: wp-applink.php:200
     151#: wp-applink.php:204
    148152msgid "1 week"
    149153msgstr ""
    150154
    151 #: wp-applink.php:201
     155#: wp-applink.php:205
    152156msgid "1 month(Default)"
    153157msgstr ""
    154158
    155 #: wp-applink.php:202
     159#: wp-applink.php:206
    156160msgid "Indefinitely"
    157161msgstr ""
    158162
    159 #: wp-applink.php:293
     163#: wp-applink.php:297
    160164msgid "Search result"
    161165msgstr ""
    162166
    163 #: wp-applink.php:293
     167#: wp-applink.php:297
    164168msgid "items."
    165169msgstr ""
  • wp-applink/trunk/readme.txt

    r1889975 r2088836  
    44Tags: apps, app, link, iTunes, affiliate, shortcode, apple, phg
    55Requires at least: 4.0
    6 Tested up to: 4.9.6
    7 Stable tag: 0.3.2
     6Tested up to: 5.2.0
     7Stable tag: 0.4.0
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7070== Changelog ==
    7171
     72= 0.4.0 =
     73* Support for Gutenberg block editor.
     74* Gutenberg ブロックエディターに対応しました。
     75
    7276= 0.3.2 =
    7377* Bug fix.
     
    110114== Upgrade notice ==
    111115
     116= 0.4.0 =
     117* Support for Gutenberg block editor.
     118* Gutenberg ブロックエディターに対応しました。
     119
     120= 0.3.2 =
    112121* Bug fix.
    113122
     
    116125* Fixed bug in enabling plugin.
    117126* プラグイン有効時の不具合を修正しました。
    118 
    119127
    120128= 0.2.1 =
     
    126134This not only reduces the number of requests to the API but also shortens the display time of the search results and the short code Applink.
    127135
    128 
    129136= 0.1.3 =
    130137
  • wp-applink/trunk/views/view-metabox.php

    r1592131 r2088836  
    5757  <input type="hidden" name="at" value="<?php echo $token; ?>" id="wpal-token">
    5858  <div id="wpal-submit" class="wpal-submit button button-primary button-large"><?php echo __('Search'); ?></div>
    59     <?php //submit_button(); ?>
    6059</div>
     60
     61<div id="wpal-code" class="wpal-code"><div class="wpal-code-label"><?php echo __('Copy the code below and paste it', 'wp-applink'); ?></div><textarea id="wpal-code-result" class="wpal-code-result"></textarea></div>
    6162
    6263<div id="wpal-loader" class="wpal-loader">
     
    8384<div id="wpal-status"></div>
    8485<div id="wpal-result" class="wpal-result"></div>
    85 
    86 <script>
    87 function send_to_parent_editor(str) {
    88     var win = parent.window.dialogArguments || opener || parent || top;
    89     console.log(parent.window.dialogArguments || opener || parent ||top);
    90     win.send_to_editor(decodeURIComponent(str));
    91 }
    92 </script>
  • wp-applink/trunk/wp-applink.php

    r1889975 r2088836  
    44Plugin URI: http://e-joint.jp/works/wp-applink/
    55Description: It is a WordPress plugin that generates iTunes PHG affiliate links such as iPhone, iPad, Mac apps and music, movies etc.
    6 Version: 0.3.2
     6Version: 0.4.0
    77Author: e-JOINT.jp
    88Author URI: http://e-joint.jp
     
    6060    add_action('admin_menu', array($this, 'add_plugin_page'));
    6161    add_action('admin_init', array($this, 'page_init'));
     62    add_action('admin_footer', array($this, 'scripts'));
    6263    add_action('admin_enqueue_scripts', array($this, 'add_admin_js_css'));
    6364    add_action('wp_enqueue_scripts', array($this, 'add_styles'));
    6465    add_action('wp_ajax_wpal_ajax_search', array($this, 'wpal_ajax_search'));
    6566    add_action('wp_ajax_nopriv_wpal_ajax_search', array($this, 'wpal_ajax_search'));
     67
     68
    6669    add_shortcode('applink', array($this, 'wpal_shortcode'));
    6770
     
    237240
    238241  public function add_admin_js_css() {
    239     wp_enqueue_style('wpal', plugins_url('assets/css/metabox.css', __FILE__), array(), $this->version);
    240     wp_enqueue_script('wpal', plugins_url('assets/js/wp-applink.js', __FILE__), array('jquery'), $this->version);
     242    wp_enqueue_style('wpal', plugins_url('assets/css/admin.css', __FILE__), array(), $this->version);
     243    wp_enqueue_script('wpal', plugins_url('assets/js/bundle.js', __FILE__), array(), $this->version, true);
    241244  }
    242245
     
    244247  public function add_styles() {
    245248    if(!isset($this->options['nocss']) || (isset($this->options['nocss']) && !$this->options['nocss'])) {
    246       wp_enqueue_style('wpal', plugins_url('assets/css/wp-applink.css', __FILE__), array(), $this->version);
     249      wp_enqueue_style('wpal', plugins_url('assets/css/style.css', __FILE__), array(), $this->version);
    247250    }
    248251  }
     
    302305  }
    303306
     307  // 検索結果のボタンを押したときの関数
     308  public function scripts() { ?>
     309    <script>
     310    function showCode (str) {
     311      var $code = document.getElementById('wpal-code')
     312      var $codeResult = document.getElementById('wpal-code-result')
     313      $code.style.display = 'block'
     314      $codeResult.value = decodeURIComponent(str)
     315      $codeResult.value = $codeResult.value.trim()
     316      $codeResult.select()
     317    }
     318    </script><?php
     319  }
     320
    304321  // ショートコードの定義
    305322  public function wpal_shortcode($atts) {
Note: See TracChangeset for help on using the changeset viewer.