diff --git a/archive-post-order-plus.php b/archive-post-order-plus.php
index 0b31cb0..c691181 100644
--- a/archive-post-order-plus.php
+++ b/archive-post-order-plus.php
@@ -5,8 +5,10 @@ Plugin URI: https://develop.n-k-y.net/wordpress/wp_plugin/apop/
Author: NBK45
Author URI: https://develop.n-k-y.net
Description: Archive Post Order Plus は「最新の投稿」「検索結果」「カテゴリー」「タグ」「カスタム分類」の投稿記事の表示順をドラッグで並べ替えて設定するプラグインです。
-Version: 1.1.6
+Version: 1.1.7
License: GPLv2
+Text Domain: ArchivePostOrderPlus
+Domain Path: /languages
*/
/* Copyright 2021 Nobuhiro Kimura (email : big-me@n-k-y.net)
@@ -25,6 +27,8 @@ License: GPLv2
define( 'APOP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'APOP_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
define( 'APOP_CUSTOM_FIELD_PREFIX', '_apop_postorder_' );
+define( 'APOP_DOMAIN', 'ArchivePostOrderPlus' );
+load_plugin_textdomain( APOP_DOMAIN, false, basename( dirname( __FILE__ ) ) . '/languages' );
//メイン処理のクラスをインスタンス化
require_once __DIR__ . '/class/class.apop.order.php';
diff --git a/class/class.apop.apop_post.php b/class/class.apop.apop_post.php
index 3192b0d..204325d 100644
--- a/class/class.apop.apop_post.php
+++ b/class/class.apop.apop_post.php
@@ -30,7 +30,7 @@ if ( ! class_exists( 'APOP_POST' ) ) {
public function add_meta_fields() {
$target_posts = $this->set_post_types();
foreach ( $target_posts as $target_post ) {
- add_meta_box( 'apo_custom_fields', 'APO+カスタムフィールド', array(
+ add_meta_box( 'apo_custom_fields', __( 'APO + custom field settings', APOP_DOMAIN ), array(
$this,
'insert_meta_fields'
), $target_post, 'normal' );
@@ -43,16 +43,17 @@ if ( ! class_exists( 'APOP_POST' ) ) {
$this->create_order_field_data( get_option( '_apop_normal_order_param' ), 'normal' );
}
//検索ソート
- if ( get_option( '_apop_tax_sort_type' ) == '1' ) {
+ if ( get_option( '_apop_search_order' ) == '1' ) {
$this->create_order_field_data( get_option( '_apop_search_order_param' ), 'search' );
}
+
//カテゴリー、タグ、カスタム分類
$this->create_order_tax_field_data( get_option( '_apop_tax_order_param' ) );
$this->labels = array(
- 'normal' => '最新の投稿',
- 'search' => '検索',
- 'tax' => 'カテゴリー、タグ、カスタム分類',
+ 'normal' => __('Your latest posts', APOP_DOMAIN),
+ 'search' => __('Search', APOP_DOMAIN),
+ 'tax' => __('Category, Tag, Custom Taxonomy', APOP_DOMAIN),
);
require_once self::TEMPLATE_DIR . 'setting_post_custom_field.php';
diff --git a/class/class.apop.apop_ui.php b/class/class.apop.apop_ui.php
index 08d2366..adf218e 100644
--- a/class/class.apop.apop_ui.php
+++ b/class/class.apop.apop_ui.php
@@ -249,7 +249,7 @@ value="' . esc_html( $sort_num ) . '">
if ( count( $tax_data ) > 0 ) {
$order_name = $order_name;
$order_tax = $key == 'post_tag' ? 'tag' : $key;
- echo '
| ' . esc_html( $title ) . '設定 | ';
+ echo ' |
|---|
| ' . esc_html( $title ) . ' | ';
include APOP_PLUGIN_PATH . 'template/setting_parts_taxonomy.php';
echo ' |
';
}
@@ -289,14 +289,14 @@ value="' . esc_html( $sort_num ) . '">
}
$target_keys = self::set_search_normal_target_keys( $order_param );
$target_values = array(
- 'date' => '登録日',
- 'title' => 'タイトル',
+ 'date' => __( 'Published', APOP_DOMAIN ),
+ 'title' => __( 'Post Title', APOP_DOMAIN ),
'ID' => 'ID',
- 'modified' => '更新日',
- 'custom_field' => 'カスタムフィールド1',
- 'custom_field_2' => 'カスタムフィールド2',
- 'custom_field_3' => 'カスタムフィールド3',
- 'custom_field_4' => 'カスタムフィールド4',
+ 'modified' => __( 'Modified', APOP_DOMAIN ),
+ 'custom_field' => __( 'Custom filed 1', APOP_DOMAIN ),
+ 'custom_field_2' => __( 'Custom filed 2', APOP_DOMAIN ),
+ 'custom_field_3' => __( 'Custom filed 3', APOP_DOMAIN ),
+ 'custom_field_4' => __( 'Custom filed 4', APOP_DOMAIN ),
);
$list = array();
foreach ( $target_keys as $target_key ) {
@@ -318,17 +318,17 @@ value="' . esc_html( $sort_num ) . '">
+ value="1"' . esc_attr( self::set_search_normal_checked( $sort, 1 ) ) . '>' . __( 'Asc', APOP_DOMAIN ) . '
';
+ value="2"' . esc_attr( self::set_search_normal_checked( $sort, 2 ) ) . '>' . __( 'Desc', APOP_DOMAIN ) . '';
if ( strpos( $target_key, 'custom_field' ) !== false ) {
self::create_custom_field_sort_type( $name_key, $target_key, $cnv_order_params );
@@ -355,28 +355,28 @@ value="' . esc_html( $sort_num ) . '">
選択
+ value="1"' . esc_attr( self::set_search_normal_checked( $custom_field_type, '1' ) ) . '>' . __( 'Select', APOP_DOMAIN ) . '
+ value="2"' . esc_attr( self::set_search_normal_checked( $custom_field_type, '2' ) ) . '>' . __( 'Add', APOP_DOMAIN ) . '
';
echo '
-
値タイプ:
+
' . __( 'Type', APOP_DOMAIN ) . ':
+ value="meta_value"' . esc_attr( self::set_search_normal_checked( $value_type, 'meta_value' ) ) . '>' . __( 'Text', APOP_DOMAIN ) . '
+ value="meta_value_num"' . esc_attr( self::set_search_normal_checked( $value_type, 'meta_value_num' ) ) . '>' . __( 'Number', APOP_DOMAIN ) . '
';
}
diff --git a/class/class.apop.order.php b/class/class.apop.order.php
index de05147..2ddd107 100644
--- a/class/class.apop.order.php
+++ b/class/class.apop.order.php
@@ -29,10 +29,11 @@ if ( ! class_exists( 'APOP' ) ) {
array( $this, 'display_setting_page' ),
''
);
+ //
add_submenu_page(
'apop_post_sort', // parent_slug
'Sort taxonomy', // page_title
- '表示件数・対象設定', // menu_title
+ __( 'Display number / target setting', APOP_DOMAIN ), // menu_title
'administrator', // capability
'apop_post_sort', // menu_slug
array( $this, 'display_setting_page' ) // function
@@ -40,7 +41,7 @@ if ( ! class_exists( 'APOP' ) ) {
add_submenu_page(
'apop_post_sort', // parent_slug
'Select taxonomy', // page_title
- '並べ替え', // menu_title
+ __( 'Sorting', APOP_DOMAIN ), // menu_title
'administrator', // capability
'apop_post_sort_setting', // menu_slug
array( $this, 'show_option_page' ) // function
diff --git a/css/apop-style.css b/css/apop-style.css
index c401e3b..b143f76 100644
--- a/css/apop-style.css
+++ b/css/apop-style.css
@@ -187,10 +187,13 @@ dl.apop-setting-list-dd .sort-custom-field-input {
}
.search-normal-sort .product-list-sort-type label:first-of-type {
- width: 5em;
margin-right: 3em;
}
+.disable-box ul.disable-normal-list li.product-list.no-order .product-list-sort-type {
+ width: 40%;
+}
+
.product-list.no-order {
background: #ababab;
}
diff --git a/js/apop-style.js b/js/apop-style.js
index 4fa9da4..20b0809 100644
--- a/js/apop-style.js
+++ b/js/apop-style.js
@@ -222,14 +222,20 @@ jQuery(function ($) {
}
function en_dis_list(obj, type) {
+ let select_msg = 'Select from existing custom fields';
+ let add_msg = 'Added custom field for APOP';
+ if ($('.post-setting-box').hasClass('apop-lang-ja')) {
+ select_msg = '既存のカスタムフィールドから選択';
+ add_msg = 'APOP専用カスタムフィールドを追加';
+ }
if (type == 1) {
obj.parents('.product-list-sort-type').find('.custom_field_key_select').prop('disabled', false).show();
obj.parents('.product-list-sort-type').find('.custom_field_key').prop('disabled', true).hide();
- obj.parents('.product-list-sort-type').find('.custom-field-select-alert').text('既存のカスタムフィールドから選択');
+ obj.parents('.product-list-sort-type').find('.custom-field-select-alert').text(select_msg);
} else if (type == 2) {
obj.parents('.product-list-sort-type').find('.custom_field_key').prop('disabled', false).show();
obj.parents('.product-list-sort-type').find('.custom_field_key_select').prop('disabled', true).hide();
- obj.parents('.product-list-sort-type').find('.custom-field-select-alert').text('APOP専用カスタムフィールドを追加');
+ obj.parents('.product-list-sort-type').find('.custom-field-select-alert').text(add_msg);
}
}
}
diff --git a/languages/ArchivePostOrderPlus-ja.mo b/languages/ArchivePostOrderPlus-ja.mo
new file mode 100644
index 0000000..505fc8e
Binary files /dev/null and b/languages/ArchivePostOrderPlus-ja.mo differ
diff --git a/languages/ArchivePostOrderPlus-ja.po b/languages/ArchivePostOrderPlus-ja.po
new file mode 100644
index 0000000..acf7cc8
--- /dev/null
+++ b/languages/ArchivePostOrderPlus-ja.po
@@ -0,0 +1,220 @@
+# Blank WordPress Pot
+# Copyright 2014 ...
+# This file is distributed under the GNU General Public License v3 or later.
+msgid ""
+msgstr ""
+"Project-Id-Version: Archive Post Order Plus\n"
+"Report-Msgid-Bugs-To: Translator Name \n"
+"POT-Creation-Date: 2021-07-11 17:11+0900\n"
+"PO-Revision-Date: \n"
+"Last-Translator: NBK45 \n"
+"Language-Team: NBK45 \n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;"
+"esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;"
+"_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
+"X-Poedit-Basepath: ..\n"
+"X-Generator: Poedit 3.0\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: class/class.apop.apop_post.php:33
+msgid "APO + custom field settings"
+msgstr "APO+カスタムフィールド"
+
+#: class/class.apop.apop_post.php:54 template/order.php:8
+msgid "Your latest posts"
+msgstr "最新の投稿"
+
+#: class/class.apop.apop_post.php:55 template/order.php:9 template/order.php:54
+msgid "Search"
+msgstr "検索"
+
+#: class/class.apop.apop_post.php:56
+msgid "Category, Tag, Custom Taxonomy"
+msgstr "カテゴリー、タグ、カスタム分類"
+
+#: class/class.apop.apop_ui.php:292
+msgid "Published"
+msgstr "投稿日"
+
+#: class/class.apop.apop_ui.php:293
+msgid "Post Title"
+msgstr "タイトル"
+
+#: class/class.apop.apop_ui.php:295
+msgid "Modified"
+msgstr "更新日"
+
+#: class/class.apop.apop_ui.php:296
+msgid "Custom filed 1"
+msgstr "カスタムフィールド1"
+
+#: class/class.apop.apop_ui.php:297
+msgid "Custom filed 2"
+msgstr "カスタムフィールド2"
+
+#: class/class.apop.apop_ui.php:298
+msgid "Custom filed 3"
+msgstr "カスタムフィールド3"
+
+#: class/class.apop.apop_ui.php:299
+msgid "Custom filed 4"
+msgstr "カスタムフィールド4"
+
+#: class/class.apop.apop_ui.php:321 template/order.php:33 template/order.php:64
+#: template/order_parts_taxonomy.php:46
+msgid "Enabled"
+msgstr "有効"
+
+#: class/class.apop.apop_ui.php:327
+msgid "Asc"
+msgstr "昇順"
+
+#: class/class.apop.apop_ui.php:331
+msgid "Desc"
+msgstr "降順"
+
+#: class/class.apop.apop_ui.php:358
+msgid "Select"
+msgstr "選択"
+
+#: class/class.apop.apop_ui.php:363
+msgid "Add"
+msgstr "追加"
+
+#: class/class.apop.apop_ui.php:370
+msgid "Type"
+msgstr "値タイプ"
+
+#: class/class.apop.apop_ui.php:375
+msgid "Text"
+msgstr "テキスト"
+
+#: class/class.apop.apop_ui.php:379
+msgid "Number"
+msgstr "数値"
+
+#: class/class.apop.order.php:36
+msgid "Display number / target setting"
+msgstr "表示件数・対象設定"
+
+#: class/class.apop.order.php:44 template/order.php:5
+msgid "Sorting"
+msgstr "並べ替え"
+
+#: template/order.php:4
+msgid "apop-lang-en"
+msgstr "apop-lang-ja"
+
+#: template/order.php:10 template/order.php:86
+msgid "Category"
+msgstr "カテゴリー"
+
+#: template/order.php:11 template/order.php:95
+msgid "Tag"
+msgstr "タグ"
+
+#: template/order.php:12 template/order.php:104
+msgid "Custom taxonomy"
+msgstr "カスタム分類"
+
+#: template/order.php:23
+msgid "Your latest posts / Settings - Reading Settings"
+msgstr "最新の投稿(設定-表示設定ーホームページの表示)"
+
+#: template/order.php:30 template/order.php:61
+#: template/order_parts_taxonomy.php:36 template/order_parts_taxonomy.php:44
+msgid "Click \"Save Changes\" to register the sort."
+msgstr "並べ替えを登録するには「変更を保存」をクリックしてください。"
+
+#: template/order.php:39 template/order.php:70
+#: template/order_parts_taxonomy.php:52
+msgid "Disabled"
+msgstr "無効"
+
+#: template/order.php:110 template/setting.php:45
+msgid "Save changes"
+msgstr "変更を保存"
+
+#: template/order_parts_menu.php:6 template/order_parts_taxonomy.php:22
+msgid "Standard + custom field sort"
+msgstr "標準+カスタムフィールドソート"
+
+#: template/order_parts_menu.php:9 template/order_parts_taxonomy.php:29
+msgid "Drag sort"
+msgstr "ドラッグソート"
+
+#: template/order_parts_taxonomy.php:59
+msgid "No"
+msgstr "並べ替えをカスタマイズする「"
+
+#: template/order_parts_taxonomy.php:59
+msgid "has been selected."
+msgstr "」は選択されていません。"
+
+#: template/setting.php:4
+msgid "Settings"
+msgstr "設定"
+
+#: template/setting.php:7
+msgid "Global settings"
+msgstr "全体設定"
+
+#: template/setting.php:10
+msgid "Displayed per page"
+msgstr "1ページ表示件数"
+
+#: template/setting.php:16 template/setting_parts_taxonomy.php:31
+msgid "Follow display settings"
+msgstr "表示設定に従う"
+
+#: template/setting.php:18 template/setting_parts_taxonomy.php:32
+msgid "Posts"
+msgstr "件"
+
+#: template/setting.php:22 template/setting_parts_taxonomy.php:42
+msgid "All posts"
+msgstr "全件"
+
+#: template/setting.php:28 template/setting_parts_taxonomy.php:47
+msgid "Set the number posts"
+msgstr "表示数設定"
+
+#: template/setting.php:40
+msgid "Categories setting"
+msgstr "カテゴリー設定"
+
+#: template/setting.php:41
+msgid "Tags setting"
+msgstr "タグ設定"
+
+#: template/setting.php:42
+msgid "Custom Taxonomies setting"
+msgstr "カスタム分類設定"
+
+#: template/setting_parts_taxonomy.php:3
+msgid "Targets"
+msgstr "対象"
+
+#: template/setting_parts_taxonomy.php:37
+msgid "Follow global settings"
+msgstr "全体設定に従う"
+
+#: template/setting_post_custom_field.php:18
+msgid "* Change from custom field"
+msgstr "※カスタムフィールドから変更してください"
+
+#: template/success.php:2
+msgid "Saved the setting"
+msgstr "設定を保存しました"
+
+#, fuzzy
+#~| msgid "Search"
+#~ msgid "Search!!!"
+#~ msgstr "検索"
diff --git a/readme.txt b/readme.txt
index de24c50..b9109ed 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,13 +4,20 @@ Tags: latest posts order,categories post order,tags post order,custom taxonomy p
Requires at least: 4.9
Tested up to: 5.7.2
Requires PHP: 7.0
-Stable tag: 1.1.6
+Stable tag: 1.1.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
+A plugin that sets the display order of posts.
投稿の表示順を設定するプラグイン。
== Description ==
+This plugin is a plugin that customizes the posting order below.
+- Your latest posts / Settings - Reading Settings
+- Search results
+- Category
+- Tag
+- Custom Taxonomy
このプラグインは、下記の投稿表示順をカスタマイズするプラグインです。
・[設定]-[表示設定]の「最新の投稿」
@@ -19,11 +26,19 @@ License URI: https://www.gnu.org/licenses/gpl-2.0.html
・タグ
・カスタム分類
-= 仕様 =
+= Specification =
+Select either 1) standard + custom field sort or 2) drag sort for the display order.
+
[設定]-[表示設定]の「最新の投稿」、検索結果、カテゴリー、タグ、カスタム分類毎に投稿表示順を設定可能にします。
表示順は 1)標準+カスタムフィールドソート、2)ドラッグソートのどちらを選択します。
-1)標準+カスタムフィールドソート
+1)Standard + custom field sort (標準+カスタムフィールドソート)
+In addition to the post update date, ID, title, and registration date, 4 custom fields (*) can be registered.
+Select the post you want to enable and drag to set the order.
+
+*) Custom fields can be selected from existing custom fields or added for this plugin.
+*) When this plug-in is deleted, the added custom field will also be deleted.
+
投稿の更新日、ID、タイトル、登録日に加え、4つのカスタムフィールド(※)が登録可能です。
有効にしたい項目を選択しドラッグで順番を設定します。
@@ -31,20 +46,26 @@ License URI: https://www.gnu.org/licenses/gpl-2.0.html
(追加の場合は各投稿の専用入力フォームから登録します)
※)本プラグインの削除時は、追加したカスタムフィールドも削除されます
-2)ドラッグソート
-リスト表示されてた投稿一覧で、投稿をドラッグし表示順を設定します。
+2)Drag sort (ドラッグソート)
+In the list of posts displayed in the list, drag the posts to set the display order.
+リスト表示されてた投稿一覧で、投稿をドラッグし表示順を設定します。
== Installation ==
-= 自動インストール =
-1. プラグインの検索フィールドより「Archive Post Order Plus」と入力し、"プラグインの検索"をクリックします。
-2. 当プラグインを見つけたら、"今すぐインストール"をクリックしてインストールし、プラグインを有効化してください。
+= Automatic installation (自動インストール) =
+1. Enter "Archive Post Order Plus" in the plugin search field and click "Search for Plugins".
+2. If you find this plugin, click "Install Now" to install it and activate the plugin.
-= 手動インストール =
-1. プラグインをダウンロードします。
-2. プラグインフォルダ内にアップロードし、管理画面よりプラグインを有効化してください。
+1)プラグインの検索フィールドより「Archive Post Order Plus」と入力し、"プラグインの検索"をクリックします。
+2)当プラグインを見つけたら、"今すぐインストール"をクリックしてインストールし、プラグインを有効化してください。
+= Manual installation (手動インストール) =
+1. Download this plugin.
+2. Please upload it in the plugin folder and activate the plugin from the management screen.
+
+1)プラグインをダウンロードします。
+2)プラグインフォルダ内にアップロードし、管理画面よりプラグインを有効化してください。
== Frequently Asked Questions ==
@@ -61,36 +82,57 @@ screenshot-8.png
== Changelog ==
-= 1.0.0 =
-初回リリース
+= 1.1.7 =
+Supports translation.
+Bug fixed: custom field selection by Search
-= 1.0.1 =
-検索のソート対象にカスタム投稿を追加
+翻訳対応
+検索のカスタムフィールド選択バグの修正
+
+= 1.1.6 =
+Fixed the part where the notice error occurred when the initial data was not set.
+初期データ未設定時にnoticeエラーになっていた箇所を修正
+
+= 1.1.5 =
+Smartphone support for drag sorting of posted articles.
+投稿記事のドラッグ並べ替えのスマートフォン対応
+
+= 1.1.4 =
+Explicitly include jquery-ui-autocomplete.
+jquery-ui-autocompleteを明示的にインクルード
+
+= 1.1.3 =
+Change selected custom field to autocomplete.
+選択カスタムフィールドをオートコンプリートに変更
+
+= 1.1.2 =
+Fixed selected custom fields to be read-only.
+選択カスタムフィールドを読み取り専用表示するよう修正
+
+= 1.1.1 =
+Bug fixed: Fixed missing addition of selected attribute of custom field.
+バグ修正:カスタムフィールドのselected属性の追加漏れ修正
= 1.1.0 =
+Fixed mandatory check omissions for custom fields.
+Fixed existing custom field selection.
+Set background color in sort list.
+Fixed refresh button position on sort settings page.
+Fixed the order of radio buttons for sorting by category, tag, and custom taxonomies to be the same as standard and search.
+
カスタムフィールドの必須チェック漏れの修正
既存カスタムフィールド選択も可能なよう修正
ソートのリストに背景色を設定
並べ替え設定ページの更新ボタン位置を修正
カテゴリー、タグ、カスタム分類のソート対象選択のラジオボタン並び順を標準、検索と同一になるよう修正
-= 1.1.1 =
-バグ修正:カスタムフィールドのselected属性の追加漏れ修正
+= 1.0.1 =
+Add custom posts to search sort.
+検索のソート対象にカスタム投稿を追加
-= 1.1.2 =
-選択カスタムフィールドを読み取り専用表示するよう修正
-
-= 1.1.3 =
-選択カスタムフィールドをオートコンプリートに変更
-
-= 1.1.4 =
-jquery-ui-autocompleteを明示的にインクルード
-
-= 1.1.5 =
-投稿記事のドラッグ並べ替えのスマートフォン対応
-
-= 1.1.6 =
-初期データ未設定時にnoticeエラーになっていた箇所を修正
+= 1.0.0 =
+First lease.
+初回リリース
== Upgrade Notice ==
No information
\ No newline at end of file
diff --git a/template/order.php b/template/order.php
index 8821ffb..bb7cea7 100644
--- a/template/order.php
+++ b/template/order.php
@@ -1,15 +1,15 @@
-
-
並べ替え
+
+