Changeset 2088836
- Timestamp:
- 05/16/2019 05:57:21 AM (7 years ago)
- Location:
- wp-applink/trunk
- Files:
-
- 6 added
- 4 deleted
- 7 edited
-
assets/css/admin.css (added)
-
assets/css/metabox.css (deleted)
-
assets/css/style.css (added)
-
assets/css/wp-applink.css (deleted)
-
assets/js/bundle.js (added)
-
assets/js/wp-applink.js (deleted)
-
assets/scss (deleted)
-
assets/stylus (added)
-
assets/stylus/admin.styl (added)
-
assets/stylus/style.styl (added)
-
class/class-search.php (modified) (1 diff)
-
languages/wp-applink-ja.mo (modified) (previous)
-
languages/wp-applink-ja.po (modified) (4 diffs)
-
languages/wp-applink.pot (modified) (4 diffs)
-
readme.txt (modified) (5 diffs)
-
views/view-metabox.php (modified) (2 diffs)
-
wp-applink.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-applink/trunk/class/class-search.php
r1859504 r2088836 34 34 $html .= '<div class="' . $prefix . 'title">' . $this->name($item) . '</div>'; 35 35 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>'; 38 38 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 39 42 $html .= '</div>'; 40 43 } -
wp-applink/trunk/languages/wp-applink-ja.po
r1859504 r2088836 6 6 "Project-Id-Version: WP Applink\n" 7 7 "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n" 8 "POT-Creation-Date: 201 8-04-17 13:46+0900\n"8 "POT-Creation-Date: 2019-05-16 13:29+0900\n" 9 9 "PO-Revision-Date: \n" 10 10 "Last-Translator: \n" … … 25 25 "X-Poedit-SearchPath-0: .\n" 26 26 27 #: class/class-itunes.php:3 7927 #: class/class-itunes.php:380 28 28 msgid "Free" 29 29 msgstr "無料" 30 30 31 #: class/class-itunes.php:38 831 #: class/class-itunes.php:389 32 32 msgid "iOS Universal" 33 33 msgstr "iOSユニバーサル" … … 37 37 msgstr "リンクが見つかりませんでした。" 38 38 39 #: class/class-search.php:3 639 #: class/class-search.php:39 40 40 msgid "Shortcode" 41 41 msgstr "ショートコード" 42 42 43 #: class/class-search.php: 3743 #: class/class-search.php:40 44 44 msgid "HTML Tag" 45 45 msgstr "HTMLタグ" … … 101 101 msgstr "検索" 102 102 103 #: wp-applink.php:143 103 #: views/view-metabox.php:62 104 msgid "Copy the code below and paste it" 105 msgstr "下のコードをコピーして貼り付けてください" 106 107 #: wp-applink.php:147 104 108 msgid "Please read this document for setting options." 105 109 msgstr "オプションの設定についてはこちらのドキュメントをお読みください。" 106 110 107 #: wp-applink.php:14 4111 #: wp-applink.php:148 108 112 msgid "Read the Document" 109 113 msgstr "ドキュメントを読む" 110 114 111 #: wp-applink.php:15 2115 #: wp-applink.php:156 112 116 msgid "PHG Token" 113 117 msgstr "PHGトークン" 114 118 115 #: wp-applink.php:15 3119 #: wp-applink.php:157 116 120 msgid "Do not use plugin's CSS" 117 121 msgstr "プラグインのCSSを使わない" 118 122 119 #: wp-applink.php:15 4123 #: wp-applink.php:158 120 124 msgid "Country" 121 125 msgstr "国" 122 126 123 #: wp-applink.php:15 5127 #: wp-applink.php:159 124 128 msgid "Cache limit" 125 129 msgstr "キャッシュの保存期間" 126 130 127 #: wp-applink.php:1 56131 #: wp-applink.php:160 128 132 msgid "Post type to use" 129 133 msgstr "使用する投稿タイプ" 130 134 131 #: wp-applink.php:1 57135 #: wp-applink.php:161 132 136 msgid "Clear Cache" 133 137 msgstr "キャッシュを削除" 134 138 135 #: wp-applink.php:17 3139 #: wp-applink.php:177 136 140 msgid "Please enter a token." 137 141 msgstr "トークンを入力してください。" 138 142 139 #: wp-applink.php:19 2143 #: wp-applink.php:196 140 144 msgid "Japan(Default)" 141 145 msgstr "日本(デフォルト)" 142 146 143 #: wp-applink.php:19 3147 #: wp-applink.php:197 144 148 msgid "United States" 145 149 msgstr "米国" 146 150 147 #: wp-applink.php: 199151 #: wp-applink.php:203 148 152 msgid "1 day" 149 153 msgstr "1日" 150 154 151 #: wp-applink.php:20 0155 #: wp-applink.php:204 152 156 msgid "1 week" 153 157 msgstr "1週間" 154 158 155 #: wp-applink.php:20 1159 #: wp-applink.php:205 156 160 msgid "1 month(Default)" 157 161 msgstr "1ヶ月(デフォルト)" 158 162 159 #: wp-applink.php:20 2163 #: wp-applink.php:206 160 164 msgid "Indefinitely" 161 165 msgstr "無期限" 162 166 163 #: wp-applink.php:29 3167 #: wp-applink.php:297 164 168 msgid "Search result" 165 169 msgstr "検索結果" 166 170 167 #: wp-applink.php:29 3171 #: wp-applink.php:297 168 172 msgid "items." 169 173 msgstr "件" -
wp-applink/trunk/languages/wp-applink.pot
r1859504 r2088836 4 4 "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" 5 5 "Project-Id-Version: WP Applink\n" 6 "POT-Creation-Date: 201 8-04-17 13:45+0900\n"6 "POT-Creation-Date: 2019-05-16 13:29+0900\n" 7 7 "PO-Revision-Date: 2017-02-10 12:19+0900\n" 8 8 "Last-Translator: \n" … … 21 21 "X-Poedit-SearchPathExcluded-0: *.js\n" 22 22 23 #: class/class-itunes.php:3 7923 #: class/class-itunes.php:380 24 24 msgid "Free" 25 25 msgstr "" 26 26 27 #: class/class-itunes.php:38 827 #: class/class-itunes.php:389 28 28 msgid "iOS Universal" 29 29 msgstr "" … … 33 33 msgstr "" 34 34 35 #: class/class-search.php:3 635 #: class/class-search.php:39 36 36 msgid "Shortcode" 37 37 msgstr "" 38 38 39 #: class/class-search.php: 3739 #: class/class-search.php:40 40 40 msgid "HTML Tag" 41 41 msgstr "" … … 97 97 msgstr "" 98 98 99 #: wp-applink.php:143 99 #: views/view-metabox.php:62 100 msgid "Copy the code below and paste it" 101 msgstr "" 102 103 #: wp-applink.php:147 100 104 msgid "Please read this document for setting options." 101 105 msgstr "" 102 106 103 #: wp-applink.php:14 4107 #: wp-applink.php:148 104 108 msgid "Read the Document" 105 109 msgstr "" 106 110 107 #: wp-applink.php:15 2111 #: wp-applink.php:156 108 112 msgid "PHG Token" 109 113 msgstr "" 110 114 111 #: wp-applink.php:15 3115 #: wp-applink.php:157 112 116 msgid "Do not use plugin's CSS" 113 117 msgstr "" 114 118 115 #: wp-applink.php:15 4119 #: wp-applink.php:158 116 120 msgid "Country" 117 121 msgstr "" 118 122 119 #: wp-applink.php:15 5123 #: wp-applink.php:159 120 124 msgid "Cache limit" 121 125 msgstr "" 122 126 123 #: wp-applink.php:1 56127 #: wp-applink.php:160 124 128 msgid "Post type to use" 125 129 msgstr "" 126 130 127 #: wp-applink.php:1 57131 #: wp-applink.php:161 128 132 msgid "Clear Cache" 129 133 msgstr "" 130 134 131 #: wp-applink.php:17 3135 #: wp-applink.php:177 132 136 msgid "Please enter a token." 133 137 msgstr "" 134 138 135 #: wp-applink.php:19 2139 #: wp-applink.php:196 136 140 msgid "Japan(Default)" 137 141 msgstr "" 138 142 139 #: wp-applink.php:19 3143 #: wp-applink.php:197 140 144 msgid "United States" 141 145 msgstr "" 142 146 143 #: wp-applink.php: 199147 #: wp-applink.php:203 144 148 msgid "1 day" 145 149 msgstr "" 146 150 147 #: wp-applink.php:20 0151 #: wp-applink.php:204 148 152 msgid "1 week" 149 153 msgstr "" 150 154 151 #: wp-applink.php:20 1155 #: wp-applink.php:205 152 156 msgid "1 month(Default)" 153 157 msgstr "" 154 158 155 #: wp-applink.php:20 2159 #: wp-applink.php:206 156 160 msgid "Indefinitely" 157 161 msgstr "" 158 162 159 #: wp-applink.php:29 3163 #: wp-applink.php:297 160 164 msgid "Search result" 161 165 msgstr "" 162 166 163 #: wp-applink.php:29 3167 #: wp-applink.php:297 164 168 msgid "items." 165 169 msgstr "" -
wp-applink/trunk/readme.txt
r1889975 r2088836 4 4 Tags: apps, app, link, iTunes, affiliate, shortcode, apple, phg 5 5 Requires at least: 4.0 6 Tested up to: 4.9.67 Stable tag: 0. 3.26 Tested up to: 5.2.0 7 Stable tag: 0.4.0 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 70 70 == Changelog == 71 71 72 = 0.4.0 = 73 * Support for Gutenberg block editor. 74 * Gutenberg ブロックエディターに対応しました。 75 72 76 = 0.3.2 = 73 77 * Bug fix. … … 110 114 == Upgrade notice == 111 115 116 = 0.4.0 = 117 * Support for Gutenberg block editor. 118 * Gutenberg ブロックエディターに対応しました。 119 120 = 0.3.2 = 112 121 * Bug fix. 113 122 … … 116 125 * Fixed bug in enabling plugin. 117 126 * プラグイン有効時の不具合を修正しました。 118 119 127 120 128 = 0.2.1 = … … 126 134 This 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. 127 135 128 129 136 = 0.1.3 = 130 137 -
wp-applink/trunk/views/view-metabox.php
r1592131 r2088836 57 57 <input type="hidden" name="at" value="<?php echo $token; ?>" id="wpal-token"> 58 58 <div id="wpal-submit" class="wpal-submit button button-primary button-large"><?php echo __('Search'); ?></div> 59 <?php //submit_button(); ?>60 59 </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> 61 62 62 63 <div id="wpal-loader" class="wpal-loader"> … … 83 84 <div id="wpal-status"></div> 84 85 <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 4 4 Plugin URI: http://e-joint.jp/works/wp-applink/ 5 5 Description: 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.26 Version: 0.4.0 7 7 Author: e-JOINT.jp 8 8 Author URI: http://e-joint.jp … … 60 60 add_action('admin_menu', array($this, 'add_plugin_page')); 61 61 add_action('admin_init', array($this, 'page_init')); 62 add_action('admin_footer', array($this, 'scripts')); 62 63 add_action('admin_enqueue_scripts', array($this, 'add_admin_js_css')); 63 64 add_action('wp_enqueue_scripts', array($this, 'add_styles')); 64 65 add_action('wp_ajax_wpal_ajax_search', array($this, 'wpal_ajax_search')); 65 66 add_action('wp_ajax_nopriv_wpal_ajax_search', array($this, 'wpal_ajax_search')); 67 68 66 69 add_shortcode('applink', array($this, 'wpal_shortcode')); 67 70 … … 237 240 238 241 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); 241 244 } 242 245 … … 244 247 public function add_styles() { 245 248 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); 247 250 } 248 251 } … … 302 305 } 303 306 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 304 321 // ショートコードの定義 305 322 public function wpal_shortcode($atts) {
Note: See TracChangeset
for help on using the changeset viewer.