Plugin Directory

Changeset 3005355


Ignore:
Timestamp:
12/05/2023 01:52:35 AM (2 years ago)
Author:
enomoto celtislab
Message:

ver4.1.0 Added Ajax acceleration filter (Features for plugin developers)

Location:
plugin-load-filter/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • plugin-load-filter/trunk/languages/plf-ja.po

    r2674033 r3005355  
    33"Project-Id-Version: plf\n"
    44"POT-Creation-Date: 2020-08-04 05:11+0000\n"
    5 "PO-Revision-Date: 2022-02-07 02:57+0000\n"
     5"PO-Revision-Date: 2023-12-01 08:28+0000\n"
    66"Last-Translator: \n"
    77"Language-Team: 日本語\n"
     
    1919"X-Loco-Version: 2.4.0; wp-5.4.2"
    2020
    21 #: plugin-load-filter.php:704
     21#: plugin-load-filter.php:722
    2222msgid ""
    2323"* Plugins with `Page Type Filter` selected are blocked, but you can Activate "
     
    2828"有効プラグイン登録やシングルページ毎の設定等で、様々なタイプ毎に有効化するプラグインを選択できます"
    2929
    30 #: plugin-load-filter.php:696
     30#: plugin-load-filter.php:714
    3131msgid "<strong>Admin Type</strong> - If you only use plugins for Admin pages."
    3232msgstr "<strong>Admin Type</strong> - 管理用ページのみで使用するプラグインとして設定"
    3333
    34 #: plugin-load-filter.php:707
     34#: plugin-load-filter.php:725
    3535msgid ""
    3636"<strong>Exclude Post Format Type</strong> - Choose Post Format Type you are "
     
    4040"有効プラグイン登録画面の項目件名から除外出来ます"
    4141
    42 #: plugin-load-filter.php:695
     42#: plugin-load-filter.php:713
    4343msgid "<strong>Normal</strong> - Exclude plugin from Page Type filter"
    4444msgstr "<strong>Normal</strong> - Page Type フィルタの対象ではないプラグイン"
    4545
    46 #: plugin-load-filter.php:697
     46#: plugin-load-filter.php:715
    4747msgid ""
    4848"<strong>Page Type</strong> - If you want to activate or deactivate plugins "
     
    5050msgstr "<strong>Page Type</strong> - ページタイプ毎や単一ページ毎に有効 / 停止するプラグインとして設定"
    5151
    52 #: plugin-load-filter.php:721
     52#: plugin-load-filter.php:745
    5353msgid ""
    5454"A very simple multilingual feature that uses MO translation files for the "
     
    5656msgstr "とってもシンプルな多言語機能で 投稿/固定ページ毎に指定した言語ロケールに応じた翻訳ファイルを使用します"
    5757
    58 #: plugin-load-filter.php:899
     58#: plugin-load-filter.php:925
    5959msgid "Activate Plugin Entry &raquo;"
    6060msgstr "有効化プラグイン登録 &raquo;"
    6161
    62 #: plugin-load-filter.php:701
     62#: plugin-load-filter.php:719
    6363msgid "Add a link to admin bar for displaying the plugins filtered status"
    6464msgstr "管理バーにプラグインのフィルタリング状態を表示するためのリンクを表示"
    6565
    66 #: plugin-load-filter.php:640
     66#: plugin-load-filter.php:658
    6767msgid "Admin Type"
    6868msgstr ""
    6969
    70 #: plugin-load-filter.php:779
     70#: plugin-load-filter.php:742
     71msgid "Ajax acceleration filter"
     72msgstr "Ajax 高速化フィルタ"
     73
     74#: plugin-load-filter.php:738
     75msgid "Ajax acceleration filter (Features for plugin developers)"
     76msgstr "Ajax 高速化フィルタ(プラグイン開発者向け機能)"
     77
     78#: plugin-load-filter.php:803
    7179msgid "Archive page"
    7280msgstr "アーカイブページ"
    7381
    74 #: plugin-load-filter.php:781
     82#: plugin-load-filter.php:805
    7583msgid "Attachment page"
    7684msgstr "添付ページ"
    7785
    78 #: plugin-load-filter.php:880 plugin-load-filter.php:898
     86#: plugin-load-filter.php:904 plugin-load-filter.php:924
    7987msgid "Clear"
    8088msgstr "クリア"
    8189
    82 #: plugin-load-filter.php:808
     90#: plugin-load-filter.php:832
    8391msgid "Custom Post : "
    8492msgstr "カスタムポスト : "
    8593
    86 #: plugin-load-filter.php:776 plugin-load-filter.php:962
     94#: plugin-load-filter.php:800 plugin-load-filter.php:988
    8795msgid "Desktop Device"
    8896msgstr "デスクトップデバイス"
     
    98106msgstr ""
    99107
    100 #: plugin-load-filter.php:881
     108#: plugin-load-filter.php:905
    101109msgid "Filter Entry &raquo;"
    102110msgstr "フィルター登録 &raquo;"
    103111
    104 #: plugin-load-filter.php:872
     112#: plugin-load-filter.php:896
    105113msgid "Filter Registration"
    106114msgstr "フィルター登録"
    107115
    108 #: plugin-load-filter.php:272
     116#: plugin-load-filter.php:276
    109117msgid "General Settings"
    110118msgstr "一般的な設定"
    111119
    112 #: plugin-load-filter.php:778
     120#: plugin-load-filter.php:802
    113121msgid "Home/Front-page"
    114122msgstr "ホーム/フロントページ"
     
    122130msgstr "https://celtislab.net/wp-plugin-load-filter"
    123131
    124 #: plugin-load-filter.php:730
     132#: plugin-load-filter.php:739
     133msgid ""
     134"If you are implementing Ajax requests in your plugin development, you can "
     135"deactivate unnecessary plugins and speed up Ajax by setting the plugin slugs "
     136"to be activated to `_ajax_plf` in the request data."
     137msgstr ""
     138"プラグイン開発で Ajax リクエストを実装している場合、リクエスト データ内で有効化するプラグイン スラグを `_ajax_plf` "
     139"に設定することで、不要なプラグインを無効化し、Ajax を高速化することができます"
     140
     141#: plugin-load-filter.php:754
    125142msgid "Introduction of Addon"
    126143msgstr "アドオンのご案内"
    127144
    128 #: plugin-load-filter.php:737
     145#: plugin-load-filter.php:761
    129146msgid "Introduction of Realtime Image Optimizer"
    130147msgstr "画像最適化プラグインのご案内"
    131148
    132 #: plugin-load-filter.php:1062
     149#: plugin-load-filter.php:1088
    133150msgid "Language of this post"
    134151msgstr "この投稿の言語"
    135152
    136 #: plugin-load-filter.php:724
     153#: plugin-load-filter.php:748
    137154msgid "Language switching per post"
    138155msgstr "投稿毎の言語ロケール切替え"
    139156
    140 #: plugin-load-filter.php:777 plugin-load-filter.php:963
     157#: plugin-load-filter.php:801 plugin-load-filter.php:989
    141158msgid "Mobile Device"
    142159msgstr "モバイルデバイス"
    143160
    144 #: plugin-load-filter.php:639
     161#: plugin-load-filter.php:657
    145162msgid "Normal"
    146163msgstr ""
    147164
    148 #: plugin-load-filter.php:1033
     165#: plugin-load-filter.php:1059
    149166msgid "Not Use"
    150167msgstr "使用しない"
    151168
    152 #: plugin-load-filter.php:1074
     169#: plugin-load-filter.php:1100
    153170msgid "Original post ID for hreflang"
    154171msgstr "元記事 Post ID(hreflang 用)"
    155172
    156 #: plugin-load-filter.php:782
     173#: plugin-load-filter.php:806
    157174msgid "Page"
    158175msgstr "固定ページ"
    159176
    160 #: plugin-load-filter.php:905 plugin-load-filter.php:957
     177#: plugin-load-filter.php:931 plugin-load-filter.php:983
    161178msgid "Page Filter is not registered"
    162179msgstr "Page Filter にプラグインが登録されていません"
    163180
    164 #: plugin-load-filter.php:641
     181#: plugin-load-filter.php:659
    165182msgid "Page Type"
    166183msgstr ""
    167184
    168 #: plugin-load-filter.php:873
     185#: plugin-load-filter.php:897
    169186msgid "Page Type Activation"
    170187msgstr "Page Type 有効プラグイン登録"
    171188
    172 #: plugin-load-filter.php:585 plugin-load-filter.php:694
     189#: plugin-load-filter.php:603 plugin-load-filter.php:712
    173190msgid "Page Type Filter"
    174191msgstr "Page Type フィルタ"
    175192
    176 #: plugin-load-filter.php:1038
     193#: plugin-load-filter.php:1064
    177194msgid "Plugin Activate/Deactivate filter for this Post only"
    178195msgstr "この投稿のみに適用するプラグインの有効/停止フィルタ"
    179196
    180 #: plugin-load-filter.php:1032
     197#: plugin-load-filter.php:1058
    181198msgid "Plugin filter for Single post"
    182199msgstr "シングルページ用プラグインフィルタ"
    183200
    184 #: plugin-load-filter.php:271 plugin-load-filter.php:921
     201#: plugin-load-filter.php:275 plugin-load-filter.php:947
    185202msgid "Plugin Load Filter"
    186203msgstr ""
     
    190207msgstr ""
    191208
    192 #: plugin-load-filter.php:1234
     209#: plugin-load-filter.php:1260
    193210msgid ""
    194211"Plugin Load Filter setting has been updated.\\nClick OK to reload the page."
    195212msgstr "Plugin Load Filterの設定を更新しました\\n OK をクリックするとページをリロードします"
    196213
    197 #: plugin-load-filter.php:868
     214#: plugin-load-filter.php:892
    198215msgid "Plugin Load Filter Settings"
    199216msgstr "プラグインロードフィルター設定"
    200217
    201 #: plugin-load-filter.php:866
     218#: plugin-load-filter.php:890
    202219msgid "Plugin Load Filter Settings\\nClick OK to clear it."
    203220msgstr "プラグインロードフィルター\\nOKをクリックすると設定をクリアします"
    204221
    205 #: plugin-load-filter.php:783 plugin-load-filter.php:796
     222#: plugin-load-filter.php:807 plugin-load-filter.php:820
    206223msgid "Post : "
    207224msgstr "投稿フォーマット : "
    208225
    209 #: plugin-load-filter.php:720
     226#: plugin-load-filter.php:744
    210227msgid "Post Language Locale"
    211228msgstr "投稿毎の言語ロケール"
    212229
    213 #: plugin-load-filter.php:780
     230#: plugin-load-filter.php:804
    214231msgid "Search page"
    215232msgstr "検索結果ページ"
    216233
    217 #: plugin-load-filter.php:732 plugin-load-filter.php:739
     234#: plugin-load-filter.php:756 plugin-load-filter.php:763
    218235msgid "See more information "
    219236msgstr "詳細情報の参照"
    220237
    221 #: plugin-load-filter.php:894
     238#: plugin-load-filter.php:919
    222239msgid ""
    223240"Select plugins to be activated for each page type by clicking on <span "
     
    228245"dashicons-admin-plugins\"></span> マークをクリックして指定します"
    229246
    230 #: plugin-load-filter.php:783
     247#: plugin-load-filter.php:807
    231248msgid "Standard"
    232249msgstr "標準"
    233250
    234 #: plugin-load-filter.php:731
     251#: plugin-load-filter.php:755
    235252msgid ""
    236253"Thank you for using Plugin Load Filter. We offer URL filtering as Addon. "
     
    240257"Filterをご利用いただきありがとうございます。アドオンとしてURLフィルタリング機能を提供しております。アドオンのご利用をご検討ください"
    241258
    242 #: plugin-load-filter.php:583
     259#: plugin-load-filter.php:601
    243260msgid "URL Group Filter"
    244261msgstr "URL グループフィルタ"
    245262
    246 #: plugin-load-filter.php:1034
     263#: plugin-load-filter.php:1060
    247264msgid "Use"
    248265msgstr "使用する"
    249266
    250 #: plugin-load-filter.php:1102
     267#: plugin-load-filter.php:1128
    251268msgid ""
    252269"Use MO translation file for the selected locale. When Original Post ID is "
     
    257274"`hreflang` メタデータグループとして扱われます"
    258275
    259 #: plugin-load-filter.php:738
     276#: plugin-load-filter.php:762
    260277#| msgid ""
    261278#| "We also sell image optimization plug-ins. Reduce and speed up data size "
     
    266283msgstr "画像最適化プラグインを販売しています。 WebP / AVIFに変換することにより、データサイズを縮小して高速化します"
    267284
    268 #: plugin-load-filter.php:802
     285#: plugin-load-filter.php:826
    269286msgid "WordPress Embed Content Card (API)"
    270287msgstr "WordPress 埋め込みコンテンツカード (API)"
    271288
    272 #: plugin-load-filter.php:895
     289#: plugin-load-filter.php:921
    273290msgid ""
    274291"You can also select plugins to activate from Post/Page content editing "
  • plugin-load-filter/trunk/languages/plf.pot

    r2674033 r3005355  
    33msgstr ""
    44"Project-Id-Version: plf\n"
    5 "POT-Creation-Date: 2022-02-07 02:53+0000\n"
     5"POT-Creation-Date: 2023-12-01 08:23+0000\n"
    66"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    77"Last-Translator: Yasunari Enomoto <[email protected]>\n"
     
    1818"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;"
    1919
    20 #: plugin-load-filter.php:704
     20#: plugin-load-filter.php:722
    2121msgid ""
    2222"* Plugins with `Page Type Filter` selected are blocked, but you can Activate "
     
    2525msgstr ""
    2626
    27 #: plugin-load-filter.php:696
     27#: plugin-load-filter.php:714
    2828msgid "<strong>Admin Type</strong> - If you only use plugins for Admin pages."
    2929msgstr ""
    3030
    31 #: plugin-load-filter.php:707
     31#: plugin-load-filter.php:725
    3232msgid ""
    3333"<strong>Exclude Post Format Type</strong> - Choose Post Format Type you are "
     
    3535msgstr ""
    3636
    37 #: plugin-load-filter.php:695
     37#: plugin-load-filter.php:713
    3838msgid "<strong>Normal</strong> - Exclude plugin from Page Type filter"
    3939msgstr ""
    4040
    41 #: plugin-load-filter.php:697
     41#: plugin-load-filter.php:715
    4242msgid ""
    4343"<strong>Page Type</strong> - If you want to activate or deactivate plugins "
     
    4545msgstr ""
    4646
    47 #: plugin-load-filter.php:721
     47#: plugin-load-filter.php:745
    4848msgid ""
    4949"A very simple multilingual feature that uses MO translation files for the "
     
    5151msgstr ""
    5252
    53 #: plugin-load-filter.php:899
     53#: plugin-load-filter.php:925
    5454msgid "Activate Plugin Entry &raquo;"
    5555msgstr ""
    5656
    57 #: plugin-load-filter.php:701
     57#: plugin-load-filter.php:719
    5858msgid "Add a link to admin bar for displaying the plugins filtered status"
    5959msgstr ""
    6060
    61 #: plugin-load-filter.php:640
     61#: plugin-load-filter.php:658
    6262msgid "Admin Type"
    6363msgstr ""
    6464
    65 #: plugin-load-filter.php:779
     65#: plugin-load-filter.php:742
     66msgid "Ajax acceleration filter"
     67msgstr ""
     68
     69#: plugin-load-filter.php:738
     70msgid "Ajax acceleration filter (Features for plugin developers)"
     71msgstr ""
     72
     73#: plugin-load-filter.php:803
    6674msgid "Archive page"
    6775msgstr ""
    6876
    69 #: plugin-load-filter.php:781
     77#: plugin-load-filter.php:805
    7078msgid "Attachment page"
    7179msgstr ""
    7280
    73 #: plugin-load-filter.php:880 plugin-load-filter.php:898
     81#: plugin-load-filter.php:904 plugin-load-filter.php:924
    7482msgid "Clear"
    7583msgstr ""
    7684
    77 #: plugin-load-filter.php:808
     85#: plugin-load-filter.php:832
    7886msgid "Custom Post : "
    7987msgstr ""
    8088
    81 #: plugin-load-filter.php:776 plugin-load-filter.php:962
     89#: plugin-load-filter.php:800 plugin-load-filter.php:988
    8290msgid "Desktop Device"
    8391msgstr ""
     
    93101msgstr ""
    94102
    95 #: plugin-load-filter.php:881
     103#: plugin-load-filter.php:905
    96104msgid "Filter Entry &raquo;"
    97105msgstr ""
    98106
    99 #: plugin-load-filter.php:872
     107#: plugin-load-filter.php:896
    100108msgid "Filter Registration"
    101109msgstr ""
    102110
    103 #: plugin-load-filter.php:272
     111#: plugin-load-filter.php:276
    104112msgid "General Settings"
    105113msgstr ""
    106114
    107 #: plugin-load-filter.php:778
     115#: plugin-load-filter.php:802
    108116msgid "Home/Front-page"
    109117msgstr ""
     
    117125msgstr ""
    118126
    119 #: plugin-load-filter.php:730
     127#: plugin-load-filter.php:739
     128msgid ""
     129"If you are implementing Ajax requests in your plugin development, you can "
     130"deactivate unnecessary plugins and speed up Ajax by setting the plugin slugs "
     131"to be activated to `_ajax_plf` in the request data."
     132msgstr ""
     133
     134#: plugin-load-filter.php:754
    120135msgid "Introduction of Addon"
    121136msgstr ""
    122137
    123 #: plugin-load-filter.php:737
     138#: plugin-load-filter.php:761
    124139msgid "Introduction of Realtime Image Optimizer"
    125140msgstr ""
    126141
    127 #: plugin-load-filter.php:1062
     142#: plugin-load-filter.php:1088
    128143msgid "Language of this post"
    129144msgstr ""
    130145
    131 #: plugin-load-filter.php:724
     146#: plugin-load-filter.php:748
    132147msgid "Language switching per post"
    133148msgstr ""
    134149
    135 #: plugin-load-filter.php:777 plugin-load-filter.php:963
     150#: plugin-load-filter.php:801 plugin-load-filter.php:989
    136151msgid "Mobile Device"
    137152msgstr ""
    138153
    139 #: plugin-load-filter.php:639
     154#: plugin-load-filter.php:657
    140155msgid "Normal"
    141156msgstr ""
    142157
    143 #: plugin-load-filter.php:1033
     158#: plugin-load-filter.php:1059
    144159msgid "Not Use"
    145160msgstr ""
    146161
    147 #: plugin-load-filter.php:1074
     162#: plugin-load-filter.php:1100
    148163msgid "Original post ID for hreflang"
    149164msgstr ""
    150165
    151 #: plugin-load-filter.php:782
     166#: plugin-load-filter.php:806
    152167msgid "Page"
    153168msgstr ""
    154169
    155 #: plugin-load-filter.php:905 plugin-load-filter.php:957
     170#: plugin-load-filter.php:931 plugin-load-filter.php:983
    156171msgid "Page Filter is not registered"
    157172msgstr ""
    158173
    159 #: plugin-load-filter.php:641
     174#: plugin-load-filter.php:659
    160175msgid "Page Type"
    161176msgstr ""
    162177
    163 #: plugin-load-filter.php:873
     178#: plugin-load-filter.php:897
    164179msgid "Page Type Activation"
    165180msgstr ""
    166181
    167 #: plugin-load-filter.php:585 plugin-load-filter.php:694
     182#: plugin-load-filter.php:603 plugin-load-filter.php:712
    168183msgid "Page Type Filter"
    169184msgstr ""
    170185
    171 #: plugin-load-filter.php:1038
     186#: plugin-load-filter.php:1064
    172187msgid "Plugin Activate/Deactivate filter for this Post only"
    173188msgstr ""
    174189
    175 #: plugin-load-filter.php:1032
     190#: plugin-load-filter.php:1058
    176191msgid "Plugin filter for Single post"
    177192msgstr ""
    178193
    179 #: plugin-load-filter.php:271 plugin-load-filter.php:921
     194#: plugin-load-filter.php:275 plugin-load-filter.php:947
    180195msgid "Plugin Load Filter"
    181196msgstr ""
     
    185200msgstr ""
    186201
    187 #: plugin-load-filter.php:1234
     202#: plugin-load-filter.php:1260
    188203msgid ""
    189204"Plugin Load Filter setting has been updated.\\nClick OK to reload the page."
    190205msgstr ""
    191206
    192 #: plugin-load-filter.php:868
     207#: plugin-load-filter.php:892
    193208msgid "Plugin Load Filter Settings"
    194209msgstr ""
    195210
    196 #: plugin-load-filter.php:866
     211#: plugin-load-filter.php:890
    197212msgid "Plugin Load Filter Settings\\nClick OK to clear it."
    198213msgstr ""
    199214
    200 #: plugin-load-filter.php:783 plugin-load-filter.php:796
     215#: plugin-load-filter.php:807 plugin-load-filter.php:820
    201216msgid "Post : "
    202217msgstr ""
    203218
    204 #: plugin-load-filter.php:720
     219#: plugin-load-filter.php:744
    205220msgid "Post Language Locale"
    206221msgstr ""
    207222
    208 #: plugin-load-filter.php:780
     223#: plugin-load-filter.php:804
    209224msgid "Search page"
    210225msgstr ""
    211226
    212 #: plugin-load-filter.php:732 plugin-load-filter.php:739
     227#: plugin-load-filter.php:756 plugin-load-filter.php:763
    213228msgid "See more information "
    214229msgstr ""
    215230
    216 #: plugin-load-filter.php:894
     231#: plugin-load-filter.php:919
    217232msgid ""
    218233"Select plugins to be activated for each page type by clicking on <span "
     
    221236msgstr ""
    222237
    223 #: plugin-load-filter.php:783
     238#: plugin-load-filter.php:807
    224239msgid "Standard"
    225240msgstr ""
    226241
    227 #: plugin-load-filter.php:731
     242#: plugin-load-filter.php:755
    228243msgid ""
    229244"Thank you for using Plugin Load Filter. We offer URL filtering as Addon. "
     
    231246msgstr ""
    232247
    233 #: plugin-load-filter.php:583
     248#: plugin-load-filter.php:601
    234249msgid "URL Group Filter"
    235250msgstr ""
    236251
    237 #: plugin-load-filter.php:1034
     252#: plugin-load-filter.php:1060
    238253msgid "Use"
    239254msgstr ""
    240255
    241 #: plugin-load-filter.php:1102
     256#: plugin-load-filter.php:1128
    242257msgid ""
    243258"Use MO translation file for the selected locale. When Original Post ID is "
     
    246261msgstr ""
    247262
    248 #: plugin-load-filter.php:738
     263#: plugin-load-filter.php:762
    249264msgid ""
    250265"We sell Image Optimization plugin. Reduce and speed up data size by "
     
    252267msgstr ""
    253268
    254 #: plugin-load-filter.php:802
     269#: plugin-load-filter.php:826
    255270msgid "WordPress Embed Content Card (API)"
    256271msgstr ""
    257272
    258 #: plugin-load-filter.php:895
     273#: plugin-load-filter.php:921
    259274msgid ""
    260275"You can also select plugins to activate from Post/Page content editing "
  • plugin-load-filter/trunk/mu-plugins/plf-filter.php

    r2981485 r3005355  
    33  Plugin Name: plugin load filter [plf-filter]
    44  Description: Dynamically activated only plugins that you have selected in each page. [Note] plf-filter has been automatically installed / deleted by Activate / Deactivate of "load filter plugin".
    5   Version: 4.0.17
     5  Version: 4.1.0
    66  Plugin URI: http://celtislab.net/en/wp-plugin-load-filter
    77  Author: enomoto@celtislab
     
    4444function wp_get_current_user() {
    4545    if ( ! function_exists( 'wp_set_current_user' ) ){
    46         /*
    4746        if ( defined( 'LOGGED_IN_COOKIE' ) && !empty( $_COOKIE[ LOGGED_IN_COOKIE ] ) ) {
    4847            $cookie_elements = explode( '|', $_COOKIE[ LOGGED_IN_COOKIE ] );
     
    7069            }
    7170        }
    72          */
    7371        //ver4.0.17 fixed https://wordpress.org/support/topic/wp_get_current_user-is-overridden/
    7472        //return 0;
     
    233231          <div><textarea id="plf-filtered-result" style="width:100%; height:320px; margin:5px 0;"><?php echo $text; ?></textarea></div>
    234232          <div class="button-group">
    235             <a href="#" id="plf-status-close" class="button" aria-label="Close modal"><?php _e('Close'); ?></a>
     233            <a href="#" id="plf-status-close" class="button" aria-label="Close modal">Close</a>
    236234          </div>
    237235      </div>
     
    556554                        $args->query_vars[$wpvar] = $args->extra_query_vars[$wpvar];
    557555                    } elseif ( isset( $_GET[ $wpvar ] ) && isset( $_POST[ $wpvar ] ) && $_GET[ $wpvar ] !== $_POST[ $wpvar ] ) {
    558                         wp_die( __( 'A variable mismatch has been detected.' ), __( 'Sorry, you are not allowed to view this item.' ), 400 );                       
     556                        wp_die( 'A variable mismatch has been detected.', 'Sorry, you are not allowed to view this item.', 400 );                       
    559557                    } elseif ( isset( $_POST[$wpvar] ) ){
    560558                        $args->query_vars[$wpvar] = $_POST[$wpvar];
     
    861859        return $new_plugins;
    862860    }
     861
     862    /**
     863     * Get valid plugins list for ajax acceleration filter
     864     * @param $p_slugs  : ajax _ajax_plf activate plugins slug data (Separate multiple with commas)
     865     * @param $option   : option data eg. 'active_plugins', 'active_sitewide_plugins', 'jetpack_active_modules' ...
     866     * @param $plugins  : active plugins values before filtering
     867     * @return data values after filtering
     868     */
     869    static function ajaxfilter_to_active_plugins( $p_slugs, $option, $plugins ){
     870        //照合用にカンマ区切りをスラッシュ区切りへ変換
     871        $arslugs = array_filter( array_map("trim", explode(',', $p_slugs)));
     872        $slugs   = '/' . implode('/', $arslugs) . '/';
     873       
     874        $new_plugins = array();
     875        foreach ( $plugins as $item ) {
     876            if(!empty($item)){
     877                $unload = false;
     878                $p_key  = self::plugin_keygen( $item, $option );
     879                $sep    = strpos($p_key, '/' );
     880                $p_slug = ($sep !== false)? substr($p_key, 0, $sep) : $p_key;
     881                if(false === strpos($slugs, "/$p_slug/")){
     882                    $unload = true;
     883                }
     884                if(!$unload) {
     885                    if($option === 'active_sitewide_plugins'){
     886                        $new_plugins[$item] = $item;
     887                    } else {
     888                        $new_plugins[] = $item;
     889                    }
     890                }               
     891            }
     892        }
     893        return $new_plugins;
     894    }
    863895   
    864896    //Plugin Load Filter Main (active plugins/modules filtering)
     
    10651097            if(strpos($parse_url['path'], '/plugins.php' ) !== false || strpos($parse_url['path'], '/update-core.php' ) !== false){
    10661098                return false;
     1099            }
     1100            //Ajax acceleration plugin filter (for plugin developers)
     1101            if(!empty($action) && !empty(self::$filter['ajax_accelfilter'])){
     1102                $slugs  = (isset($_REQUEST['_ajax_plf']))? wp_kses( stripslashes($_REQUEST['_ajax_plf']), 'strip' ) : '';
     1103                if(!empty($slugs)){
     1104                    $referer = (!empty( $_SERVER['HTTP_REFERER'] )) ? wp_kses( stripslashes($_SERVER['HTTP_REFERER']), 'strip' ) : '';
     1105                    $parse_ref = parse_url($referer);
     1106                    if(!empty($parse_ref['host']) && strpos( home_url(), $parse_ref['host'] ) !== false){
     1107                        $new_plugins = self::ajaxfilter_to_active_plugins( $slugs, $option, $act_plugins );                       
     1108                        foreach ($new_plugins as $key) {
     1109                            if(!empty($key)){
     1110                                $key = self::plugin_keygen( $key, $option );
     1111                                self::$filtered_plugins[$key] = $key;                                   
     1112                            }
     1113                        }
     1114                        return $new_plugins;                       
     1115                    }
     1116                }
    10671117            }
    10681118            if(!empty(self::$s_url_filter)){
  • plugin-load-filter/trunk/plugin-load-filter.php

    r2981485 r3005355  
    33  Plugin Name: plugin load filter
    44  Description: Dynamically activate the selected plugins for each page. Response will be faster by filtering plugins.
    5   Version: 4.0.17
     5  Version: 4.1.0
    66  Plugin URI: https://celtislab.net/en/wp-plugin-load-filter
    77  Author: enomoto@celtislab
    88  Author URI: https://celtislab.net/
    99  Requires at least: 5.3
    10   Tested up to: 6.3
     10  Tested up to: 6.4
    1111  Requires PHP: 7.2
    1212  License: GPLv2
     
    173173    .dashicons-yes:before { font-size: 20px; border: 1px solid #eee; }
    174174    .device-type input.altcheckbox[type="checkbox"]:checked + span.dashicons-yes:before { background-color: yellowgreen; }
    175     .language-option { margin-bottom: 28px; }
     175    .option-item { margin-bottom: 28px; }
    176176    </style>
    177177    <?php }   
     
    273273    public function plf_option_menu() {
    274274        if(current_user_can( 'activate_plugins' )){
    275             $page = add_menu_page( 'Plugin Load FIlter Settings', __('Plugin Load Filter', 'plf'), 'manage_options', 'plugin_load_filter_admin_manage_page', array(&$this, 'plf_option_page'), 'dashicons-filter', '65.1');
    276             add_submenu_page( 'plugin_load_filter_admin_manage_page', 'Plugin Load FIlter Settings', __('General Settings', 'plf'), 'manage_options', 'plugin_load_filter_admin_manage_page', array(&$this, 'plf_option_page') );
     275            $page = add_menu_page( 'Plugin Load FIlter Settings', esc_html__('Plugin Load Filter', 'plf'), 'manage_options', 'plugin_load_filter_admin_manage_page', array(&$this, 'plf_option_page'), 'dashicons-filter', '65.1');
     276            add_submenu_page( 'plugin_load_filter_admin_manage_page', 'Plugin Load FIlter Settings', esc_html__('General Settings', 'plf'), 'manage_options', 'plugin_load_filter_admin_manage_page', array(&$this, 'plf_option_page') );
    277277            add_action( 'admin_print_scripts-'.$page, array(&$this, 'plf_scripts') );
    278278            add_action( 'admin_print_scripts-'.$page, array(&$this, 'deploy_mu_plugins'));
     
    394394                    self::$filter['language'] = (isset($_POST['plf_option']['language']))? 1 : 0;
    395395                   
     396                    //Ajax acceleration plugin filter (for plugin developers)
     397                    self::$filter['ajax_accelfilter'] = (isset($_POST['plf_option']['ajax_accelfilter']))? 1 : 0;
     398                   
    396399                    update_option('plf_option', self::$filter );
    397400                }
     
    421424                self::$filter['admin_bar'] = 0;
    422425                self::$filter['language'] = 0;
     426                self::$filter['ajax_accelfilter'] = 0;
    423427                update_option('plf_option', self::$filter );
    424428                header('Location: ' . admin_url('plugins.php?page=plugin_load_filter_admin_manage_page'));
     
    547551        return $html;
    548552    }
    549        
     553
     554    //安全な文字列から指定タグのみデコード(既存の翻訳ファイルへ影響せずにエスケープするために使用)
     555    //&lt;strong&gt;Type&lt;/strong&gt -> <strong>Type</strong>
     556    static function decode_safe_tag( $tag, $safe_str ) {
     557        $safe_str = preg_replace_callback( "|&lt;($tag.*)&gt;(.*)&lt;/($tag)&gt;|im", function($matches){
     558            $tag_attrs = str_replace( '&quot;', '"', $matches[1]);
     559            return '<' . $tag_attrs . '>' . $matches[2] . '</' . $matches[3] . '>';
     560        }, $safe_str);
     561        return $safe_str;
     562    }
     563   
    550564    public function plfregist_item($key, $chklist, $filter) {
    551565        $p_name = self::pluginkey_to_name($key);
     
    583597           ?>
    584598           <tr>
    585                <th class="filter-plugins-name" rowspan="2"><?php _e('Plugins'); ?></th>
     599               <th class="filter-plugins-name" rowspan="2"><?php esc_html_e('Plugins'); ?></th>
    586600               <?php if($urlnum > 0) { ?>
    587                  <th class="filter-type urlfilter" colspan="<?php echo $urlnum; ?>" style="font-weight:bold; font-size:smaller;"><?php _e('URL Group Filter', 'plf'); ?></th>
     601                 <th class="filter-type urlfilter" colspan="<?php echo $urlnum; ?>" style="font-weight:bold; font-size:smaller;"><?php esc_html_e('URL Group Filter', 'plf'); ?></th>
    588602               <?php } ?>
    589                <th class="filter-type filter-tmpl" colspan="3" style="font-weight:bold; font-size:smaller;"><?php _e('Page Type Filter', 'plf'); ?></th>
     603               <th class="filter-type filter-tmpl" colspan="3" style="font-weight:bold; font-size:smaller;"><?php esc_html_e('Page Type Filter', 'plf'); ?></th>
    590604           </tr>
    591605           <tr>
     
    641655                    }
    642656               } ?>
    643                <th class="filter-type filter-none"><span style="font-size:smaller"><?php _e('Normal', 'plf'); ?></span></th>
    644                <th class="filter-type filter-admin"><span style="font-size:smaller"><?php _e('Admin Type', 'plf'); ?></span></th>
    645                <th class="filter-type filter-tmpl"><span style="font-size:smaller"><?php _e('Page Type', 'plf'); ?></span></th>
     657               <th class="filter-type filter-none"><span style="font-size:smaller"><?php esc_html_e('Normal', 'plf'); ?></span></th>
     658               <th class="filter-type filter-admin"><span style="font-size:smaller"><?php esc_html_e('Admin Type', 'plf'); ?></span></th>
     659               <th class="filter-type filter-tmpl"><span style="font-size:smaller"><?php esc_html_e('Page Type', 'plf'); ?></span></th>
    646660           </tr>
    647661        </thead>
     
    696710    <div class="grid-row">
    697711      <div class="filter-description">
    698         <p><strong>[ <?php _e('Page Type Filter', 'plf'); ?> ]</strong></p>
    699         <?php _e('<strong>Normal</strong> - Exclude plugin from Page Type filter', 'plf'); ?><br />
    700         <?php _e('<strong>Admin Type</strong> - If you only use plugins for Admin pages.', 'plf'); ?><br />
    701         <?php _e('<strong>Page Type</strong> - If you want to activate or deactivate plugins for each Page Type and Single page.', 'plf'); ?>
     712        <p><strong>[ <?php esc_html_e('Page Type Filter', 'plf'); ?> ]</strong></p>
     713        <?php echo self::decode_safe_tag( 'strong', esc_html__('<strong>Normal</strong> - Exclude plugin from Page Type filter', 'plf')); ?><br />
     714        <?php echo self::decode_safe_tag( 'strong', esc_html__('<strong>Admin Type</strong> - If you only use plugins for Admin pages.', 'plf')); ?><br />
     715        <?php echo self::decode_safe_tag( 'strong', esc_html__('<strong>Page Type</strong> - If you want to activate or deactivate plugins for each Page Type and Single page.', 'plf')); ?>
    702716        <p>
    703717        <?php
    704718        $checked = (!empty(self::$filter['admin_bar']))? self::$filter['admin_bar'] : false;
    705         echo '<span class="admin-bar-option">' . self::checkbox("plf_option[admin_bar]", $checked, __('Add a link to admin bar for displaying the plugins filtered status', 'plf') ) . '</span>';
     719        echo '<span class="admin-bar-option">' . self::checkbox("plf_option[admin_bar]", $checked, esc_html__('Add a link to admin bar for displaying the plugins filtered status', 'plf') ) . '</span>';
    706720        ?>
    707721        </p>
    708         <p><?php _e('* Plugins with `Page Type Filter` selected are blocked, but you can Activate it for various Page type in the `Page Type Activation` and Single Page setting.', 'plf'); ?></p>
     722        <p><?php esc_html_e('* Plugins with `Page Type Filter` selected are blocked, but you can Activate it for various Page type in the `Page Type Activation` and Single Page setting.', 'plf'); ?></p>
    709723   
    710724        <div class="exclude-pformat">
    711             <p><?php _e('<strong>Exclude Post Format Type</strong> - Choose Post Format Type you are not using. To exclude from Page Type item subject.', 'plf'); ?></p>
     725            <p><?php echo self::decode_safe_tag( 'strong', esc_html__('<strong>Exclude Post Format Type</strong> - Choose Post Format Type you are not using. To exclude from Page Type item subject.', 'plf')); ?></p>
    712726            <?php
    713727            $html =  '<div>';
     
    722736            ?>
    723737        </div>
    724         <p><strong>[ <?php _e('Post Language Locale', 'plf'); ?> ]</strong></p>
    725         <p><?php _e('A very simple multilingual feature that uses MO translation files for the selected locale per Post/Page editing screen.','plf'); ?></p>
     738        <p><strong>[ <?php esc_html_e('Ajax acceleration filter (Features for plugin developers)', 'plf'); ?> ]</strong></p>
     739        <p><?php esc_html_e('If you are implementing Ajax requests in your plugin development, you can deactivate unnecessary plugins and speed up Ajax by setting the plugin slugs to be activated to `_ajax_plf` in the request data.','plf'); ?></p>
     740        <?php
     741            $checked = (!empty(self::$filter['ajax_accelfilter']))? self::$filter['ajax_accelfilter'] : false;
     742            echo '<div class="option-item">' . self::checkbox("plf_option[ajax_accelfilter]", $checked, esc_html__('Ajax acceleration filter', 'plf') ) . '</div>';
     743        ?>         
     744        <p><strong>[ <?php esc_html_e('Post Language Locale', 'plf'); ?> ]</strong></p>
     745        <p><?php esc_html_e('A very simple multilingual feature that uses MO translation files for the selected locale per Post/Page editing screen.','plf'); ?></p>
    726746        <?php
    727747            $checked = (!empty(self::$filter['language']))? self::$filter['language'] : false;
    728             echo '<div class="language-option">' . self::checkbox("plf_option[language]", $checked, __('Language switching per post', 'plf') ) . '</div>';
     748            echo '<div class="option-item">' . self::checkbox("plf_option[language]", $checked, esc_html__('Language switching per post', 'plf') ) . '</div>';
    729749        ?>         
    730750      </div>
     
    732752      <?php if(! is_plugin_active('plugin-load-filter-addon/plugin-load-filter-addon.php')){ ?>
    733753        <div style="background-color: #f0fff0; border:1px solid #70c370; padding:4px 20px; margin: 10px 0;" >
    734          <p><strong><?php _e('Introduction of Addon', 'plf'); ?></strong></p>
    735          <p><?php _e('Thank you for using Plugin Load Filter. We offer URL filtering as Addon. Please consider using Addon!', 'plf'); ?></p>
    736          <p><?php _e('See more information ', 'plf'); ?><a target="_blank" rel="noopener" href="https://celtislab.net/en/wp-plugin-load-filter-addon/"> Plugin Load Filter Addon</a></p>
     754         <p><strong><?php esc_html_e('Introduction of Addon', 'plf'); ?></strong></p>
     755         <p><?php esc_html_e('Thank you for using Plugin Load Filter. We offer URL filtering as Addon. Please consider using Addon!', 'plf'); ?></p>
     756         <p><?php esc_html_e('See more information ', 'plf'); ?><a target="_blank" rel="noopener" href="https://celtislab.net/en/wp-plugin-load-filter-addon/"> Plugin Load Filter Addon</a></p>
    737757        </div>
    738758      <?php } ?>
    739759      <?php if(! is_plugin_active('realtime-img-optimizer/realtime-img-optimizer.php')){ ?>
    740760        <div style="background-color: #f0fff0; border:1px solid #70c370; padding:4px 20px; margin: 10px 0;" >
    741          <p><strong><?php _e('Introduction of Realtime Image Optimizer', 'plf'); ?></strong></p>
    742          <p><?php _e('We sell Image Optimization plugin. Reduce and speed up data size by converting to WebP / AVIF.', 'plf'); ?></p>
    743          <p><?php _e('See more information ', 'plf'); ?><a target="_blank" rel="noopener" href="https://celtislab.net/en/wp-realtime-image-optimizer/"> Realtime Image Optimizer</a></p>
     761         <p><strong><?php esc_html_e('Introduction of Realtime Image Optimizer', 'plf'); ?></strong></p>
     762         <p><?php esc_html_e('We sell Image Optimization plugin. Reduce and speed up data size by converting to WebP / AVIF.', 'plf'); ?></p>
     763         <p><?php esc_html_e('See more information ', 'plf'); ?><a target="_blank" rel="noopener" href="https://celtislab.net/en/wp-realtime-image-optimizer/"> Realtime Image Optimizer</a></p>
    744764        </div>
    745765      <?php } ?>           
     
    777797    <table id="activation-table" class="widefat">
    778798        <thead>
    779            <tr><th class="plugins-name"><?php _e('Plugins'); ?></th>
    780                <th class="device-type"><span title="<?php _e('Desktop Device', 'plf'); ?>" class="dashicons dashicons-desktop"></span><br /><span style="font-size:xx-small">Desktop</span></th>
    781                <th class="device-type"><span title="<?php _e('Mobile Device', 'plf'); ?>" class="dashicons dashicons-smartphone"></span><br /><span style="font-size:xx-small">Mobile</span></th>
    782                <th class="ckbox-type"><span title="<?php _e('Home/Front-page', 'plf'); ?>" class="dashicons dashicons-admin-home"></span><br /><span style="font-size:xx-small">Home</span></th>
    783                <th class="ckbox-type"><span title="<?php _e('Archive page', 'plf'); ?>" class="dashicons dashicons-list-view"></span><br /><span style="font-size:xx-small">Archive</span></th>
    784                <th class="ckbox-type"><span title="<?php _e('Search page', 'plf'); ?>" class="dashicons dashicons-search"></span><br /><span style="font-size:xx-small">Search</span></th>
    785                <th class="ckbox-type"><span title="<?php _e('Attachment page', 'plf'); ?>" class="dashicons dashicons-media-default"></span><br /><span style="font-size:xx-small">Attach</span></th>
    786                <th class="ckbox-type"><span title="<?php _e('Page', 'plf'); ?>" class="dashicons dashicons-admin-page"></span><br /><span style="font-size:xx-small">Page</span></th>
    787                <th class="ckbox-type pformat"><span title="<?php _e('Post : ', 'plf'); _e('Standard', 'plf'); ?>" class="dashicons dashicons-admin-post"></span><br /><span style="font-size:xx-small">Post</span></th>
     799           <tr><th class="plugins-name"><?php esc_html_e('Plugins'); ?></th>
     800               <th class="device-type"><span title="<?php esc_html_e('Desktop Device', 'plf'); ?>" class="dashicons dashicons-desktop"></span><br /><span style="font-size:xx-small">Desktop</span></th>
     801               <th class="device-type"><span title="<?php esc_html_e('Mobile Device', 'plf'); ?>" class="dashicons dashicons-smartphone"></span><br /><span style="font-size:xx-small">Mobile</span></th>
     802               <th class="ckbox-type"><span title="<?php esc_html_e('Home/Front-page', 'plf'); ?>" class="dashicons dashicons-admin-home"></span><br /><span style="font-size:xx-small">Home</span></th>
     803               <th class="ckbox-type"><span title="<?php esc_html_e('Archive page', 'plf'); ?>" class="dashicons dashicons-list-view"></span><br /><span style="font-size:xx-small">Archive</span></th>
     804               <th class="ckbox-type"><span title="<?php esc_html_e('Search page', 'plf'); ?>" class="dashicons dashicons-search"></span><br /><span style="font-size:xx-small">Search</span></th>
     805               <th class="ckbox-type"><span title="<?php esc_html_e('Attachment page', 'plf'); ?>" class="dashicons dashicons-media-default"></span><br /><span style="font-size:xx-small">Attach</span></th>
     806               <th class="ckbox-type"><span title="<?php esc_html_e('Page', 'plf'); ?>" class="dashicons dashicons-admin-page"></span><br /><span style="font-size:xx-small">Page</span></th>
     807               <th class="ckbox-type pformat"><span title="<?php esc_html_e('Post : ', 'plf'); esc_html_e('Standard', 'plf'); ?>" class="dashicons dashicons-admin-post"></span><br /><span style="font-size:xx-small">Post</span></th>
    788808               <?php
    789809                $pformat = array('image', 'gallery', 'video', 'audio', 'aside', 'status', 'quote', 'link', 'chat' );
     
    798818                foreach ( $pformat as $type) {
    799819                    if(!in_array($type, $exclude)){
    800                         $title = __('Post : ', 'plf') . $type;
     820                        $title = esc_html__('Post : ', 'plf') . $type;
    801821                        $icon  = ($type === "link")? "dashicons-admin-links" : "dashicons-format-$type";
    802822                        echo '<th class="ckbox-type pformat"><span title="' . $title . '" class="dashicons ' . $icon .'"></span><br /><span style="font-size:xx-small">' . $type .'</span></th>';
     
    804824                }
    805825                if(function_exists('is_embed')){
    806                     $title = __('WordPress Embed Content Card (API)', 'plf');
     826                    $title = esc_html__('WordPress Embed Content Card (API)', 'plf');
    807827                    echo "<th class='ckbox-type tmpl-embed'><span title='$title' style='font-size:xx-small'>Embed Content</span></th>";
    808828                }
     
    810830                foreach ( $post_types as $post_type ) {
    811831                    if(!empty($post_type)){
    812                        $title = __('Custom Post : ', 'plf') . $post_type;
     832                       $title = esc_html__('Custom Post : ', 'plf') . $post_type;
    813833                       echo "<th class='ckbox-type tmpl-custom'><span title='$title' style='font-size:xx-small'>$post_type</span></th>";
    814834                    }
     
    868888    //Option Setting Form Display
    869889    public function plf_option_page() {
    870         $clear_dialog = __('Plugin Load Filter Settings\nClick OK to clear it.', 'plf');
     890        $clear_dialog = esc_html__('Plugin Load Filter Settings\nClick OK to clear it.', 'plf');
    871891    ?>
    872     <h2><?php _e('Plugin Load Filter Settings', 'plf'); ?></h2>
     892    <h2><?php esc_html_e('Plugin Load Filter Settings', 'plf'); ?></h2>
    873893    <p></p>
    874894    <div id="plf-setting-tabs">
    875895        <ul>
    876             <li><a href="#plf-registration-tab" ><?php _e('Filter Registration', 'plf'); ?></a></li>
    877             <li><a href="#plf-activation-tab" ><?php _e('Page Type Activation', 'plf'); ?></a></li>
     896            <li><a href="#plf-registration-tab" ><?php esc_html_e('Filter Registration', 'plf'); ?></a></li>
     897            <li><a href="#plf-activation-tab" ><?php esc_html_e('Page Type Activation', 'plf'); ?></a></li>
    878898        </ul>
    879899        <div id="plf-registration-tab" style="display : none;">               
     
    882902                <?php $this->plfregist_table(self::$plugins_inf, self::$filter); ?>
    883903                <p class="submit">
    884                     <input type="submit" class="button-primary" name="clear_regist_filter" value="<?php _e('Clear', 'plf'); ?>" onclick="return confirm('<?php echo $clear_dialog; ?>')" />&nbsp;&nbsp;&nbsp;
    885                     <input type="submit" class="button-primary" name="edit_regist_filter" value="<?php _e('Filter Entry &raquo;', 'plf'); ?>" />
     904                    <input type="submit" class="button-primary" name="clear_regist_filter" value="<?php esc_html_e('Clear', 'plf'); ?>" onclick="return confirm('<?php echo $clear_dialog; ?>')" />&nbsp;&nbsp;&nbsp;
     905                    <input type="submit" class="button-primary" name="edit_regist_filter" value="<?php esc_html_e('Filter Entry &raquo;', 'plf'); ?>" />
    886906                </p>
    887907            </form>
     
    896916                    ?>
    897917                    <br />
    898                     <p><?php _e('Select plugins to be activated for each page type by clicking on <span class="dashicons dashicons-admin-plugins"></span> mark from "page type filter" registered plugins.', 'plf') ?><br />
    899                        <?php _e('You can also select plugins to activate from Post/Page content editing screen.', 'plf') ?>
    900                     </p>
     918                    <p><?php
     919                    echo self::decode_safe_tag( 'span', esc_html__('Select plugins to be activated for each page type by clicking on <span class="dashicons dashicons-admin-plugins"></span> mark from "page type filter" registered plugins.', 'plf'));
     920                    ?><br />
     921                       <?php esc_html_e('You can also select plugins to activate from Post/Page content editing screen.', 'plf') ?>
     922                    </p>                   
    901923                    <p class="submit">
    902                       <input type="submit" class="button-primary" name="clear_activate_page_filter" value="<?php _e('Clear', 'plf'); ?>" onclick="return confirm('<?php echo $clear_dialog; ?>')" />&nbsp;&nbsp;&nbsp;
    903                       <input type="submit" class="button-primary" name="edit_activate_page_filter" value="<?php _e('Activate Plugin Entry &raquo;', 'plf'); ?>" />
     924                      <input type="submit" class="button-primary" name="clear_activate_page_filter" value="<?php esc_html_e('Clear', 'plf'); ?>" onclick="return confirm('<?php echo $clear_dialog; ?>')" />&nbsp;&nbsp;&nbsp;
     925                      <input type="submit" class="button-primary" name="edit_activate_page_filter" value="<?php esc_html_e('Activate Plugin Entry &raquo;', 'plf'); ?>" />
    904926                    </p>
    905927                    <?php
     
    907929                    ?>
    908930                    <br />
    909                     <p><span style="color: #ff0000;"><?php _e('Page Filter is not registered', 'plf') ?></span></p>
     931                    <p><span style="color: #ff0000;"><?php esc_html_e('Page Filter is not registered', 'plf') ?></span></p>
    910932                    <?php
    911933                }
     
    923945    function load_meta_boxes( $post_type, $post ) {
    924946        if ( current_user_can('activate_plugins', $post->ID) ) {
    925             add_meta_box( 'pluginfilterdiv', __( 'Plugin Load Filter', 'plf' ), array(&$this, 'plf_meta_box'), null, 'side' );
     947            add_meta_box( 'pluginfilterdiv', esc_html__( 'Plugin Load Filter', 'plf' ), array(&$this, 'plf_meta_box'), null, 'side' );
    926948            //add_action( 'admin_head', array(&$this, 'plf_css' ));
    927949            add_action( 'admin_footer', array(&$this, 'plf_meta_script' ));
     
    959981       
    960982        if(empty($select_cvplugins))
    961             return __('Page Filter is not registered', 'plf');
     983            return esc_html__('Page Filter is not registered', 'plf');
    962984       
    963985        $html = '<table id="activation-table">';
    964986        $html .= '<thead>';
    965         $html .= '<tr><th class="plugins-name">'. __('Plugins') . '</th>';
    966         $html .= '<th class="device-type"><span title="'. __('Desktop Device', 'plf'). '" class="dashicons dashicons-desktop"></span><br /><span style="font-size:xx-small">Desktop</span></th>';
    967         $html .= '<th class="device-type"><span title="'. __('Mobile Device', 'plf'). '" class="dashicons dashicons-smartphone"></span><br /><span style="font-size:xx-small">Mobile</span></th>';
     987        $html .= '<tr><th class="plugins-name">'. esc_html__('Plugins') . '</th>';
     988        $html .= '<th class="device-type"><span title="'. esc_html__('Desktop Device', 'plf'). '" class="dashicons dashicons-desktop"></span><br /><span style="font-size:xx-small">Desktop</span></th>';
     989        $html .= '<th class="device-type"><span title="'. esc_html__('Mobile Device', 'plf'). '" class="dashicons dashicons-smartphone"></span><br /><span style="font-size:xx-small">Mobile</span></th>';
    968990        $html .= '</tr>';
    969991        $html .= '</thead>';
     
    10341056            ?>
    10351057            <div id="plugin-filter-select">
    1036                 <p><?php _e( 'Plugin filter for Single post', 'plf' ); ?></p>
    1037                 <label><input type="radio" name="pagefilter" value="default" <?php checked('default', $option['filter']); ?>/><?php _e('Not Use', 'plf' ); ?></label>
    1038                 <label><input type="radio" name="pagefilter" value="include" <?php checked('include', $option['filter']); ?>/><?php _e('Use', 'plf'); ?></label>
     1058                <p><?php esc_html_e( 'Plugin filter for Single post', 'plf' ); ?></p>
     1059                <label><input type="radio" name="pagefilter" value="default" <?php checked('default', $option['filter']); ?>/><?php esc_html_e('Not Use', 'plf' ); ?></label>
     1060                <label><input type="radio" name="pagefilter" value="include" <?php checked('include', $option['filter']); ?>/><?php esc_html_e('Use', 'plf'); ?></label>
    10391061                <div id="page-filter-stat">
    10401062                <?php echo $this->pagefilter_plugins_checklist( self::$plugins_inf, $pgfilter, $option ); ?>
    10411063                </div>
    1042                 <div class="plf-option-info"><?php _e('Plugin Activate/Deactivate filter for this Post only', 'plf'); ?></div>
     1064                <div class="plf-option-info"><?php esc_html_e('Plugin Activate/Deactivate filter for this Post only', 'plf'); ?></div>
    10431065                <?php
    10441066                $c_locale = $o_post_id = '';
     
    10601082                    $locale_mode = '';
    10611083                }
    1062                 echo '<p class="hide-if-no-js"><a id="plugin-filter-submit" class="button" href="#pluginfilterdiv" onclick="WPAddPagePluginLoadFilter(\'' . $ajax_nonce . '\');return false;" >'. __('Save') .'</a></p>';
     1084                echo '<p class="hide-if-no-js"><a id="plugin-filter-submit" class="button" href="#pluginfilterdiv" onclick="WPAddPagePluginLoadFilter(\'' . $ajax_nonce . '\');return false;" >'. esc_html__('Save') .'</a></p>';
    10631085                ?>
    10641086                <hr>
    10651087                <div id="plf-post-locale-select" <?php echo $locale_mode; ?>>
    1066                     <p><?php _e( 'Language of this post', 'plf' ); ?> <span class="dashicons dashicons-translation" aria-hidden="true"></span></p>
     1088                    <p><?php esc_html_e( 'Language of this post', 'plf' ); ?> <span class="dashicons dashicons-translation" aria-hidden="true"></span></p>
    10671089                    <?php
    10681090                    wp_dropdown_languages(
     
    10761098                    );
    10771099                    ?>
    1078                     <p><?php _e( 'Original post ID for hreflang', 'plf' ); ?></p>
     1100                    <p><?php esc_html_e( 'Original post ID for hreflang', 'plf' ); ?></p>
    10791101                    <input type="text" id="plf_original_post_id" name="plf_original_post_id" size="8" value="<?php echo $o_post_id; ?>" />
    10801102                    <div class="hflang-group-edit-lonk">
     
    10961118                                        $url = get_edit_post_link( $v );
    10971119                                        if(!empty($url)){
    1098                                             echo '<p><a class="edit-post-locale-link" target="_blank"  href="' . $url .'" rel="external noreferrer noopener">' . __('Edit Post') . " ($l) " . '<span class="dashicons dashicons-external" aria-hidden="true"></span></a></p>';
     1120                                            echo '<p><a class="edit-post-locale-link" target="_blank"  href="' . $url .'" rel="external noreferrer noopener">' . esc_html__('Edit Post') . " ($l) " . '<span class="dashicons dashicons-external" aria-hidden="true"></span></a></p>';
    10991121                                        }
    11001122                                    }
     
    11041126                        ?>
    11051127                    </div>
    1106                     <div class="plf-option-info"><?php _e('Use MO translation file for the selected locale. When Original Post ID is registered, posts with the same Original Post ID are treated as `hreflang` metadata group.', 'plf'); ?></div>
    1107                     <?php echo '<p class="hide-if-no-js"><a id="plugin-filter-submit" class="button" href="#pluginfilterdiv" onclick="WPAddPagePluginLoadFilter(\'' . $ajax_nonce . '\');return false;" >'. __('Save') .'</a></p>'; ?>
     1128                    <div class="plf-option-info"><?php esc_html_e('Use MO translation file for the selected locale. When Original Post ID is registered, posts with the same Original Post ID are treated as `hreflang` metadata group.', 'plf'); ?></div>
     1129                    <?php echo '<p class="hide-if-no-js"><a id="plugin-filter-submit" class="button" href="#pluginfilterdiv" onclick="WPAddPagePluginLoadFilter(\'' . $ajax_nonce . '\');return false;" >'. esc_html__('Save') .'</a></p>'; ?>
    11081130                </div>
    11091131            </div>
     
    12361258   
    12371259    function plf_meta_script() {
    1238         $reload_dialog = __('Plugin Load Filter setting has been updated.\nClick OK to reload the page.', 'plf');
     1260        $reload_dialog = esc_html__('Plugin Load Filter setting has been updated.\nClick OK to reload the page.', 'plf');
    12391261    ?>
    12401262    <script type='text/javascript' >
  • plugin-load-filter/trunk/readme.txt

    r2981485 r3005355  
    33Tags: plugin, dynamic deactivate, disable plugins, filter, performance, language, locale
    44Requires at least: 5.3
    5 Tested up to: 6.3
     5Tested up to: 6.4
    66Requires PHP: 7.2
    7 Stable tag: 4.0.17
     7Stable tag: 4.1.0
    88Donate link: https://celtislab.net/en/wp-plugin-load-filter-addon/
    99License: GPLv2
     
    8282== Changelog ==
    8383
     84= 4.1.0 =
     85* 2023-12-1
     86* Security measures
     87* Added Ajax acceleration filter (Features for plugin developers)
     88
     89
    8490= 4.0.17 =
    8591* 2023-10-20
Note: See TracChangeset for help on using the changeset viewer.