This commit is contained in:
KhaiNguyen
2020-02-13 10:39:37 +07:00
commit 59401cb805
12867 changed files with 4646216 additions and 0 deletions

2
wp-content/index.php Normal file
View File

@@ -0,0 +1,2 @@
<?php
// Silence is golden.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -0,0 +1,864 @@
# Translation of Plugins - Akismet Anti-Spam - Stable (latest release) in Vietnamese
# This file is distributed under the same license as the Plugins - Akismet Anti-Spam - Stable (latest release) package.
msgid ""
msgstr ""
"PO-Revision-Date: 2019-11-12 11:13:56+0000\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-Generator: GlotPress/2.4.0-alpha\n"
"Language: vi_VN\n"
"Project-Id-Version: Plugins - Akismet Anti-Spam - Stable (latest release)\n"
#: views/enter.php:8
msgid "Enter your API key"
msgstr "Nhập API key"
#: views/connect-jp.php:66
msgid "Set up a different account"
msgstr "Cài đặt tài khoản khác"
#: views/setup.php:5
msgid "Set up your Akismet account to enable spam filtering on this site."
msgstr "Cài đặt tài khoản Akismet để bật bộ chống Spam trên web."
#: views/setup.php:1
msgid "Set Up Akismet"
msgstr "Cài đặt Akismet"
#: class.akismet-admin.php:1081
msgid "Akismet could not recheck your comments for spam."
msgstr "Akismet không thể kiểm tra lại bình luận spam."
#: class.akismet-admin.php:429
msgid "You don't have permission to do that."
msgstr "Bạn không có quyền làm điều đó."
#: class.akismet-cli.php:165
msgid "Stats response could not be decoded."
msgstr "Thống kê phản hồi không thể giải mã."
#: class.akismet-cli.php:159
msgid "Currently unable to fetch stats. Please try again."
msgstr "Hiện không thể tìm nạp số liệu thống kê. Vui lòng thử lại."
#: class.akismet-cli.php:134
msgid "API key must be set to fetch stats."
msgstr "API ket phải được set để lấy dữ liệu thống kê."
#: views/notice.php:144
msgid "To help your site with transparency under privacy laws like the GDPR, Akismet can display a notice to your users under your comment forms. This feature is disabled by default, however, you can turn it on below."
msgstr "Để giúp website của bạn đáp ứng các quy định như bộ luật GDPR, Akismet có thể hiển thị chú ý tới người dùng bên dưới mục bình luận. Tính năng này mặc định được tắt, nhưng bạn có thể bật nó ở bên trên."
#: views/config.php:162
msgid "To help your site with transparency under privacy laws like the GDPR, Akismet can display a notice to your users under your comment forms. This feature is disabled by default, however, you can turn it on above."
msgstr "Để giúp website của bạn đáp ứng các quy định như bộ luật GDPR, Akismet có thể hiển thị chú ý tới người xem bên dưới mục bình luận. Tính năng này mặc định không được kích hoạt, tuy nhiên, bạn có thể bật nó ở ngay trên đây."
#: views/notice.php:145
msgid " Please <a href=\"%s\">enable</a> or <a href=\"%s\">disable</a> this feature. <a href=\"%s\" id=\"akismet-privacy-notice-control-notice-info-link\" target=\"_blank\">More information</a>."
msgstr " Vui lòng <a href=\"%s\">bật</a> hoặc <a href=\"%s\">tắt</a> tính năng này. <a href=\"%s\" id=\"akismet-privacy-notice-control-notice-info-link\" target=\"_blank\">Tìm hiểu thêm</a>."
#: views/notice.php:143
msgid "Akismet & Privacy."
msgstr "Akismet và Chính sách riêng tư."
#: views/config.php:160
msgid "Do not display privacy notice."
msgstr "Không hiển thị thông báo bảo mật."
#: views/config.php:159
msgid "Display a privacy notice under your comment forms."
msgstr "Hiển thị chú ý về chính sách riêng tư bên dưới mục bình luận của bạn."
#: views/config.php:158
msgid "Akismet privacy notice"
msgstr "Thông báo bảo mật của Akismet"
#: views/config.php:155
msgid "Privacy"
msgstr "Riêng tư"
#: class.akismet.php:1420
msgid "This site uses Akismet to reduce spam. <a href=\"%s\" target=\"_blank\" rel=\"nofollow noopener\">Learn how your comment data is processed</a>."
msgstr "Website này sử dụng Akismet để hạn chế spam. <a href=\"%s\" target=\"_blank\" rel=\"nofollow noopener\">Tìm hiểu bình luận của bạn được duyệt như thế nào</a>."
#: class.akismet-admin.php:96
msgid "We collect information about visitors who comment on Sites that use our Akismet anti-spam service. The information we collect depends on how the User sets up Akismet for the Site, but typically includes the commenter's IP address, user agent, referrer, and Site URL (along with other information directly provided by the commenter such as their name, username, email address, and the comment itself)."
msgstr "Chúng tôi thu thập thông tin về người dùng đã bình luận trên website sử dụng dịch vụ của Akismet. Các thông tin thu thập phụ thuộc vào cách người sử dụng cài đặt Akismet trên website, nhưng thông thường bao gồm địa chỉ IP, trình duyệt, nguồn đến và địa chỉ Website (bên cạnh các thông tin khác người dùng trực tiếp nhập như họ tên, tài khoản, địa chỉ email và nội dung bình luận)."
#: class.akismet.php:231
msgid "Comment discarded."
msgstr "Bình luận bị loại bỏ."
#: class.akismet-rest-api.php:174
msgid "This site's API key is hardcoded and cannot be deleted."
msgstr "API key của trang này đã bị đặt vào trong code và không thể xóa được."
#: class.akismet-rest-api.php:158
msgid "The value provided is not a valid and registered API key."
msgstr "Thông tin được nhập không phải là key API hợp lệ."
#: class.akismet-rest-api.php:152
msgid "This site's API key is hardcoded and cannot be changed via the API."
msgstr "API Key của site này được nhập tay và không thể đổi qua API."
#: class.akismet-rest-api.php:71 class.akismet-rest-api.php:80
msgid "The time period for which to retrieve stats. Options: 60-days, 6-months, all"
msgstr "Thời gian để làm kết quả thống kê. Các lựa chọn: 60 ngày, 6 tháng, tất cả"
#: class.akismet-rest-api.php:56
msgid "If true, show the number of approved comments beside each comment author in the comments list page."
msgstr "Nếu bật, hiển thị số bình luận đã được duyệt bên cạnh tên tác giả bình luận trong danh sách bình luận."
#: class.akismet-rest-api.php:51
msgid "If true, Akismet will automatically discard the worst spam automatically rather than putting it in the spam folder."
msgstr "Nếu bật, Akismet sẽ tự động bỏ qua các spam mức độ cao tự động hơn là bỏ vào thư mục Spam."
#: class.akismet-rest-api.php:27 class.akismet-rest-api.php:101
#: class.akismet-rest-api.php:114 class.akismet-rest-api.php:127
msgid "A 12-character Akismet API key. Available at akismet.com/get/"
msgstr "Key Akismet API bao gồm 12 kí tự. Có thể lấy từ akismet.com/get/"
#: class.akismet-admin.php:405
msgid "(%1$s%)"
msgstr "(%1$s%)"
#: views/notice.php:55
msgid "Your site can&#8217;t connect to the Akismet servers."
msgstr "Website của bạn không thể kết nối tới máy chủ của Akismet."
#. translators: %s is the wp-config.php file
#: views/predefined.php:7
msgid "An Akismet API key has been defined in the %s file for this site."
msgstr "API Key được xác định trong file %s của website này."
#: views/predefined.php:2
msgid "Manual Configuration"
msgstr "Cấu hình bằng tay"
#: class.akismet-admin.php:239
msgid "On this page, you are able to update your Akismet settings and view spam stats."
msgstr "Trong trang này, bạn có thể cập nhật thiết lập Akismet và xem thống kê spam."
#. Description of the plugin
msgid "Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key."
msgstr "Được sử dụng bởi hàng triệu người, Akismet có thể là cách tốt nhất trên thế giới để <strong>bảo vệ blog của bạn từ spam</strong>. Nó giúp trang của bạn được bảo vệ cả khi bạn đang ngủ. Để bắt đầu: kích hoạt phần mở rộng Akismet và chuyển đến trang Thiết lập Akismet để cài đặt API key của bạn. "
#. Plugin Name of the plugin
#: class.akismet-admin.php:121 class.akismet-admin.php:124
msgid "Akismet Anti-Spam"
msgstr "Akismet Anti-Spam"
#: views/stats.php:4
msgid "Akismet Settings"
msgstr "Thiết lập Akismet"
#: views/enter.php:9
msgid "Connect with API key"
msgstr "Kết nối với API key"
#. translators: %s is the WordPress.com username
#: views/connect-jp.php:23 views/connect-jp.php:58
msgid "You are connected as %s."
msgstr "Bạn đã kết nối bằng %s."
#: views/connect-jp.php:10 views/connect-jp.php:18 views/connect-jp.php:31
#: views/connect-jp.php:53 views/connect-jp.php:65
msgid "Connect with Jetpack"
msgstr "Kết nối với Jetpack"
#: views/connect-jp.php:12 views/connect-jp.php:25 views/connect-jp.php:48
msgid "Use your Jetpack connection to set up Akismet."
msgstr "Sử dụng Jetpack để cài đặt Akismet."
#: views/title.php:2
msgid "Eliminate spam from your site"
msgstr "Loại bỏ spam từ trang của bạn"
#: views/notice.php:107
msgid "Would you like to <a href=\"%s\">check pending comments</a>?"
msgstr "Bạn có muốn <a href=\"%s\">kiểm tra các comment chờ duyệt</a>?"
#: views/notice.php:105
msgid "Akismet is now protecting your site from spam. Happy blogging!"
msgstr "Akismet đang bảo vệ website của bạn khỏi spam. Xin chúc mừng!"
#: views/setup.php:3 views/notice.php:14
msgid "Set up your Akismet account"
msgstr "Cài đặt tài khoản Akismet của bạn"
#: views/config.php:26
msgid "Detailed Stats"
msgstr "Thống kê chi tiết"
#: views/config.php:22
msgid "Statistics"
msgstr "Thống kê"
#: class.akismet-admin.php:1193
msgid "Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. To get started, just go to <a href=\"admin.php?page=akismet-key-config\">your Akismet Settings page</a> to set up your API key."
msgstr "Được sử dụng bởi hàng triệu website, Akismet là plugin hữu ích giúp bạn <strong>bảo vệ website khỏi spam</strong>. Nó giúp bảo vệ website khi bạn đang ngủ. Để bắt đầu, hãy <a href=\"admin.php?page=akismet-key-config\">thiết lập cấu hình</a> để nhập API key."
#: class.akismet-admin.php:1190
msgid "Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. Your site is fully configured and being protected, even while you sleep."
msgstr "Được sử dụng bởi hàng triệu người, Akismet là có thể là cách thức tốt nhất trên thế giới để <strong>bảo về blog của bạn khỏi spam</strong>. Trang của bạn được cấu hình hoàn toàn và được bảo về, thậm chí trong khi bạn đang ngủ."
#: class.akismet-admin.php:1074
msgid "%s comment was caught as spam."
msgid_plural "%s comments were caught as spam."
msgstr[0] "%s bình luận bị phát hiện là spam."
#: class.akismet-admin.php:1071
msgid "No comments were caught as spam."
msgstr "Không có bình luận nào bị phát hiện là spam."
#: class.akismet-admin.php:1067
msgid "Akismet checked %s comment."
msgid_plural "Akismet checked %s comments."
msgstr[0] "Akismet đã kiểm tra %s bình luận."
#: class.akismet-admin.php:1064
msgid "There were no comments to check. Akismet will only check comments in the Pending queue."
msgstr "Không còn bình luận để kiểm tra, Akismet sẽ chỉ kiểm tra bình luận trong mục Đang chờ. "
#: class.akismet-admin.php:404
msgid "Checking for Spam"
msgstr "Đang kiểm tra Spam"
#: class.akismet.php:512
msgid "Comment not found."
msgstr "Không tìm thấy bình luận."
#: class.akismet-cli.php:88
msgid "%d comment could not be checked."
msgid_plural "%d comments could not be checked."
msgstr[0] "%d bình luận không thể kiểm tra."
#: class.akismet-cli.php:85
msgid "%d comment moved to Spam."
msgid_plural "%d comments moved to Spam."
msgstr[0] "%d bình luận đã được chuyển tới Spam."
#: class.akismet-cli.php:84
msgid "Processed %d comment."
msgid_plural "Processed %d comments."
msgstr[0] "Đã xử lý %d bình luận. "
#: class.akismet-cli.php:46
msgid "Comment #%d could not be checked."
msgstr "Bình luận #%d không thể kiểm tra."
#: class.akismet-cli.php:43
msgid "Failed to connect to Akismet."
msgstr "Kết nối thật bại đến Akismet."
#: class.akismet-cli.php:39
msgid "Comment #%d is not spam."
msgstr "Bình luận #%d không phải spam."
#: class.akismet-cli.php:36
msgid "Comment #%d is spam."
msgstr "Bình luận #%d là spam."
#: views/config.php:49
msgid "%s false positive"
msgid_plural "%s false positives"
msgstr[0] "%s thông báo sai"
#: views/config.php:47
msgid "%s missed spam"
msgid_plural "%s missed spam"
msgstr[0] "%s bỏ qua spam"
#: views/notice.php:85
msgid "You don&#8217;t have an Akismet plan."
msgstr "Bạn không có đăng ký gói Akismet nào."
#: views/notice.php:70
msgid "Your Akismet subscription is suspended."
msgstr "Gói đăng ký Akismet của bạn đã bị khoá."
#: views/notice.php:65
msgid "Your Akismet plan has been cancelled."
msgstr "Gói Akismet đã được huỷ."
#: views/notice.php:61
msgid "We cannot process your payment. Please <a href=\"%s\" target=\"_blank\">update your payment details</a>."
msgstr "Chúng tôi không thể thực hiện thanh toán. Hãy <a href=\"%s\" target=\"_blank\">cập nhật thông tin thanh toán</a>."
#: views/notice.php:60
msgid "Please update your payment information."
msgstr "Vui lòng cập nhật thông tin thanh toán."
#: views/notice.php:17
msgid "<strong>Almost done</strong> - configure Akismet and say goodbye to spam"
msgstr "<strong>Sắp hoàn tất</strong> - hãy cấu hình Akismet và tạm biệt Spam"
#: class.akismet-admin.php:995
msgid "Akismet has saved you %d minute!"
msgid_plural "Akismet has saved you %d minutes!"
msgstr[0] "Akismet đã tiết kiệm cho bạn %d phút!"
#: class.akismet-admin.php:993
msgid "Akismet has saved you %d hour!"
msgid_plural "Akismet has saved you %d hours!"
msgstr[0] "Akismet đã tiết kiệm cho bạn %d giờ! "
#: class.akismet-admin.php:991
msgid "Akismet has saved you %s day!"
msgid_plural "Akismet has saved you %s days!"
msgstr[0] "Akismet đã tiết kiệm cho bạn %s ngày!"
#: class.akismet-admin.php:187 class.akismet-admin.php:225
#: class.akismet-admin.php:238
msgid "Akismet filters out spam, so you can focus on more important things."
msgstr "Akismet giúp bạn lọc spam, nên bạn có thể tập trung làm những chuyện quan trọng hơn."
#: views/notice.php:135
msgid "To continue your service, <a href=\"%s\" target=\"_blank\">upgrade to an Enterprise subscription</a>, which covers an unlimited number of sites."
msgstr "Để tiếp tục dịch vụ của bạn, <a href=\"%s\" target=\"_blank\"> hãy nâng cấp lên gói Doanh nghiệp</a> khi đó sẽ không giới hạn số trang web sử dụng."
#: views/notice.php:128
msgid "Your Pro subscription allows the use of Akismet on only one site. Please <a href=\"%s\" target=\"_blank\">purchase additional Pro subscriptions</a> or upgrade to an Enterprise subscription that allows the use of Akismet on unlimited sites."
msgstr "Gói Pro chỉ cho phép bạn sử dụng Akismet trên một trang web của bạn. Vui lòng <a href=\"%s\" target=\"_blank\">mua thêm gói Pro</a> hoặc nâng cấp lên gói Doanh nghiệp để sử dụng Akismet không giới hạn."
#: views/notice.php:121
msgid "The connection to akismet.com could not be established. Please refer to <a href=\"%s\" target=\"_blank\">our guide about firewalls</a> and check your server configuration."
msgstr "Kết nối tới akismet.com bị gián đoạn. Vui lòng xem <a href=\"%s\" target=\"_blank\">hướng dẫn về tường lửa</a> và kiểm tra lại cấu hình máy chủ."
#: views/notice.php:120
msgid "The API key you entered could not be verified."
msgstr "Mã bạn vừa nhập không thể xác minh."
#: views/notice.php:116
msgid "Your API key is no longer valid. Please enter a new key or contact support@akismet.com."
msgstr "API key của bạn không hợp lệ. Nhập key mới hoặc liên hệ support@akismet.com."
#: views/notice.php:89 views/notice.php:130 views/notice.php:137
msgid "Please <a href=\"%s\" target=\"_blank\">contact our support team</a> with any questions."
msgstr "Hãy <a href=\"%s\" target=\"_blank\"> liên hệ với nhóm hỗ trợ của chúng tôi </a> với bất kỳ câu hỏi nào bạn đang thắc mắc."
#: views/notice.php:87
msgid "In 2012, Akismet began using subscription plans for all accounts (even free ones). A plan has not been assigned to your account, and we&#8217;d appreciate it if you&#8217;d <a href=\"%s\" target=\"_blank\">sign into your account</a> and choose one."
msgstr "Vào năm 2012, Akismet bắt đầu áp dụng gói đăng ký cho tất cả tài khoản (bao gồm cả miễn phí). Hiện tài khoản của bạn chưa có gói đăng ký nào, và chúng tôi đề nghị bạn <a href=\"%s\" target=\"_blank\">đăng nhập vào tài khoản</a> và chọn một gói."
#: views/config.php:95
msgid "All systems functional."
msgstr "Hệ thống hoạt động bình thường."
#: views/config.php:95
msgid "Enabled."
msgstr "Kích hoạt."
#: views/config.php:92
msgid "Akismet encountered a problem with a previous SSL request and disabled it temporarily. It will begin using SSL for requests again shortly."
msgstr "Akismet gặp lỗi với yêu cầu SSL gần nhất và đã tắt tạm thời. Kết nối SSL sẽ được thực thi lại ngay sau đây."
#: views/config.php:92
msgid "Temporarily disabled."
msgstr "Bị tắt tạm thời."
#: views/config.php:86
msgid "Your Web server cannot make SSL requests; contact your Web host and ask them to add support for SSL requests."
msgstr "Máy chủ web của bạn không thể gửi yêu cầu SSL, vui lòng liên hệ nhà cung cấp Hosting và đề nghị bật kết nối SSL."
#: views/config.php:86
msgid "Disabled."
msgstr "Bị tắt."
#: views/config.php:79
msgid "SSL Status"
msgstr "Trạng thái SSL"
#: class.akismet-admin.php:624
msgid "This comment was reported as not spam."
msgstr "Bình luận này được đánh dấu không phải bình luận rác."
#: class.akismet-admin.php:616
msgid "This comment was reported as spam."
msgstr "Bình luận này bị báo cáo là bình luận rác."
#: class.akismet-admin.php:156
msgid "(undo)"
msgstr "(hoàn tác)"
#: class.akismet-admin.php:155
msgid "URL removed"
msgstr "URL đã được loại"
#: class.akismet-admin.php:154
msgid "Removing..."
msgstr "Đang xóa"
#: class.akismet-admin.php:95 class.akismet-admin.php:1212
msgid "Akismet"
msgstr "Akismet"
#: class.akismet-admin.php:114 class.akismet-admin.php:246
#: class.akismet-admin.php:674 views/config.php:60
msgid "Settings"
msgstr "Cài đặt"
#: class.akismet-admin.php:157
msgid "Re-adding..."
msgstr "Đang thêm vào lại..."
#: class.akismet-admin.php:184 class.akismet-admin.php:222
#: class.akismet-admin.php:235
msgid "Overview"
msgstr "Tổng quan"
#: class.akismet-admin.php:186 class.akismet-admin.php:197
#: class.akismet-admin.php:208
msgid "Akismet Setup"
msgstr "Cài đặt Akismet"
#: class.akismet-admin.php:188
msgid "On this page, you are able to set up the Akismet plugin."
msgstr "Trong trang này, bạn có thể cài đặt plugin Akismet."
#: class.akismet-admin.php:195
msgid "New to Akismet"
msgstr "Mới sử dụng Akismet"
#: class.akismet-admin.php:198
msgid "You need to enter an API key to activate the Akismet service on your site."
msgstr "Bạn cần nhập AP keyI để kích hoạt Akismet trên trang web của bạn."
#: class.akismet-admin.php:206
msgid "Enter an API Key"
msgstr "Nhập API Key"
#: class.akismet-admin.php:199
msgid "Sign up for an account on %s to get an API Key."
msgstr "Đăng ký tài khoản trên %s để lấy mã API"
#: class.akismet-admin.php:209
msgid "If you already have an API key"
msgstr "Nếu bạn đã có key API"
#: class.akismet-admin.php:211
msgid "Copy and paste the API key into the text field."
msgstr "Sao chép và dán mã API vào trường văn bản bên dưới."
#: class.akismet-admin.php:212
msgid "Click the Use this Key button."
msgstr "Nhấp chuột vào nút Sử dụng Key này."
#: class.akismet-admin.php:224
msgid "Akismet Stats"
msgstr "Thống kê Akismet"
#: class.akismet-admin.php:226
msgid "On this page, you are able to view stats on spam filtered on your site."
msgstr "Trong trang này, bạn có thể xem thống kê về lọc spam trên website của mình."
#: class.akismet-admin.php:237 class.akismet-admin.php:248
#: class.akismet-admin.php:261
msgid "Akismet Configuration"
msgstr "Cấu hình Akismet"
#: class.akismet-admin.php:249 views/config.php:70
msgid "API Key"
msgstr "API Key"
#: class.akismet-admin.php:249
msgid "Enter/remove an API key."
msgstr "Thêm/Gỡ API key"
#: class.akismet-admin.php:250 views/config.php:105
msgid "Comments"
msgstr "Bình luận"
#: class.akismet-admin.php:250
msgid "Show the number of approved comments beside each comment author in the comments list page."
msgstr "Hiển thị số bình luận đã được thông qua ngay bên cạnh tên của người bình luận trong trang danh sách bình luận."
#: class.akismet-admin.php:251
msgid "Choose to either discard the worst spam automatically or to always put all spam in spam folder."
msgstr "Chọn hoặc loại bỏ các thư rác nhất hoặc luôn luôn đặt các thư rác vào trong thư mục thư rác."
#: class.akismet-admin.php:251 views/config.php:128
msgid "Strictness"
msgstr "Độ nghiêm ngặt"
#: class.akismet-admin.php:259 views/config.php:188
msgid "Account"
msgstr "Tài khoản"
#: class.akismet-admin.php:262 views/config.php:196
msgid "Subscription Type"
msgstr "Gói dịch vụ"
#: class.akismet-admin.php:263
msgid "The subscription status - active, cancelled or suspended"
msgstr "Trạng thái gói dịch vụ: đang kích hoạt, đã huỷ hoặc đã khoá"
#: class.akismet-admin.php:263 views/config.php:203
msgid "Status"
msgstr "Trạng thái"
#: class.akismet-admin.php:262
msgid "The Akismet subscription plan"
msgstr "Gói đăng ký Akismet"
#: class.akismet-admin.php:273
msgid "Akismet FAQ"
msgstr "Câu hỏi thường gặp trong Akismet"
#: class.akismet-admin.php:272
msgid "For more information:"
msgstr "Thông tin thêm:"
#: class.akismet-admin.php:274
msgid "Akismet Support"
msgstr "Hỗ trợ Akismet"
#: class.akismet-admin.php:280
msgid "Cheatin&#8217; uh?"
msgstr "Ăn gian?"
#: class.akismet-admin.php:350
msgctxt "comments"
msgid "Spam"
msgstr "Spam"
#: class.akismet-admin.php:352
msgid "<a href=\"%1$s\">Akismet</a> has protected your site from <a href=\"%2$s\">%3$s spam comment</a>."
msgid_plural "<a href=\"%1$s\">Akismet</a> has protected your site from <a href=\"%2$s\">%3$s spam comments</a>."
msgstr[0] "<a href=\"%1$s\">Akismet</a> đã bảo vệ site của bạn từ<a href=\"%2$s\">%3$s các bình luận spam</a>."
#: class.akismet-admin.php:362
msgid "<a href=\"%1$s\">Akismet</a> has protected your site from %2$s spam comment already. "
msgid_plural "<a href=\"%1$s\">Akismet</a> has protected your site from %2$s spam comments already. "
msgstr[0] "<a href=\"%1$s\">Akismet</a> đã chặn %2$ spam. "
#: class.akismet-admin.php:368
msgid "<a href=\"%s\">Akismet</a> blocks spam from getting to your blog. "
msgstr "<a href=\"%s\">Akismet</a> đã chặn spam từ blog của bạn."
#: class.akismet-admin.php:374
msgid "There&#8217;s <a href=\"%2$s\">%1$s comment</a> in your spam queue right now."
msgid_plural "There are <a href=\"%2$s\">%1$s comments</a> in your spam queue right now."
msgstr[0] "Có tổng cộng <a href=\"%2$s\">%1$s bình luận</a> trong mục Duyệt spam ngay lúc này."
#: class.akismet-admin.php:380
msgid "There&#8217;s nothing in your <a href='%s'>spam queue</a> at the moment."
msgstr "Hiện tại không có gì trong <a href='%s'>hàng chờ thư rác</a> của bạn."
#: class.akismet-admin.php:603
msgid "Akismet re-checked and cleared this comment."
msgstr "Akismet đã kiểm tra lại và bỏ đánh dấu spam bình luận này."
#: class.akismet-admin.php:597
msgid "Akismet re-checked and caught this comment as spam."
msgstr "Akismet đã kiểm tra lại và đánh dấu bình luận này là spam."
#: class.akismet-admin.php:411
msgid "Check for Spam"
msgstr "Tìm Spam"
#: class.akismet-admin.php:640
msgid "Akismet was unable to recheck this comment (response: %s)."
msgstr "Akismet không thể check lại bình luận này (phản hồi: %s)."
#: class.akismet-admin.php:525
msgid "Flagged as spam by Akismet"
msgstr "Đánh dấu là spam bởi Akismet"
#: class.akismet-admin.php:521
msgid "Awaiting spam check"
msgstr "Đang chờ kiểm duyệt"
#: class.akismet-admin.php:531
msgid "Flagged as spam by %s"
msgstr "Đánh dấu là spam bởi %s"
#: class.akismet-admin.php:527
msgid "Cleared by Akismet"
msgstr "Bị xóa bởi Akismet"
#: class.akismet-admin.php:533
msgid "Un-spammed by %s"
msgstr "Được bỏ đánh dấu là spam bởi %s"
#: class.akismet-admin.php:568
msgid "%s approved"
msgid_plural "%s approved"
msgstr[0] "%s được thông qua"
#: class.akismet-admin.php:545
msgid "History"
msgstr "Lịch sử"
#: class.akismet-admin.php:545 class.akismet-admin.php:553
msgid "View comment history"
msgstr "Xem lịch sử bình luận"
#: class.akismet-admin.php:881
msgid "Please check your <a href=\"%s\">Akismet configuration</a> and contact your web host if problems persist."
msgstr "Hãy kiểm tra <a href=\"%s\">Cấu hình Akismet</a> của bạn và liên hệ với nhà cung cấp host nếu vẫn không khắc phục được sự cố."
#: class.akismet-admin.php:662
msgid "%s ago"
msgstr "%s trước"
#: class.akismet-admin.php:988
msgid "Cleaning up spam takes time."
msgstr "Dọn dẹp rác khá tốn thời gian."
#: class.akismet-widget.php:12
msgid "Akismet Widget"
msgstr "Bảng công cụ Akismet"
#: class.akismet-widget.php:13
msgid "Display the number of spam comments Akismet has caught"
msgstr "Hiển thị số lượng bình luận rác Akismet đã phát hiện"
#: class.akismet-widget.php:74
msgid "Title:"
msgstr "Tiêu đề:"
#: class.akismet-widget.php:69 class.akismet-widget.php:90
msgid "Spam Blocked"
msgstr "Bình luận rác đã bị chặn"
#: class.akismet-widget.php:102
msgid "<strong class=\"count\">%1$s spam</strong> blocked by <strong>Akismet</strong>"
msgid_plural "<strong class=\"count\">%1$s spam</strong> blocked by <strong>Akismet</strong>"
msgstr[0] "<strong class=\"count\">%1$s bình luận rác</strong> đã bị loại bỏ bởi <strong>Akismet</strong>"
#: class.akismet-admin.php:600
msgid "Akismet caught this comment as spam."
msgstr "Akismet đánh dấu bình luận này là spam."
#: class.akismet-admin.php:648
msgid "Comment status was changed to %s"
msgstr "Trạng thái bình luận đã được thay đổi thành %s"
#: class.akismet-admin.php:606
msgid "Akismet cleared this comment."
msgstr "Akismet xóa bình luận này."
#: class.akismet-admin.php:609
msgid "Comment was caught by wp_blacklist_check."
msgstr "Bình luận được nhận diện spam bởi wp_blacklist_check."
#: class.akismet-admin.php:635
msgid "Akismet was unable to check this comment (response: %s) but will automatically retry later."
msgstr "Akismet không thể kiểm tra bình luận này (trả về: %s), nhưng sẽ tự động thử lại sau."
#: class.akismet-admin.php:654
msgid "%1$s changed the comment status to %2$s."
msgstr "%1$s đổi trạng thái bình luận sang %2$s."
#: class.akismet-admin.php:613
msgid "%s reported this comment as spam."
msgstr "%s thông báo bình luận này là spam."
#: class.akismet-admin.php:621
msgid "%s reported this comment as not spam."
msgstr "%s thông báo bình luận này không phải spam."
#: class.akismet-admin.php:628
msgid "Akismet caught this comment as spam during an automatic retry."
msgstr "Akismet nhận định đây là bình luận rác trong quá trình tự động kiểm tra lại."
#: class.akismet-admin.php:631
msgid "Akismet cleared this comment during an automatic retry."
msgstr "Akismet đã xác minh đây không phải là bình luận rác trong quá trình tự động kiểm tra lại."
#: class.akismet.php:1277
msgid "Please <a href=\"%1$s\">upgrade WordPress</a> to a current version, or <a href=\"%2$s\">downgrade to version 2.4 of the Akismet plugin</a>."
msgstr "Hãy <a href=\"%1$s\">nâng cấp Wordpress</a> tới phiên bản hiện tại, hoặc <a href=\"%2$s\">hạ cấp plugin Akismet xuống 2.4</a>."
#: class.akismet.php:1277
msgid "Akismet %s requires WordPress %s or higher."
msgstr "Akismet %s yêu cầu phiên bản WordPress %s hoặc cao hơn."
#: views/config.php:37 views/config.php:42
msgid "Spam blocked"
msgid_plural "Spam blocked"
msgstr[0] "Spam đã bị chặn"
#: views/config.php:35
msgid "Past six months"
msgstr "6 tháng trước"
#: views/config.php:40
msgid "All time"
msgstr "Mọi lúc"
#: views/config.php:45
msgid "Accuracy"
msgstr "Độ chính xác"
#: views/config.php:109
msgid "Show approved comments"
msgstr "Hiển thị bình luận được chấp nhận"
#: views/config.php:122
msgid "Show the number of approved comments beside each comment author"
msgstr "Hiển thị số bình luận được thông qua bên cạnh tên của người bình luận."
#: views/config.php:131
msgid "Akismet anti-spam strictness"
msgstr "Akismet chống spam nghiêm ngặt"
#: views/config.php:132
msgid "Silently discard the worst and most pervasive spam so I never see it."
msgstr "Tự động bỏ qua những spam mức độ cao để tôi không nhìn thấy chúng."
#: views/config.php:133
msgid "Always put spam in the Spam folder for review."
msgstr "Luôn đặt spam trong thư mục spam để xem xét"
#: views/config.php:141
msgid "Spam in the <a href=\"%1$s\">spam folder</a> older than 1 day is deleted automatically."
msgid_plural "Spam in the <a href=\"%1$s\">spam folder</a> older than %2$d days is deleted automatically."
msgstr[0] "Spam nằm trong <a href=\"%1$s\">thư mục Spam</a> cũ hơn %2$d ngày sẽ bị xoá tự động."
#: views/config.php:135
msgid "Note:"
msgstr "Ghi chú:"
#: views/config.php:208
msgid "Cancelled"
msgstr "Đã hủy"
#: views/config.php:176
msgid "Save Changes"
msgstr "Lưu thay đổi"
#: views/config.php:170
msgid "Disconnect this account"
msgstr "Ngắt kết nối tài khoản này"
#: views/config.php:210
msgid "Suspended"
msgstr "Đã ngưng"
#: views/config.php:214
msgid "No Subscription Found"
msgstr "Không tìm thấy gói dịch vụ"
#: views/config.php:212
msgid "Missing"
msgstr "Lỗi"
#: views/config.php:222
msgid "Next Billing Date"
msgstr "Ngày thanh toán tiếp theo"
#: views/config.php:216
msgid "Active"
msgstr "Kích hoạt"
#: views/config.php:233
msgid "Upgrade"
msgstr "Nâng cấp"
#: views/config.php:233
msgid "Change"
msgstr "Đổi"
#: views/notice.php:23
msgid "Akismet has detected a problem."
msgstr "Akismet gặp trục trặc."
#: views/notice.php:24
msgid "Some comments have not yet been checked for spam by Akismet. They have been temporarily held for moderation and will automatically be rechecked later."
msgstr "Một vài bình luận chưa được kiểm tra bởi Akismet. Nó sẽ bị tạm giữ để kiểm duyệt và được tự động kiểm tra Spam lại sau."
#: views/notice.php:31
msgid "Akismet Error Code: %s"
msgstr "Mã lỗi Akismet: %s"
#. translators: the placeholder is a clickable URL that leads to more
#. information regarding an error code.
#: views/notice.php:36
msgid "For more information: %s"
msgstr "Xem chi tiết: %s"
#: views/notice.php:51
msgid "Your web host or server administrator has disabled PHP&#8217;s <code>gethostbynamel</code> function. <strong>Akismet cannot work correctly until this is fixed.</strong> Please contact your web host or firewall administrator and give them <a href=\"%s\" target=\"_blank\">this information about Akismet&#8217;s system requirements</a>."
msgstr "Máy chủ web của bạn đã tắt function PHP <code>gethostbynamel</code>. <strong>Akismet không thể hoạt động cho tới khi function này được bật lên</strong> Vui lòng liên hệ nhà cung cấp Hosting và gửi họ <a href=\"%s\" target=\"_blank\">thông tin yêu cầu tối thiểu của Akismet</a>."
#: views/notice.php:50
msgid "Network functions are disabled."
msgstr "Chức năng mạng bị vô hiệu."
#: views/notice.php:56
msgid "Your firewall may be blocking Akismet from connecting to its API. Please contact your host and refer to <a href=\"%s\" target=\"_blank\">our guide about firewalls</a>."
msgstr "Tường lửa của nhà cung cấp Hosting đang chặn Akismet kết nối tới API. Vui lòng liên hệ nhà cung cấp Hosting và đưa <a href=\"%s\" target=\"_blank\">thông tin về tường lửa của Akismet</a>."
#: views/notice.php:66
msgid "Please visit your <a href=\"%s\" target=\"_blank\">Akismet account page</a> to reactivate your subscription."
msgstr "Vào <a href=\"%s\" target=\"_blank\">Trang tài khoản Akismet</a> để kích hoạt lại đăng ký của bạn."
#: views/notice.php:71 views/notice.php:81
msgid "Please contact <a href=\"%s\" target=\"_blank\">Akismet support</a> for assistance."
msgstr "Vui lòng liên hệ <a href=\"%s\" target=\"_blank\">Akismet</a> để được trợ giúp."
#: views/notice.php:76
msgid "You can help us fight spam and upgrade your account by <a href=\"%s\" target=\"_blank\">contributing a token amount</a>."
msgstr "Bạn có thể giúp chúng tôi chống lại spam và nâng cấp tài khoản bằng cách <a href=\"%s\" target=\"_blank\">đóng góp một số tiền</a>."
#: views/notice.php:80
msgid "There is a problem with your API key."
msgstr "Key API của bạn có vấn đề."
#: views/notice.php:112
msgid "The key you entered is invalid. Please double-check it."
msgstr "Khóa nhập vào không hợp lệ. Xin hãy kiểm tra lại."
#: views/notice.php:126
msgid "You&#8217;re using your Akismet key on more sites than your Pro subscription allows."
msgstr "Bạn đang sử dụng key Akismet nhiều hơn số website mà gói dịch vụ Pro cho phép."
#: views/notice.php:133
msgid "You&#8217;re using Akismet on far too many sites for your Pro subscription."
msgstr "Bạn đang dùng gói dịch vụ Akismet Pro trên quá nhiều website."
#. translators: %s is the WordPress.com email address
#: views/connect-jp.php:36
msgid "Your subscription for %s is cancelled."
msgstr "Gói dịch vụ của %s đã bị huỷ."
#. translators: %s is the WordPress.com email address
#: views/connect-jp.php:44
msgid "Your subscription for %s is suspended."
msgstr "Gói dịch vụ của %s của bạn đã bị khoá."
#: views/connect-jp.php:45
msgid "No worries! Get in touch and we&#8217;ll sort this out."
msgstr "Đừng lo lắng! Hãy liên lạc và chúng tôi sẽ giúp bạn giải quyết"
#: views/connect-jp.php:39
msgid "Contact Akismet support"
msgstr "Liên hệ đội hỗ trợ Akismet"
#: views/enter.php:2
msgid "Manually enter an API key"
msgstr "Nhập khóa API thủ công"
#. Plugin URI of the plugin
msgid "https://akismet.com/"
msgstr "https://akismet.com/"
#. Author URI of the plugin
msgid "https://automattic.com/wordpress-plugins/"
msgstr "https://automattic.com/wordpress-plugins/"
#. Author of the plugin
msgid "Automattic"
msgstr "Automattic"
#: class.akismet-admin.php:153
msgid "Remove this URL"
msgstr "Loại bỏ URL này"
#: class.akismet-admin.php:91
msgid "Comment History"
msgstr "Lịch sử bình luận"

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -0,0 +1,32 @@
# Translation of Plugins - Hello Dolly - Stable (latest release) in Vietnamese
# This file is distributed under the same license as the Plugins - Hello Dolly - Stable (latest release) package.
msgid ""
msgstr ""
"PO-Revision-Date: 2019-11-12 11:26:07+0000\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-Generator: GlotPress/2.4.0-alpha\n"
"Language: vi_VN\n"
"Project-Id-Version: Plugins - Hello Dolly - Stable (latest release)\n"
#. Author of the plugin
msgid "Matt Mullenweg"
msgstr "Matt Mullenweg"
#. Description of the plugin
msgid "This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page."
msgstr "Đây không chỉ là plugin, nó đại diện cho hi vọng và lòng nhiệt thành của một thế hệ được gói gọn trong hai từ trong một bài hát nổi tiếng của Louis Armstrong: Hello, Dolly. Khi bạn kích hoạt plugin bạn sẽ thấy các lời bài hát ngẫu nhiên từ <cite>Hello, Dolly</cite> ở góc trên bên phải màn hình ở mọi trang."
#. Plugin Name of the plugin
msgid "Hello Dolly"
msgstr "Hello Dolly"
#. Author URI of the plugin
msgid "https://ma.tt/"
msgstr "https://ma.tt/"
#. Plugin URI of the plugin
msgid "https://wordpress.org/plugins/hello-dolly/"
msgstr "https://wordpress.org/plugins/hello-dolly/"

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -0,0 +1,387 @@
# Translation of Themes - Twenty Nineteen in Vietnamese
# This file is distributed under the same license as the Themes - Twenty Nineteen package.
msgid ""
msgstr ""
"PO-Revision-Date: 2019-05-10 05:13:06+0000\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-Generator: GlotPress/2.4.0-alpha\n"
"Language: vi_VN\n"
"Project-Id-Version: Themes - Twenty Nineteen\n"
#. Description of the theme
msgid "Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you'll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether youre running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it's built to be beautiful on all screen sizes."
msgstr "Giao diện mặc định năm 2019 được thiết kế để thể hiện sức mạnh của trình soạn thảo block mới. Hỗ trợ tùy chỉnh style cho tất cả block mặc định, và được xây dựng để những gì bạn sửa là những gì bạn sẽ thấy trên web. Giao diện 2019 được thiết kế để phù hợp với nhiều loại website, từ blog ảnh, cửa hàng kinh doanh mới mở cho tới tổ chức phi lợi nhuận. Cung cấp khoảng không gian rộng cùng kiển font tiêu đề có nét và kiểu chữ gọn gàng, bạn sẽ thấy nó hiển thị tốt trên mọi màn hình."
#. Theme Name of the theme
msgid "Twenty Nineteen"
msgstr "2019"
#. translators: %s: parent post link
#: single.php:31
msgid "<span class=\"meta-nav\">Published in</span><span class=\"post-title\">%s</span>"
msgstr "<span class=\"meta-nav\">Đăng trong</span><span class=\"post-title\">%s</span>"
#: image.php:87
msgctxt "Parent post link"
msgid "<span class=\"meta-nav\">Published in</span><br><span class=\"post-title\">%title</span>"
msgstr "<span class=\"meta-nav\">Đăng trong</span><br><span class=\"post-title\">%title</span>"
#: template-parts/content/content.php:18
#: template-parts/content/content-excerpt.php:18
msgctxt "post"
msgid "Featured"
msgstr "Nổi bật"
#: inc/back-compat.php:39 inc/back-compat.php:53 inc/back-compat.php:73
msgid "Twenty Nineteen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again."
msgstr "Twenty Nineteen yêu cầu phiên bản WordPress 4.7 trở lên. Bạn đang sử dụng phiên bản %s. Hãy nâng cấp và thử lại."
#: inc/template-functions.php:216
msgid "Back"
msgstr "Trở lại"
#: inc/template-functions.php:209
msgid "More"
msgstr "Xem thêm"
#: inc/customizer.php:98
msgid "Apply a filter to featured images using the primary color"
msgstr "Áp dụng bộ lọc cho ảnh đại diện sử dụng màu chính"
#: inc/customizer.php:78
msgid "Apply a custom color for buttons, links, featured images, etc."
msgstr "Áp dụng màu riêng cho nút ấn, liên kết, ảnh đại diện,..."
#: inc/customizer.php:56
msgctxt "primary color"
msgid "Custom"
msgstr "Tùy chỉnh"
#: inc/customizer.php:55
msgctxt "primary color"
msgid "Default"
msgstr "Mặc định"
#: functions.php:166
msgid "White"
msgstr "Trắng"
#: functions.php:161
msgid "Light Gray"
msgstr "Light Gray"
#: functions.php:156
msgid "Dark Gray"
msgstr "Dark Gray"
#: functions.php:151
msgid "Secondary"
msgstr "Phụ"
#: functions.php:134
msgid "XL"
msgstr "XL"
#: functions.php:133
msgid "Huge"
msgstr "Rất lớn"
#: functions.php:128
msgid "L"
msgstr "L"
#: functions.php:127
msgid "Large"
msgstr "Lớn"
#: functions.php:122
msgid "M"
msgstr "M"
#: functions.php:121
msgid "Normal"
msgstr "Bình thường"
#: functions.php:115
msgid "Small"
msgstr "Nhỏ"
#: functions.php:116
msgid "S"
msgstr "S"
#: functions.php:60 footer.php:37
msgid "Footer Menu"
msgstr "Menu cuối trang"
#: image.php:70
msgctxt "Used before full size attachment link."
msgid "Full size"
msgstr "Kích thước đầy đủ"
#: image.php:56
msgid "Page"
msgstr "Trang"
#: functions.php:190
msgid "Add widgets here to appear in your footer."
msgstr "Thêm widget ở đây để hiển thị ở cuối trang."
#: functions.php:188 template-parts/footer/footer-widgets.php:12
msgid "Footer"
msgstr "Cuối trang"
#: inc/customizer.php:53
msgid "Primary Color"
msgstr "Màu chính"
#: template-parts/post/discussion-meta.php:18
msgid "No comments"
msgstr "Chưa có bình luận"
#. translators: %1(X comments)$s
#: template-parts/post/discussion-meta.php:16
msgid "%d Comment"
msgid_plural "%d Comments"
msgstr[0] "%d bình luận"
#: template-parts/post/author-bio.php:26
msgid "View more posts"
msgstr "Xem thêm bài viết"
#. translators: %s: post author
#: template-parts/post/author-bio.php:17
msgid "Published by %s"
msgstr "Đăng bởi %s"
#: template-parts/header/site-branding.php:33
msgid "Top Menu"
msgstr "Menu trên cùng"
#. translators: %s: Name of current post. Only visible to screen readers
#: template-parts/content/content.php:36
#: template-parts/content/content-single.php:27
msgid "Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>"
msgstr "Đọc tiếp<span class=\"screen-reader-text\"> \"%s\"</span>"
#: image.php:52 template-parts/content/content-page.php:27
#: template-parts/content/content.php:49
#: template-parts/content/content-single.php:40
msgid "Pages:"
msgstr "Trang:"
#: template-parts/content/content-none.php:46
msgid "It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help."
msgstr "Không thấy nội dung tìm kiếm. Hãy thử tìm kiếm khác."
#: template-parts/content/content-none.php:39
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
msgstr "Rất tiếc, không có nội dung nào khớp với yêu cầu tìm kiếm của bạn. Hãy thử lại với các từ khóa khác."
#. translators: 1: link to WP admin new post page.
#: template-parts/content/content-none.php:26
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
msgstr "Bạn đã sẵn sàng đăng bài viết đầu tiên chưa? <a href=\"%1$s\">Hãy bắt đầu tại đây</a>."
#: template-parts/content/content-none.php:16
msgid "Nothing Found"
msgstr "Không có kết quả"
#: single.php:42
msgid "Previous post:"
msgstr "Bài cũ hơn:"
#: single.php:41
msgid "Previous Post"
msgstr "Bài cũ hơn"
#: single.php:39
msgid "Next post:"
msgstr "Bài tiếp theo:"
#: single.php:38
msgid "Next Post"
msgstr "Bài tiếp theo"
#: search.php:22
msgid "Search results for:"
msgstr "Kết quả tìm kiếm cho:"
#: inc/template-tags.php:234
msgid "Older posts"
msgstr "Bài cũ hơn"
#: inc/template-tags.php:230
msgid "Newer posts"
msgstr "Bài mới hơn"
#: inc/template-tags.php:104
msgid "Tags:"
msgstr "Thẻ từ khóa:"
#: inc/template-tags.php:92
msgid "Posted in"
msgstr "Đăng trong"
#. translators: used between list items, there is a space after the comma.
#: inc/template-tags.php:86 inc/template-tags.php:98
msgid ", "
msgstr ", "
#. translators: %s: Name of current post. Only visible to screen readers.
#: inc/template-tags.php:63
msgid "Leave a comment<span class=\"screen-reader-text\"> on %s</span>"
msgstr "Đăng bình luận<span class=\"screen-reader-text\"> trong %s</span>"
#: inc/template-tags.php:46
msgid "Posted by"
msgstr "Đăng bởi"
#: inc/template-functions.php:82
msgctxt "monthly archives date format"
msgid "F Y"
msgstr "F Y"
#: inc/template-functions.php:80
msgctxt "yearly archives date format"
msgid "Y"
msgstr "Y"
#: inc/template-functions.php:92
msgid "Archives:"
msgstr "Lưu trữ:"
#. translators: %s: Taxonomy singular name
#: inc/template-functions.php:90
msgid "%s Archives:"
msgstr "Bài viết trong %s:"
#: inc/template-functions.php:86
msgid "Post Type Archives: "
msgstr "Bài viết:"
#: inc/template-functions.php:84
msgid "Daily Archives: "
msgstr "Bài viết đăng ngày:"
#: inc/template-functions.php:82
msgid "Monthly Archives: "
msgstr "Bài viết đăng trong tháng:"
#: inc/template-functions.php:80
msgid "Yearly Archives: "
msgstr "Bài viết đăng trong năm:"
#: inc/template-functions.php:78
msgid "Author Archives: "
msgstr "Bài viết của tác giả:"
#: inc/template-functions.php:76
msgid "Tag Archives: "
msgstr "Bài viết có từ khóa:"
#: inc/template-functions.php:74
msgid "Category Archives: "
msgstr "Bài viết trong chuyên mục:"
#. translators: %s: Name of current post. Only visible to screen readers
#. translators: %s: Name of current post. Only visible to screen readers.
#: template-parts/content/content-page.php:41
#: template-parts/header/entry-header.php:32 inc/template-tags.php:120
msgid "Edit <span class=\"screen-reader-text\">%s</span>"
msgstr "Sửa <span class=\"screen-reader-text\">%s</span>"
#: header.php:25
msgid "Skip to content"
msgstr "Chuyển đến phần nội dung"
#: functions.php:61 template-parts/header/site-branding.php:46
msgid "Social Links Menu"
msgstr "Menu mạng xã hội"
#: functions.php:59 functions.php:146
msgid "Primary"
msgstr "Chính"
#. translators: %s: WordPress.
#: footer.php:28
msgid "Proudly powered by %s."
msgstr "Tự hào cung cấp bởi %s."
#: comments.php:116
msgid "Comments are closed."
msgstr "Không cho phép bình luận."
#: comments.php:96
msgid "Next"
msgstr "Trang sau"
#: comments.php:95
msgid "Previous"
msgstr "Trước"
#: comments.php:92 comments.php:95 comments.php:96
msgid "Comments"
msgstr "Bình luận"
#. translators: 1: number of comments, 2: post title
#: comments.php:44
msgctxt "comments title"
msgid "%1$s reply on &ldquo;%2$s&rdquo;"
msgid_plural "%1$s replies on &ldquo;%2$s&rdquo;"
msgstr[0] "%1$s trả lời trong &ldquo;%2$s&rdquo;"
#. translators: %s: post title
#: comments.php:40
msgctxt "comments title"
msgid "One reply on &ldquo;%s&rdquo;"
msgstr "Một bình luận trong &ldquo;%s&rdquo;"
#: comments.php:35 comments.php:105 comments.php:107
msgid "Leave a comment"
msgstr "Gửi bình luận"
#: comments.php:33
msgid "Join the Conversation"
msgstr "Tham gia bình luận"
#: classes/class-twentynineteen-walker-comment.php:99
msgid "Your comment is awaiting moderation."
msgstr "Bình luận của bạn cần chờ duyệt."
#: classes/class-twentynineteen-walker-comment.php:94
msgid "Edit"
msgstr "Sửa"
#. translators: 1: comment date, 2: comment time
#: classes/class-twentynineteen-walker-comment.php:86
msgid "%1$s at %2$s"
msgstr "%1$s vào lúc %2$s"
#: classes/class-twentynineteen-walker-comment.php:66
msgid "%s <span class=\"screen-reader-text says\">says:</span>"
msgstr "%s <span class=\"screen-reader-text says\">bình luận:</span>"
#: 404.php:24
msgid "It looks like nothing was found at this location. Maybe try a search?"
msgstr "Không thể tìm thấy dữ liệu cần thiết tại đây. Hãy thử tìm kiếm?"
#: 404.php:20
msgid "Oops! That page can&rsquo;t be found."
msgstr "Oops! Không tìm thấy trang này."
#. Theme URI of the theme
msgid "https://wordpress.org/themes/twentynineteen/"
msgstr "https://wordpress.org/themes/twentynineteen/"
#. Author of the theme
msgid "the WordPress team"
msgstr "Nhóm Phát Triển WordPress"
#. Author URI of the theme
#: footer.php:25
msgid "https://wordpress.org/"
msgstr "https://vi.wordpress.org/"

Binary file not shown.

View File

@@ -0,0 +1,330 @@
# Translation of Themes - Twenty Seventeen in Vietnamese
# This file is distributed under the same license as the Themes - Twenty Seventeen package.
msgid ""
msgstr ""
"PO-Revision-Date: 2019-05-10 05:34:17+0000\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-Generator: GlotPress/2.4.0-alpha\n"
"Language: vi_VN\n"
"Project-Id-Version: Themes - Twenty Seventeen\n"
#. Description of the theme
msgid "Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device."
msgstr "Twenty Seventeen mang đến video trên header và ảnh nổi bật. Với định hướng dành cho các site kinh doanh, giao diện này mang đến nhiều mục trên trang chủ cũng như widget, menu chính và menu mạng xã hội, logo, và nhiều hơn nữa. Cá nhân hoá dễ dàng với màu tự chọn, và hiển thị nội dung đa phương tiện với định dạng bài viết. Đây là giao diện mặc định cho năm 2017 với nhiều ngôn ngữ, nhiều sự tuỳ biến và hoạt động tốt trên các thiết bị khác nhau."
#. Theme Name of the theme
msgid "Twenty Seventeen"
msgstr "Twenty Seventeen"
#: template-parts/footer/footer-widgets.php:18
msgid "Footer"
msgstr "Cuối trang"
#: functions.php:338
msgid "Add widgets here to appear in your sidebar on blog posts and archive pages."
msgstr "Thêm widget ở đây để hiển thị trong Sidebar của bạn trên các bài viết và trang Lưu trữ."
#: sidebar.php:18 functions.php:336
msgid "Blog Sidebar"
msgstr "Blog Sidebar"
#: template-parts/navigation/navigation-top.php:31
#: template-parts/header/site-branding.php:34
msgid "Scroll down to content"
msgstr "Kéo xuống nội dung"
#: functions.php:179
msgctxt "Theme starter content"
msgid "Coffee"
msgstr "Coffee"
#: functions.php:175
msgctxt "Theme starter content"
msgid "Sandwich"
msgstr "Bánh kẹp"
#: functions.php:171
msgctxt "Theme starter content"
msgid "Espresso"
msgstr "Espresso"
#: inc/custom-header.php:128
msgid "Pause background video"
msgstr "Tạm dừng video nền"
#: inc/custom-header.php:127
msgid "Play background video"
msgstr "Chạy video nền"
#: inc/template-tags.php:151
msgid "Front Page Section %1$s Placeholder"
msgstr "Mục nhập %1$s trên trang chủ"
#: inc/customizer.php:109
msgid "When the two-column layout is assigned, the page title is in one column and content is in the other."
msgstr "Khi giao diện 2 cột được lựa chọn, tiêu đề trang sẽ trong 1 cột và nội dung sẽ trong cột khác."
#: single.php:34
msgid "Next Post"
msgstr "Bài tiếp theo"
#: index.php:27
msgid "Posts"
msgstr "Bài viết"
#: inc/template-tags.php:89
msgid "Tags"
msgstr "Tag"
#: inc/template-tags.php:85
msgid "Categories"
msgstr "Danh mục"
#. translators: used between list items, there is a space after the comma
#: inc/template-tags.php:66
msgid ", "
msgstr ", "
#. translators: %s: post date
#: inc/template-tags.php:52
msgid "<span class=\"screen-reader-text\">Posted on</span> %s"
msgstr "<span class=\"screen-reader-text\">Đăng trong</span> %s"
#. translators: %s: post author
#: inc/template-tags.php:21
msgid "by %s"
msgstr "bởi %s"
#: inc/icon-functions.php:44
msgid "Please define an SVG icon filename."
msgstr "Vui lòng xác định tên file icon SVG."
#: inc/icon-functions.php:39
msgid "Please define default parameters in the form of an array."
msgstr "Vui lòng xác định giá trị mặc định trong form của array."
#: inc/customizer.php:143
msgid "Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed."
msgstr "Chọn trang để hiển thị nổi bật trong mỗi khu vực từ danh sách dropdown. Thêm ảnh cho muc bằng thiết lập ảnh đại diện trong phần sửa trang. Mục rỗng sẽ không hiển thị."
#. translators: %d is the front page section number
#: inc/customizer.php:142
msgid "Front Page Section %d Content"
msgstr "Nội dung mục trang chủ %d"
#: inc/customizer.php:112 inc/customizer.php:171
msgid "Two Column"
msgstr "Hai cột"
#: inc/customizer.php:111 inc/customizer.php:170
msgid "One Column"
msgstr "Một cột"
#: inc/customizer.php:106
msgid "Page Layout"
msgstr "Giao diện trang"
#: inc/customizer.php:89
msgid "Theme Options"
msgstr "Tuỳ chọn giao diện"
#: inc/customizer.php:64
msgid "Custom"
msgstr "Tuỳ biến"
#: inc/customizer.php:62
msgid "Light"
msgstr "Tông màu sáng"
#: inc/customizer.php:60
msgid "Color Scheme"
msgstr "Tông màu"
#: inc/custom-header.php:56
msgid "Default Header Image"
msgstr "Ảnh mặc định trên cùng"
#: functions.php:360
msgid "Footer 2"
msgstr "Cuối trang 2"
#: functions.php:350 functions.php:362
msgid "Add widgets here to appear in your footer."
msgstr "Thêm widget ở đây để hiển thị trong Cuối trang."
#: functions.php:348
msgid "Footer 1"
msgstr "Cuối trang 1"
#: functions.php:289
msgctxt "Libre Franklin font: on or off"
msgid "on"
msgstr "bật"
#: template-parts/navigation/navigation-top.php:12 functions.php:64
#: functions.php:203
msgid "Top Menu"
msgstr "Menu trên cùng"
#: comments.php:62
msgid "Reply"
msgstr "Trả lời"
#: template-parts/post/content-none.php:28
msgid "It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help."
msgstr "Không thấy nội dung tìm kiếm. Hãy thử tìm kiếm khác."
#: search.php:54
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
msgstr "Rất tiếc, không có nội dung nào khớp với yêu cầu tìm kiếm của bạn. Hãy thử lại với các từ khóa khác."
#: template-parts/post/content-none.php:24
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
msgstr "Bạn đã sẵn sàng đăng bài viết đầu tiên chưa? <a href=\"%1$s\">Hãy bắt đầu tại đây</a>."
#: template-parts/post/content-none.php:17 search.php:21
msgid "Nothing Found"
msgstr "Không có kết quả"
#: single.php:33
msgid "Previous Post"
msgstr "Bài cũ hơn"
#: single.php:33 comments.php:71
msgid "Previous"
msgstr "Trước"
#: single.php:34 comments.php:72
msgid "Next"
msgstr "Trang sau"
#: searchform.php:20
msgctxt "submit button"
msgid "Search"
msgstr "Tìm kiếm"
#: searchform.php:19
msgctxt "placeholder"
msgid "Search &hellip;"
msgstr "Tìm kiếm &hellip;"
#: searchform.php:17
msgctxt "label"
msgid "Search for:"
msgstr "Tìm kiếm:"
#: search.php:19
msgid "Search Results for: %s"
msgstr "Kết quả tìm kiếm cho từ khóa: %s"
#. translators: %s: Name of current post
#: template-parts/page/content-front-page-panels.php:45
#: template-parts/page/content-front-page.php:42
#: template-parts/post/content-audio.php:84 template-parts/post/content.php:57
#: template-parts/post/content-gallery.php:71
#: template-parts/post/content-video.php:83
#: template-parts/post/content-image.php:61 functions.php:390
msgid "Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>"
msgstr "Đọc tiếp<span class=\"screen-reader-text\"> \"%s\"</span>"
#: inc/customizer.php:63
msgid "Dark"
msgstr "Tông màu tối"
#: inc/back-compat.php:39 inc/back-compat.php:52 inc/back-compat.php:70
msgid "Twenty Seventeen requires at least WordPress version 4.7. You are running version %s. Please upgrade and try again."
msgstr "Giao diện Twenty Seventeen yêu cầu phiên bản WordPress tối thiểu 4.7. Bạn đang sử dụng phiên bản %s. Vui lòng nâng cấp và thử lại."
#. translators: %s: Name of current post
#: inc/template-tags.php:117
msgid "Edit<span class=\"screen-reader-text\"> \"%s\"</span>"
msgstr "Sửa<span class=\"screen-reader-text\"> \"%s\"</span>"
#: template-parts/page/content-page.php:26
#: template-parts/post/content-audio.php:91 template-parts/post/content.php:64
#: template-parts/post/content-gallery.php:78
#: template-parts/post/content-video.php:90
#: template-parts/post/content-image.php:68
msgid "Pages:"
msgstr "Trang:"
#: template-parts/navigation/navigation-top.php:17
msgid "Menu"
msgstr "Menu"
#: header.php:28
msgid "Skip to content"
msgstr "Chuyển đến phần nội dung"
#: functions.php:482
msgid "Collapse child menu"
msgstr "Ẩn Menu con"
#: functions.php:481
msgid "Expand child menu"
msgstr "Hiện menu con"
#: functions.php:65 functions.php:214
msgid "Social Links Menu"
msgstr "Menu mạng xã hội"
#: template-parts/footer/site-info.php:19
msgid "Proudly powered by %s"
msgstr "Proudly powered by %s"
#: footer.php:26
msgid "Footer Social Links Menu"
msgstr "Menu mạng xã hội cuối trang"
#: comments.php:82
msgid "Comments are closed."
msgstr "Không cho phép bình luận."
#. translators: 1: number of comments, 2: post title
#: comments.php:41
msgctxt "comments title"
msgid "%1$s Reply to &ldquo;%2$s&rdquo;"
msgid_plural "%1$s Replies to &ldquo;%2$s&rdquo;"
msgstr[0] "%1$s Trả lời &ldquo;%2$s&rdquo;"
#. translators: %s: post title
#: comments.php:37
msgctxt "comments title"
msgid "One Reply to &ldquo;%s&rdquo;"
msgstr "Một trả lời cho &ldquo;%s&rdquo;"
#: archive.php:50 search.php:47 index.php:54
msgid "Page"
msgstr "Trang"
#: 404.php:21
msgid "Oops! That page can&rsquo;t be found."
msgstr "Oops! Không tìm thấy trang này."
#: 404.php:24
msgid "It looks like nothing was found at this location. Maybe try a search?"
msgstr "Không thể tìm thấy dữ liệu cần thiết tại đây. Hãy thử tìm kiếm?"
#: archive.php:48 search.php:45 index.php:52
msgid "Previous page"
msgstr "Trang trước"
#: archive.php:49 search.php:46 index.php:53
msgid "Next page"
msgstr "Trang tiếp"
#. Author of the theme
msgid "the WordPress team"
msgstr "Nhóm Phát Triển WordPress"
#. Theme URI of the theme
msgid "https://wordpress.org/themes/twentyseventeen/"
msgstr "https://wordpress.org/themes/twentyseventeen/"
#. Author URI of the theme
#: template-parts/footer/site-info.php:18
msgid "https://wordpress.org/"
msgstr "https://vi.wordpress.org/"

Binary file not shown.

View File

@@ -0,0 +1,372 @@
# Translation of Themes - Twenty Sixteen in Vietnamese
# This file is distributed under the same license as the Themes - Twenty Sixteen package.
msgid ""
msgstr ""
"PO-Revision-Date: 2019-05-02 05:02:21+0000\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-Generator: GlotPress/2.4.0-alpha\n"
"Language: vi_VN\n"
"Project-Id-Version: Themes - Twenty Sixteen\n"
#. Theme Name of the theme
msgid "Twenty Sixteen"
msgstr "2016"
#. Description of the theme
msgid "Twenty Sixteen is a modernized take on an ever-popular WordPress layout — the horizontal masthead with an optional right sidebar that works perfectly for blogs and websites. It has custom color options with beautiful default color schemes, a harmonious fluid grid using a mobile-first approach, and impeccable polish in every detail. Twenty Sixteen will make your WordPress look beautiful everywhere."
msgstr "Twenty Sixteen là một giao diện hiện đại dựa trên một cách bố cục trang web rất phổ biển của Wordpress - phần header ở đầu trang với tùy chọn sidebar bên phải rất phù hợp với các blog cá nhân và trang web. Giao diện này cho phép bạn tùy chỉnh màu sắc của trang web với những set màu được tùy chỉnh sẵn, nó cũng có một hệ thống grid hài hòa và linh hoạt được tối ưu cho các thiết bị di động, và được chăm chút hoàn hảo đến từng chi tiết. Twenty Sixteen sẽ giúp bạn có một website WordPress đẹp và chạy tốt trên mọi thiết bị."
#: functions.php:202
msgid "Bright Red"
msgstr "Đỏ nhạt"
#: functions.php:197
msgid "Dark Red"
msgstr "Đỏ đậm"
#: functions.php:192
msgid "Medium Brown"
msgstr "Nâu vừa"
#: functions.php:187
msgid "Dark Brown"
msgstr "Nâu đậm"
#: functions.php:182
msgid "Light Blue"
msgstr "Xanh biển nhạt"
#: functions.php:177
msgid "Bright Blue"
msgstr "Xanh biển nhạt"
#: functions.php:172
msgid "Blue Gray"
msgstr "Xanh xám"
#: functions.php:167
msgid "White"
msgstr "Trắng"
#: functions.php:162
msgid "Light Gray"
msgstr "Xám nhạt"
#: functions.php:157
msgid "Medium Gray"
msgstr "Xám vừa"
#: functions.php:152
msgid "Dark Gray"
msgstr "Xám đậm"
#. translators: %s: Name of current post
#: template-parts/content.php:29 inc/template-tags.php:194
msgid "Continue reading<span class=\"screen-reader-text\"> \"%s\"</span>"
msgstr "Đọc tiếp<span class=\"screen-reader-text\"> \"%s\"</span>"
#. translators: %s: Name of current post
#: template-parts/content.php:53 template-parts/content-page.php:39
#: template-parts/content-search.php:28 template-parts/content-search.php:43
#: template-parts/content-single.php:47 image.php:88
msgid "Edit<span class=\"screen-reader-text\"> \"%s\"</span>"
msgstr "Sửa<span class=\"screen-reader-text\"> \"%s\"</span>"
#: inc/customizer.php:345
msgid "Red"
msgstr "Màu đỏ"
#. translators: %s: post title
#: comments.php:31
msgctxt "comments title"
msgid "One thought on &ldquo;%s&rdquo;"
msgstr "Một bình luận về &ldquo;%s&rdquo;"
#: searchform.php:16
msgctxt "submit button"
msgid "Search"
msgstr "Tìm kiếm"
#: searchform.php:14
msgctxt "placeholder"
msgid "Search &hellip;"
msgstr "Tìm kiếm &hellip;"
#: searchform.php:13
msgctxt "label"
msgid "Search for:"
msgstr "Tìm kiếm:"
#: footer.php:30
msgid "Footer Social Links Menu"
msgstr "Liên kết mạng xã hội"
#: footer.php:17
msgid "Footer Primary Menu"
msgstr "Menu footer chính"
#: functions.php:267
msgid "Add widgets here to appear in your sidebar."
msgstr "Thêm các widget tại đây để chúng hiển thị trên sidebar"
#: template-parts/content.php:14
msgid "Featured"
msgstr "Nổi bật"
#: template-parts/content-none.php:28
msgid "It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help."
msgstr "Không thấy nội dung tìm kiếm. Hãy thử tìm kiếm khác."
#: template-parts/content-none.php:23
msgid "Sorry, but nothing matched your search terms. Please try again with some different keywords."
msgstr "Rất tiếc, không có nội dung nào khớp với yêu cầu tìm kiếm của bạn. Hãy thử lại với các từ khóa khác."
#: template-parts/content-none.php:19
msgid "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
msgstr "Bạn đã sẵn sàng đăng bài viết đầu tiên chưa? <a href=\"%1$s\">Hãy bắt đầu tại đây</a>."
#: template-parts/content-none.php:13
msgid "Nothing Found"
msgstr "Không có kết quả"
#: template-parts/biography.php:33
msgid "View all posts by %s"
msgstr "Xem tất cả bài viết của %s"
#: template-parts/biography.php:28
msgid "Author:"
msgstr "Tác giả:"
#: single.php:42
msgid "Previous post:"
msgstr "Bài viết trước:"
#: single.php:41
msgid "Previous"
msgstr "Trước"
#: single.php:39
msgid "Next post:"
msgstr "Bài tiếp theo:"
#: single.php:38
msgid "Next"
msgstr "Trang sau"
#: search.php:18
msgid "Search Results for: %s"
msgstr "Kết quả tìm kiếm cho từ khóa: %s"
#: inc/template-tags.php:112
msgctxt "Used before tag names."
msgid "Tags"
msgstr "Thẻ"
#: inc/template-tags.php:103
msgctxt "Used before category names."
msgid "Categories"
msgstr "Danh mục"
#: inc/template-tags.php:99 inc/template-tags.php:108
msgctxt "Used between list items, there is a space after the comma."
msgid ", "
msgstr ","
#: inc/template-tags.php:83
msgctxt "Used before publish date."
msgid "Posted on"
msgstr "Đăng vào ngày"
#: inc/template-tags.php:40
msgctxt "Used before post format."
msgid "Format"
msgstr "Loại bài viết"
#: inc/template-tags.php:52
msgid "Leave a comment<span class=\"screen-reader-text\"> on %s</span>"
msgstr "Để lại một lời bình <span class=\"screen-reader-text\"> ở %s</span>"
#: inc/template-tags.php:26
msgctxt "Used before post author name."
msgid "Author"
msgstr "Tác giả"
#: functions.php:207 inc/customizer.php:355
msgid "Yellow"
msgstr "Màu vàng"
#: inc/customizer.php:335
msgid "Gray"
msgstr "Màu xám"
#: inc/customizer.php:325
msgid "Dark"
msgstr "Màu tối"
#: inc/customizer.php:221
msgid "Main Text Color"
msgstr "Màu chữ chính"
#: inc/customizer.php:315
msgid "Default"
msgstr "Mặc định"
#: inc/customizer.php:242
msgid "Secondary Text Color"
msgstr "Màu chữ phụ"
#: inc/customizer.php:200
msgid "Link Color"
msgstr "Màu sắc liên kết"
#: inc/customizer.php:176
msgid "Page Background Color"
msgstr "Màu nền trang"
#: single.php:31 image.php:107
msgctxt "Parent post link"
msgid "<span class=\"meta-nav\">Published in</span><span class=\"post-title\">%title</span>"
msgstr "<span class=\"meta-nav\">Được đăng trong</span><span class=\"post-title\">%title</span>"
#: inc/back-compat.php:41 inc/back-compat.php:54 inc/back-compat.php:72
msgid "Twenty Sixteen requires at least WordPress version 4.4. You are running version %s. Please upgrade and try again."
msgstr "Giao diện Twenty Sixteen yêu cầu phiên bản WordPress 4.4 trở lên. Bạn đang sử dụng bản %s. Hãy cập nhật phiên bản WordPress của bạn và thử lại."
#: inc/customizer.php:153
msgid "Base Color Scheme"
msgstr "Bảng phối màu cơ bản"
#: image.php:77
msgctxt "Used before full size attachment link."
msgid "Full size"
msgstr "Kích cỡ đầy đủ"
#: template-parts/content.php:36 template-parts/content-page.php:24
#: template-parts/content-single.php:26 image.php:58
msgid "Pages:"
msgstr "Trang:"
#: image.php:26
msgid "Next Image"
msgstr "Ảnh sau"
#: image.php:25
msgid "Previous Image"
msgstr "Ảnh trước"
#: header.php:50
msgid "Menu"
msgstr "Menu"
#: header.php:28
msgid "Skip to content"
msgstr "Chuyển đến phần nội dung"
#: functions.php:407
msgid "expand child menu"
msgstr "mở rộng menu con"
#: functions.php:408
msgid "collapse child menu"
msgstr "đóng menu con"
#. translators: If there are characters in your language that are not supported
#. by Inconsolata, translate this to 'off'. Do not translate into your own
#. language.
#: functions.php:327
msgctxt "Inconsolata font: on or off"
msgid "on"
msgstr "bật"
#: functions.php:277
msgid "Content Bottom 1"
msgstr "Nội dung ở chân trang 1"
#: functions.php:279 functions.php:291
msgid "Appears at the bottom of the content on posts and pages."
msgstr "Nội dung ở chân trang 1"
#: functions.php:289
msgid "Content Bottom 2"
msgstr "Nội dung ở chân trang 2"
#. translators: If there are characters in your language that are not supported
#. by Merriweather, translate this to 'off'. Do not translate into your own
#. language.
#: functions.php:317
msgctxt "Merriweather font: on or off"
msgid "on"
msgstr "off"
#. translators: If there are characters in your language that are not supported
#. by Montserrat, translate this to 'off'. Do not translate into your own
#. language.
#: functions.php:322
msgctxt "Montserrat font: on or off"
msgid "on"
msgstr "off"
#: functions.php:265
msgid "Sidebar"
msgstr "Thanh bên"
#: functions.php:93 header.php:67
msgid "Social Links Menu"
msgstr "Menu các đường dẫn mạng xã hội"
#: functions.php:92 header.php:54
msgid "Primary Menu"
msgstr "Menu chính"
#: footer.php:61
msgid "Proudly powered by %s"
msgstr "Được xây dựng bởi %s"
#: comments.php:71
msgid "Comments are closed."
msgstr "Đã đóng bình luận."
#. translators: 1: number of comments, 2: post title
#: comments.php:35
msgctxt "comments title"
msgid "%1$s thought on &ldquo;%2$s&rdquo;"
msgid_plural "%1$s thoughts on &ldquo;%2$s&rdquo;"
msgstr[0] "%1$s bình luận về &ldquo;%2$s&rdquo;"
#: archive.php:53 template-parts/content.php:40
#: template-parts/content-page.php:28 template-parts/content-single.php:30
#: search.php:41 index.php:50 image.php:62
msgid "Page"
msgstr "Trang"
#: archive.php:52 search.php:40 index.php:49
msgid "Next page"
msgstr "Trang tiếp"
#: archive.php:51 search.php:39 index.php:48
msgid "Previous page"
msgstr "Trang trước"
#: 404.php:21
msgid "It looks like nothing was found at this location. Maybe try a search?"
msgstr "Không thể tìm thấy dữ liệu cần thiết tại đây. Hãy thử tìm kiếm?"
#: 404.php:17
msgid "Oops! That page can&rsquo;t be found."
msgstr "Oops! Không tìm thấy trang này."
#. Theme URI of the theme
msgid "https://wordpress.org/themes/twentysixteen/"
msgstr "https://wordpress.org/themes/twentysixteen/"
#. Author of the theme
msgid "the WordPress team"
msgstr "Nhóm Phát Triển WordPress"
#. Author URI of the theme
#: footer.php:60
msgid "https://wordpress.org/"
msgstr "https://wordpress.org/"

Binary file not shown.

View File

@@ -0,0 +1,511 @@
# Translation of Themes - Twenty Twenty in Vietnamese
# This file is distributed under the same license as the Themes - Twenty Twenty package.
msgid ""
msgstr ""
"PO-Revision-Date: 2019-11-21 09:32:55+0000\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-Generator: GlotPress/2.4.0-alpha\n"
"Language: vi_VN\n"
"Project-Id-Version: Themes - Twenty Twenty\n"
#. Description of the theme
msgid "Our default theme for 2020 is designed to take full advantage of the flexibility of the block editor. Organizations and businesses have the ability to create dynamic landing pages with endless layouts using the group and column blocks. The centered content column and fine-tuned typography also makes it perfect for traditional blogs. Complete editor styles give you a good idea of what your content will look like, even before you publish. You can give your site a personal touch by changing the background colors and the accent color in the Customizer. The colors of all elements on your site are automatically calculated based on the colors you pick, ensuring a high, accessible color contrast for your visitors."
msgstr "Giao diện mặc định 2020 được thiết kế để tận dụng tối đa sự linh hoạt của trình soạn thảo khối. Các tổ chức và doanh nghiệp có khả năng tạo các trang đích với bố cục vô tận bằng cách sử dụng các nhóm và cột. Cột nội dung cân giữa và kiểu chữ tinh chỉnh cũng làm cho nó hoàn hảo dành cho các blog truyền thống. Phong cách biên tập hoàn chỉnh cung cấp cho bạn một công cụ tốt để xây dựng ý tưởng về nội dung của bạn sẽ trông như thế nào, ngay cả trước khi bạn xuất bản. Bạn có thể tạo bản sắc riêng cho trang web của bạn bằng cách thay đổi màu nền và màu nhấn trong Tùy chỉnh. Màu sắc của tất cả các yếu tố trên trang web của bạn được tự động tính toán dựa trên màu sắc bạn chọn, đảm bảo độ tương phản màu cao, dễ tiếp cận cho khách truy cập của bạn."
#. Theme Name of the theme
msgid "Twenty Twenty"
msgstr "2020"
#: inc/starter-content.php:38
msgctxt "Theme starter content"
msgid "The New UMoMA Opens its Doors"
msgstr "Trang chủ mới của bạn đã sẵn sàng"
#: template-parts/entry-author-bio.php:29
msgid "View Archive <span aria-hidden=\"true\">&rarr;</span>"
msgstr "Xem lưu trữ <span aria-hidden=\"true\">&rarr;</span>"
#: classes/class-twentytwenty-customize.php:352
msgid "Overlay Background Color"
msgstr "Màu nền lớp phủ"
#: classes/class-twentytwenty-customize.php:395
msgid "Overlay Opacity"
msgstr "Độ trong suốt lớp phủ"
#: inc/starter-content.php:47
msgid "The New UMoMA Opens its Doors"
msgstr "Trang chủ mới của bạn đã sẵn sàng"
#: inc/starter-content.php:72 inc/starter-content.php:87
#: inc/starter-content.php:104 inc/starter-content.php:119
msgid "Read More"
msgstr "Đọc tiếp"
#: inc/starter-content.php:66
msgid "Works and Days"
msgstr "Vội vàng"
#: inc/starter-content.php:69 inc/starter-content.php:101
msgid "August 1 -- December 1"
msgstr "Tôi muốn tắt nắng đi; Cho màu đừng nhạt mất;"
#: inc/starter-content.php:98
msgid "The Life I Deserve"
msgstr "Đây mùa thu tới"
#: inc/starter-content.php:55
msgid "The premier destination for modern art in Northern Sweden. Open from 10 AM to 6 PM every day during the summer months."
msgstr "Hãy cùng thử tìm hiểu cách bày trí mới trong trình soạn thảo. Các ví dụ dưới đây là tên một vài bài thơ của Xuân Diệu."
#: inc/starter-content.php:81
msgid "Theatre of Operations"
msgstr "Dại khờ"
#: inc/starter-content.php:113
msgid "From Signac to Matisse"
msgstr "Vì sao"
#: inc/starter-content.php:84 inc/starter-content.php:116
msgid "October 1 -- December 1"
msgstr "Người ta khổ vì thương không phải cách; Yêu sai duyên, và mến chẳng nhằm người."
#: inc/starter-content.php:129
msgid "”Cyborgs, as the philosopher Donna Haraway established, are not reverent. They do not remember the cosmos.”"
msgstr "”Kẻ chiến thắng không bao giờ bỏ cuộc; kẻ bỏ cuộc không bao giờ chiến thắng”"
#: inc/starter-content.php:133
msgid "With seven floors of striking architecture, UMoMA shows exhibitions of international contemporary art, sometimes along with art historical retrospectives. Existential, political and philosophical issues are intrinsic to our programme. As visitor you are invited to guided tours artist talks, lectures, film screenings and other events with free admission"
msgstr "Tuổi trẻ chính là thời điểm thích hợp nhất để biến ước mơ thành hiện thực. Chúng ta có sức khỏe, trí lực, và quan trọng nhất là đủ đam mê để theo đuổi ước mơ của mình. Một trong những lỗi lầm lớn nhất của con người là họ cứ ép mình phải hứng thú với thứ gì đó. Bạn không chọn đam mê của mình; chính đam mê lựa chọn bạn."
#: inc/starter-content.php:136
msgid "The exhibitions are produced by UMoMA in collaboration with artists and museums around the world and they often attract international attention. UMoMA has received a Special Commendation from the European Museum of the Year, and was among the top candidates for the Swedish Museum of the Year Award as well as for the Council of Europe Museum Prize."
msgstr "Khi các thế hệ khởi nghiệp đầu tiên tại Việt Nam như VietnamWorks, VNG, Tiki và ngày càng có nhiều công ty khởi nghiệp ra đời, họ liên tục đổi mới và mang lại sự thịnh vượng cho những người sáng lập, những thành viên cùng đồng hành, nhà đầu tư, họ tạo ra nhiều giá trị cho khách hàng thì chúng ta sẽ còn thấy nhiều câu chuyện thành công được viết tiếp ở Việt Nam!"
#: inc/starter-content.php:144
msgid "Become a Member and Get Exclusive Offers!"
msgstr "Hãy bắt đầu từ ngay hôm nay!"
#: inc/starter-content.php:147
msgid "Members get access to exclusive exhibits and sales. Our memberships cost $99.99 and are billed annually."
msgstr "Trở thành thành viên của chúng tôi và nhận những thông tin hữu ích về khởi nghiệp."
#: inc/starter-content.php:150
msgid "Join the Club"
msgstr "Đăng ký"
#: classes/class-twentytwenty-customize.php:123
msgid "Primary Color"
msgstr "Màu chính"
#: classes/class-twentytwenty-customize.php:125
msgid "Default"
msgstr "Mặc định"
#: classes/class-twentytwenty-customize.php:126
msgid "Custom"
msgstr "Tùy chỉnh"
#: inc/template-tags.php:393
msgctxt "A string that is output before one or more categories"
msgid "In"
msgstr "Trong"
#: classes/class-twentytwenty-customize.php:375
msgid "The color used for the text in the overlay."
msgstr "Màu của chữ trên nền phủ."
#: classes/class-twentytwenty-customize.php:374
msgid "Overlay Text Color"
msgstr "Màu chữ nền phủ"
#: classes/class-twentytwenty-customize.php:353
msgid "The color used for the overlay. Defaults to the accent color."
msgstr "Màu nền phủ. Mặc định sử dụng màu phụ."
#: index.php:99
msgid "search again"
msgstr "tìm lại"
#: template-parts/modal-search.php:20 searchform.php:24
msgid "Search for:"
msgstr "Tìm kiếm cho:"
#. translators: %s: Number of search results
#: index.php:39
msgid "We found %s result for your search."
msgid_plural "We found %s results for your search."
msgstr[0] "Chúng tôi đã tìm thấy %s kết quả tìm kiếm."
#: 404.php:24
msgid "404 not found"
msgstr "404 không có"
#. translators: Copyright date format, see https://secure.php.net/date
#: footer.php:25
msgctxt "copyright date format"
msgid "Y"
msgstr "Y"
#. translators: %s: HTML character for up arrow
#: footer.php:49
msgid "Up %s"
msgstr "Lên trên %s"
#. translators: %s: HTML character for up arrow
#: footer.php:43
msgid "To the top %s"
msgstr "Lên trên cùng %s"
#. Translators: 1 = comment date, 2 = comment time
#: classes/class-twentytwenty-walker-comment.php:69
msgid "%1$s at %2$s"
msgstr "%1$s vào lúc %2$s"
#: classes/class-twentytwenty-walker-comment.php:77
msgid "Edit"
msgstr "Sửa"
#: classes/class-twentytwenty-walker-comment.php:92
msgid "Your comment is awaiting moderation."
msgstr "Bình luận của bạn cần chờ duyệt."
#: comments.php:34
msgid "Leave a comment"
msgstr "Gửi bình luận"
#. translators: %s: post title
#: comments.php:37
msgctxt "comments title"
msgid "One reply on &ldquo;%s&rdquo;"
msgstr "Một bình luận trong &ldquo;%s&rdquo;"
#. translators: 1: number of comments, 2: post title
#: comments.php:41
msgctxt "comments title"
msgid "%1$s reply on &ldquo;%2$s&rdquo;"
msgid_plural "%1$s replies on &ldquo;%2$s&rdquo;"
msgstr[0] "%1$s trả lời trong &ldquo;%2$s&rdquo;"
#: comments.php:88
msgid "Comments"
msgstr "Bình luận"
#: comments.php:127
msgid "Comments are closed."
msgstr "Không cho phép bình luận."
#: functions.php:491 inc/starter-content.php:176 inc/starter-content.php:186
msgid "Primary"
msgstr "Chính"
#: inc/starter-content.php:196
msgid "Social Links Menu"
msgstr "Menu mạng xã hội"
#. translators: %s: Post title. Only visible to screen readers.
#: inc/template-tags.php:206
msgid "Edit <span class=\"screen-reader-text\">%s</span>"
msgstr "Sửa <span class=\"screen-reader-text\">%s</span>"
#: functions.php:258
msgid "Footer Menu"
msgstr "Menu cuối trang"
#: template-parts/content.php:48 template-parts/content-cover.php:138
msgid "Pages:"
msgstr "Trang:"
#: template-parts/footer-menus-widgets.php:37
msgid "Footer"
msgstr "Cuối trang"
#: template-parts/content.php:48 template-parts/content-cover.php:138
msgid "Page"
msgstr "Trang"
#: functions.php:496
msgid "Secondary"
msgstr "Phụ"
#: template-parts/modal-search.php:26
msgid "Close search"
msgstr "Tắt tìm kiếm"
#: header.php:76 header.php:137
msgid "Menu"
msgstr "Menu"
#: header.php:53 header.php:157
msgid "Search"
msgstr "Tìm kiếm"
#: template-parts/content.php:36
msgid "Continue reading"
msgstr "Chi tiết"
#: functions.php:548
msgctxt "Short name of the larger font size in the block editor."
msgid "XL"
msgstr "XL"
#: inc/template-tags.php:347
msgid "Post author"
msgstr "Tác giả"
#: inc/template-tags.php:371
msgid "Post date"
msgstr "Ngày đăng"
#: inc/template-tags.php:407
msgid "Tags"
msgstr "Thẻ"
#: template-parts/content-cover.php:70 template-parts/entry-header.php:36
#: inc/template-tags.php:389
msgid "Categories"
msgstr "Chuyên mục"
#: index.php:48
msgid "We could not find any results for your search. You can give it another try through the search form below."
msgstr "Chúng tôi không tìm thấy bất kỳ kết quả nào. Bạn có thể tìm kiếm lại với form tìm kiếm bên dưới."
#: header.php:88
msgid "Horizontal"
msgstr "Ngang"
#: functions.php:375
msgid "Footer #2"
msgstr "Footer #2"
#: functions.php:365
msgid "Widgets in this area will be displayed in the first column in the footer."
msgstr "Widget tại vị trí này sẽ hiển thị ở cột đầu tiên ở footer."
#: functions.php:363
msgid "Footer #1"
msgstr "Footer #1"
#: functions.php:338
msgid "Skip to the content"
msgstr "Chuyển đến nội dung"
#: functions.php:259
msgid "Social Menu"
msgstr "Social Menu"
#: functions.php:257
msgid "Mobile Menu"
msgstr "Menu di động"
#: footer.php:33
msgid "Powered by WordPress"
msgstr "Xây dựng bằng WordPress"
#: comments.php:75
msgid "Older Comments"
msgstr "Các bình luận trước"
#: comments.php:74
msgid "Newer Comments"
msgstr "Các bình luận mới hơn"
#: classes/class-twentytwenty-walker-page.php:134 inc/template-tags.php:555
msgid "Show sub menu"
msgstr "Hiển thị menu con"
#. translators: %d: ID of a post
#: classes/class-twentytwenty-walker-page.php:82
msgid "#%d (no title)"
msgstr "#%d (không đề)"
#: classes/class-twentytwenty-walker-comment.php:127
msgid "By Post Author"
msgstr "Bởi tác giả"
#: classes/class-twentytwenty-walker-comment.php:56
msgid "says:"
msgstr "nói:"
#: classes/class-twentytwenty-customize.php:225
msgid "Show search in header"
msgstr "Hiển thị tìm kiếm ở header"
#: classes/class-twentytwenty-customize.php:81
msgid "Retina logo"
msgstr "Retina logo"
#: 404.php:19
msgid "The page you were looking for could not be found. It might have been removed, renamed, or did not exist in the first place."
msgstr "Không tìm thấy trang. Nó có thể đã bị xóa, đổi tên hoặc không tồn tại ở vị trí này."
#: 404.php:17
msgid "Page Not Found"
msgstr "Không tìm thấy trang"
#: index.php:32
msgid "Search:"
msgstr "Tìm kiếm:"
#: searchform.php:27
msgctxt "submit button"
msgid "Search"
msgstr "Tìm kiếm"
#: functions.php:547
msgctxt "Name of the larger font size in the block editor"
msgid "Larger"
msgstr "Lớn hơn"
#: functions.php:542
msgctxt "Short name of the large font size in the block editor."
msgid "L"
msgstr "L"
#: functions.php:541
msgctxt "Name of the large font size in the block editor"
msgid "Large"
msgstr "Lớn"
#: functions.php:536
msgctxt "Short name of the regular font size in the block editor."
msgid "M"
msgstr "M"
#: functions.php:535
msgctxt "Name of the regular font size in the block editor"
msgid "Regular"
msgstr "Bình thường"
#: functions.php:530
msgctxt "Short name of the small font size in the block editor."
msgid "S"
msgstr "S"
#: functions.php:529
msgctxt "Name of the small font size in the block editor"
msgid "Small"
msgstr "Nhỏ"
#: functions.php:514
msgid "Background Color"
msgstr "Màu nền"
#: functions.php:501
msgid "Subtle Background"
msgstr "Nền tùy chọn"
#: functions.php:377
msgid "Widgets in this area will be displayed in the second column in the footer."
msgstr "Widget ở vị trí này sẽ hiển thị ở cột thứ hai ở footer."
#: template-parts/modal-menu.php:73
msgid "Mobile"
msgstr "Di động"
#: template-parts/navigation.php:25
msgid "Post"
msgstr "Bài viết"
#: classes/class-twentytwenty-customize.php:101
msgid "Header &amp; Footer Background Color"
msgstr "Màu nền Đầu trang &amp; Cuối trang"
#. translators: %s: Author name
#: template-parts/entry-author-bio.php:20 inc/template-tags.php:354
msgid "By %s"
msgstr "Bởi %s"
#: template-parts/content-cover.php:88
msgid "Scroll Down"
msgstr "Kéo xuống"
#: searchform.php:25
msgctxt "placeholder"
msgid "Search &hellip;"
msgstr "Tìm &hellip;"
#: inc/template-tags.php:445
msgid "Sticky post"
msgstr "Bài đính lên"
#: classes/class-twentytwenty-customize.php:269
msgid "Full text"
msgstr "Chữ đầy đủ"
#: classes/class-twentytwenty-customize.php:305
msgid "Fixed Background Image"
msgstr "Ảnh nền cố định"
#: template-parts/modal-menu.php:21
msgid "Close Menu"
msgstr "Đóng menu"
#. Template Name of the theme
msgid "Full Width Template"
msgstr "Giao diện tràn màn hình"
#: template-parts/footer-menus-widgets.php:57
msgid "Social links"
msgstr "Mạng xã hội"
#: functions.php:486
msgid "Accent Color"
msgstr "Màu phụ"
#: functions.php:256
msgid "Desktop Expanded Menu"
msgstr "Menu mở rộng trên màn hình máy tính"
#: template-parts/pagination.php:25
msgid "Older <span class=\"nav-short\">Posts</span>"
msgstr "Cũ hơn <span class=\"nav-short\">Bài viết</span>"
#: template-parts/pagination.php:21
msgid "Newer <span class=\"nav-short\">Posts</span>"
msgstr "Mới hơn <span class=\"nav-short\">Bài viết</span>"
#: classes/class-twentytwenty-customize.php:202
msgid "Theme Options"
msgstr "Tùy chọn giao diện"
#. Template Name of the theme
#: classes/class-twentytwenty-customize.php:281
msgid "Cover Template"
msgstr "Giao diện Cover"
#: template-parts/modal-menu.php:48
msgid "Expanded"
msgstr "Đã mở rộng"
#: template-parts/modal-menu.php:117
msgid "Expanded Social links"
msgstr "Liên kết mạng xã hội đã mở rộng"
#: classes/class-twentytwenty-customize.php:270
msgid "Summary"
msgstr "Tóm tắt"
#: classes/class-twentytwenty-customize.php:306
msgid "Creates a parallax effect when the visitor scrolls."
msgstr "Tạo hiệu ứng chuyển động khi người dùng kéo xuống."
#: classes/class-twentytwenty-customize.php:267
msgid "On archive pages, posts show:"
msgstr "Trong các trang lưu trữ, bài viết hiển thị:"
#. Author URI of the theme
#: footer.php:32
msgid "https://wordpress.org/"
msgstr "https://vi.wordpress.org/"
#. Author of the theme
msgid "the WordPress team"
msgstr "Nhóm Phát Triển WordPress"
#. Theme URI of the theme
msgid "https://wordpress.org/themes/twentytwenty/"
msgstr "https://wordpress.org/themes/twentytwenty/"

View File

@@ -0,0 +1 @@
{"translation-revision-date":"2019-11-21 10:43:45+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=1; plural=0;","lang":"vi_VN"},"Editor tips":["G\u1ee3i \u00fd so\u1ea1n th\u1ea3o"],"Disable tips":["T\u1eaft m\u1eb9o"],"Got it":["Hi\u1ec3u r\u1ed3i"],"See next tip":["Xem m\u1eb9o ti\u1ebfp theo"]}},"comment":{"reference":"wp-includes\/js\/dist\/nux.js"}}

View File

@@ -0,0 +1 @@
{"translation-revision-date":"2019-11-21 10:43:45+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=1; plural=0;","lang":"vi_VN"},"Reusable Blocks":["Nh\u1eefng Block t\u00e1i s\u1eed d\u1ee5ng"],"Embeds":["Nh\u00fang"],"Layout Elements":["C\u00e1c \u0111\u1ed1i t\u01b0\u1ee3ng b\u1ed1 c\u1ee5c"],"Formatting":["\u0110\u1ecbnh d\u1ea1ng"],"Common Blocks":["Kh\u1ed1i chung"],"Widgets":["Widget"]}},"comment":{"reference":"wp-includes\/js\/dist\/blocks.js"}}

View File

@@ -0,0 +1 @@
{"translation-revision-date":"2019-11-21 10:43:45+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=1; plural=0;","lang":"vi_VN"},"Media upload failed. If this is a photo or a large image, please scale it down and try again.":["T\u1ea3i l\u00ean media kh\u00f4ng th\u00e0nh c\u00f4ng. N\u1ebfu \u0111\u00e2y l\u00e0 h\u00ecnh \u1ea3nh c\u00f3 k\u00edch th\u01b0\u1edbc l\u1edbn, vui l\u00f2ng thu nh\u1ecf n\u00f3 xu\u1ed1ng v\u00e0 th\u1eed l\u1ea1i."],"The response is not a valid JSON response.":["Ph\u1ea3n h\u1ed3i kh\u00f4ng ph\u1ea3i l\u00e0 m\u1ed9t JSON h\u1ee3p l\u1ec7."],"An unknown error occurred.":["C\u00f3 l\u1ed7i n\u00e0o \u0111\u00f3 \u0111\u00e3 x\u1ea3y ra."]}},"comment":{"reference":"wp-includes\/js\/dist\/api-fetch.js"}}

View File

@@ -0,0 +1 @@
{"translation-revision-date":"2019-11-21 10:43:45+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=1; plural=0;","lang":"vi_VN"},"Reusable block imported successfully!":["Nh\u1eadp kh\u1ed1i t\u00e1i s\u1eed d\u1ee5ng th\u00e0nh c\u00f4ng!"],"button label\u0004Import":["Nh\u1eadp"],"Unknown error":["L\u1ed7i kh\u00f4ng x\u00e1c \u0111\u1ecbnh."],"Invalid Reusable Block JSON file":["T\u1ec7p JSON c\u1ee7a kh\u1ed1i s\u1eed d\u1ee5ng l\u1ea1i kh\u00f4ng h\u1ee3p l\u1ec7"],"Invalid JSON file":["T\u1ec7p JSON kh\u00f4ng h\u1ee3p l\u1ec7"],"Import from JSON":["Nh\u1eadp t\u1eeb JSON"],"File":["T\u1ec7p"]}},"comment":{"reference":"wp-includes\/js\/dist\/list-reusable-blocks.js"}}

View File

@@ -0,0 +1 @@
{"translation-revision-date":"2019-11-21 10:43:45+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=1; plural=0;","lang":"vi_VN"},"Annotation":["Ch\u00fa th\u00edch"]}},"comment":{"reference":"wp-includes\/js\/dist\/annotations.js"}}

View File

@@ -0,0 +1 @@
{"translation-revision-date":"2019-12-06 18:16:39+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=1; plural=0;","lang":"vi_VN"},"All site health tests have finished running. There are items that should be addressed, and the results are now available on the page.":["T\u1ea5t c\u1ea3 c\u00e1c b\u00e0i ki\u1ec3m tra t\u00ecnh tr\u1ea1ng trang web \u0111\u00e3 ch\u1ea1y xong. C\u00f3 nh\u1eefng m\u1ee5c n\u00ean \u0111\u01b0\u1ee3c gi\u1ea3i quy\u1ebft, v\u00e0 k\u1ebft qu\u1ea3 hi\u1ec7n c\u00f3 s\u1eb5n tr\u00ean trang."],"Should be improved":["N\u00ean c\u1ea3i thi\u1ec7n"],"Good":["T\u1ed1t"],"%s critical issue":["%s v\u1ea5n \u0111\u1ec1 nghi\u00eam tr\u1ecdng"],"%s item with no issues detected":["%s m\u1ee5c kh\u00f4ng ph\u00e1t hi\u1ec7n v\u1ea5n \u0111\u1ec1"],"%s recommended improvement":["%s c\u1ea3i ti\u1ebfn \u0111\u01b0\u1ee3c \u0111\u1ec1 xu\u1ea5t"],"Site information has been added to your clipboard.":["Th\u00f4ng tin trang web \u0111\u00e3 \u0111\u01b0\u1ee3c th\u00eam v\u00e0o clipboard c\u1ee7a b\u1ea1n."],"All site health tests have finished running. Your site is looking good, and the results are now available on the page.":["T\u1ea5t c\u1ea3 c\u00e1c b\u00e0i ki\u1ec3m tra s\u1ee9c kh\u1ecfe trang web \u0111\u00e3 ch\u1ea1y xong. Trang web c\u1ee7a b\u1ea1n \u0111ang ho\u1ea1t \u0111\u1ed9ng t\u1ed1t v\u00e0 k\u1ebft qu\u1ea3 hi\u1ec7n c\u00f3 s\u1eb5n tr\u00ean trang."],"All site health tests have finished running.":["T\u1ea5t c\u1ea3 c\u00e1c m\u1ee5c ki\u1ec3m tra web \u0111\u00e3 ch\u1ea1y xong."],"Please wait...":["Vui l\u00f2ng ch\u1edd..."]}},"comment":{"reference":"wp-admin\/js\/site-health.js"}}

View File

@@ -0,0 +1 @@
{"translation-revision-date":"2019-11-21 10:43:45+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=1; plural=0;","lang":"vi_VN"},"Inline Code":["M\u00e3 n\u1ed9i tuy\u1ebfn"],"Link edited.":["\u0110\u00e3 s\u1eeda li\u00ean k\u1ebft."],"%s (opens in a new tab)":["%s (m\u1edf trong tab m\u1edbi)"],"Link removed.":["\u0110\u00e3 x\u00f3a li\u00ean k\u1ebft."],"Inline image":["\u1ea2nh c\u00f9ng d\u00f2ng"],"media":["media"],"photo":["\u1ea3nh"],"Warning: the link has been inserted but may have errors. Please test it.":["C\u1ea3nh b\u00e1o: li\u00ean k\u1ebft \u0111\u00e3 \u0111\u01b0\u1ee3c ch\u00e8n nh\u01b0ng c\u00f3 th\u1ec3 c\u00f3 l\u1ed7i. Vui l\u00f2ng ki\u1ec3m tra n\u00f3."],"Link inserted.":["Link \u0111\u00e3 \u0111\u01b0\u1ee3c ch\u00e8n"],"Link":["Li\u00ean k\u1ebft"],"Open in New Tab":["M\u1edf trong c\u1eeda s\u1ed5 m\u1edbi"],"Unlink":["B\u1ecf li\u00ean k\u1ebft"],"Strikethrough":["G\u1ea1ch gi\u1eefa t\u1eeb"],"Underline":["G\u1ea1ch ch\u00e2n"],"Italic":["Nghi\u00eang"],"Bold":["\u0110\u1eadm"],"Width":["R\u1ed9ng"],"Apply":["\u00c1p d\u1ee5ng"]}},"comment":{"reference":"wp-includes\/js\/dist\/format-library.js"}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"translation-revision-date":"2019-11-21 10:43:45+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=1; plural=0;","lang":"vi_VN"},"%s item selected":["\u0111\u00e3 ch\u1ecdn %s item"]}},"comment":{"reference":"wp-includes\/js\/media-views.js"}}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"translation-revision-date":"2019-11-21 10:43:45+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=1; plural=0;","lang":"vi_VN"},"Backtick":["Backtick"],"Period":["Giai \u0111o\u1ea1n"],"Comma":["D\u1ea5u ph\u1ea9y"]}},"comment":{"reference":"wp-includes\/js\/dist\/keycodes.js"}}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"translation-revision-date":"2019-11-21 10:43:45+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=1; plural=0;","lang":"vi_VN"},"Select or Upload Media":["Ch\u1ecdn ho\u1eb7c t\u1ea3i l\u00ean ph\u01b0\u01a1ng ti\u1ec7n"],"Error while uploading file %s to the media library.":["C\u00f3 l\u1ed7i x\u1ea3y ra khi t\u1ea3i file %s l\u00ean th\u01b0 vi\u1ec7n."],"This file is empty.":["T\u1ec7p tin n\u00e0y tr\u1ed1ng."],"Sorry, this file type is not supported here.":["Xin l\u1ed7i, lo\u1ea1i t\u1ec7p tin n\u00e0y kh\u00f4ng \u0111\u01b0\u1ee3c h\u1ed7 tr\u1ee3."],"Sorry, this file type is not permitted for security reasons.":["R\u1ea5t ti\u1ebfc, \u0111\u1ecbnh d\u1ea1ng t\u1eadp tin n\u00e0y kh\u00f4ng \u0111\u01b0\u1ee3c cho ph\u00e9p v\u00ec l\u00fd do b\u1ea3o m\u1eadt."],"This file exceeds the maximum upload size for this site.":["T\u1eadp tin v\u01b0\u1ee3t qu\u00e1 k\u00edch th\u01b0\u1edbc t\u1ed1i \u0111a \u0111\u01b0\u1ee3c ph\u00e9p t\u1ea3i l\u00ean trang n\u00e0y."]}},"comment":{"reference":"wp-includes\/js\/dist\/media-utils.js"}}

View File

@@ -0,0 +1 @@
{"translation-revision-date":"2019-11-21 10:43:45+0000","generator":"GlotPress\/2.4.0-alpha","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","plural-forms":"nplurals=1; plural=0;","lang":"vi_VN"},"Block rendered as empty.":["Kh\u1ed1i \u0111\u00e3 \u0111\u01b0\u1ee3c render r\u1ed7ng."],"Error loading block: %s":["L\u1ed7i n\u1ea1p kh\u1ed1i: %s"]}},"comment":{"reference":"wp-includes\/js\/dist\/server-side-render.js"}}

File diff suppressed because one or more lines are too long

BIN
wp-content/languages/vi.mo Normal file

Binary file not shown.

17276
wp-content/languages/vi.po Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,34 @@
# Only allow direct access to specific Web-available files.
# Apache 2.2
<IfModule !mod_authz_core.c>
Order Deny,Allow
Deny from all
</IfModule>
# Apache 2.4
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
# Akismet CSS and JS
<FilesMatch "^(form\.js|akismet\.js|akismet\.css)$">
<IfModule !mod_authz_core.c>
Allow from all
</IfModule>
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
</FilesMatch>
# Akismet images
<FilesMatch "^logo-full-2x\.png$">
<IfModule !mod_authz_core.c>
Allow from all
</IfModule>
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
</FilesMatch>

View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View File

@@ -0,0 +1,663 @@
.wp-admin.jetpack_page_akismet-key-config, .wp-admin.settings_page_akismet-key-config {
background-color:#f3f6f8;
}
#submitted-on {
position: relative;
}
#the-comment-list .author .akismet-user-comment-count {
display: inline;
}
#the-comment-list .author a span {
text-decoration: none;
color: #999;
}
#the-comment-list .author a span.akismet-span-link {
text-decoration: inherit;
color: inherit;
}
#the-comment-list .akismet_remove_url {
margin-left: 3px;
color: #999;
padding: 2px 3px 2px 0;
}
#the-comment-list .akismet_remove_url:hover {
color: #A7301F;
font-weight: bold;
padding: 2px 2px 2px 0;
}
#dashboard_recent_comments .akismet-status {
display: none;
}
.akismet-status {
float: right;
}
.akismet-status a {
color: #AAA;
font-style: italic;
}
table.comments td.comment p a {
text-decoration: underline;
}
table.comments td.comment p a:after {
content: attr(href);
color: #aaa;
display: inline-block; /* Show the URL without the link's underline extending under it. */
padding: 0 1ex; /* Because it's inline block, we can't just use spaces in the content: attribute to separate it from the link text. */
}
.mshot-arrow {
width: 0;
height: 0;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
border-right: 10px solid #5C5C5C;
position: absolute;
left: -6px;
top: 91px;
}
.mshot-container {
background: #5C5C5C;
position: absolute;
top: -94px;
padding: 7px;
width: 450px;
height: 338px;
z-index: 20000;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-border-radius: 6px;
}
.akismet-mshot {
position: absolute;
z-index: 100;
}
.akismet-mshot .mshot-image {
margin: 0;
height: 338px;
width: 450px;
}
.checkforspam {
display: inline-block !important;
}
.checkforspam-progress {
display: none;
}
.checkforspam.checking .checkforspam-progress {
padding-left: 1ex;
}
.checkforspam.button-disabled .checkforspam-progress {
display: inline;
}
.checkforspam-spinner {
display: inline-block;
margin-top: 7px;
}
.akismet-right {
float: right;
}
.akismet-card .akismet-right {
margin: 1em 0;
}
.akismet-alert-text {
color: #dd3d36;
font-weight: bold;
font-size: 120%;
margin-top: .5rem;
}
.akismet-alert {
border: 1px solid #e5e5e5;
padding: 0.4em 1em 1.4em 1em;
border-radius: 3px;
-webkit-border-radius: 3px;
border-width: 1px;
border-style: solid;
}
.akismet-alert h3.akismet-key-status {
color: #fff;
margin: 1em 0 0.5em 0;
}
.akismet-alert.akismet-critical {
background-color: #993300;
}
.akismet-alert.akismet-active {
background-color: #649316;
}
.akismet-alert p.akismet-key-status {
font-size: 24px;
}
.akismet-alert p.akismet-description {
color:#fff;
font-size: 14px;
margin: 0 0;
font-style: normal;
}
.akismet-alert p.akismet-description a,
.akismet-alert p.akismet-description a,
.akismet-alert p.akismet-description a,
.akismet-alert p.akismet-description a {
color: #fff;
}
.akismet-new-snapshot {
margin-top: 1em;
padding: 1em;
text-align: center;
background: #fff;
}
.akismet-new-snapshot h3 {
background: #f5f5f5;
color: #888;
font-size: 11px;
margin: 0;
padding: 3px;
}
.new-snapspot ul {
font-size: 12px;
width: 100%;
}
.akismet-new-snapshot ul li {
color: #999;
float: left;
font-size: 11px;
padding: 0 20px;
text-transform: uppercase;
width: 33%;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
-ms-box-sizing: border-box;
}
.akismet-new-snapshot ul li:first-child,
.akismet-new-snapshot ul li:nth-child(2) {
border-right:1px dotted #ccc;
}
.akismet-new-snapshot ul li span {
color: #52accc;
display: block;
font-size: 32px;
font-weight: lighter;
line-height: 1.5em;
}
.akismet-settings th:first-child {
vertical-align: top;
padding-top: 15px;
}
.akismet-settings th.akismet-api-key {
vertical-align: middle;
padding-top: 0;
}
.akismet-settings input[type=text] {
width: 75%;
}
.akismet-settings span.akismet-note{
float: left;
padding-left: 23px;
font-size: 75%;
margin-top: -10px;
}
/**
* For the activation notice on the plugins page.
*/
#akismet_setup_prompt {
background: none;
border: none;
margin: 0;
padding: 0;
width: 100%;
}
.akismet_activate {
border: 1px solid #4F800D;
padding: 5px;
margin: 15px 0;
background: #83AF24;
background-image: -webkit-gradient(linear, 0% 0, 80% 100%, from(#83AF24), to(#4F800D));
background-image: -moz-linear-gradient(80% 100% 120deg, #4F800D, #83AF24);
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-border-radius: 3px;
position: relative;
overflow: hidden;
}
.akismet_activate .aa_a {
position: absolute;
top: -5px;
right: 10px;
font-size: 140px;
color: #769F33;
font-family: Georgia, "Times New Roman", Times, serif;
}
.akismet_activate .aa_button {
font-weight: bold;
border: 1px solid #029DD6;
border-top: 1px solid #06B9FD;
font-size: 15px;
text-align: center;
padding: 9px 0 8px 0;
color: #FFF;
background: #029DD6;
background-image: -webkit-gradient(linear, 0% 0, 0% 100%, from(#029DD6), to(#0079B1));
background-image: -moz-linear-gradient(0% 100% 90deg, #0079B1, #029DD6);
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-border-radius: 2px;
width: 100%;
cursor: pointer;
margin: 0;
}
.akismet_activate .aa_button:hover {
text-decoration: none !important;
border: 1px solid #029DD6;
border-bottom: 1px solid #00A8EF;
font-size: 15px;
text-align: center;
padding: 9px 0 8px 0;
color: #F0F8FB;
background: #0079B1;
background-image: -webkit-gradient(linear, 0% 0, 0% 100%, from(#0079B1), to(#0092BF));
background-image: -moz-linear-gradient(0% 100% 90deg, #0092BF, #0079B1);
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-border-radius: 2px;
}
.akismet_activate .aa_button_border {
border: 1px solid #006699;
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-border-radius: 2px;
background: #029DD6;
background-image: -webkit-gradient(linear, 0% 0, 0% 100%, from(#029DD6), to(#0079B1));
background-image: -moz-linear-gradient(0% 100% 90deg, #0079B1, #029DD6);
}
.akismet_activate .aa_button_container {
box-sizing: border-box;
display: inline-block;
background: #DEF1B8;
padding: 5px;
-moz-border-radius: 2px;
border-radius: 2px;
-webkit-border-radius: 2px;
width: 266px;
}
.akismet_activate .aa_description {
position: absolute;
top: 22px;
left: 285px;
margin-left: 25px;
color: #E5F2B1;
font-size: 15px;
}
.akismet_activate .aa_description strong {
color: #FFF;
font-weight: normal;
}
@media (max-width: 550px) {
.akismet_activate .aa_a {
display: none;
}
.akismet_activate .aa_button_container {
width: 100%;
}
}
@media (max-width: 782px) {
.akismet_activate {
min-width: 0;
}
}
@media (max-width: 850px) {
#akismet_setup_prompt .aa_description {
display: none;
}
.akismet_activate {
min-width: 0;
}
}
.jetpack_page_akismet-key-config #wpcontent, .settings_page_akismet-key-config #wpcontent {
padding-left: 0;
}
.akismet-masthead {
background-color:#fff;
text-align:center;
box-shadow:0 1px 0 rgba(200,215,225,0.5),0 1px 2px #e9eff3
}
@media (max-width: 45rem) {
.akismet-masthead {
padding:0 1.25rem
}
}
.akismet-masthead__inside-container {
padding:.375rem 0;
margin:0 auto;
width:100%;
max-width:45rem;
text-align: left;
}
.akismet-masthead__logo-container {
padding:.3125rem 0 0
}
.akismet-masthead__logo {
width:10.375rem;
height:1.8125rem;
}
.akismet-masthead__logo-link {
display:inline-block;
outline:none;
vertical-align:middle
}
.akismet-masthead__logo-link:focus {
line-height:0;
box-shadow:0 0 0 2px #78dcfa
}
.akismet-masthead__logo-link+code {
margin:0 10px;
padding:5px 9px;
border-radius:2px;
background:#e6ecf1;
color:#647a88
}
.akismet-masthead__links {
display:-ms-flexbox;
display:flex;
-ms-flex-flow:row wrap;
flex-flow:row wrap;
-ms-flex:2 50%;
flex:2 50%;
-ms-flex-pack:end;
justify-content:flex-end;
margin:0
}
@media (max-width: 480px) {
.akismet-masthead__links {
padding-right:.625rem
}
}
.akismet-masthead__link-li {
margin:0;
padding:0
}
.akismet-masthead__link {
font-style:normal;
color:#0087be;
padding:.625rem;
display:inline-block
}
.akismet-masthead__link:visited {
color:#0087be
}
.akismet-masthead__link:active,.akismet-masthead__link:hover {
color:#00aadc
}
.akismet-masthead__link:hover {
text-decoration:underline
}
.akismet-masthead__link .dashicons {
display:none
}
@media (max-width: 480px) {
.akismet-masthead__link:hover,.akismet-masthead__link:active {
text-decoration:none
}
.akismet-masthead__link .dashicons {
display:block;
font-size:1.75rem
}
.akismet-masthead__link span+span {
display:none
}
}
.akismet-masthead__link-li:last-of-type .akismet-masthead__link {
padding-right:0
}
.akismet-lower {
margin: 0 auto;
text-align: left;
max-width: 45rem;
padding: 1.5rem;
}
.akismet-lower .notice {
margin-bottom: 2rem;
}
.akismet-card {
margin-top: 1rem;
margin-bottom: 0;
position: relative;
margin: 0 auto 0.625rem auto;
box-sizing: border-box;
background: white;
box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3;
}
.akismet-card:after, .akismet-card .inside:after, .akismet-masthead__logo-container:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.akismet-card .inside {
padding: 1.5rem;
padding-top: 1rem;
}
.akismet-card .akismet-card-actions {
margin-top: 1rem;
}
.jetpack_page_akismet-key-config .update-nag, .settings_page_akismet-key-config .update-nag {
display: none;
}
.akismet-masthead .akismet-right {
line-height: 2.125rem;
font-size: 0.9rem;
}
.akismet-box {
box-sizing: border-box;
background: white;
border: 1px solid rgba(200, 215, 225, 0.5);
}
.akismet-box h2, .akismet-box h3 {
padding: 1.5rem 1.5rem .5rem 1.5rem;
margin: 0;
}
.akismet-box p {
padding: 0 1.5rem 1.5rem 1.5rem;
margin: 0;
}
.akismet-jetpack-email {
font-style: oblique;
}
.akismet-jetpack-gravatar {
padding: 0 0 0 1.5rem;
float: left;
margin-right: 1rem;
width: 54px;
height: 54px;
}
.akismet-box p:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.akismet-box .akismet-right {
padding-right: 1.5rem;
}
.akismet-boxes .akismet-box {
margin-bottom: 0;
padding: 0;
margin-top: -1px;
}
.akismet-boxes .akismet-box:last-child {
margin-bottom: 1.5rem;
}
.akismet-boxes .akismet-box:first-child {
margin-top: 1.5rem;
}
.akismet-box-header {
max-width: 700px;
margin: 0 auto 40px auto;
line-height: 1.5;
}
.akismet-box-header h2 {
margin: 1.5rem 10% 0;
font-size: 1.375rem;
font-weight: 700;
color: #000;
}
.akismet-box .centered {
text-align: center;
}
.akismet-enter-api-key-box {
margin: 1.5rem 0;
}
.akismet-box .enter-api-key {
display: none;
margin-top: 1.5rem;
}
.akismet-box .akismet-toggles {
margin: 3rem 0;
}
.akismet-box .akismet-ak-connect, .akismet-box .toggle-jp-connect {
display: none;
}
.akismet-box .enter-api-key p {
padding: 0 1.5rem;
}
.akismet-button, .akismet-button:hover, .akismet-button:visited {
background: white;
border-color: #c8d7e1;
border-style: solid;
border-width: 1px 1px 2px;
color: #2e4453;
cursor: pointer;
display: inline-block;
margin: 0;
outline: 0;
overflow: hidden;
font-size: 14px;
font-weight: 500;
text-overflow: ellipsis;
text-decoration: none;
vertical-align: top;
box-sizing: border-box;
font-size: 14px;
line-height: 21px;
border-radius: 4px;
padding: 7px 14px 9px;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.akismet-button:hover {
border-color: #a8bece;
}
.akismet-button:active {
border-width: 2px 1px 1px;
}
.akismet-is-primary, .akismet-is-primary:hover, .akismet-is-primary:visited {
background: #00aadc;
border-color: #0087be;
color: white;
}
.akismet-is-primary:hover, .akismet-is-primary:focus {
border-color: #005082;
}
.akismet-is-primary:hover {
border-color: #005082;
}
.akismet-section-header {
position: relative;
margin: 0 auto 0.625rem auto;
padding: 1rem;
box-sizing: border-box;
box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3;
background: #ffffff;
width: 100%;
padding-top: 0.6875rem;
padding-bottom: 0.6875rem;
display: flex;
}
.akismet-section-header__label {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-positive: 1;
flex-grow: 1;
line-height: 1.75rem;
position: relative;
font-size: 0.875rem;
color: #4f748e;
}
.akismet-section-header__actions {
line-height: 1.75rem;
}

View File

@@ -0,0 +1,354 @@
jQuery( function ( $ ) {
var mshotRemovalTimer = null;
var mshotSecondTryTimer = null
var mshotThirdTryTimer = null
var mshotEnabledLinkSelector = 'a[id^="author_comment_url"], tr.pingback td.column-author a:first-of-type, td.comment p a';
$('.akismet-status').each(function () {
var thisId = $(this).attr('commentid');
$(this).prependTo('#comment-' + thisId + ' .column-comment');
});
$('.akismet-user-comment-count').each(function () {
var thisId = $(this).attr('commentid');
$(this).insertAfter('#comment-' + thisId + ' .author strong:first').show();
});
akismet_enable_comment_author_url_removal();
$( '#the-comment-list' ).on( 'click', '.akismet_remove_url', function () {
var thisId = $(this).attr('commentid');
var data = {
action: 'comment_author_deurl',
_wpnonce: WPAkismet.comment_author_url_nonce,
id: thisId
};
$.ajax({
url: ajaxurl,
type: 'POST',
data: data,
beforeSend: function () {
// Removes "x" link
$("a[commentid='"+ thisId +"']").hide();
// Show temp status
$("#author_comment_url_"+ thisId).html( $( '<span/>' ).text( WPAkismet.strings['Removing...'] ) );
},
success: function (response) {
if (response) {
// Show status/undo link
$("#author_comment_url_"+ thisId)
.attr('cid', thisId)
.addClass('akismet_undo_link_removal')
.html(
$( '<span/>' ).text( WPAkismet.strings['URL removed'] )
)
.append( ' ' )
.append(
$( '<span/>' )
.text( WPAkismet.strings['(undo)'] )
.addClass( 'akismet-span-link' )
);
}
}
});
return false;
}).on( 'click', '.akismet_undo_link_removal', function () {
var thisId = $(this).attr('cid');
var thisUrl = $(this).attr('href');
var data = {
action: 'comment_author_reurl',
_wpnonce: WPAkismet.comment_author_url_nonce,
id: thisId,
url: thisUrl
};
$.ajax({
url: ajaxurl,
type: 'POST',
data: data,
beforeSend: function () {
// Show temp status
$("#author_comment_url_"+ thisId).html( $( '<span/>' ).text( WPAkismet.strings['Re-adding...'] ) );
},
success: function (response) {
if (response) {
// Add "x" link
$("a[commentid='"+ thisId +"']").show();
// Show link. Core strips leading http://, so let's do that too.
$("#author_comment_url_"+ thisId).removeClass('akismet_undo_link_removal').text( thisUrl.replace( /^http:\/\/(www\.)?/ig, '' ) );
}
}
});
return false;
});
// Show a preview image of the hovered URL. Applies to author URLs and URLs inside the comments.
$( '#the-comment-list' ).on( 'mouseover', mshotEnabledLinkSelector, function () {
clearTimeout( mshotRemovalTimer );
if ( $( '.akismet-mshot' ).length > 0 ) {
if ( $( '.akismet-mshot:first' ).data( 'link' ) == this ) {
// The preview is already showing for this link.
return;
}
else {
// A new link is being hovered, so remove the old preview.
$( '.akismet-mshot' ).remove();
}
}
clearTimeout( mshotSecondTryTimer );
clearTimeout( mshotThirdTryTimer );
var thisHref = $( this ).attr( 'href' );
var mShot = $( '<div class="akismet-mshot mshot-container"><div class="mshot-arrow"></div><img src="' + akismet_mshot_url( thisHref ) + '" width="450" height="338" class="mshot-image" /></div>' );
mShot.data( 'link', this );
var offset = $( this ).offset();
mShot.offset( {
left : Math.min( $( window ).width() - 475, offset.left + $( this ).width() + 10 ), // Keep it on the screen if the link is near the edge of the window.
top: offset.top + ( $( this ).height() / 2 ) - 101 // 101 = top offset of the arrow plus the top border thickness
} );
// These retries appear to be superfluous if .mshot-image has already loaded, but it's because mShots
// can return a "Generating thumbnail..." image if it doesn't have a thumbnail ready, so we need
// to retry to see if we can get the newly generated thumbnail.
mshotSecondTryTimer = setTimeout( function () {
mShot.find( '.mshot-image' ).attr( 'src', akismet_mshot_url( thisHref, 2 ) );
}, 6000 );
mshotThirdTryTimer = setTimeout( function () {
mShot.find( '.mshot-image' ).attr( 'src', akismet_mshot_url( thisHref, 3 ) );
}, 12000 );
$( 'body' ).append( mShot );
} ).on( 'mouseout', 'a[id^="author_comment_url"], tr.pingback td.column-author a:first-of-type, td.comment p a', function () {
mshotRemovalTimer = setTimeout( function () {
clearTimeout( mshotSecondTryTimer );
clearTimeout( mshotThirdTryTimer );
$( '.akismet-mshot' ).remove();
}, 200 );
} ).on( 'mouseover', 'tr', function () {
// When the mouse hovers over a comment row, begin preloading mshots for any links in the comment or the comment author.
var linksToPreloadMshotsFor = $( this ).find( mshotEnabledLinkSelector );
linksToPreloadMshotsFor.each( function () {
// Don't attempt to preload an mshot for a single link twice. Browser caching should cover this, but in case of
// race conditions, save a flag locally when we've begun trying to preload one.
if ( ! $( this ).data( 'akismet-mshot-preloaded' ) ) {
akismet_preload_mshot( $( this ).attr( 'href' ) );
$( this ).data( 'akismet-mshot-preloaded', true );
}
} );
} );
$( '.checkforspam' ).click( function( e ) {
e.preventDefault();
if ( $( this ).hasClass( 'button-disabled' ) ) {
window.location.href = $( this ).data( 'success-url' ).replace( '__recheck_count__', 0 ).replace( '__spam_count__', 0 );
return;
}
$('.checkforspam').addClass('button-disabled').addClass( 'checking' );
$('.checkforspam-spinner').addClass( 'spinner' ).addClass( 'is-active' );
// Update the label on the "Check for Spam" button to use the active "Checking for Spam" language.
$( '.checkforspam .akismet-label' ).text( $( '.checkforspam' ).data( 'active-label' ) );
akismet_check_for_spam(0, 100);
});
var spam_count = 0;
var recheck_count = 0;
function akismet_check_for_spam(offset, limit) {
var check_for_spam_buttons = $( '.checkforspam' );
var nonce = check_for_spam_buttons.data( 'nonce' );
// We show the percentage complete down to one decimal point so even queues with 100k
// pending comments will show some progress pretty quickly.
var percentage_complete = Math.round( ( recheck_count / check_for_spam_buttons.data( 'pending-comment-count' ) ) * 1000 ) / 10;
// Update the progress counter on the "Check for Spam" button.
$( '.checkforspam-progress' ).text( check_for_spam_buttons.data( 'progress-label-format' ).replace( '%1$s', percentage_complete ) );
$.post(
ajaxurl,
{
'action': 'akismet_recheck_queue',
'offset': offset,
'limit': limit,
'nonce': nonce
},
function(result) {
if ( 'error' in result ) {
// An error is only returned in the case of a missing nonce, so we don't need the actual error message.
window.location.href = check_for_spam_buttons.data( 'failure-url' );
return;
}
recheck_count += result.counts.processed;
spam_count += result.counts.spam;
if (result.counts.processed < limit) {
window.location.href = check_for_spam_buttons.data( 'success-url' ).replace( '__recheck_count__', recheck_count ).replace( '__spam_count__', spam_count );
}
else {
// Account for comments that were caught as spam and moved out of the queue.
akismet_check_for_spam(offset + limit - result.counts.spam, limit);
}
}
);
}
if ( "start_recheck" in WPAkismet && WPAkismet.start_recheck ) {
$( '.checkforspam' ).click();
}
if ( typeof MutationObserver !== 'undefined' ) {
// Dynamically add the "X" next the the author URL links when a comment is quick-edited.
var comment_list_container = document.getElementById( 'the-comment-list' );
if ( comment_list_container ) {
var observer = new MutationObserver( function ( mutations ) {
for ( var i = 0, _len = mutations.length; i < _len; i++ ) {
if ( mutations[i].addedNodes.length > 0 ) {
akismet_enable_comment_author_url_removal();
// Once we know that we'll have to check for new author links, skip the rest of the mutations.
break;
}
}
} );
observer.observe( comment_list_container, { attributes: true, childList: true, characterData: true } );
}
}
function akismet_enable_comment_author_url_removal() {
$( '#the-comment-list' )
.find( 'tr.comment, tr[id ^= "comment-"]' )
.find( '.column-author a[href^="http"]:first' ) // Ignore mailto: links, which would be the comment author's email.
.each(function () {
if ( $( this ).parent().find( '.akismet_remove_url' ).length > 0 ) {
return;
}
var linkHref = $(this).attr( 'href' );
// Ignore any links to the current domain, which are diagnostic tools, like the IP address link
// or any other links another plugin might add.
var currentHostParts = document.location.href.split( '/' );
var currentHost = currentHostParts[0] + '//' + currentHostParts[2] + '/';
if ( linkHref.indexOf( currentHost ) != 0 ) {
var thisCommentId = $(this).parents('tr:first').attr('id').split("-");
$(this)
.attr("id", "author_comment_url_"+ thisCommentId[1])
.after(
$( '<a href="#" class="akismet_remove_url">x</a>' )
.attr( 'commentid', thisCommentId[1] )
.attr( 'title', WPAkismet.strings['Remove this URL'] )
);
}
});
}
/**
* Generate an mShot URL if given a link URL.
*
* @param string linkUrl
* @param int retry If retrying a request, the number of the retry.
* @return string The mShot URL;
*/
function akismet_mshot_url( linkUrl, retry ) {
var mshotUrl = '//s0.wordpress.com/mshots/v1/' + encodeURIComponent( linkUrl ) + '?w=900';
if ( retry ) {
mshotUrl += '&r=' + encodeURIComponent( retry );
}
return mshotUrl;
}
/**
* Begin loading an mShot preview of a link.
*
* @param string linkUrl
*/
function akismet_preload_mshot( linkUrl ) {
var img = new Image();
img.src = akismet_mshot_url( linkUrl );
}
/**
* Sets the comment form privacy notice display to hide when one clicks Core's dismiss button on the related admin notice.
*/
$( '#akismet-privacy-notice-admin-notice' ).on( 'click', '.notice-dismiss', function () {
$.ajax( {
url: './options-general.php?page=akismet-key-config&akismet_comment_form_privacy_notice=hide',
} );
});
$( '.akismet-could-be-primary' ).each( function () {
var form = $( this ).closest( 'form' );
form.data( 'initial-state', form.serialize() );
form.on( 'change keyup', function () {
var self = $( this );
var submit_button = self.find( '.akismet-could-be-primary' );
if ( self.serialize() != self.data( 'initial-state' ) ) {
submit_button.addClass( 'akismet-is-primary' );
}
else {
submit_button.removeClass( 'akismet-is-primary' );
}
} );
} );
/**
* Shows the Enter API key form
*/
$( '.akismet-enter-api-key-box a' ).on( 'click', function ( e ) {
e.preventDefault();
var div = $( '.enter-api-key' );
div.show( 500 );
div.find( 'input[name=key]' ).focus();
$( this ).hide();
} );
/**
* Hides the Connect with Jetpack form | Shows the Activate Akismet Account form
*/
$( 'a.toggle-ak-connect' ).on( 'click', function ( e ) {
e.preventDefault();
$( '.akismet-ak-connect' ).slideToggle('slow');
$( 'a.toggle-ak-connect' ).hide();
$( '.akismet-jp-connect' ).hide();
$( 'a.toggle-jp-connect' ).show();
} );
/**
* Shows the Connect with Jetpack form | Hides the Activate Akismet Account form
*/
$( 'a.toggle-jp-connect' ).on( 'click', function ( e ) {
e.preventDefault();
$( '.akismet-jp-connect' ).slideToggle('slow');
$( 'a.toggle-jp-connect' ).hide();
$( '.akismet-ak-connect' ).hide();
$( 'a.toggle-ak-connect' ).show();
} );
});

View File

@@ -0,0 +1,30 @@
var ak_js = document.getElementById( "ak_js" );
if ( ! ak_js ) {
ak_js = document.createElement( 'input' );
ak_js.setAttribute( 'id', 'ak_js' );
ak_js.setAttribute( 'name', 'ak_js' );
ak_js.setAttribute( 'type', 'hidden' );
}
else {
ak_js.parentNode.removeChild( ak_js );
}
ak_js.setAttribute( 'value', ( new Date() ).getTime() );
var commentForm = document.getElementById( 'commentform' );
if ( commentForm ) {
commentForm.appendChild( ak_js );
}
else {
var replyRowContainer = document.getElementById( 'replyrow' );
if ( replyRowContainer ) {
var children = replyRowContainer.getElementsByTagName( 'td' );
if ( children.length > 0 ) {
children[0].appendChild( ak_js );
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@@ -0,0 +1,66 @@
<?php
/**
* @package Akismet
*/
/*
Plugin Name: Akismet Anti-Spam
Plugin URI: https://akismet.com/
Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. It keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key.
Version: 4.1.3
Author: Automattic
Author URI: https://automattic.com/wordpress-plugins/
License: GPLv2 or later
Text Domain: akismet
*/
/*
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Copyright 2005-2015 Automattic, Inc.
*/
// Make sure we don't expose any info if called directly
if ( !function_exists( 'add_action' ) ) {
echo 'Hi there! I\'m just a plugin, not much I can do when called directly.';
exit;
}
define( 'AKISMET_VERSION', '4.1.3' );
define( 'AKISMET__MINIMUM_WP_VERSION', '4.0' );
define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'AKISMET_DELETE_LIMIT', 100000 );
register_activation_hook( __FILE__, array( 'Akismet', 'plugin_activation' ) );
register_deactivation_hook( __FILE__, array( 'Akismet', 'plugin_deactivation' ) );
require_once( AKISMET__PLUGIN_DIR . 'class.akismet.php' );
require_once( AKISMET__PLUGIN_DIR . 'class.akismet-widget.php' );
require_once( AKISMET__PLUGIN_DIR . 'class.akismet-rest-api.php' );
add_action( 'init', array( 'Akismet', 'init' ) );
add_action( 'rest_api_init', array( 'Akismet_REST_API', 'init' ) );
if ( is_admin() || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
require_once( AKISMET__PLUGIN_DIR . 'class.akismet-admin.php' );
add_action( 'init', array( 'Akismet_Admin', 'init' ) );
}
//add wrapper class around deprecated akismet functions that are referenced elsewhere
require_once( AKISMET__PLUGIN_DIR . 'wrapper.php' );
if ( defined( 'WP_CLI' ) && WP_CLI ) {
require_once( AKISMET__PLUGIN_DIR . 'class.akismet-cli.php' );
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,185 @@
<?php
WP_CLI::add_command( 'akismet', 'Akismet_CLI' );
/**
* Filter spam comments.
*/
class Akismet_CLI extends WP_CLI_Command {
/**
* Checks one or more comments against the Akismet API.
*
* ## OPTIONS
* <comment_id>...
* : The ID(s) of the comment(s) to check.
*
* [--noaction]
* : Don't change the status of the comment. Just report what Akismet thinks it is.
*
* ## EXAMPLES
*
* wp akismet check 12345
*
* @alias comment-check
*/
public function check( $args, $assoc_args ) {
foreach ( $args as $comment_id ) {
if ( isset( $assoc_args['noaction'] ) ) {
// Check the comment, but don't reclassify it.
$api_response = Akismet::check_db_comment( $comment_id, 'wp-cli' );
}
else {
$api_response = Akismet::recheck_comment( $comment_id, 'wp-cli' );
}
if ( 'true' === $api_response ) {
WP_CLI::line( sprintf( __( "Comment #%d is spam.", 'akismet' ), $comment_id ) );
}
else if ( 'false' === $api_response ) {
WP_CLI::line( sprintf( __( "Comment #%d is not spam.", 'akismet' ), $comment_id ) );
}
else {
if ( false === $api_response ) {
WP_CLI::error( __( "Failed to connect to Akismet.", 'akismet' ) );
}
else if ( is_wp_error( $api_response ) ) {
WP_CLI::warning( sprintf( __( "Comment #%d could not be checked.", 'akismet' ), $comment_id ) );
}
}
}
}
/**
* Recheck all comments in the Pending queue.
*
* ## EXAMPLES
*
* wp akismet recheck_queue
*
* @alias recheck-queue
*/
public function recheck_queue() {
$batch_size = 100;
$start = 0;
$total_counts = array();
do {
$result_counts = Akismet_Admin::recheck_queue_portion( $start, $batch_size );
if ( $result_counts['processed'] > 0 ) {
foreach ( $result_counts as $key => $count ) {
if ( ! isset( $total_counts[ $key ] ) ) {
$total_counts[ $key ] = $count;
}
else {
$total_counts[ $key ] += $count;
}
}
$start += $batch_size;
$start -= $result_counts['spam']; // These comments will have been removed from the queue.
}
} while ( $result_counts['processed'] > 0 );
WP_CLI::line( sprintf( _n( "Processed %d comment.", "Processed %d comments.", $total_counts['processed'], 'akismet' ), number_format( $total_counts['processed'] ) ) );
WP_CLI::line( sprintf( _n( "%d comment moved to Spam.", "%d comments moved to Spam.", $total_counts['spam'], 'akismet' ), number_format( $total_counts['spam'] ) ) );
if ( $total_counts['error'] ) {
WP_CLI::line( sprintf( _n( "%d comment could not be checked.", "%d comments could not be checked.", $total_counts['error'], 'akismet' ), number_format( $total_counts['error'] ) ) );
}
}
/**
* Fetches stats from the Akismet API.
*
* ## OPTIONS
*
* [<interval>]
* : The time period for which to retrieve stats.
* ---
* default: all
* options:
* - days
* - months
* - all
* ---
*
* [--format=<format>]
* : Allows overriding the output of the command when listing connections.
* ---
* default: table
* options:
* - table
* - json
* - csv
* - yaml
* - count
* ---
*
* [--summary]
* : When set, will display a summary of the stats.
*
* ## EXAMPLES
*
* wp akismet stats
* wp akismet stats all
* wp akismet stats days
* wp akismet stats months
* wp akismet stats all --summary
*/
public function stats( $args, $assoc_args ) {
$api_key = Akismet::get_api_key();
if ( empty( $api_key ) ) {
WP_CLI::error( __( 'API key must be set to fetch stats.', 'akismet' ) );
}
switch ( $args[0] ) {
case 'days':
$interval = '60-days';
break;
case 'months':
$interval = '6-months';
break;
default:
$interval = 'all';
break;
}
$response = Akismet::http_post(
Akismet::build_query( array(
'blog' => get_option( 'home' ),
'key' => $api_key,
'from' => $interval,
) ),
'get-stats'
);
if ( empty( $response[1] ) ) {
WP_CLI::error( __( 'Currently unable to fetch stats. Please try again.', 'akismet' ) );
}
$response_body = json_decode( $response[1], true );
if ( is_null( $response_body ) ) {
WP_CLI::error( __( 'Stats response could not be decoded.', 'akismet' ) );
}
if ( isset( $assoc_args['summary'] ) ) {
$keys = array(
'spam',
'ham',
'missed_spam',
'false_positives',
'accuracy',
'time_saved',
);
WP_CLI\Utils\format_items( $assoc_args['format'], array( $response_body ), $keys );
}
else {
$stats = $response_body['breakdown'];
WP_CLI\Utils\format_items( $assoc_args['format'], $stats, array_keys( end( $stats ) ) );
}
}
}

View File

@@ -0,0 +1,366 @@
<?php
class Akismet_REST_API {
/**
* Register the REST API routes.
*/
public static function init() {
if ( ! function_exists( 'register_rest_route' ) ) {
// The REST API wasn't integrated into core until 4.4, and we support 4.0+ (for now).
return false;
}
register_rest_route( 'akismet/v1', '/key', array(
array(
'methods' => WP_REST_Server::READABLE,
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'get_key' ),
), array(
'methods' => WP_REST_Server::EDITABLE,
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'set_key' ),
'args' => array(
'key' => array(
'required' => true,
'type' => 'string',
'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_key' ),
'description' => __( 'A 12-character Akismet API key. Available at akismet.com/get/', 'akismet' ),
),
),
), array(
'methods' => WP_REST_Server::DELETABLE,
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'delete_key' ),
)
) );
register_rest_route( 'akismet/v1', '/settings/', array(
array(
'methods' => WP_REST_Server::READABLE,
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'get_settings' ),
),
array(
'methods' => WP_REST_Server::EDITABLE,
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'set_boolean_settings' ),
'args' => array(
'akismet_strictness' => array(
'required' => false,
'type' => 'boolean',
'description' => __( 'If true, Akismet will automatically discard the worst spam automatically rather than putting it in the spam folder.', 'akismet' ),
),
'akismet_show_user_comments_approved' => array(
'required' => false,
'type' => 'boolean',
'description' => __( 'If true, show the number of approved comments beside each comment author in the comments list page.', 'akismet' ),
),
),
)
) );
register_rest_route( 'akismet/v1', '/stats', array(
'methods' => WP_REST_Server::READABLE,
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'get_stats' ),
'args' => array(
'interval' => array(
'required' => false,
'type' => 'string',
'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_interval' ),
'description' => __( 'The time period for which to retrieve stats. Options: 60-days, 6-months, all', 'akismet' ),
'default' => 'all',
),
),
) );
register_rest_route( 'akismet/v1', '/stats/(?P<interval>[\w+])', array(
'args' => array(
'interval' => array(
'description' => __( 'The time period for which to retrieve stats. Options: 60-days, 6-months, all', 'akismet' ),
'type' => 'string',
),
),
array(
'methods' => WP_REST_Server::READABLE,
'permission_callback' => array( 'Akismet_REST_API', 'privileged_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'get_stats' ),
)
) );
register_rest_route( 'akismet/v1', '/alert', array(
array(
'methods' => WP_REST_Server::READABLE,
'permission_callback' => array( 'Akismet_REST_API', 'remote_call_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'get_alert' ),
'args' => array(
'key' => array(
'required' => false,
'type' => 'string',
'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_key' ),
'description' => __( 'A 12-character Akismet API key. Available at akismet.com/get/', 'akismet' ),
),
),
),
array(
'methods' => WP_REST_Server::EDITABLE,
'permission_callback' => array( 'Akismet_REST_API', 'remote_call_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'set_alert' ),
'args' => array(
'key' => array(
'required' => false,
'type' => 'string',
'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_key' ),
'description' => __( 'A 12-character Akismet API key. Available at akismet.com/get/', 'akismet' ),
),
),
),
array(
'methods' => WP_REST_Server::DELETABLE,
'permission_callback' => array( 'Akismet_REST_API', 'remote_call_permission_callback' ),
'callback' => array( 'Akismet_REST_API', 'delete_alert' ),
'args' => array(
'key' => array(
'required' => false,
'type' => 'string',
'sanitize_callback' => array( 'Akismet_REST_API', 'sanitize_key' ),
'description' => __( 'A 12-character Akismet API key. Available at akismet.com/get/', 'akismet' ),
),
),
)
) );
}
/**
* Get the current Akismet API key.
*
* @param WP_REST_Request $request
* @return WP_Error|WP_REST_Response
*/
public static function get_key( $request = null ) {
return rest_ensure_response( Akismet::get_api_key() );
}
/**
* Set the API key, if possible.
*
* @param WP_REST_Request $request
* @return WP_Error|WP_REST_Response
*/
public static function set_key( $request ) {
if ( defined( 'WPCOM_API_KEY' ) ) {
return rest_ensure_response( new WP_Error( 'hardcoded_key', __( 'This site\'s API key is hardcoded and cannot be changed via the API.', 'akismet' ), array( 'status'=> 409 ) ) );
}
$new_api_key = $request->get_param( 'key' );
if ( ! self::key_is_valid( $new_api_key ) ) {
return rest_ensure_response( new WP_Error( 'invalid_key', __( 'The value provided is not a valid and registered API key.', 'akismet' ), array( 'status' => 400 ) ) );
}
update_option( 'wordpress_api_key', $new_api_key );
return self::get_key();
}
/**
* Unset the API key, if possible.
*
* @param WP_REST_Request $request
* @return WP_Error|WP_REST_Response
*/
public static function delete_key( $request ) {
if ( defined( 'WPCOM_API_KEY' ) ) {
return rest_ensure_response( new WP_Error( 'hardcoded_key', __( 'This site\'s API key is hardcoded and cannot be deleted.', 'akismet' ), array( 'status'=> 409 ) ) );
}
delete_option( 'wordpress_api_key' );
return rest_ensure_response( true );
}
/**
* Get the Akismet settings.
*
* @param WP_REST_Request $request
* @return WP_Error|WP_REST_Response
*/
public static function get_settings( $request = null ) {
return rest_ensure_response( array(
'akismet_strictness' => ( get_option( 'akismet_strictness', '1' ) === '1' ),
'akismet_show_user_comments_approved' => ( get_option( 'akismet_show_user_comments_approved', '1' ) === '1' ),
) );
}
/**
* Update the Akismet settings.
*
* @param WP_REST_Request $request
* @return WP_Error|WP_REST_Response
*/
public static function set_boolean_settings( $request ) {
foreach ( array(
'akismet_strictness',
'akismet_show_user_comments_approved',
) as $setting_key ) {
$setting_value = $request->get_param( $setting_key );
if ( is_null( $setting_value ) ) {
// This setting was not specified.
continue;
}
// From 4.7+, WP core will ensure that these are always boolean
// values because they are registered with 'type' => 'boolean',
// but we need to do this ourselves for prior versions.
$setting_value = Akismet_REST_API::parse_boolean( $setting_value );
update_option( $setting_key, $setting_value ? '1' : '0' );
}
return self::get_settings();
}
/**
* Parse a numeric or string boolean value into a boolean.
*
* @param mixed $value The value to convert into a boolean.
* @return bool The converted value.
*/
public static function parse_boolean( $value ) {
switch ( $value ) {
case true:
case 'true':
case '1':
case 1:
return true;
case false:
case 'false':
case '0':
case 0:
return false;
default:
return (bool) $value;
}
}
/**
* Get the Akismet stats for a given time period.
*
* Possible `interval` values:
* - all
* - 60-days
* - 6-months
*
* @param WP_REST_Request $request
* @return WP_Error|WP_REST_Response
*/
public static function get_stats( $request ) {
$api_key = Akismet::get_api_key();
$interval = $request->get_param( 'interval' );
$stat_totals = array();
$response = Akismet::http_post( Akismet::build_query( array( 'blog' => get_option( 'home' ), 'key' => $api_key, 'from' => $interval ) ), 'get-stats' );
if ( ! empty( $response[1] ) ) {
$stat_totals[$interval] = json_decode( $response[1] );
}
return rest_ensure_response( $stat_totals );
}
/**
* Get the current alert code and message. Alert codes are used to notify the site owner
* if there's a problem, like a connection issue between their site and the Akismet API,
* invalid requests being sent, etc.
*
* @param WP_REST_Request $request
* @return WP_Error|WP_REST_Response
*/
public static function get_alert( $request ) {
return rest_ensure_response( array(
'code' => get_option( 'akismet_alert_code' ),
'message' => get_option( 'akismet_alert_msg' ),
) );
}
/**
* Update the current alert code and message by triggering a call to the Akismet server.
*
* @param WP_REST_Request $request
* @return WP_Error|WP_REST_Response
*/
public static function set_alert( $request ) {
delete_option( 'akismet_alert_code' );
delete_option( 'akismet_alert_msg' );
// Make a request so the most recent alert code and message are retrieved.
Akismet::verify_key( Akismet::get_api_key() );
return self::get_alert( $request );
}
/**
* Clear the current alert code and message.
*
* @param WP_REST_Request $request
* @return WP_Error|WP_REST_Response
*/
public static function delete_alert( $request ) {
delete_option( 'akismet_alert_code' );
delete_option( 'akismet_alert_msg' );
return self::get_alert( $request );
}
private static function key_is_valid( $key ) {
$response = Akismet::http_post(
Akismet::build_query(
array(
'key' => $key,
'blog' => get_option( 'home' )
)
),
'verify-key'
);
if ( $response[1] == 'valid' ) {
return true;
}
return false;
}
public static function privileged_permission_callback() {
return current_user_can( 'manage_options' );
}
/**
* For calls that Akismet.com makes to the site to clear outdated alert codes, use the API key for authorization.
*/
public static function remote_call_permission_callback( $request ) {
$local_key = Akismet::get_api_key();
return $local_key && ( strtolower( $request->get_param( 'key' ) ) === strtolower( $local_key ) );
}
public static function sanitize_interval( $interval, $request, $param ) {
$interval = trim( $interval );
$valid_intervals = array( '60-days', '6-months', 'all', );
if ( ! in_array( $interval, $valid_intervals ) ) {
$interval = 'all';
}
return $interval;
}
public static function sanitize_key( $key, $request, $param ) {
return trim( $key );
}
}

View File

@@ -0,0 +1,114 @@
<?php
/**
* @package Akismet
*/
class Akismet_Widget extends WP_Widget {
function __construct() {
load_plugin_textdomain( 'akismet' );
parent::__construct(
'akismet_widget',
__( 'Akismet Widget' , 'akismet'),
array( 'description' => __( 'Display the number of spam comments Akismet has caught' , 'akismet') )
);
if ( is_active_widget( false, false, $this->id_base ) ) {
add_action( 'wp_head', array( $this, 'css' ) );
}
}
function css() {
?>
<style type="text/css">
.a-stats {
width: auto;
}
.a-stats a {
background: #7CA821;
background-image:-moz-linear-gradient(0% 100% 90deg,#5F8E14,#7CA821);
background-image:-webkit-gradient(linear,0% 0,0% 100%,from(#7CA821),to(#5F8E14));
border: 1px solid #5F8E14;
border-radius:3px;
color: #CFEA93;
cursor: pointer;
display: block;
font-weight: normal;
height: 100%;
-moz-border-radius:3px;
padding: 7px 0 8px;
text-align: center;
text-decoration: none;
-webkit-border-radius:3px;
width: 100%;
}
.a-stats a:hover {
text-decoration: none;
background-image:-moz-linear-gradient(0% 100% 90deg,#6F9C1B,#659417);
background-image:-webkit-gradient(linear,0% 0,0% 100%,from(#659417),to(#6F9C1B));
}
.a-stats .count {
color: #FFF;
display: block;
font-size: 15px;
line-height: 16px;
padding: 0 13px;
white-space: nowrap;
}
</style>
<?php
}
function form( $instance ) {
if ( $instance && isset( $instance['title'] ) ) {
$title = $instance['title'];
}
else {
$title = __( 'Spam Blocked' , 'akismet' );
}
?>
<p>
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:' , 'akismet'); ?></label>
<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
</p>
<?php
}
function update( $new_instance, $old_instance ) {
$instance['title'] = strip_tags( $new_instance['title'] );
return $instance;
}
function widget( $args, $instance ) {
$count = get_option( 'akismet_spam_count' );
if ( ! isset( $instance['title'] ) ) {
$instance['title'] = __( 'Spam Blocked' , 'akismet' );
}
echo $args['before_widget'];
if ( ! empty( $instance['title'] ) ) {
echo $args['before_title'];
echo esc_html( $instance['title'] );
echo $args['after_title'];
}
?>
<div class="a-stats">
<a href="https://akismet.com" target="_blank" title=""><?php printf( _n( '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', $count , 'akismet'), number_format_i18n( $count ) ); ?></a>
</div>
<?php
echo $args['after_widget'];
}
}
function akismet_register_widgets() {
register_widget( 'Akismet_Widget' );
}
add_action( 'widgets_init', 'akismet_register_widgets' );

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
<?php
# Silence is golden.

View File

@@ -0,0 +1,474 @@
=== Akismet Anti-Spam ===
Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs, procifer, stephdau
Tags: akismet, comments, spam, antispam, anti-spam, anti spam, comment moderation, comment spam, contact form spam, spam comments
Requires at least: 4.0
Tested up to: 5.3
Stable tag: 4.1.3
License: GPLv2 or later
Akismet checks your comments and contact form submissions against our global database of spam to protect you and your site from malicious content.
== Description ==
Akismet checks your comments and contact form submissions against our global database of spam to prevent your site from publishing malicious content. You can review the comment spam it catches on your blog's "Comments" admin screen.
Major features in Akismet include:
* Automatically checks all comments and filters out the ones that look like spam.
* Each comment has a status history, so you can easily see which comments were caught or cleared by Akismet and which were spammed or unspammed by a moderator.
* URLs are shown in the comment body to reveal hidden or misleading links.
* Moderators can see the number of approved comments for each user.
* A discard feature that outright blocks the worst spam, saving you disk space and speeding up your site.
PS: You'll be prompted to get an Akismet.com API key to use it, once activated. Keys are free for personal blogs; paid subscriptions are available for businesses and commercial sites.
== Installation ==
Upload the Akismet plugin to your blog, activate it, and then enter your Akismet.com API key.
1, 2, 3: You're done!
== Changelog ==
= 4.1.3 =
*Release Date - 31 October 2019*
* Prevented an attacker from being able to cause a user to unknowingly recheck their Pending comments for spam.
* Improved compatibility with Jetpack 7.7+.
* Updated the plugin activation page to use consistent language and markup.
* Redirecting users to the Akismet connnection/settings screen upon plugin activation, in an effort to make it easier for people to get setup.
= 4.1.2 =
*Release Date - 14 May 2019*
* Fixed a conflict between the Akismet setup banner and other plugin notices.
* Reduced the number of API requests made by the plugin when attempting to verify the API key.
* Include additional data in the pingback pre-check API request to help make the stats more accurate.
* Fixed a bug that was enabling the "Check for Spam" button when no comments were eligible to be checked.
* Improved Akismet's AMP compatibility.
= 4.1.1 =
*Release Date - 31 January 2019*
* Fixed the "Setup Akismet" notice so it resizes responsively.
* Only highlight the "Save Changes" button in the Akismet config when changes have been made.
* The count of comments in your spam queue shown on the dashboard show now always be up-to-date.
= 4.1 =
*Release Date - 12 November 2018*
* Added a WP-CLI method for retrieving stats.
* Hooked into the new "Personal Data Eraser" functionality from WordPress 4.9.6.
* Added functionality to clear outdated alerts from Akismet.com.
= 4.0.8 =
*Release Date - 19 June 2018*
* Improved the grammar and consistency of the in-admin privacy related notes (notice and config).
* Revised in-admin explanation of the comment form privacy notice to make its usage clearer.
* Added `rel="nofollow noopener"` to the comment form privacy notice to improve SEO and security.
= 4.0.7 =
*Release Date - 28 May 2018*
* Based on user feedback, the link on "Learn how your comment data is processed." in the optional privacy notice now has a `target` of `_blank` and opens in a new tab/window.
* Updated the in-admin privacy notice to use the term "comment" instead of "contact" in "Akismet can display a notice to your users under your comment forms."
* Only show in-admin privacy notice if Akismet has an API Key configured
= 4.0.6 =
*Release Date - 26 May 2018*
* Moved away from using `empty( get_option() )` to instantiating a variable to be compatible with older versions of PHP (5.3, 5.4, etc).
= 4.0.5 =
*Release Date - 26 May 2018*
* Corrected version number after tagging. Sorry...
= 4.0.4 =
*Release Date - 26 May 2018*
* Added a hook to provide Akismet-specific privacy information for a site's privacy policy.
* Added tools to control the display of a privacy related notice under comment forms.
* Fixed HTML in activation failure message to close META and HEAD tag properly.
* Fixed a bug that would sometimes prevent Akismet from being correctly auto-configured.
= 4.0.3 =
*Release Date - 19 February 2018*
* Added a scheduled task to remove entries in wp_commentmeta that no longer have corresponding comments in wp_comments.
* Added a new `akismet_batch_delete_count` action to the batch delete methods for people who'd like to keep track of the numbers of records being processed by those methods.
= 4.0.2 =
*Release Date - 18 December 2017*
* Fixed a bug that could cause Akismet to recheck a comment that has already been manually approved or marked as spam.
* Fixed a bug that could cause Akismet to claim that some comments are still waiting to be checked when no comments are waiting to be checked.
= 4.0.1 =
*Release Date - 6 November 2017*
* Fixed a bug that could prevent some users from connecting Akismet via their Jetpack connection.
* Ensured that any pending Akismet-related events are unscheduled if the plugin is deactivated.
* Allow some JavaScript to be run asynchronously to avoid affecting page render speeds.
= 4.0 =
*Release Date - 19 September 2017*
* Added REST API endpoints for configuring Akismet and retrieving stats.
* Increased the minimum supported WordPress version to 4.0.
* Added compatibility with comments submitted via the REST API.
* Improved the progress indicator on the "Check for Spam" button.
= 3.3.4 =
*Release Date - 3 August 2017*
* Disabled Akismet's debug log output by default unless AKISMET_DEBUG is defined.
* URL previews now begin preloading when the mouse moves near them in the comments section of wp-admin.
* When a comment is caught by the Comment Blacklist, Akismet will always allow it to stay in the trash even if it is spam as well.
* Fixed a bug that was preventing an error from being shown when a site can't reach Akismet's servers.
= 3.3.3 =
*Release Date - 13 July 2017*
* Reduced amount of bandwidth used by the URL Preview feature.
* Improved the admin UI when the API key is manually pre-defined for the site.
* Removed a workaround for WordPress installations older than 3.3 that will improve Akismet's compatibility with other plugins.
* The number of spam blocked that is displayed on the WordPress dashboard will now be more accurate and updated more frequently.
* Fixed a bug in the Akismet widget that could cause PHP warnings.
= 3.3.2 =
*Release Date - 10 May 2017*
* Fixed a bug causing JavaScript errors in some browsers.
= 3.3.1 =
*Release Date - 2 May 2017*
* Improve performance by only requesting the akismet_comment_nonce option when absolutely necessary.
* Fixed two bugs that could cause PHP warnings.
* Fixed a bug that was preventing the "Remove author URL" feature from working after a comment was edited using "Quick Edit."
* Fixed a bug that was preventing the URL preview feature from working after a comment was edited using "Quick Edit."
= 3.3 =
*Release Date - 23 February 2017*
* Updated the Akismet admin pages with a new clean design.
* Fixed bugs preventing the `akismet_add_comment_nonce` and `akismet_update_alert` wrapper functions from working properly.
* Fixed bug preventing the loading indicator from appearing when re-checking all comments for spam.
* Added a progress indicator to the "Check for Spam" button.
* Added a success message after manually rechecking the Pending queue for spam.
= 3.2 =
*Release Date - 6 September 2016*
* Added a WP-CLI module. You can now check comments and recheck the moderation queue from the command line.
* Stopped using the deprecated jQuery function `.live()`.
* Fixed a bug in `remove_comment_author_url()` and `add_comment_author_url()` that could generate PHP notices.
* Fixed a bug that could cause an infinite loop for sites with very very very large comment IDs.
* Fixed a bug that could cause the Akismet widget title to be blank.
= 3.1.11 =
*Release Date - 12 May 2016*
* Fixed a bug that could cause the "Check for Spam" button to skip some comments.
* Fixed a bug that could prevent some spam submissions from being sent to Akismet.
* Updated all links to use https:// when possible.
* Disabled Akismet debug logging unless WP_DEBUG and WP_DEBUG_LOG are both enabled.
= 3.1.10 =
*Release Date - 1 April 2016*
* Fixed a bug that could cause comments caught as spam to be placed in the Pending queue.
* Fixed a bug that could have resulted in comments that were caught by the core WordPress comment blacklist not to have a corresponding History entry.
* Fixed a bug that could have caused avoidable PHP warnings in the error log.
= 3.1.9 =
*Release Date - 28 March 2016*
* Add compatibility with Jetpack so that Jetpack can automatically configure Akismet settings when appropriate.
* Fixed a bug preventing some comment data from being sent to Akismet.
= 3.1.8 =
*Release Date - 4 March 2016*
* Fixed a bug preventing Akismet from being used with some plugins that rewrite admin URLs.
* Reduced the amount of bandwidth used on Akismet API calls
* Reduced the amount of space Akismet uses in the database
* Fixed a bug that could cause comments caught as spam to be placed in the Pending queue.
= 3.1.7 =
*Release Date - 4 January 2016*
* Added documentation for the 'akismet_comment_nonce' filter.
* The post-install activation button is now accessible to screen readers and keyboard-only users.
* Fixed a bug that was preventing the "Remove author URL" feature from working in WordPress 4.4
= 3.1.6 =
*Release Date - 14 December 2015*
* Improve the notices shown after activating Akismet.
* Update some strings to allow for the proper plural forms in all languages.
= 3.1.5 =
*Release Date - 13 October 2015*
* Closes a potential XSS vulnerability.
= 3.1.4 =
*Release Date - 24 September 2015*
* Fixed a bug that was preventing some users from automatically connecting using Jetpack if they didn't have a current Akismet subscription.
* Fixed a bug that could cause comments caught as spam to be placed in the Pending queue.
* Error messages and instructions have been simplified to be more understandable.
* Link previews are enabled for all links inside comments, not just the author's website link.
= 3.1.3 =
*Release Date - 6 July 2015*
* Notify users when their account status changes after previously being successfully set up. This should help any users who are seeing blank Akismet settings screens.
= 3.1.2 =
*Release Date - 7 June 2015*
* Reduced the amount of space Akismet uses in the commentmeta table.
* Fixed a bug where some comments with quotes in the author name weren't getting history entries
* Pre-emptive security improvements to ensure that the Akismet plugin can't be used by attackers to compromise a WordPress installation.
* Better UI for the key entry field: allow whitespace to be included at the beginning or end of the key and strip it out automatically when the form is submitted.
* When deactivating the plugin, notify the Akismet API so the site can be marked as inactive.
* Clearer error messages.
= 3.1.1 =
*Release Date - 17th March, 2015*
* Improvements to the "Remove comment author URL" JavaScript
* Include the pingback pre-check from the 2.6 branch.
= 3.1 =
*Release Date - 11th March, 2015*
* Use HTTPS by default for all requests to Akismet.
* Fix for a situation where Akismet might strip HTML from a comment.
= 3.0.4 =
*Release Date - 11th December, 2014*
* Fix to make .htaccess compatible with Apache 2.4.
* Fix to allow removal of https author URLs.
* Fix to avoid stripping part of the author URL when removing and re-adding.
* Removed the "Check for Spam" button from the "Trash" and "Approved" queues, where it would have no effect.
* Allow automatic API key configuration when Jetpack is installed and connected to a WordPress.com account
= 3.0.3 =
*Release Date - 3rd November, 2014*
* Fix for sending the wrong data to delete_comment action that could have prevented old spam comments from being deleted.
* Added a filter to disable logging of Akismet debugging information.
* Added a filter for the maximum comment age when deleting old spam comments.
* Added a filter for the number per batch when deleting old spam comments.
* Removed the "Check for Spam" button from the Spam folder.
= 3.0.2 =
*Release Date - 18th August, 2014*
* Performance improvements.
* Fixed a bug that could truncate the comment data being sent to Akismet for checking.
= 3.0.1 =
*Release Date - 9th July, 2014*
* Removed dependency on PHP's fsockopen function
* Fix spam/ham reports to work when reported outside of the WP dashboard, e.g., from Notifications or the WP app
* Remove jQuery dependency for comment form JavaScript
* Remove unnecessary data from some Akismet comment meta
* Suspended keys will now result in all comments being put in moderation, not spam.
= 3.0.0 =
*Release Date - 15th April, 2014*
* Move Akismet to Settings menu
* Drop Akismet Stats menu
* Add stats snapshot to Akismet settings
* Add Akismet subscription details and status to Akismet settings
* Add contextual help for each page
* Improve Akismet setup to use Jetpack to automate plugin setup
* Fix "Check for Spam" to use AJAX to avoid page timing out
* Fix Akismet settings page to be responsive
* Drop legacy code
* Tidy up CSS and Javascript
* Replace the old discard setting with a new "discard pervasive spam" feature.
= 2.6.0 =
*Release Date - 18th March, 2014*
* Add ajax paging to the check for spam button to handle large volumes of comments
* Optimize javascript and add localization support
* Fix bug in link to spam comments from right now dashboard widget
* Fix bug with deleting old comments to avoid timeouts dealing with large volumes of comments
* Include X-Pingback-Forwarded-For header in outbound WordPress pingback verifications
* Add pre-check for pingbacks, to stop spam before an outbound verification request is made
= 2.5.9 =
*Release Date - 1st August, 2013*
* Update 'Already have a key' link to redirect page rather than depend on javascript
* Fix some non-translatable strings to be translatable
* Update Activation banner in plugins page to redirect user to Akismet config page
= 2.5.8 =
*Release Date - 20th January, 2013*
* Simplify the activation process for new users
* Remove the reporter_ip parameter
* Minor preventative security improvements
= 2.5.7 =
*Release Date - 13th December, 2012*
* FireFox Stats iframe preview bug
* Fix mshots preview when using https
* Add .htaccess to block direct access to files
* Prevent some PHP notices
* Fix Check For Spam return location when referrer is empty
* Fix Settings links for network admins
* Fix prepare() warnings in WP 3.5
= 2.5.6 =
*Release Date - 26th April, 2012*
* Prevent retry scheduling problems on sites where wp_cron is misbehaving
* Preload mshot previews
* Modernize the widget code
* Fix a bug where comments were not held for moderation during an error condition
* Improve the UX and display when comments are temporarily held due to an error
* Make the Check For Spam button force a retry when comments are held due to an error
* Handle errors caused by an invalid key
* Don't retry comments that are too old
* Improve error messages when verifying an API key
= 2.5.5 =
*Release Date - 11th January, 2012*
* Add nonce check for comment author URL remove action
* Fix the settings link
= 2.5.4 =
*Release Date - 5th January, 2012*
* Limit Akismet CSS and Javascript loading in wp-admin to just the pages that need it
* Added author URL quick removal functionality
* Added mShot preview on Author URL hover
* Added empty index.php to prevent directory listing
* Move wp-admin menu items under Jetpack, if it is installed
* Purge old Akismet comment meta data, default of 15 days
= 2.5.3 =
*Release Date - 8th Febuary, 2011*
* Specify the license is GPL v2 or later
* Fix a bug that could result in orphaned commentmeta entries
* Include hotfix for WordPress 3.0.5 filter issue
= 2.5.2 =
*Release Date - 14th January, 2011*
* Properly format the comment count for author counts
* Look for super admins on multisite installs when looking up user roles
* Increase the HTTP request timeout
* Removed padding for author approved count
* Fix typo in function name
* Set Akismet stats iframe height to fixed 2500px. Better to have one tall scroll bar than two side by side.
= 2.5.1 =
*Release Date - 17th December, 2010*
* Fix a bug that caused the "Auto delete" option to fail to discard comments correctly
* Remove the comment nonce form field from the 'Akismet Configuration' page in favor of using a filter, akismet_comment_nonce
* Fixed padding bug in "author" column of posts screen
* Added margin-top to "cleared by ..." badges on dashboard
* Fix possible error when calling akismet_cron_recheck()
* Fix more PHP warnings
* Clean up XHTML warnings for comment nonce
* Fix for possible condition where scheduled comment re-checks could get stuck
* Clean up the comment meta details after deleting a comment
* Only show the status badge if the comment status has been changed by someone/something other than Akismet
* Show a 'History' link in the row-actions
* Translation fixes
* Reduced font-size on author name
* Moved "flagged by..." notification to top right corner of comment container and removed heavy styling
* Hid "flagged by..." notification while on dashboard
= 2.5.0 =
*Release Date - 7th December, 2010*
* Track comment actions under 'Akismet Status' on the edit comment screen
* Fix a few remaining deprecated function calls ( props Mike Glendinning )
* Use HTTPS for the stats IFRAME when wp-admin is using HTTPS
* Use the WordPress HTTP class if available
* Move the admin UI code to a separate file, only loaded when needed
* Add cron retry feature, to replace the old connectivity check
* Display Akismet status badge beside each comment
* Record history for each comment, and display it on the edit page
* Record the complete comment as originally submitted in comment_meta, to use when reporting spam and ham
* Highlight links in comment content
* New option, "Show the number of comments you've approved beside each comment author."
* New option, "Use a nonce on the comment form."
= 2.4.0 =
*Release Date - 23rd August, 2010*
* Spell out that the license is GPLv2
* Fix PHP warnings
* Fix WordPress deprecated function calls
* Fire the delete_comment action when deleting comments
* Move code specific for older WP versions to legacy.php
* General code clean up
= 2.3.0 =
*Release Date - 5th June, 2010*
* Fix "Are you sure" nonce message on config screen in WPMU
* Fix XHTML compliance issue in sidebar widget
* Change author link; remove some old references to WordPress.com accounts
* Localize the widget title (core ticket #13879)
= 2.2.9 =
*Release Date - 2nd June, 2010*
* Eliminate a potential conflict with some plugins that may cause spurious reports
= 2.2.8 =
*Release Date - 27th May, 2010*
* Fix bug in initial comment check for ipv6 addresses
* Report comments as ham when they are moved from spam to moderation
* Report comments as ham when clicking undo after spam
* Use transition_comment_status action when available instead of older actions for spam/ham submissions
* Better diagnostic messages when PHP network functions are unavailable
* Better handling of comments by logged-in users
= 2.2.7 =
*Release Date - 17th December, 2009*
* Add a new AKISMET_VERSION constant
* Reduce the possibility of over-counting spam when another spam filter plugin is in use
* Disable the connectivity check when the API key is hard-coded for WPMU
= 2.2.6 =
*Release Date - 20th July, 2009*
* Fix a global warning introduced in 2.2.5
* Add changelog and additional readme.txt tags
* Fix an array conversion warning in some versions of PHP
* Support a new WPCOM_API_KEY constant for easier use with WordPress MU
= 2.2.5 =
*Release Date - 13th July, 2009*
* Include a new Server Connectivity diagnostic check, to detect problems caused by firewalls
= 2.2.4 =
*Release Date - 3rd June, 2009*
* Fixed a key problem affecting the stats feature in WordPress MU
* Provide additional blog information in Akismet API calls

View File

@@ -0,0 +1,8 @@
<div class="akismet-box">
<?php Akismet::view( 'title' ); ?>
<?php Akismet::view( 'setup' );?>
</div>
<br/>
<div class="akismet-box">
<?php Akismet::view( 'enter' );?>
</div>

View File

@@ -0,0 +1,242 @@
<div id="akismet-plugin-container">
<div class="akismet-masthead">
<div class="akismet-masthead__inside-container">
<div class="akismet-masthead__logo-container">
<img class="akismet-masthead__logo" src="<?php echo esc_url( plugins_url( '../_inc/img/logo-full-2x.png', __FILE__ ) ); ?>" alt="Akismet" />
</div>
</div>
</div>
<div class="akismet-lower">
<?php if ( Akismet::get_api_key() ) { ?>
<?php Akismet_Admin::display_status(); ?>
<?php } ?>
<?php if ( ! empty( $notices ) ) { ?>
<?php foreach ( $notices as $notice ) { ?>
<?php Akismet::view( 'notice', $notice ); ?>
<?php } ?>
<?php } ?>
<?php if ( $stat_totals && isset( $stat_totals['all'] ) && (int) $stat_totals['all']->spam > 0 ) : ?>
<div class="akismet-card">
<div class="akismet-section-header">
<div class="akismet-section-header__label">
<span><?php esc_html_e( 'Statistics' , 'akismet'); ?></span>
</div>
<div class="akismet-section-header__actions">
<a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>">
<?php esc_html_e( 'Detailed Stats' , 'akismet');?>
</a>
</div>
</div>
<div class="akismet-new-snapshot">
<iframe allowtransparency="true" scrolling="no" frameborder="0" style="width: 100%; height: 220px; overflow: hidden;" src="<?php printf( '//akismet.com/web/1.0/snapshot.php?blog=%s&api_key=%s&height=200&locale=%s', urlencode( get_option( 'home' ) ), Akismet::get_api_key(), get_locale() );?>"></iframe>
<ul>
<li>
<h3><?php esc_html_e( 'Past six months' , 'akismet');?></h3>
<span><?php echo number_format( $stat_totals['6-months']->spam );?></span>
<?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['6-months']->spam, 'akismet' ) ); ?>
</li>
<li>
<h3><?php esc_html_e( 'All time' , 'akismet');?></h3>
<span><?php echo number_format( $stat_totals['all']->spam );?></span>
<?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['all']->spam, 'akismet' ) ); ?>
</li>
<li>
<h3><?php esc_html_e( 'Accuracy' , 'akismet');?></h3>
<span><?php echo floatval( $stat_totals['all']->accuracy ); ?>%</span>
<?php printf( _n( '%s missed spam', '%s missed spam', $stat_totals['all']->missed_spam, 'akismet' ), number_format( $stat_totals['all']->missed_spam ) ); ?>
|
<?php printf( _n( '%s false positive', '%s false positives', $stat_totals['all']->false_positives, 'akismet' ), number_format( $stat_totals['all']->false_positives ) ); ?>
</li>
</ul>
</div>
</div>
<?php endif;?>
<?php if ( $akismet_user ):?>
<div class="akismet-card">
<div class="akismet-section-header">
<div class="akismet-section-header__label">
<span><?php esc_html_e( 'Settings' , 'akismet'); ?></span>
</div>
</div>
<div class="inside">
<form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="POST">
<table cellspacing="0" class="akismet-settings">
<tbody>
<?php if ( ! Akismet::predefined_api_key() ) { ?>
<tr>
<th class="akismet-api-key" width="10%" align="left" scope="row"><?php esc_html_e('API Key', 'akismet');?></th>
<td width="5%"/>
<td align="left">
<span class="api-key"><input id="key" name="key" type="text" size="15" value="<?php echo esc_attr( get_option('wordpress_api_key') ); ?>" class="<?php echo esc_attr( 'regular-text code ' . $akismet_user->status ); ?>"></span>
</td>
</tr>
<?php } ?>
<?php if ( isset( $_GET['ssl_status'] ) ) { ?>
<tr>
<th align="left" scope="row"><?php esc_html_e( 'SSL Status', 'akismet' ); ?></th>
<td></td>
<td align="left">
<p>
<?php
if ( ! wp_http_supports( array( 'ssl' ) ) ) {
?><b><?php esc_html_e( 'Disabled.', 'akismet' ); ?></b> <?php esc_html_e( 'Your Web server cannot make SSL requests; contact your Web host and ask them to add support for SSL requests.', 'akismet' ); ?><?php
}
else {
$ssl_disabled = get_option( 'akismet_ssl_disabled' );
if ( $ssl_disabled ) {
?><b><?php esc_html_e( 'Temporarily disabled.', 'akismet' ); ?></b> <?php esc_html_e( 'Akismet encountered a problem with a previous SSL request and disabled it temporarily. It will begin using SSL for requests again shortly.', 'akismet' ); ?><?php
}
else {
?><b><?php esc_html_e( 'Enabled.', 'akismet' ); ?></b> <?php esc_html_e( 'All systems functional.', 'akismet' ); ?><?php
}
}
?>
</p>
</td>
</tr>
<?php } ?>
<tr>
<th align="left" scope="row"><?php esc_html_e('Comments', 'akismet');?></th>
<td></td>
<td align="left">
<p>
<label for="akismet_show_user_comments_approved" title="<?php esc_attr_e( 'Show approved comments' , 'akismet'); ?>">
<input
name="akismet_show_user_comments_approved"
id="akismet_show_user_comments_approved"
value="1"
type="checkbox"
<?php
// If the option isn't set, or if it's enabled ('1'), or if it was enabled a long time ago ('true'), check the checkbox.
checked( true, ( in_array( get_option( 'akismet_show_user_comments_approved' ), array( false, '1', 'true' ), true ) ) );
?>
/>
<?php esc_html_e( 'Show the number of approved comments beside each comment author', 'akismet' ); ?>
</label>
</p>
</td>
</tr>
<tr>
<th class="strictness" align="left" scope="row"><?php esc_html_e('Strictness', 'akismet'); ?></th>
<td></td>
<td align="left">
<fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet anti-spam strictness', 'akismet'); ?></span></legend>
<p><label for="akismet_strictness_1"><input type="radio" name="akismet_strictness" id="akismet_strictness_1" value="1" <?php checked('1', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Silently discard the worst and most pervasive spam so I never see it.', 'akismet'); ?></label></p>
<p><label for="akismet_strictness_0"><input type="radio" name="akismet_strictness" id="akismet_strictness_0" value="0" <?php checked('0', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Always put spam in the Spam folder for review.', 'akismet'); ?></label></p>
</fieldset>
<span class="akismet-note"><strong><?php esc_html_e('Note:', 'akismet');?></strong>
<?php
$delete_interval = max( 1, intval( apply_filters( 'akismet_delete_comment_interval', 15 ) ) );
printf(
_n(
'Spam in the <a href="%1$s">spam folder</a> older than 1 day is deleted automatically.',
'Spam in the <a href="%1$s">spam folder</a> older than %2$d days is deleted automatically.',
$delete_interval,
'akismet'
),
admin_url( 'edit-comments.php?comment_status=spam' ),
$delete_interval
);
?>
</td>
</tr>
<tr>
<th class="comment-form-privacy-notice" align="left" scope="row"><?php esc_html_e('Privacy', 'akismet'); ?></th>
<td></td>
<td align="left">
<fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet privacy notice', 'akismet'); ?></span></legend>
<p><label for="akismet_comment_form_privacy_notice_display"><input type="radio" name="akismet_comment_form_privacy_notice" id="akismet_comment_form_privacy_notice_display" value="display" <?php checked('display', get_option('akismet_comment_form_privacy_notice')); ?> /> <?php esc_html_e('Display a privacy notice under your comment forms.', 'akismet'); ?></label></p>
<p><label for="akismet_comment_form_privacy_notice_hide"><input type="radio" name="akismet_comment_form_privacy_notice" id="akismet_comment_form_privacy_notice_hide" value="hide" <?php echo in_array( get_option('akismet_comment_form_privacy_notice'), array('display', 'hide') ) ? checked('hide', get_option('akismet_comment_form_privacy_notice'), false) : 'checked="checked"'; ?> /> <?php esc_html_e('Do not display privacy notice.', 'akismet'); ?></label></p>
</fieldset>
<span class="akismet-note"><?php esc_html_e( 'To help your site with transparency under privacy laws like the GDPR, Akismet can display a notice to your users under your comment forms. This feature is disabled by default, however, you can turn it on above.', 'akismet' );?></span>
</td>
</tr>
</tbody>
</table>
<div class="akismet-card-actions">
<?php if ( ! Akismet::predefined_api_key() ) { ?>
<div id="delete-action">
<a class="submitdelete deletion" href="<?php echo esc_url( Akismet_Admin::get_page_url( 'delete_key' ) ); ?>"><?php esc_html_e('Disconnect this account', 'akismet'); ?></a>
</div>
<?php } ?>
<?php wp_nonce_field(Akismet_Admin::NONCE) ?>
<div id="publishing-action">
<input type="hidden" name="action" value="enter-key">
<input type="submit" name="submit" id="submit" class="akismet-button akismet-could-be-primary" value="<?php esc_attr_e('Save Changes', 'akismet');?>">
</div>
<div class="clear"></div>
</div>
</form>
</div>
</div>
<?php if ( ! Akismet::predefined_api_key() ) { ?>
<div class="akismet-card">
<div class="akismet-section-header">
<div class="akismet-section-header__label">
<span><?php esc_html_e( 'Account' , 'akismet'); ?></span>
</div>
</div>
<div class="inside">
<table cellspacing="0" border="0" class="akismet-settings">
<tbody>
<tr>
<th scope="row" align="left"><?php esc_html_e( 'Subscription Type' , 'akismet');?></th>
<td width="5%"/>
<td align="left">
<p><?php echo esc_html( $akismet_user->account_name ); ?></p>
</td>
</tr>
<tr>
<th scope="row" align="left"><?php esc_html_e( 'Status' , 'akismet');?></th>
<td width="5%"/>
<td align="left">
<p><?php
if ( 'cancelled' == $akismet_user->status ) :
esc_html_e( 'Cancelled', 'akismet' );
elseif ( 'suspended' == $akismet_user->status ) :
esc_html_e( 'Suspended', 'akismet' );
elseif ( 'missing' == $akismet_user->status ) :
esc_html_e( 'Missing', 'akismet' );
elseif ( 'no-sub' == $akismet_user->status ) :
esc_html_e( 'No Subscription Found', 'akismet' );
else :
esc_html_e( 'Active', 'akismet' );
endif; ?></p>
</td>
</tr>
<?php if ( $akismet_user->next_billing_date ) : ?>
<tr>
<th scope="row" align="left"><?php esc_html_e( 'Next Billing Date' , 'akismet');?></th>
<td width="5%"/>
<td align="left">
<p><?php echo date( 'F j, Y', $akismet_user->next_billing_date ); ?></p>
</td>
</tr>
<?php endif; ?>
</tbody>
</table>
<div class="akismet-card-actions">
<div id="publishing-action">
<?php Akismet::view( 'get', array( 'text' => ( $akismet_user->account_type == 'free-api-key' && $akismet_user->status == 'active' ? __( 'Upgrade' , 'akismet') : __( 'Change' , 'akismet') ), 'redirect' => 'upgrade' ) ); ?>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<?php } ?>
<?php endif;?>
</div>
</div>

View File

@@ -0,0 +1,72 @@
<?php
//phpcs:disable VariableAnalysis
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
?>
<div class="akismet-box">
<?php Akismet::view( 'title' ); ?>
<div class="akismet-jp-connect">
<h3><?php esc_html_e( 'Connect with Jetpack', 'akismet' ); ?></h3><?php
if ( in_array( $akismet_user->status, array( 'no-sub', 'missing' ) ) ) {?>
<p><?php esc_html_e( 'Use your Jetpack connection to set up Akismet.', 'akismet' ); ?></p>
<form name="akismet_activate" id="akismet_activate" action="https://akismet.com/get/" method="post" class="akismet-right" target="_blank">
<input type="hidden" name="passback_url" value="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"/>
<input type="hidden" name="blog" value="<?php echo esc_url( get_option( 'home' ) ); ?>"/>
<input type="hidden" name="auto-connect" value="<?php echo esc_attr( $akismet_user->ID ); ?>"/>
<input type="hidden" name="redirect" value="plugin-signup"/>
<input type="submit" class="akismet-button akismet-is-primary" value="<?php esc_attr_e( 'Connect with Jetpack' , 'akismet' ); ?>"/>
</form>
<?php echo get_avatar( $akismet_user->user_email, null, null, null, array( 'class' => 'akismet-jetpack-gravatar' ) ); ?>
<p><?php
/* translators: %s is the WordPress.com username */
echo sprintf( esc_html( __( 'You are connected as %s.', 'akismet' ) ), '<b>' . esc_html( $akismet_user->user_login ) . '</b>' ); ?><br /><span class="akismet-jetpack-email"><?php echo esc_html( $akismet_user->user_email ); ?></span></p>
<?php } elseif ( $akismet_user->status == 'cancelled' ) { ?>
<p><?php esc_html_e( 'Use your Jetpack connection to set up Akismet.', 'akismet' ); ?></p>
<form name="akismet_activate" id="akismet_activate" action="https://akismet.com/get/" method="post" class="akismet-right" target="_blank">
<input type="hidden" name="passback_url" value="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"/>
<input type="hidden" name="blog" value="<?php echo esc_url( get_option( 'home' ) ); ?>"/>
<input type="hidden" name="user_id" value="<?php echo esc_attr( $akismet_user->ID ); ?>"/>
<input type="hidden" name="redirect" value="upgrade"/>
<input type="submit" class="akismet-button akismet-is-primary" value="<?php esc_attr_e( 'Connect with Jetpack' , 'akismet' ); ?>"/>
</form>
<?php echo get_avatar( $akismet_user->user_email, null, null, null, array( 'class' => 'akismet-jetpack-gravatar' ) ); ?>
<p><?php
/* translators: %s is the WordPress.com email address */
echo esc_html( sprintf( __( 'Your subscription for %s is cancelled.' , 'akismet' ), $akismet_user->user_email ) ); ?><br /><span class="akismet-jetpack-email"><?php echo esc_html( $akismet_user->user_email ); ?></span></p>
<?php } elseif ( $akismet_user->status == 'suspended' ) { ?>
<div class="akismet-right">
<p><a href="https://akismet.com/contact" class="akismet-button akismet-is-primary"><?php esc_html_e( 'Contact Akismet support' , 'akismet' ); ?></a></p>
</div>
<p>
<span class="akismet-alert-text"><?php
/* translators: %s is the WordPress.com email address */
echo esc_html( sprintf( __( 'Your subscription for %s is suspended.' , 'akismet' ), $akismet_user->user_email ) ); ?></span>
<?php esc_html_e( 'No worries! Get in touch and we&#8217;ll sort this out.', 'akismet' ); ?>
</p>
<?php } else { // ask do they want to use akismet account found using jetpack wpcom connection ?>
<p><?php esc_html_e( 'Use your Jetpack connection to set up Akismet.', 'akismet' ); ?></p>
<form name="akismet_use_wpcom_key" action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post" id="akismet-activate" class="akismet-right">
<input type="hidden" name="key" value="<?php echo esc_attr( $akismet_user->api_key );?>"/>
<input type="hidden" name="action" value="enter-key">
<?php wp_nonce_field( Akismet_Admin::NONCE ) ?>
<input type="submit" class="akismet-button akismet-is-primary" value="<?php esc_attr_e( 'Connect with Jetpack' , 'akismet' ); ?>"/>
</form>
<?php echo get_avatar( $akismet_user->user_email, null, null, null, array( 'class' => 'akismet-jetpack-gravatar' ) ); ?>
<p><?php
/* translators: %s is the WordPress.com username */
echo sprintf( esc_html( __( 'You are connected as %s.', 'akismet' ) ), '<b>' . esc_html( $akismet_user->user_login ) . '</b>' ); ?><br /><span class="akismet-jetpack-email"><?php echo esc_html( $akismet_user->user_email ); ?></span></p>
<?php } ?>
</div>
<div class="akismet-ak-connect">
<?php Akismet::view( 'setup' );?>
</div>
<div class="centered akismet-toggles">
<a href="#" class="toggle-jp-connect"><?php esc_html_e( 'Connect with Jetpack' ); ?></a>
<a href="#" class="toggle-ak-connect"><?php esc_html_e( 'Set up a different account' ); ?></a>
</div>
</div>
<br/>
<div class="akismet-box">
<?php Akismet::view( 'enter' );?>
</div>

View File

@@ -0,0 +1,13 @@
<div class="akismet-enter-api-key-box centered">
<a href="#"><?php esc_html_e( 'Manually enter an API key' ); ?></a>
<div class="enter-api-key">
<form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post">
<?php wp_nonce_field( Akismet_Admin::NONCE ) ?>
<input type="hidden" name="action" value="enter-key">
<p style="width: 100%; display: flex; flex-wrap: nowrap; box-sizing: border-box;">
<input id="key" name="key" type="text" size="15" value="" placeholder="<?php esc_attr_e( 'Enter your API key' , 'akismet' ); ?>" class="regular-text code" style="flex-grow: 1; margin-right: 1rem;">
<input type="submit" name="submit" id="submit" class="akismet-button" value="<?php esc_attr_e( 'Connect with API key', 'akismet' );?>">
</p>
</form>
</div>
</div>

View File

@@ -0,0 +1,12 @@
<?php
//phpcs:disable VariableAnalysis
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
?>
<form name="akismet_activate" action="https://akismet.com/get/" method="POST" target="_blank">
<input type="hidden" name="passback_url" value="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>"/>
<input type="hidden" name="blog" value="<?php echo esc_url( get_option( 'home' ) ); ?>"/>
<input type="hidden" name="redirect" value="<?php echo isset( $redirect ) ? $redirect : 'plugin-signup'; ?>"/>
<input type="submit" class="<?php echo isset( $classes ) && count( $classes ) > 0 ? implode( ' ', $classes ) : 'akismet-button';?>" value="<?php echo esc_attr( $text ); ?>"/>
</form>

View File

@@ -0,0 +1,147 @@
<?php
//phpcs:disable VariableAnalysis
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
?>
<?php if ( $type == 'plugin' ) :?>
<div class="updated" id="akismet_setup_prompt">
<form name="akismet_activate" action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="POST">
<div class="akismet_activate">
<div class="aa_a">A</div>
<div class="aa_button_container">
<div class="aa_button_border">
<input type="submit" class="aa_button" value="<?php esc_attr_e( 'Set up your Akismet account', 'akismet' ); ?>" />
</div>
</div>
<div class="aa_description"><?php _e('<strong>Almost done</strong> - configure Akismet and say goodbye to spam', 'akismet');?></div>
</div>
</form>
</div>
<?php elseif ( $type == 'spam-check' ) :?>
<div class="notice notice-warning">
<p><strong><?php esc_html_e( 'Akismet has detected a problem.', 'akismet' );?></strong></p>
<p><?php esc_html_e( 'Some comments have not yet been checked for spam by Akismet. They have been temporarily held for moderation and will automatically be rechecked later.', 'akismet' ); ?></p>
<?php if ( $link_text ) { ?>
<p><?php echo $link_text; ?></p>
<?php } ?>
</div>
<?php elseif ( $type == 'alert' ) :?>
<div class='error'>
<p><strong><?php printf( esc_html__( 'Akismet Error Code: %s', 'akismet' ), $code ); ?></strong></p>
<p><?php echo esc_html( $msg ); ?></p>
<p><?php
/* translators: the placeholder is a clickable URL that leads to more information regarding an error code. */
printf( esc_html__( 'For more information: %s' , 'akismet'), '<a href="https://akismet.com/errors/' . $code . '">https://akismet.com/errors/' . $code . '</a>' );
?>
</p>
</div>
<?php elseif ( $type == 'notice' ) :?>
<div class="akismet-alert akismet-critical">
<h3 class="akismet-key-status failed"><?php echo $notice_header; ?></h3>
<p class="akismet-description">
<?php echo $notice_text; ?>
</p>
</div>
<?php elseif ( $type == 'missing-functions' ) :?>
<div class="akismet-alert akismet-critical">
<h3 class="akismet-key-status failed"><?php esc_html_e('Network functions are disabled.', 'akismet'); ?></h3>
<p class="akismet-description"><?php printf( __('Your web host or server administrator has disabled PHP&#8217;s <code>gethostbynamel</code> function. <strong>Akismet cannot work correctly until this is fixed.</strong> Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet&#8217;s system requirements</a>.', 'akismet'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p>
</div>
<?php elseif ( $type == 'servers-be-down' ) :?>
<div class="akismet-alert akismet-critical">
<h3 class="akismet-key-status failed"><?php esc_html_e("Your site can&#8217;t connect to the Akismet servers.", 'akismet'); ?></h3>
<p class="akismet-description"><?php printf( __('Your firewall may be blocking Akismet from connecting to its API. Please contact your host and refer to <a href="%s" target="_blank">our guide about firewalls</a>.', 'akismet'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p>
</div>
<?php elseif ( $type == 'active-dunning' ) :?>
<div class="akismet-alert akismet-critical">
<h3 class="akismet-key-status"><?php esc_html_e("Please update your payment information.", 'akismet'); ?></h3>
<p class="akismet-description"><?php printf( __('We cannot process your payment. Please <a href="%s" target="_blank">update your payment details</a>.', 'akismet'), 'https://akismet.com/account/'); ?></p>
</div>
<?php elseif ( $type == 'cancelled' ) :?>
<div class="akismet-alert akismet-critical">
<h3 class="akismet-key-status"><?php esc_html_e("Your Akismet plan has been cancelled.", 'akismet'); ?></h3>
<p class="akismet-description"><?php printf( __('Please visit your <a href="%s" target="_blank">Akismet account page</a> to reactivate your subscription.', 'akismet'), 'https://akismet.com/account/'); ?></p>
</div>
<?php elseif ( $type == 'suspended' ) :?>
<div class="akismet-alert akismet-critical">
<h3 class="akismet-key-status failed"><?php esc_html_e("Your Akismet subscription is suspended.", 'akismet'); ?></h3>
<p class="akismet-description"><?php printf( __('Please contact <a href="%s" target="_blank">Akismet support</a> for assistance.', 'akismet'), 'https://akismet.com/contact/'); ?></p>
</div>
<?php elseif ( $type == 'active-notice' && $time_saved ) :?>
<div class="akismet-alert akismet-active">
<h3 class="akismet-key-status"><?php echo esc_html( $time_saved ); ?></h3>
<p class="akismet-description"><?php printf( __('You can help us fight spam and upgrade your account by <a href="%s" target="_blank">contributing a token amount</a>.', 'akismet'), 'https://akismet.com/account/upgrade/'); ?></p>
</div>
<?php elseif ( $type == 'missing' ) :?>
<div class="akismet-alert akismet-critical">
<h3 class="akismet-key-status failed"><?php esc_html_e( 'There is a problem with your API key.', 'akismet'); ?></h3>
<p class="akismet-description"><?php printf( __('Please contact <a href="%s" target="_blank">Akismet support</a> for assistance.', 'akismet'), 'https://akismet.com/contact/'); ?></p>
</div>
<?php elseif ( $type == 'no-sub' ) :?>
<div class="akismet-alert akismet-critical">
<h3 class="akismet-key-status failed"><?php esc_html_e( 'You don&#8217;t have an Akismet plan.', 'akismet'); ?></h3>
<p class="akismet-description">
<?php printf( __( 'In 2012, Akismet began using subscription plans for all accounts (even free ones). A plan has not been assigned to your account, and we&#8217;d appreciate it if you&#8217;d <a href="%s" target="_blank">sign into your account</a> and choose one.', 'akismet'), 'https://akismet.com/account/upgrade/' ); ?>
<br /><br />
<?php printf( __( 'Please <a href="%s" target="_blank">contact our support team</a> with any questions.', 'akismet' ), 'https://akismet.com/contact/' ); ?>
</p>
</div>
<?php elseif ( $type == 'new-key-valid' ) :
global $wpdb;
$check_pending_link = false;
$at_least_one_comment_in_moderation = !! $wpdb->get_var( "SELECT comment_ID FROM {$wpdb->comments} WHERE comment_approved = '0' LIMIT 1" );
if ( $at_least_one_comment_in_moderation) {
$check_pending_link = 'edit-comments.php?akismet_recheck=' . wp_create_nonce( 'akismet_recheck' );
}
?>
<div class="akismet-alert akismet-active">
<h3 class="akismet-key-status"><?php esc_html_e( 'Akismet is now protecting your site from spam. Happy blogging!', 'akismet' ); ?></h3>
<?php if ( $check_pending_link ) { ?>
<p class="akismet-description"><?php printf( __( 'Would you like to <a href="%s">check pending comments</a>?', 'akismet' ), esc_url( $check_pending_link ) ); ?></p>
<?php } ?>
</div>
<?php elseif ( $type == 'new-key-invalid' ) :?>
<div class="akismet-alert akismet-critical">
<h3 class="akismet-key-status"><?php esc_html_e( 'The key you entered is invalid. Please double-check it.' , 'akismet'); ?></h3>
</div>
<?php elseif ( $type == 'existing-key-invalid' ) :?>
<div class="akismet-alert akismet-critical">
<h3 class="akismet-key-status"><?php esc_html_e( 'Your API key is no longer valid. Please enter a new key or contact support@akismet.com.' , 'akismet'); ?></h3>
</div>
<?php elseif ( $type == 'new-key-failed' ) :?>
<div class="akismet-alert akismet-critical">
<h3 class="akismet-key-status"><?php esc_html_e( 'The API key you entered could not be verified.' , 'akismet'); ?></h3>
<p class="akismet-description"><?php printf( __('The connection to akismet.com could not be established. Please refer to <a href="%s" target="_blank">our guide about firewalls</a> and check your server configuration.', 'akismet'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p>
</div>
<?php elseif ( $type == 'limit-reached' && in_array( $level, array( 'yellow', 'red' ) ) ) :?>
<div class="akismet-alert akismet-critical">
<?php if ( $level == 'yellow' ): ?>
<h3 class="akismet-key-status failed"><?php esc_html_e( 'You&#8217;re using your Akismet key on more sites than your Pro subscription allows.', 'akismet' ); ?></h3>
<p class="akismet-description">
<?php printf( __( 'Your Pro subscription allows the use of Akismet on only one site. Please <a href="%s" target="_blank">purchase additional Pro subscriptions</a> or upgrade to an Enterprise subscription that allows the use of Akismet on unlimited sites.', 'akismet' ), 'https://docs.akismet.com/billing/add-more-sites/' ); ?>
<br /><br />
<?php printf( __( 'Please <a href="%s" target="_blank">contact our support team</a> with any questions.', 'akismet' ), 'https://akismet.com/contact/'); ?>
</p>
<?php elseif ( $level == 'red' ): ?>
<h3 class="akismet-key-status failed"><?php esc_html_e( 'You&#8217;re using Akismet on far too many sites for your Pro subscription.', 'akismet' ); ?></h3>
<p class="akismet-description">
<?php printf( __( 'To continue your service, <a href="%s" target="_blank">upgrade to an Enterprise subscription</a>, which covers an unlimited number of sites.', 'akismet'), 'https://akismet.com/account/upgrade/' ); ?>
<br /><br />
<?php printf( __( 'Please <a href="%s" target="_blank">contact our support team</a> with any questions.', 'akismet' ), 'https://akismet.com/contact/'); ?>
</p>
<?php endif; ?>
</div>
<?php elseif ( $type == 'privacy' ) :?>
<div class="notice notice-warning is-dismissible" id="akismet-privacy-notice-admin-notice">
<p><strong><?php esc_html_e( 'Akismet & Privacy.', 'akismet' );?></strong></p>
<p><?php esc_html_e( 'To help your site with transparency under privacy laws like the GDPR, Akismet can display a notice to your users under your comment forms. This feature is disabled by default, however, you can turn it on below.', 'akismet' ); ?></p>
<p><?php printf( __(' Please <a href="%s">enable</a> or <a href="%s">disable</a> this feature. <a href="%s" id="akismet-privacy-notice-control-notice-info-link" target="_blank">More information</a>.', 'akismet' ), admin_url( apply_filters( 'akismet_comment_form_privacy_notice_url_display', 'options-general.php?page=akismet-key-config&akismet_comment_form_privacy_notice=display' ) ), admin_url( apply_filters( 'akismet_comment_form_privacy_notice_url_hide', 'options-general.php?page=akismet-key-config&akismet_comment_form_privacy_notice=hide' ) ), 'https://akismet.com/privacy/' ); ?></p>
</div>
<?php endif;?>

View File

@@ -0,0 +1,11 @@
<div class="akismet-box">
<h2><?php esc_html_e( 'Manual Configuration', 'akismet' ); ?></h2>
<p>
<?php
/* translators: %s is the wp-config.php file */
echo sprintf( esc_html__( 'An Akismet API key has been defined in the %s file for this site.', 'akismet' ), '<code>wp-config.php</code>' );
?>
</p>
</div>

View File

@@ -0,0 +1,5 @@
<h3><?php esc_html_e( 'Set Up Akismet' , 'akismet' );?></h3>
<div class="akismet-right">
<?php Akismet::view( 'get', array( 'text' => __( 'Set up your Akismet account' , 'akismet' ), 'classes' => array( 'akismet-button', 'akismet-is-primary' ) ) ); ?>
</div>
<p><?php esc_html_e( 'Set up your Akismet account to enable spam filtering on this site.', 'akismet' ); ?></p>

View File

@@ -0,0 +1,31 @@
<?php
//phpcs:disable VariableAnalysis
// There are "undefined" variables here because they're defined in the code that includes this file as a template.
?>
<div id="akismet-plugin-container">
<div class="akismet-masthead">
<div class="akismet-masthead__inside-container">
<div class="akismet-masthead__logo-container">
<img class="akismet-masthead__logo" src="<?php echo esc_url( plugins_url( '../_inc/img/logo-full-2x.png', __FILE__ ) ); ?>" alt="Akismet" />
</div>
</div>
</div>
<div class="akismet-lower">
<?php Akismet_Admin::display_status();?>
<div class="akismet-boxes">
<?php
if ( Akismet::predefined_api_key() ) {
Akismet::view( 'predefined' );
} elseif ( $akismet_user && in_array( $akismet_user->status, array( 'active', 'active-dunning', 'no-sub', 'missing', 'cancelled', 'suspended' ) ) ) {
Akismet::view( 'connect-jp', compact( 'akismet_user' ) );
} else {
Akismet::view( 'activate' );
}
?>
</div>
</div>
</div>

View File

@@ -0,0 +1,11 @@
<div id="akismet-plugin-container">
<div class="akismet-masthead">
<div class="akismet-masthead__inside-container">
<a href="<?php echo esc_url( Akismet_Admin::get_page_url() );?>" class="akismet-right"><?php esc_html_e( 'Akismet Settings' , 'akismet' ); ?></a>
<div class="akismet-masthead__logo-container">
<img class="akismet-masthead__logo" src="<?php echo esc_url( plugins_url( '../_inc/img/logo-full-2x.png', __FILE__ ) ); ?>" alt="Akismet" />
</div>
</div>
</div>
<iframe src="<?php echo esc_url( sprintf( '//akismet.com/web/1.0/user-stats.php?blog=%s&api_key=%s&locale=%s', urlencode( get_option( 'home' ) ), Akismet::get_api_key(), get_locale() ) ); ?>" width="100%" height="2500px" frameborder="0"></iframe>
</div>

View File

@@ -0,0 +1,3 @@
<div class="centered akismet-box-header">
<h2><?php esc_html_e( 'Eliminate spam from your site', 'akismet' ); ?></h2>
</div>

View File

@@ -0,0 +1,214 @@
<?php
global $wpcom_api_key, $akismet_api_host, $akismet_api_port;
$wpcom_api_key = defined( 'WPCOM_API_KEY' ) ? constant( 'WPCOM_API_KEY' ) : '';
$akismet_api_host = Akismet::get_api_key() . '.rest.akismet.com';
$akismet_api_port = 80;
function akismet_test_mode() {
return Akismet::is_test_mode();
}
function akismet_http_post( $request, $host, $path, $port = 80, $ip = null ) {
$path = str_replace( '/1.1/', '', $path );
return Akismet::http_post( $request, $path, $ip );
}
function akismet_microtime() {
return Akismet::_get_microtime();
}
function akismet_delete_old() {
return Akismet::delete_old_comments();
}
function akismet_delete_old_metadata() {
return Akismet::delete_old_comments_meta();
}
function akismet_check_db_comment( $id, $recheck_reason = 'recheck_queue' ) {
return Akismet::check_db_comment( $id, $recheck_reason );
}
function akismet_rightnow() {
if ( !class_exists( 'Akismet_Admin' ) )
return false;
return Akismet_Admin::rightnow_stats();
}
function akismet_admin_init() {
_deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_version_warning() {
_deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_load_js_and_css() {
_deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_nonce_field( $action = -1 ) {
return wp_nonce_field( $action );
}
function akismet_plugin_action_links( $links, $file ) {
return Akismet_Admin::plugin_action_links( $links, $file );
}
function akismet_conf() {
_deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_stats_display() {
_deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_stats() {
return Akismet_Admin::dashboard_stats();
}
function akismet_admin_warnings() {
_deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_comment_row_action( $a, $comment ) {
return Akismet_Admin::comment_row_actions( $a, $comment );
}
function akismet_comment_status_meta_box( $comment ) {
return Akismet_Admin::comment_status_meta_box( $comment );
}
function akismet_comments_columns( $columns ) {
_deprecated_function( __FUNCTION__, '3.0' );
return $columns;
}
function akismet_comment_column_row( $column, $comment_id ) {
_deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_text_add_link_callback( $m ) {
return Akismet_Admin::text_add_link_callback( $m );
}
function akismet_text_add_link_class( $comment_text ) {
return Akismet_Admin::text_add_link_class( $comment_text );
}
function akismet_check_for_spam_button( $comment_status ) {
return Akismet_Admin::check_for_spam_button( $comment_status );
}
function akismet_submit_nonspam_comment( $comment_id ) {
return Akismet::submit_nonspam_comment( $comment_id );
}
function akismet_submit_spam_comment( $comment_id ) {
return Akismet::submit_spam_comment( $comment_id );
}
function akismet_transition_comment_status( $new_status, $old_status, $comment ) {
return Akismet::transition_comment_status( $new_status, $old_status, $comment );
}
function akismet_spam_count( $type = false ) {
return Akismet_Admin::get_spam_count( $type );
}
function akismet_recheck_queue() {
return Akismet_Admin::recheck_queue();
}
function akismet_remove_comment_author_url() {
return Akismet_Admin::remove_comment_author_url();
}
function akismet_add_comment_author_url() {
return Akismet_Admin::add_comment_author_url();
}
function akismet_check_server_connectivity() {
return Akismet_Admin::check_server_connectivity();
}
function akismet_get_server_connectivity( $cache_timeout = 86400 ) {
return Akismet_Admin::get_server_connectivity( $cache_timeout );
}
function akismet_server_connectivity_ok() {
_deprecated_function( __FUNCTION__, '3.0' );
return true;
}
function akismet_admin_menu() {
return Akismet_Admin::admin_menu();
}
function akismet_load_menu() {
return Akismet_Admin::load_menu();
}
function akismet_init() {
_deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_get_key() {
return Akismet::get_api_key();
}
function akismet_check_key_status( $key, $ip = null ) {
return Akismet::check_key_status( $key, $ip );
}
function akismet_update_alert( $response ) {
return Akismet::update_alert( $response );
}
function akismet_verify_key( $key, $ip = null ) {
return Akismet::verify_key( $key, $ip );
}
function akismet_get_user_roles( $user_id ) {
return Akismet::get_user_roles( $user_id );
}
function akismet_result_spam( $approved ) {
return Akismet::comment_is_spam( $approved );
}
function akismet_result_hold( $approved ) {
return Akismet::comment_needs_moderation( $approved );
}
function akismet_get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url ) {
return Akismet::get_user_comments_approved( $user_id, $comment_author_email, $comment_author, $comment_author_url );
}
function akismet_update_comment_history( $comment_id, $message, $event = null ) {
return Akismet::update_comment_history( $comment_id, $message, $event );
}
function akismet_get_comment_history( $comment_id ) {
return Akismet::get_comment_history( $comment_id );
}
function akismet_cmp_time( $a, $b ) {
return Akismet::_cmp_time( $a, $b );
}
function akismet_auto_check_update_meta( $id, $comment ) {
return Akismet::auto_check_update_meta( $id, $comment );
}
function akismet_auto_check_comment( $commentdata ) {
return Akismet::auto_check_comment( $commentdata );
}
function akismet_get_ip_address() {
return Akismet::get_ip_address();
}
function akismet_cron_recheck() {
return Akismet::cron_recheck();
}
function akismet_add_comment_nonce( $post_id ) {
return Akismet::add_comment_nonce( $post_id );
}
function akismet_fix_scheduled_recheck() {
return Akismet::fix_scheduled_recheck();
}
function akismet_spam_comments() {
_deprecated_function( __FUNCTION__, '3.0' );
return array();
}
function akismet_spam_totals() {
_deprecated_function( __FUNCTION__, '3.0' );
return array();
}
function akismet_manage_page() {
_deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_caught() {
_deprecated_function( __FUNCTION__, '3.0' );
}
function redirect_old_akismet_urls() {
_deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_kill_proxy_check( $option ) {
_deprecated_function( __FUNCTION__, '3.0' );
return 0;
}
function akismet_pingback_forwarded_for( $r, $url ) {
// This functionality is now in core.
return false;
}
function akismet_pre_check_pingback( $method ) {
return Akismet::pre_check_pingback( $method );
}

View File

@@ -0,0 +1,125 @@
/**
* A Gutenberg Breadcrumb Block
*/
( function( blocks, components, i18n, element ) {
const { __ } = wp.i18n;
const { registerBlockType, InspectorControls } = wp.blocks;
const { Component } = wp.element;
const { decodeEntities } = wp.htmlEntities;
wp.data.use( wp.data.plugins.controls );
const { data, apiFetch } = wp;
const { registerStore, withSelect, select, dispatch } = data;
const el = wp.element.createElement;
const iconBCN = el('svg', { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
el('path', { d: "M0.6 7.2C0.4 7.2 0.4 7.2 0.4 7.4V16.9C0.4 17.1 0.4 17.1 0.6 17.1H10.9C11.1 17.1 11.1 17.1 11.3 16.9L16 12.1 11.3 7.4C11.1 7.2 11.1 7.2 10.9 7.2ZM15 7.2 19.9 12.1 15 17.1H18.7C18.9 17.1 18.9 17.1 19.1 16.9L23.8 12.1 19.1 7.4C18.9 7.2 18.9 7.2 18.7 7.2Z" } )
);
const DEFAULT_STATE = {
breadcrumbTrails: {}
};
const actions = {
setBreadcrumbTrail( post, breadcrumbTrail) {
return {
type: 'SET_BREADCRUMB_TRAIL',
post,
breadcrumbTrail,
}
},
fetchFromAPI( path ) {
return {
type: 'FETCH_FROM_API',
path,
}
}
};
registerStore('breadcrumb-navxt', {
reducer( state = DEFAULT_STATE, action ) {
switch ( action.type ) {
case 'SET_BREADCRUMB_TRAIL' :
return {
...state,
breadcrumbTrails: {
...state.breadcrumbTrails,
[ action.post ]: action.breadcrumbTrail,
},
};
}
return state;
},
actions,
selectors: {
getBreadcrumbTrail( state, post ) {
const { breadcrumbTrails } = state;
const breadcrumbTrail = breadcrumbTrails[ post ];
return breadcrumbTrail;
},
},
controls: {
FETCH_FROM_API( action ) {
return apiFetch( { path: action.path } );
},
},
resolvers: {
* getBreadcrumbTrail( post ) {
const path = '/bcn/v1/post/' + post;
const breadcrumbTrail = yield actions.fetchFromAPI( path );
return actions.setBreadcrumbTrail( post, breadcrumbTrail );
}
},
} );
function renderBreadcrumbTrail( breadcrumbTrail ) {
var trailString = [];
const length = breadcrumbTrail.itemListElement.length;
breadcrumbTrail.itemListElement.forEach( function( listElement, index ) {
if( index > 0 ) {
trailString.push( decodeEntities( bcnOpts.hseparator ) );
}
if( index < length - 1 || bcnOpts.bcurrent_item_linked) {
trailString.push( el( 'a', { href: listElement.item['@id'] }, decodeEntities( listElement.item.name ) ) );
}
else {
trailString.push( el( 'span', { }, decodeEntities( listElement.item.name ) ) );
}
});
return trailString;
}
function displayBreadcrumbTrail( { breadcrumbTrail } ) {
if( ! breadcrumbTrail ) {
return __( 'Loading...', 'breadcrumb-navxt' );
}
if( breadcrumbTrail.itemListElement === 0 ) {
return __( 'No breadcrumb trail', 'breadcrumb-navxt' );
}
var breadcrumb = breadcrumbTrail.itemListElement[ 0 ];
return renderBreadcrumbTrail(breadcrumbTrail);
}
registerBlockType( 'bcn/breadcrumb-trail', {
title: __( 'Breadcrumb Trail', 'breadcrumb-navxt' ),
description: __( "Display a breadcrumb trail representing this post's location on this website.", 'breadcrumb-navxt'),
icon: iconBCN,
category: 'widgets',
edit: withSelect( ( select, ownProps ) => {
const { getBreadcrumbTrail } = select( 'breadcrumb-navxt' );
return {
breadcrumbTrail: getBreadcrumbTrail( select( 'core/editor' ).getCurrentPostId() ),
};
} )( displayBreadcrumbTrail ),
save: function() {
//Rendering in PHP
return null;
},
} );
} )(
window.wp.blocks,
window.wp.components,
window.wp.i18n,
window.wp.element
);

View File

@@ -0,0 +1,664 @@
<?php
/*
Plugin Name: Breadcrumb NavXT
Plugin URI: http://mtekk.us/code/breadcrumb-navxt/
Description: Adds a breadcrumb navigation showing the visitor&#39;s path to their current location. For details on how to use this plugin visit <a href="http://mtekk.us/code/breadcrumb-navxt/">Breadcrumb NavXT</a>.
Version: 6.4.0
Author: John Havlik
Author URI: http://mtekk.us/
License: GPL2
Text Domain: breadcrumb-navxt
Domain Path: /languages
*/
/*
Copyright 2007-2020 John Havlik (email : john.havlik@mtekk.us)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//Do a PHP version check, require 5.3 or newer
if(version_compare(phpversion(), '5.3.0', '<'))
{
//Only purpose of this function is to echo out the PHP version error
function bcn_phpold()
{
printf('<div class="notice notice-error"><p>' . esc_html__('Your PHP version is too old, please upgrade to a newer version. Your version is %1$s, Breadcrumb NavXT requires %2$s', 'breadcrumb-navxt') . '</p></div>', phpversion(), '5.3.0');
}
//If we are in the admin, let's print a warning then return
if(is_admin())
{
add_action('admin_notices', 'bcn_phpold');
}
return;
}
require_once(dirname(__FILE__) . '/includes/multibyte_supplicant.php');
//Include admin base class
if(!class_exists('mtekk_adminKit'))
{
require_once(dirname(__FILE__) . '/includes/class.mtekk_adminkit.php');
}
//Include the breadcrumb class
require_once(dirname(__FILE__) . '/class.bcn_breadcrumb.php');
//Include the breadcrumb trail class
require_once(dirname(__FILE__) . '/class.bcn_breadcrumb_trail.php');
if(class_exists('WP_Widget'))
{
//Include the WP 2.8+ widget class
require_once(dirname(__FILE__) . '/class.bcn_widget.php');
}
$breadcrumb_navxt = null;
//TODO change to extends mtekk_plugKit
class breadcrumb_navxt
{
const version = '6.4.0';
protected $name = 'Breadcrumb NavXT';
protected $identifier = 'breadcrumb-navxt';
protected $unique_prefix = 'bcn';
protected $plugin_basename = null;
protected $opt = null;
protected $breadcrumb_trail = null;
protected $admin = null;
protected $rest_controller = null;
/**
* Constructor for a new breadcrumb_navxt object
*
* @param bcn_breadcrumb_trail $breadcrumb_trail An instance of a bcn_breadcrumb_trail object to use for everything
*/
public function __construct(bcn_breadcrumb_trail $breadcrumb_trail)
{
//We get our breadcrumb trail object from our constructor
$this->breadcrumb_trail = $breadcrumb_trail;
//Grab defaults from the breadcrumb_trail object
$this->opt = $this->breadcrumb_trail->opt;
//We set the plugin basename here
$this->plugin_basename = plugin_basename(__FILE__);
//We need to add in the defaults for CPTs and custom taxonomies after all other plugins are loaded
add_action('wp_loaded', array($this, 'wp_loaded'), 15);
add_action('rest_api_init', array($this, 'rest_api_init'), 10);
//Run a little later than everyone else
add_action('init', array($this, 'init'), 11);
//Register the WordPress 2.8 Widget
add_action('widgets_init', array($this, 'register_widget'));
//Load our network admin if in the network dashboard (yes is_network_admin() doesn't exist)
if(defined('WP_NETWORK_ADMIN') && WP_NETWORK_ADMIN)
{
require_once(dirname(__FILE__) . '/class.bcn_network_admin.php');
//Instantiate our new admin object
$this->admin = new bcn_network_admin($this->breadcrumb_trail, $this->plugin_basename);
}
//Load our main admin if in the dashboard, but only if we're not in the network dashboard (prevents goofy bugs)
else if(is_admin() || defined('WP_UNINSTALL_PLUGIN'))
{
require_once(dirname(__FILE__) . '/class.bcn_admin.php');
//Instantiate our new admin object
$this->admin = new bcn_admin($this->breadcrumb_trail, $this->plugin_basename);
}
}
public function init()
{
breadcrumb_navxt::setup_options($this->opt);
if(!is_admin() || !isset($_POST[$this->unique_prefix . '_admin_reset']))
{
$this->get_settings(); //This breaks the reset options script, so only do it if we're not trying to reset the settings
}
add_filter('bcn_allowed_html', array($this, 'allowed_html'), 1, 1);
//We want to run late for using our breadcrumbs
add_filter('tha_breadcrumb_navigation', array($this, 'tha_compat'), 99);
//Only include the REST API if enabled
if(!defined('BCN_DISABLE_REST_API') || !BCN_DISABLE_REST_API)
{
require_once(dirname(__FILE__) . '/class.bcn_rest_controller.php');
$this->rest_controller = new bcn_rest_controller($this->breadcrumb_trail, $this->unique_prefix);
}
//Register Guternberg
$this->register_block();
}
public function rest_api_init()
{
add_filter('bcn_register_rest_endpoint', array($this, 'api_enable_for_block'), 10, 4);
}
public function register_widget()
{
return register_widget($this->unique_prefix . '_widget');
}
/**
* Server-side rendering for front-end block display
*
* @param array $attributes Array of attributes set by the Gutenberg sidebar
* @return string The Breadcrumb Trail string
*/
public function render_block($attributes)
{
$extra_classs = '';
if(isset($attributes['className']))
{
$extra_classs = esc_attr($attributes['className']);
}
return sprintf('<div class="breadcrumbs %2$s" typeof="BreadcrumbList" vocab="https://schema.org/">%1$s</div>', bcn_display(true), $extra_classs);
}
/**
* Handles registering the Breadcrumb Trail Gutenberg block
*/
public function register_block()
{
wp_register_script($this->unique_prefix . '-breadcrumb-trail-block-script', plugins_url('bcn_gutenberg_block.js', __FILE__), array('wp-blocks', 'wp-element', 'wp-i18n', 'wp-api'));
if(function_exists('register_block_type'))
{
register_block_type( $this->unique_prefix . '/breadcrumb-trail', array(
'editor_script' => $this->unique_prefix . '-breadcrumb-trail-block-script',
'render_callback' => array($this, 'render_block')
/*'editor_style' => ''/*,
'style' => ''*/
));
if(function_exists('wp_set_script_translations'))
{
//Setup our translation strings
wp_set_script_translations($this->unique_prefix . '-breadcrumb-trail-block-script', 'breadcrumb-navxt');
}
//Setup some bcn settings
//TODO: New settings arch should make this easier
wp_add_inline_script($this->unique_prefix . '-breadcrumb-trail-block-script',
$this->unique_prefix . 'Opts = ' . json_encode(
array(
'bcurrent_item_linked' => $this->opt['bcurrent_item_linked'],
'hseparator' => $this->opt['hseparator']
)) . ';',
'before');
}
}
public function api_enable_for_block($register_rest_endpoint, $endpoint, $version, $methods)
{
//Enable if the current user can edit posts
if(current_user_can('edit_posts') && $endpoint === 'post')
{
return true;
}
return $register_rest_endpoint;
}
public function allowed_html($tags)
{
$allowed_html = array(
'a' => array(
'href' => true,
'title' => true,
'class' => true,
'id' => true,
'media' => true,
'dir' => true,
'relList' => true,
'rel' => true,
'aria-hidden' => true,
'data-icon' => true,
'itemref' => true,
'itemid' => true,
'itemprop' => true,
'itemscope' => true,
'itemtype' => true,
'xmlns:v' => true,
'typeof' => true,
'property' => true,
'vocab' => true,
'translate' => true,
'lang' => true,
'bcn-aria-current' => true
),
'img' => array(
'alt' => true,
'align' => true,
'height' => true,
'width' => true,
'src' => true,
'srcset' => true,
'sizes' => true,
'id' => true,
'class' => true,
'aria-hidden' => true,
'data-icon' => true,
'itemref' => true,
'itemid' => true,
'itemprop' => true,
'itemscope' => true,
'itemtype' => true,
'xmlns:v' => true,
'typeof' => true,
'property' => true,
'vocab' => true,
'lang' => true
),
'span' => array(
'title' => true,
'class' => true,
'id' => true,
'dir' => true,
'align' => true,
'lang' => true,
'xml:lang' => true,
'aria-hidden' => true,
'data-icon' => true,
'itemref' => true,
'itemid' => true,
'itemprop' => true,
'itemscope' => true,
'itemtype' => true,
'xmlns:v' => true,
'typeof' => true,
'property' => true,
'vocab' => true,
'translate' => true,
'lang' => true
),
'h1' => array(
'title' => true,
'class' => true,
'id' => true,
'dir' => true,
'align' => true,
'lang' => true,
'xml:lang' => true,
'aria-hidden' => true,
'data-icon' => true,
'itemref' => true,
'itemid' => true,
'itemprop' => true,
'itemscope' => true,
'itemtype' => true,
'xmlns:v' => true,
'typeof' => true,
'property' => true,
'vocab' => true,
'translate' => true,
'lang' => true
),
'h2' => array(
'title' => true,
'class' => true,
'id' => true,
'dir' => true,
'align' => true,
'lang' => true,
'xml:lang' => true,
'aria-hidden' => true,
'data-icon' => true,
'itemref' => true,
'itemid' => true,
'itemprop' => true,
'itemscope' => true,
'itemtype' => true,
'xmlns:v' => true,
'typeof' => true,
'property' => true,
'vocab' => true,
'translate' => true,
'lang' => true
),
'meta' => array(
'content' => true,
'property' => true,
'vocab' => true,
'itemprop' => true
)
);
return mtekk_adminKit::array_merge_recursive($tags, $allowed_html);
}
public function get_version()
{
return self::version;
}
public function wp_loaded()
{
}
public function uninstall()
{
$this->admin->uninstall();
}
/**
* Sets up the extended options for any CPTs, taxonomies or extensions
*
* @param array $opt The options array, passed by reference
*/
static public function setup_options(&$opt)
{
//Add custom post types
breadcrumb_navxt::find_posttypes($opt);
//Add custom taxonomy types
breadcrumb_navxt::find_taxonomies($opt);
//Let others hook into our settings
$opt = apply_filters('bcn_settings_init', $opt);
}
/**
* Places settings into $opts array, if missing, for the registered post types
*
* @param array $opts
*/
static function find_posttypes(&$opts)
{
global $wp_post_types, $wp_taxonomies;
//Loop through all of the post types in the array
foreach($wp_post_types as $post_type)
{
//We only want custom post types
if(!$post_type->_builtin)
{
if(!isset($opts['bpost_' . $post_type->name . '_taxonomy_referer']))
{
//Default to not letting the refering page influence the referer
$opts['bpost_' . $post_type->name . '_taxonomy_referer'] = false;
}
//If the post type does not have settings in the options array yet, we need to load some defaults
if(!isset($opts['Hpost_' . $post_type->name . '_template']))
{
//Add the necessary option array members
$opts['Hpost_' . $post_type->name . '_template'] = bcn_breadcrumb::get_default_template();
}
if(!isset($opts['Hpost_' . $post_type->name . '_template_no_anchor']))
{
$opts['Hpost_' . $post_type->name . '_template_no_anchor'] = bcn_breadcrumb::default_template_no_anchor;
}
if(!isset($opts['apost_' . $post_type->name . '_root']))
{
//Default to not showing a post_root
$opts['apost_' . $post_type->name . '_root'] = 0;
}
if(!isset($opts['bpost_' . $post_type->name . '_hierarchy_display']))
{
//Default to not displaying a taxonomy
$opts['bpost_' . $post_type->name . '_hierarchy_display'] = false;
}
if(!isset($opts['Spost_' . $post_type->name . '_hierarchy_type']))
{
if($post_type->has_archive == true || is_string($post_type->has_archive))
{
$opts['bpost_' . $post_type->name . '_archive_display'] = true;
}
else
{
$opts['bpost_' . $post_type->name . '_archive_display'] = false;
}
if(!$post_type->hierarchical)
{
//Loop through all of the possible taxonomies
foreach($wp_taxonomies as $taxonomy)
{
//Check for non-public taxonomies
if(!apply_filters('bcn_show_tax_private', $taxonomy->public, $taxonomy->name, $post_type->name))
{
continue;
}
//Activate the first taxonomy valid for this post type and exit the loop
if($taxonomy->object_type == $post_type->name || in_array($post_type->name, $taxonomy->object_type))
{
$opts['bpost_' . $post_type->name . '_hierarchy_display'] = true;
$opts['Spost_' . $post_type->name . '_hierarchy_type'] = $taxonomy->name;
break;
}
}
}
else
{
$opts['bpost_' . $post_type->name . '_hierarchy_display'] = true;
$opts['Spost_' . $post_type->name . '_hierarchy_type'] = 'BCN_PARENT';
}
//If there are no valid taxonomies for this type, setup our defaults
if(!isset($opts['Spost_' . $post_type->name . '_hierarchy_type']))
{
$opts['Spost_' . $post_type->name . '_hierarchy_type'] = 'BCN_DATE';
}
//Run through some filters, allowing extensions to directly influence the default hierarchy selection/display
$opts['Spost_' . $post_type->name . '_hierarchy_type'] = apply_filters('bcn_default_hierarchy_type', $opts['Spost_' . $post_type->name . '_hierarchy_type'], $post_type->name);
$opts['bpost_' . $post_type->name . '_hierarchy_display'] = apply_filters('bcn_default_hierarchy_display', $opts['bpost_' . $post_type->name . '_hierarchy_display'], $post_type->name, $opts['Spost_' . $post_type->name . '_hierarchy_type']);
}
//New for 6.2
if(!isset($opts['bpost_' . $post_type->name . '_hierarchy_parent_first']))
{
$opts['bpost_' . $post_type->name . '_hierarchy_parent_first'] = false;
$opts['bpost_' . $post_type->name . '_hierarchy_parent_first'] = apply_filters('bcn_default_hierarchy_parent_first', $opts['bpost_' . $post_type->name . '_hierarchy_parent_first'], $post_type->name);
}
}
}
}
/**
* Places settings into $opts array, if missing, for the registered taxonomies
*
* @param $opts
*/
static function find_taxonomies(&$opts)
{
global $wp_taxonomies;
//We'll add our custom taxonomy stuff at this time
foreach($wp_taxonomies as $taxonomy)
{
//We only want custom taxonomies
if(!$taxonomy->_builtin)
{
//If the taxonomy does not have settings in the options array yet, we need to load some defaults
if(!isset($opts['Htax_' . $taxonomy->name . '_template']))
{
//Add the necessary option array members
$opts['Htax_' . $taxonomy->name . '_template'] = __(sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="Go to the %%title%% %s archives." href="%%link%%" class="%%type%%" bcn-aria-current><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', $taxonomy->labels->singular_name), 'breadcrumb-navxt');
$opts['Htax_' . $taxonomy->name . '_template_no_anchor'] = __(sprintf('<span property="itemListElement" typeof="ListItem"><span property="name">%%htitle%%</span><meta property="position" content="%%position%%"></span>', $taxonomy->labels->singular_name), 'breadcrumb-navxt');
}
}
}
}
/**
* Hooks into the theme hook alliance tha_breadcrumb_navigation filter and replaces the trail
* with one generated by Breadcrumb NavXT
*
* @param string $bradcrumb_trail The string breadcrumb trail that we will replace
* @return string The Breadcrumb NavXT assembled breadcrumb trail
*/
public function tha_compat($breadcrumb_trail)
{
//Return our breadcrumb trail
return $this->display(true);
}
/**
* Function updates the breadcrumb_trail options array from the database in a semi intellegent manner
*
* @since 5.0.0
*/
private function get_settings()
{
//Grab the current settings for the current local site from the db
$this->breadcrumb_trail->opt = wp_parse_args(get_option('bcn_options'), $this->opt);
//If we're in multisite mode, look at the three BCN_SETTINGS globals
if(is_multisite())
{
if(defined('BCN_SETTINGS_USE_NETWORK') && BCN_SETTINGS_USE_NETWORK)
{
//Grab the current network wide settings
$this->breadcrumb_trail->opt = wp_parse_args(get_site_option('bcn_options'), $this->opt);
}
else if(defined('BCN_SETTINGS_FAVOR_LOCAL') && BCN_SETTINGS_FAVOR_LOCAL)
{
//Grab the current settings for the current local site from the db
$this->breadcrumb_trail->opt = wp_parse_args(get_option('bcn_options'), $this->breadcrumb_trail->opt);
}
else if(defined('BCN_SETTINGS_FAVOR_NETWORK') && BCN_SETTINGS_FAVOR_NETWORK)
{
//Grab the current settings from the db
$this->breadcrumb_trail->opt = wp_parse_args(get_site_option('bcn_options'), get_option('bcn_options'));
}
}
//Currently only support using post_parent for the page hierarchy
$this->breadcrumb_trail->opt['bpost_page_hierarchy_display'] = true;
$this->breadcrumb_trail->opt['bpost_page_hierarchy_parent_first'] = true;
$this->breadcrumb_trail->opt['Spost_page_hierarchy_type'] = 'BCN_POST_PARENT';
$this->breadcrumb_trail->opt['apost_page_root'] = get_option('page_on_front');
//This one isn't needed as it is performed in bcn_breadcrumb_trail::fill(), it's here for completeness only
$this->breadcrumb_trail->opt['apost_post_root'] = get_option('page_for_posts');
//Loop through all of the post types in the array, migrate automatically if necessary
foreach($GLOBALS['wp_post_types'] as $post_type)
{
if(isset($this->opt['Spost_' . $post_type->name . '_taxonomy_type']))
{
$this->opt['Spost_' . $post_type->name . '_hierarchy_type'] = $this->opt['Spost_' . $post_type->name . '_taxonomy_type'];
unset($this->opt['Spost_' . $post_type->name . '_taxonomy_type']);
}
if(isset($this->opt['Spost_' . $post_type->name . '_taxonomy_display']))
{
$this->opt['Spost_' . $post_type->name . '_hierarchy_display'] = $this->opt['Spost_' . $post_type->name . '_taxonomy_display'];
unset($this->opt['Spost_' . $post_type->name . '_taxonomy_display']);
}
}
}
/**
* Outputs the breadcrumb trail
*
* @param bool $return Whether to return or echo the trail.
* @param bool $linked Whether to allow hyperlinks in the trail or not.
* @param bool $reverse Whether to reverse the output or not.
* @param bool $force Whether or not to force the fill function to run.
* @param string $template The template to use for the string output.
*
* @return void Void if Option to print out breadcrumb trail was chosen.
* @return string String-Data of breadcrumb trail.
*/
public function display($return = false, $linked = true, $reverse = false, $force = false, $template = '%1$s%2$s')
{
//If we're being forced to fill the trail, clear it before calling fill
if($force)
{
$this->breadcrumb_trail->breadcrumbs = array();
}
//Generate the breadcrumb trail
$this->breadcrumb_trail->fill();
$trail_string = $this->breadcrumb_trail->display($linked, $reverse, $template);
if($return)
{
return $trail_string;
}
else
{
//Helps track issues, please don't remove it
$credits = "<!-- Breadcrumb NavXT " . $this::version . " -->\n";
echo $credits . $trail_string;
}
}
/**
* Outputs the breadcrumb trail with each element encapsulated with li tags
*
* @deprecated 6.0.0 No longer needed, superceeded by $template parameter in display
*
* @param bool $return Whether to return or echo the trail.
* @param bool $linked Whether to allow hyperlinks in the trail or not.
* @param bool $reverse Whether to reverse the output or not.
* @param bool $force Whether or not to force the fill function to run.
*
* @return void Void if Option to print out breadcrumb trail was chosen.
* @return string String-Data of breadcrumb trail.
*/
public function display_list($return = false, $linked = true, $reverse = false, $force = false)
{
_deprecated_function( __FUNCTION__, '6.0', 'breadcrumb_navxt::display');
return $this->display($return, $linked, $reverse, $force, "<li%3\$s>%1\$s</li>\n");
}
/**
* Outputs the breadcrumb trail in Schema.org BreadcrumbList compatible JSON-LD
*
* @param bool $return Whether to return or echo the trail.
* @param bool $reverse Whether to reverse the output or not.
* @param bool $force Whether or not to force the fill function to run.
*
* @return void Void if Option to print out breadcrumb trail was chosen.
* @return string String-Data of breadcrumb trail.
*/
public function display_json_ld($return = false, $reverse = false, $force = false)
{
//If we're being forced to fill the trail, clear it before calling fill
if($force)
{
$this->breadcrumb_trail->breadcrumbs = array();
}
//Generate the breadcrumb trail
$this->breadcrumb_trail->fill();
$trail_string = json_encode($this->breadcrumb_trail->display_json_ld($reverse), JSON_UNESCAPED_SLASHES);
if($return)
{
return $trail_string;
}
else
{
echo $trail_string;
}
}
}
//Have to bootstrap our startup so that other plugins can replace the bcn_breadcrumb_trail object if they need to
add_action('plugins_loaded', 'bcn_init', 15);
function bcn_init()
{
global $breadcrumb_navxt;
//Create an instance of bcn_breadcrumb_trail
$bcn_breadcrumb_trail = new bcn_breadcrumb_trail();
//Let's make an instance of our object that takes care of everything
$breadcrumb_navxt = new breadcrumb_navxt(apply_filters('bcn_breadcrumb_trail_object', $bcn_breadcrumb_trail));
}
/**
* Outputs the breadcrumb trail
*
* @param bool $return Whether to return or echo the trail. (optional)
* @param bool $linked Whether to allow hyperlinks in the trail or not. (optional)
* @param bool $reverse Whether to reverse the output or not. (optional)
* @param bool $force Whether or not to force the fill function to run. (optional)
*
* @return void Void if Option to print out breadcrumb trail was chosen.
* @return string String-Data of breadcrumb trail.
*/
function bcn_display($return = false, $linked = true, $reverse = false, $force = false)
{
global $breadcrumb_navxt;
if($breadcrumb_navxt !== null)
{
return $breadcrumb_navxt->display($return, $linked, $reverse, $force);
}
}
/**
* Outputs the breadcrumb trail with each element encapsulated with li tags
*
* @param bool $return Whether to return or echo the trail. (optional)
* @param bool $linked Whether to allow hyperlinks in the trail or not. (optional)
* @param bool $reverse Whether to reverse the output or not. (optional)
* @param bool $force Whether or not to force the fill function to run. (optional)
*
* @return void Void if Option to print out breadcrumb trail was chosen.
* @return string String-Data of breadcrumb trail.
*/
function bcn_display_list($return = false, $linked = true, $reverse = false, $force = false)
{
global $breadcrumb_navxt;
if($breadcrumb_navxt !== null)
{
return $breadcrumb_navxt->display($return, $linked, $reverse, $force, "<li%3\$s>%1\$s</li>\n");
}
}
/**
* Outputs the breadcrumb trail in Schema.org BreadcrumbList compatible JSON-LD
*
* @param bool $return Whether to return or echo the trail. (optional)
* @param bool $reverse Whether to reverse the output or not. (optional)
* @param bool $force Whether or not to force the fill function to run. (optional)
*
* @return void Void if Option to print out breadcrumb trail was chosen.
* @return string String-Data of breadcrumb trail.
*/
function bcn_display_json_ld($return = false, $reverse = false, $force = false)
{
global $breadcrumb_navxt;
if($breadcrumb_navxt !== null)
{
return $breadcrumb_navxt->display_json_ld($return, $reverse, $force);
}
}

View File

@@ -0,0 +1,779 @@
<?php
/*
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once(dirname(__FILE__) . '/includes/block_direct_access.php');
//Do a PHP version check, require 5.3 or newer
if(version_compare(phpversion(), '5.3.0', '<'))
{
//Only purpose of this function is to echo out the PHP version error
function bcn_phpold()
{
printf('<div class="notice notice-error"><p>' . __('Your PHP version is too old, please upgrade to a newer version. Your version is %1$s, Breadcrumb NavXT requires %2$s', 'breadcrumb-navxt') . '</p></div>', phpversion(), '5.3.0');
}
//If we are in the admin, let's print a warning then return
if(is_admin())
{
add_action('admin_notices', 'bcn_phpold');
}
return;
}
//Include admin base class
if(!class_exists('mtekk_adminKit'))
{
require_once(dirname(__FILE__) . '/includes/class.mtekk_adminkit.php');
}
/**
* The administrative interface class
*
*/
class bcn_admin extends mtekk_adminKit
{
const version = '6.4.0';
protected $full_name = 'Breadcrumb NavXT Settings';
protected $short_name = 'Breadcrumb NavXT';
protected $access_level = 'manage_options';
protected $identifier = 'breadcrumb-navxt';
protected $unique_prefix = 'bcn';
protected $plugin_basename = null;
protected $support_url = 'https://wordpress.org/support/plugin/breadcrumb-navxt/';
protected $breadcrumb_trail = null;
/**
* Administrative interface class default constructor
*
* @param bcn_breadcrumb_trail $breadcrumb_trail a breadcrumb trail object
* @param string $basename The basename of the plugin
*/
function __construct(bcn_breadcrumb_trail &$breadcrumb_trail, $basename)
{
$this->breadcrumb_trail =& $breadcrumb_trail;
$this->plugin_basename = $basename;
$this->full_name = esc_html__('Breadcrumb NavXT Settings', 'breadcrumb-navxt');
//Grab defaults from the breadcrumb_trail object
$this->opt =& $this->breadcrumb_trail->opt;
//We're going to make sure we load the parent's constructor
parent::__construct();
}
/**
* admin initialization callback function
*
* is bound to wordpress action 'admin_init' on instantiation
*
* @since 3.2.0
* @return void
*/
function init()
{
//We're going to make sure we run the parent's version of this function as well
parent::init();
}
function wp_loaded()
{
parent::wp_loaded();
breadcrumb_navxt::setup_options($this->opt);
}
/**
* Sets hard constants into the options array
*
* @param &$opts The options array to set hard constants into
*/
function opts_fix(&$opts)
{
$opts['bpost_page_hierarchy_display'] = true;
$opts['Spost_page_hierarchy_type'] = 'BCN_POST_PARENT';
$opts['apost_page_root'] = get_option('page_on_front');
}
/**
* Upgrades input options array, sets to $this->opt
*
* @param array $opts
* @param string $version the version of the passed in options
*/
function opts_upgrade($opts, $version)
{
global $wp_post_types, $wp_taxonomies;
//If our version is not the same as in the db, time to update
if(version_compare($version, $this::version, '<'))
{
//Upgrading to 3.8.1
if(version_compare($version, '3.8.1', '<'))
{
$opts['post_page_root'] = $this->get_option('page_on_front');
$opts['post_post_root'] = $this->get_option('page_for_posts');
}
//Upgrading to 4.0
if(version_compare($version, '4.0.0', '<'))
{
//Only migrate if we haven't migrated yet
if(isset($opts['current_item_linked']))
{
//Loop through the old options, migrate some of them
foreach($opts as $option => $value)
{
//Handle all of our boolean options first, they're real easy, just add a 'b'
if(strpos($option, 'display') > 0 || $option == 'current_item_linked')
{
$this->breadcrumb_trail->opt['b' . $option] = $value;
}
//Handle migration of anchor templates to the templates
else if(strpos($option, 'anchor') > 0)
{
$parts = explode('_', $option);
//Do excess slash removal sanitation
$this->breadcrumb_trail->opt['H' . $parts[0] . '_template'] = $value . '%htitle%</a>';
}
//Handle our abs integers
else if($option == 'max_title_length' || $option == 'post_post_root' || $option == 'post_page_root')
{
$this->breadcrumb_trail->opt['a' . $option] = $value;
}
//Now everything else, minus prefix and suffix
else if(strpos($option, 'prefix') === false && strpos($option, 'suffix') === false)
{
$this->breadcrumb_trail->opt['S' . $option] = $value;
}
}
}
//Add in the new settings for CPTs introduced in 4.0
foreach($wp_post_types as $post_type)
{
//We only want custom post types
if(!$post_type->_builtin)
{
//Add in the archive_display option
$this->breadcrumb_trail->opt['bpost_' . $post_type->name . '_archive_display'] = $post_type->has_archive;
}
}
$opts = $this->breadcrumb_trail->opt;
}
if(version_compare($version, '4.0.1', '<'))
{
if(isset($opts['Hcurrent_item_template_no_anchor']))
{
unset($opts['Hcurrent_item_template_no_anchor']);
}
if(isset($opts['Hcurrent_item_template']))
{
unset($opts['Hcurrent_item_template']);
}
}
//Upgrading to 4.3.0
if(version_compare($version, '4.3.0', '<'))
{
//Removed home_title
if(isset($opts['Shome_title']))
{
unset($opts['Shome_title']);
}
//Removed mainsite_title
if(isset($opts['Smainsite_title']))
{
unset($opts['Smainsite_title']);
}
}
//Upgrading to 5.1.0
if(version_compare($version, '5.1.0', '<'))
{
foreach($wp_taxonomies as $taxonomy)
{
//If we have the old options style for it, update
if($taxonomy->name !== 'post_format' && isset($opts['H' . $taxonomy->name . '_template']))
{
//Migrate to the new setting name
$opts['Htax_' . $taxonomy->name . '_template'] = $opts['H' . $taxonomy->name . '_template'];
$opts['Htax_' . $taxonomy->name . '_template_no_anchor'] = $opts['H' . $taxonomy->name . '_template_no_anchor'];
//Clean up old settings
unset($opts['H' . $taxonomy->name . '_template']);
unset($opts['H' . $taxonomy->name . '_template_no_anchor']);
}
}
}
//Upgrading to 5.4.0
if(version_compare($version, '5.4.0', '<'))
{
//Migrate users to schema.org breadcrumbs for author and search if still on the defaults for posts
if($opts['Hpost_post_template'] === bcn_breadcrumb::get_default_template() && $opts['Hpost_post_template_no_anchor'] === bcn_breadcrumb::default_template_no_anchor)
{
if($opts['Hpaged_template'] === 'Page %htitle%')
{
$opts['Hpaged_template'] = $this->opt['Hpaged_template'];
}
if($opts['Hsearch_template'] === 'Search results for &#39;<a title="Go to the first page of search results for %title%." href="%link%" class="%type%">%htitle%</a>&#39;' || $opts['Hsearch_template'] === 'Search results for &#039;<a title="Go to the first page of search results for %title%." href="%link%" class="%type%">%htitle%</a>&#039;')
{
$opts['Hsearch_template'] = $this->opt['Hsearch_template'];
}
if($opts['Hsearch_template_no_anchor'] === 'Search results for &#39;%htitle%&#39;' || $opts['Hsearch_template_no_anchor'] === 'Search results for &#039;%htitle%&#039;')
{
$opts['Hsearch_template_no_anchor'] = $this->opt['Hsearch_template_no_anchor'];
}
if($opts['Hauthor_template'] === 'Articles by: <a title="Go to the first page of posts by %title%." href="%link%" class="%type%">%htitle%</a>')
{
$opts['Hauthor_template'] = $this->opt['Hauthor_template'];
}
if($opts['Hauthor_template_no_anchor'] === 'Articles by: %htitle%')
{
$opts['Hauthor_template_no_anchor'] = $this->opt['Hauthor_template_no_anchor'];
}
}
}
//Upgrading to 5.5.0
if(version_compare($version, '5.5.0', '<'))
{
//Translate the old 'page' taxonomy type to BCN_POST_PARENT
if($this->opt['Spost_post_taxonomy_type'] === 'page')
{
$this->opt['Spost_post_taxonomy_type'] = 'BCN_POST_PARENT';
}
if(!isset($this->opt['Spost_post_taxonomy_referer']))
{
$this->opt['bpost_post_taxonomy_referer'] = false;
}
//Loop through all of the post types in the array
foreach($wp_post_types as $post_type)
{
//Check for non-public CPTs
if(!apply_filters('bcn_show_cpt_private', $post_type->public, $post_type->name))
{
continue;
}
//We only want custom post types
if(!$post_type->_builtin)
{
//Translate the old 'page' taxonomy type to BCN_POST_PARENT
if($this->opt['Spost_' . $post_type->name . '_taxonomy_type'] === 'page')
{
$this->opt['Spost_' . $post_type->name . '_taxonomy_type'] = 'BCN_POST_PARENT';
}
//Translate the old 'date' taxonomy type to BCN_DATE
if($this->opt['Spost_' . $post_type->name . '_taxonomy_type'] === 'date')
{
$this->opt['Spost_' . $post_type->name . '_taxonomy_type'] = 'BCN_DATE';
}
if(!isset($this->opt['Spost_' . $post_type->name . '_taxonomy_referer']))
{
$this->opt['bpost_' . $post_type->name . '_taxonomy_referer'] = false;
}
}
}
}
//Upgrading to 6.0.0
if(version_compare($version, '6.0.0', '<'))
{
//Loop through all of the post types in the array
foreach($wp_post_types as $post_type)
{
if(isset($this->opt['Spost_' . $post_type->name . '_taxonomy_type']))
{
$this->opt['Spost_' . $post_type->name . '_hierarchy_type'] = $this->opt['Spost_' . $post_type->name . '_taxonomy_type'];
unset($this->opt['Spost_' . $post_type->name . '_taxonomy_type']);
}
if(isset($this->opt['Spost_' . $post_type->name . '_taxonomy_display']))
{
$this->opt['Spost_' . $post_type->name . '_hierarchy_display'] = $this->opt['Spost_' . $post_type->name . '_taxonomy_display'];
unset($this->opt['Spost_' . $post_type->name . '_taxonomy_display']);
}
}
}
//Set the max title length to 20 if we are not limiting the title and the length was 0
if(!$opts['blimit_title'] && $opts['amax_title_length'] == 0)
{
$opts['amax_title_length'] = 20;
}
}
//Save the passed in opts to the object's option array
$this->opt = mtekk_adminKit::parse_args($opts, $this->opt);
//End with resetting up the options
breadcrumb_navxt::setup_options($this->opt);
}
function opts_update_prebk(&$opts)
{
//This may no longer be needed
breadcrumb_navxt::setup_options($opts);
$opts = apply_filters('bcn_opts_update_prebk', $opts);
}
/**
* help action hook function
*
* @return string
*
*/
function help()
{
$screen = get_current_screen();
//Exit early if the add_help_tab function doesn't exist
if(!method_exists($screen, 'add_help_tab'))
{
return;
}
//Add contextual help on current screen
if($screen->id == 'settings_page_' . $this->identifier)
{
$general_tab = '<p>' . esc_html__('Tips for the settings are located below select options.', 'breadcrumb-navxt') .
'</p><h5>' . esc_html__('Resources', 'breadcrumb-navxt') . '</h5><ul><li>' .
sprintf(esc_html__("%sTutorials and How Tos%s: There are several guides, tutorials, and how tos available on the author's website.", 'breadcrumb-navxt'),'<a title="' . esc_attr__('Go to the Breadcrumb NavXT tag archive.', 'breadcrumb-navxt') . '" href="https://mtekk.us/archives/tag/breadcrumb-navxt">', '</a>') . '</li><li>' .
sprintf(esc_html__('%sOnline Documentation%s: Check out the documentation for more indepth technical information.', 'breadcrumb-navxt'), '<a title="' . esc_attr__('Go to the Breadcrumb NavXT online documentation', 'breadcrumb-navxt') . '" href="https://mtekk.us/code/breadcrumb-navxt/breadcrumb-navxt-doc/">', '</a>') . '</li><li>' .
sprintf(esc_html__('%sReport a Bug%s: If you think you have found a bug, please include your WordPress version and details on how to reproduce the bug.', 'breadcrumb-navxt'),'<a title="' . esc_attr__('Go to the Breadcrumb NavXT support post for your version.', 'breadcrumb-navxt') . '" href="https://wordpress.org/support/plugin/breadcrumb-navxt/">', '</a>') . '</li></ul>' .
'<h5>' . esc_html__('Giving Back', 'breadcrumb-navxt') . '</h5><ul><li>' .
sprintf(esc_html__('%sDonate%s: Love Breadcrumb NavXT and want to help development? Consider buying the author a beer.', 'breadcrumb-navxt'),'<a title="' . esc_attr__('Go to PayPal to give a donation to Breadcrumb NavXT.', 'breadcrumb-navxt') . '" href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=FD5XEU783BR8U&lc=US&item_name=Breadcrumb%20NavXT%20Donation&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted">', '</a>') . '</li><li>' .
sprintf(esc_html__('%sTranslate%s: Is your language not available? Visit the Breadcrumb NavXT translation project on WordPress.org to start translating.', 'breadcrumb-navxt'),'<a title="' . esc_attr__('Go to the Breadcrumb NavXT translation project.', 'breadcrumb-navxt') . '" href="https://translate.wordpress.org/projects/wp-plugins/breadcrumb-navxt">', '</a>') . '</li></ul>';
$screen->add_help_tab(
array(
'id' => $this->identifier . '-base',
'title' => __('General', 'breadcrumb-navxt'),
'content' => $general_tab
));
$quickstart_tab = '<p>' . esc_html__('For the settings on this page to take effect, you must either use the included Breadcrumb NavXT widget, or place either of the code sections below into your theme.', 'breadcrumb-navxt') .
'</p><h5>' . esc_html__('Breadcrumb trail with separators', 'breadcrumb-navxt') . '</h5><pre><code>&lt;div class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/"&gt;' . "
&lt;?php if(function_exists('bcn_display'))
{
bcn_display();
}?&gt;
&lt;/div&gt;</code></pre>" .
'<h5>' . esc_html__('Breadcrumb trail in list form', 'breadcrumb-navxt').'</h5><pre><code>&lt;ol class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/"&gt;'."
&lt;?php if(function_exists('bcn_display_list'))
{
bcn_display_list();
}?&gt;
&lt;/ol&gt;</code></pre>";
$screen->add_help_tab(
array(
'id' => $this->identifier . '-quick-start',
'title' => __('Quick Start', 'breadcrumb-navxt'),
'content' => $quickstart_tab
));
$styling_tab = '<p>' . esc_html__('Using the code from the Quick Start section above, the following CSS can be used as base for styling your breadcrumb trail.', 'breadcrumb-navxt') . '</p>' .
'<pre><code>.breadcrumbs
{
font-size: 1.1em;
color: #fff;
margin: 30px 0 0 10px;
position: relative;
float: left;
}</code></pre>';
$screen->add_help_tab(
array(
'id' => $this->identifier . '-styling',
'title' => __('Styling', 'breadcrumb-navxt'),
'content' => $styling_tab
));
$screen->add_help_tab(
array(
'id' => $this->identifier . '-import-export-reset',
'title' => __('Import/Export/Reset', 'breadcrumb-navxt'),
'content' => $this->import_form()
));
}
}
/**
* enqueue's the tab style sheet on the settings page
*/
function admin_styles()
{
wp_enqueue_style('mtekk_adminkit_tabs');
}
/**
* enqueue's the tab js and translation js on the settings page
*/
function admin_scripts()
{
//Enqueue ui-tabs
wp_enqueue_script('jquery-ui-tabs');
//Enqueue the admin tabs javascript
wp_enqueue_script('mtekk_adminkit_tabs');
//Load the translations for the tabs
wp_localize_script('mtekk_adminkit_tabs', 'objectL10n', array(
'mtad_uid' => 'bcn_admin',
'mtad_import' => __('Import', 'breadcrumb-navxt'),
'mtad_export' => __('Export', 'breadcrumb-navxt'),
'mtad_reset' => __('Reset', 'breadcrumb-navxt'),
));
//Enqueue the admin enable/disable groups javascript
wp_enqueue_script('mtekk_adminkit_engroups');
}
/**
* A message function that checks for the BCN_SETTINGS_* define statement
*/
function multisite_settings_warn()
{
if(is_multisite())
{
if(defined('BCN_SETTINGS_USE_LOCAL') && BCN_SETTINGS_USE_LOCAL)
{
}
else if(defined('BCN_SETTINGS_USE_NETWORK') && BCN_SETTINGS_USE_NETWORK)
{
$this->messages[] = new mtekk_adminKit_message(esc_html__('Warning: Your network settings will override any settings set in this page.', 'breadcrumb-navxt'), 'warning', true, $this->unique_prefix . '_msg_is_nsiteoveride');
}
else if(defined('BCN_SETTINGS_FAVOR_LOCAL') && BCN_SETTINGS_FAVOR_LOCAL)
{
$this->messages[] = new mtekk_adminKit_message(esc_html__('Warning: Your network settings may override any settings set in this page.', 'breadcrumb-navxt'), 'warning', true, $this->unique_prefix . '_msg_is_isitemayoveride');
}
else if(defined('BCN_SETTINGS_FAVOR_NETWORK') && BCN_SETTINGS_FAVOR_NETWORK)
{
$this->messages[] = new mtekk_adminKit_message(esc_html__('Warning: Your network settings may override any settings set in this page.', 'breadcrumb-navxt'), 'warning', true, $this->unique_prefix . '_msg_is_nsitemayoveride');
}
//Fall through if no settings mode was set
else
{
$this->messages[] = new mtekk_adminKit_message(esc_html__('Warning: No BCN_SETTINGS_* define statement found, defaulting to BCN_SETTINGS_USE_LOCAL.', 'breadcrumb-navxt'), 'warning', true, $this->unique_prefix . '_msg_is_nosetting');
}
}
}
/**
* A message function that checks for deprecated settings that are set and warns the user
*/
function deprecated_settings_warn()
{
//We're deprecating the limit title length setting, let the user know the new method of accomplishing this
if(isset($this->opt['blimit_title']) && $this->opt['blimit_title'])
{
$this->messages[] = new mtekk_adminKit_message(sprintf(esc_html__('Warning: Your are using a deprecated setting "Title Length" (see Miscellaneous &gt; Deprecated), please %1$suse CSS instead%2$s.', 'breadcrumb-navxt'), '<a title="' . __('Go to the guide on trimming breadcrumb title lengths with CSS', 'breadcrumb-navxt') . '" href="https://mtekk.us/archives/guides/trimming-breadcrumb-title-lengths-with-css/">', '</a>'), 'warning');
}
}
/**
* Function checks the current site to see if the blog options should be disabled
*
* @return boool Whether or not the blog options should be disabled
*/
function maybe_disable_blog_options()
{
return (get_option('show_on_front') !== 'page' || get_option('page_for_posts') < 1);
}
/**
* Function checks the current site to see if the mainsite options should be disabled
*
* @return bool Whether or not the mainsite options should be disabled
*/
function maybe_disable_mainsite_options()
{
return !is_multisite();
}
/**
* The administrative page for Breadcrumb NavXT
*/
function admin_page()
{
global $wp_taxonomies, $wp_post_types;
$this->security();
//Do a check on deprecated settings
$this->deprecated_settings_warn();
//Do a check for multisite settings mode
$this->multisite_settings_warn();
do_action($this->unique_prefix . '_settings_pre_messages', $this->opt);
//Display our messages
$this->messages();
?>
<div class="wrap"><h1><?php echo $this->full_name; ?></h1>
<?php
//We exit after the version check if there is an action the user needs to take before saving settings
if(!$this->version_check($this->get_option($this->unique_prefix . '_version')))
{
return;
}
?>
<form action="<?php echo $this->admin_url(); ?>" method="post" id="bcn_admin-options">
<?php settings_fields('bcn_options');?>
<div id="hasadmintabs">
<fieldset id="general" class="bcn_options">
<legend class="screen-reader-text" data-title="<?php _e( 'A collection of settings most likely to be modified are located under this tab.', 'breadcrumb-navxt' );?>"><?php _e( 'General', 'breadcrumb-navxt' ); ?></legend>
<h2><?php _e('General', 'breadcrumb-navxt'); ?></h2>
<table class="form-table">
<?php
$this->textbox(__('Breadcrumb Separator', 'breadcrumb-navxt'), 'hseparator', '2', false, __('Placed in between each breadcrumb.', 'breadcrumb-navxt'));
do_action($this->unique_prefix . '_settings_general', $this->opt);
?>
</table>
<h2><?php _e('Current Item', 'breadcrumb-navxt'); ?></h2>
<table class="form-table adminkit-enset-top">
<?php
$this->input_check(__('Link Current Item', 'breadcrumb-navxt'), 'bcurrent_item_linked', __('Yes', 'breadcrumb-navxt'));
$this->input_check(_x('Paged Breadcrumb', 'Paged as in when on an archive or post that is split into multiple pages', 'breadcrumb-navxt'), 'bpaged_display', __('Place the page number breadcrumb in the trail.', 'breadcrumb-navxt'), false, __('Indicates that the user is on a page other than the first of a paginated archive or post.', 'breadcrumb-navxt'), 'adminkit-enset-ctrl adminkit-enset');
$this->textbox(_x('Paged Template', 'Paged as in when on an archive or post that is split into multiple pages', 'breadcrumb-navxt'), 'Hpaged_template', '4', false, __('The template for paged breadcrumbs.', 'breadcrumb-navxt'), 'adminkit-enset');
do_action($this->unique_prefix . '_settings_current_item', $this->opt);
?>
</table>
<h2><?php _e('Home Breadcrumb', 'breadcrumb-navxt'); ?></h2>
<table class="form-table adminkit-enset-top">
<?php
$this->input_check(__('Home Breadcrumb', 'breadcrumb-navxt'), 'bhome_display', __('Place the home breadcrumb in the trail.', 'breadcrumb-navxt'), false, '', 'adminkit-enset-ctrl adminkit-enset');
$this->textbox(__('Home Template', 'breadcrumb-navxt'), 'Hhome_template', '6', false, __('The template for the home breadcrumb.', 'breadcrumb-navxt'), 'adminkit-enset');
$this->textbox(__('Home Template (Unlinked)', 'breadcrumb-navxt'), 'Hhome_template_no_anchor', '4', false, __('The template for the home breadcrumb, used when the breadcrumb is not linked.', 'breadcrumb-navxt'), 'adminkit-enset');
do_action($this->unique_prefix . '_settings_home', $this->opt);
?>
</table>
<h2><?php _e('Blog Breadcrumb', 'breadcrumb-navxt'); ?></h2>
<table class="form-table adminkit-enset-top">
<?php
$this->input_check(__('Blog Breadcrumb', 'breadcrumb-navxt'), 'bblog_display', __('Place the blog breadcrumb in the trail.', 'breadcrumb-navxt'), $this->maybe_disable_blog_options(), '', 'adminkit-enset-ctrl adminkit-enset');
do_action($this->unique_prefix . '_settings_blog', $this->opt);
?>
</table>
<h2><?php _e('Mainsite Breadcrumb', 'breadcrumb-navxt'); ?></h2>
<table class="form-table adminkit-enset-top">
<?php
$this->input_check(__('Main Site Breadcrumb', 'breadcrumb-navxt'), 'bmainsite_display', __('Place the main site home breadcrumb in the trail in an multisite setup.', 'breadcrumb-navxt'), $this->maybe_disable_mainsite_options(), '', 'adminkit-enset-ctrl adminkit-enset');
$this->textbox(__('Main Site Home Template', 'breadcrumb-navxt'), 'Hmainsite_template', '6', $this->maybe_disable_mainsite_options(), __('The template for the main site home breadcrumb, used only in multisite environments.', 'breadcrumb-navxt'), 'adminkit-enset');
$this->textbox(__('Main Site Home Template (Unlinked)', 'breadcrumb-navxt'), 'Hmainsite_template_no_anchor', '4', $this->maybe_disable_mainsite_options(), __('The template for the main site home breadcrumb, used only in multisite environments and when the breadcrumb is not linked.', 'breadcrumb-navxt'), 'adminkit-enset');
do_action($this->unique_prefix . '_settings_mainsite', $this->opt);
?>
</table>
<?php do_action($this->unique_prefix . '_after_settings_tab_general', $this->opt); ?>
</fieldset>
<fieldset id="post" class="bcn_options">
<legend class="screen-reader-text" data-title="<?php _e( 'The settings for all post types (Posts, Pages, and Custom Post Types) are located under this tab.', 'breadcrumb-navxt' );?>"><?php _e( 'Post Types', 'breadcrumb-navxt' ); ?></legend>
<h2><?php _e('Posts', 'breadcrumb-navxt'); ?></h2>
<table class="form-table adminkit-enset-top">
<?php
$this->textbox(__('Post Template', 'breadcrumb-navxt'), 'Hpost_post_template', '6', false, __('The template for post breadcrumbs.', 'breadcrumb-navxt'));
$this->textbox(__('Post Template (Unlinked)', 'breadcrumb-navxt'), 'Hpost_post_template_no_anchor', '4', false, __('The template for post breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'));
$this->input_check(__('Post Hierarchy Display', 'breadcrumb-navxt'), 'bpost_post_hierarchy_display', __('Show the hierarchy (specified below) leading to a post in the breadcrumb trail.', 'breadcrumb-navxt'), false, '', 'adminkit-enset-ctrl adminkit-enset');
$this->input_check(__('Post Hierarchy Use Parent First', 'breadcrumb-navxt'), 'bpost_post_hierarchy_parent_first', __('Use the parent of the post as the primary hierarchy, falling back to the hierarchy selected below when the parent hierarchy is exhausted.', 'breadcrumb-navxt'), false, '', 'adminkit-enset');
$this->input_check(__('Post Hierarchy Referer Influence', 'breadcrumb-navxt'), 'bpost_post_taxonomy_referer', __('Allow the referring page to influence the taxonomy selected for the hierarchy.', 'breadcrumb-navxt'), false, '', 'adminkit-enset');
?>
<tr valign="top">
<th scope="row">
<?php _e('Post Hierarchy', 'breadcrumb-navxt'); ?>
</th>
<td>
<?php
$this->input_radio('Spost_post_hierarchy_type', 'category', __('Categories'), false, 'adminkit-enset');
$this->input_radio('Spost_post_hierarchy_type', 'BCN_DATE', __('Dates', 'breadcrumb-navxt'), false, 'adminkit-enset');
$this->input_radio('Spost_post_hierarchy_type', 'post_tag', __('Tags'), false, 'adminkit-enset');
//We use the value 'page' but really, this will follow the parent post hierarchy
$this->input_radio('Spost_post_hierarchy_type', 'BCN_POST_PARENT', __('Post Parent', 'breadcrumb-navxt'), false, 'adminkit-enset');
//Loop through all of the taxonomies in the array
foreach($wp_taxonomies as $taxonomy)
{
//Check for non-public taxonomies
if(!apply_filters('bcn_show_tax_private', $taxonomy->public, $taxonomy->name, 'post'))
{
continue;
}
//We only want custom taxonomies
if(($taxonomy->object_type == 'post' || is_array($taxonomy->object_type) && in_array('post', $taxonomy->object_type)) && !$taxonomy->_builtin)
{
$this->input_radio('Spost_post_hierarchy_type', $taxonomy->name, mb_convert_case($taxonomy->label, MB_CASE_TITLE, 'UTF-8'), false, 'adminkit-enset');
}
}
?>
<p class="description"><?php esc_html_e('The hierarchy which the breadcrumb trail will show. Note that the "Post Parent" option may require an additional plugin to behave as expected since this is a non-hierarchical post type.', 'breadcrumb-navxt'); ?></p>
</td>
</tr>
</table>
<h2><?php _e('Pages', 'breadcrumb-navxt'); ?></h2>
<table class="form-table">
<?php
$this->textbox(__('Page Template', 'breadcrumb-navxt'), 'Hpost_page_template', '6', false, __('The template for page breadcrumbs.', 'breadcrumb-navxt'));
$this->textbox(__('Page Template (Unlinked)', 'breadcrumb-navxt'), 'Hpost_page_template_no_anchor', '4', false, __('The template for page breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'));
$this->input_hidden('bpost_page_hierarchy_display');
$this->input_hidden('bpost_page_hierarchy_parent_first');
$this->input_hidden('Spost_page_hierarchy_type');
?>
</table>
<?php
//Loop through all of the post types in the array
foreach($wp_post_types as $post_type)
{
//Check for non-public CPTs
if(!apply_filters('bcn_show_cpt_private', $post_type->public, $post_type->name))
{
continue;
}
//We only want custom post types
if($post_type->name === 'attachment' || !$post_type->_builtin)
{
$singular_name_lc = mb_strtolower($post_type->labels->singular_name, 'UTF-8');
?>
<h2><?php echo $post_type->labels->singular_name; ?></h2>
<table class="form-table adminkit-enset-top">
<?php
$this->textbox(sprintf(__('%s Template', 'breadcrumb-navxt'), $post_type->labels->singular_name), 'Hpost_' . $post_type->name . '_template', '6', false, sprintf(__('The template for %s breadcrumbs.', 'breadcrumb-navxt'), $singular_name_lc));
$this->textbox(sprintf(__('%s Template (Unlinked)', 'breadcrumb-navxt'), $post_type->labels->singular_name), 'Hpost_' . $post_type->name . '_template_no_anchor', '4', false, sprintf(__('The template for %s breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'), $singular_name_lc));
$optid = mtekk_adminKit::get_valid_id('apost_' . $post_type->name . '_root');
?>
<tr valign="top">
<th scope="row">
<label for="<?php echo $optid;?>"><?php printf(esc_html__('%s Root Page', 'breadcrumb-navxt'), $post_type->labels->singular_name);?></label>
</th>
<td>
<?php wp_dropdown_pages(array('name' => $this->unique_prefix . '_options[apost_' . $post_type->name . '_root]', 'id' => $optid, 'echo' => 1, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => $this->opt['apost_' . $post_type->name . '_root']));?>
</td>
</tr>
<?php
$this->input_check(sprintf(__('%s Archive Display', 'breadcrumb-navxt'), $post_type->labels->singular_name), 'bpost_' . $post_type->name . '_archive_display', sprintf(__('Show the breadcrumb for the %s post type archives in the breadcrumb trail.', 'breadcrumb-navxt'), $singular_name_lc), !$post_type->has_archive);
$this->input_check(sprintf(__('%s Hierarchy Display', 'breadcrumb-navxt'), $post_type->labels->singular_name), 'bpost_' . $post_type->name . '_hierarchy_display', sprintf(__('Show the hierarchy (specified below) leading to a %s in the breadcrumb trail.', 'breadcrumb-navxt'), $singular_name_lc), false, '', 'adminkit-enset-ctrl adminkit-enset');
$this->input_check(sprintf(__('%s Hierarchy Use Parent First', 'breadcrumb-navxt'), $post_type->labels->singular_name), 'bpost_' . $post_type->name . '_hierarchy_parent_first', sprintf(__('Use the parent of the %s as the primary hierarchy, falling back to the hierarchy selected below when the parent hierarchy is exhausted.', 'breadcrumb-navxt'), $singular_name_lc), false, '', 'adminkit-enset');
$this->input_check(sprintf(__('%s Hierarchy Referer Influence', 'breadcrumb-navxt'), $post_type->labels->singular_name), 'bpost_' . $post_type->name . '_taxonomy_referer', __('Allow the referring page to influence the taxonomy selected for the hierarchy.', 'breadcrumb-navxt'), false, '', 'adminkit-enset');
?>
<tr valign="top">
<th scope="row">
<?php printf(__('%s Hierarchy', 'breadcrumb-navxt'), $post_type->labels->singular_name); ?>
</th>
<td>
<?php
//We use the value 'page' but really, this will follow the parent post hierarchy
$this->input_radio('Spost_' . $post_type->name . '_hierarchy_type', 'BCN_POST_PARENT', __('Post Parent', 'breadcrumb-navxt'), false, 'adminkit-enset');
$this->input_radio('Spost_' . $post_type->name . '_hierarchy_type', 'BCN_DATE', __('Dates', 'breadcrumb-navxt'), false, 'adminkit-enset');
//Loop through all of the taxonomies in the array
foreach($wp_taxonomies as $taxonomy)
{
//Check for non-public taxonomies
if(!apply_filters('bcn_show_tax_private', $taxonomy->public, $taxonomy->name, $post_type->name))
{
continue;
}
//We only want custom taxonomies
if($taxonomy->object_type == $post_type->name || in_array($post_type->name, $taxonomy->object_type))
{
$this->input_radio('Spost_' . $post_type->name . '_hierarchy_type', $taxonomy->name, $taxonomy->labels->singular_name, false, 'adminkit-enset');
}
}
?>
<p class="description">
<?php
if($post_type->hierarchical)
{
esc_html_e('The hierarchy which the breadcrumb trail will show.', 'breadcrumb-navxt');
}
else
{
esc_html_e('The hierarchy which the breadcrumb trail will show. Note that the "Post Parent" option may require an additional plugin to behave as expected since this is a non-hierarchical post type.', 'breadcrumb-navxt');
}
?>
</p>
</td>
</tr>
</table>
<?php
}
}
do_action($this->unique_prefix . '_after_settings_tab_post', $this->opt);
?>
</fieldset>
<fieldset id="tax" class="bcn_options alttab">
<legend class="screen-reader-text" data-title="<?php _e( 'The settings for all taxonomies (including Categories, Tags, and custom taxonomies) are located under this tab.', 'breadcrumb-navxt' );?>"><?php _e( 'Taxonomies', 'breadcrumb-navxt' ); ?></legend>
<h2><?php _e('Categories', 'breadcrumb-navxt'); ?></h2>
<table class="form-table">
<?php
$this->textbox(__('Category Template', 'breadcrumb-navxt'), 'Htax_category_template', '6', false, __('The template for category breadcrumbs.', 'breadcrumb-navxt'));
$this->textbox(__('Category Template (Unlinked)', 'breadcrumb-navxt'), 'Htax_category_template_no_anchor', '4', false, __('The template for category breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'));
?>
</table>
<h2><?php _e('Tags', 'breadcrumb-navxt'); ?></h2>
<table class="form-table">
<?php
$this->textbox(__('Tag Template', 'breadcrumb-navxt'), 'Htax_post_tag_template', '6', false, __('The template for tag breadcrumbs.', 'breadcrumb-navxt'));
$this->textbox(__('Tag Template (Unlinked)', 'breadcrumb-navxt'), 'Htax_post_tag_template_no_anchor', '4', false, __('The template for tag breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'));
?>
</table>
<h2><?php _e('Post Formats', 'breadcrumb-navxt'); ?></h2>
<table class="form-table">
<?php
$this->textbox(__('Post Format Template', 'breadcrumb-navxt'), 'Htax_post_format_template', '6', false, __('The template for post format breadcrumbs.', 'breadcrumb-navxt'));
$this->textbox(__('Post Format Template (Unlinked)', 'breadcrumb-navxt'), 'Htax_post_format_template_no_anchor', '4', false, __('The template for post_format breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'));
?>
</table>
<?php
//Loop through all of the taxonomies in the array
foreach($wp_taxonomies as $taxonomy)
{
//Check for non-public taxonomies
if(!apply_filters('bcn_show_tax_private', $taxonomy->public, $taxonomy->name, null))
{
continue;
}
//We only want custom taxonomies
if(!$taxonomy->_builtin)
{
$label_lc = mb_strtolower($taxonomy->label, 'UTF-8');
?>
<h3><?php echo mb_convert_case($taxonomy->label, MB_CASE_TITLE, 'UTF-8'); ?></h3>
<table class="form-table">
<?php
$this->textbox(sprintf(__('%s Template', 'breadcrumb-navxt'), $taxonomy->labels->singular_name), 'Htax_' . $taxonomy->name . '_template', '6', false, sprintf(__('The template for %s breadcrumbs.', 'breadcrumb-navxt'), $label_lc));
$this->textbox(sprintf(__('%s Template (Unlinked)', 'breadcrumb-navxt'), $taxonomy->labels->singular_name), 'Htax_' . $taxonomy->name . '_template_no_anchor', '4', false, sprintf(__('The template for %s breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'), $label_lc));
?>
</table>
<?php
}
}
do_action($this->unique_prefix . '_after_settings_tab_taxonomy', $this->opt); ?>
</fieldset>
<fieldset id="miscellaneous" class="bcn_options">
<legend class="screen-reader-text" data-title="<?php _e( 'The settings for author and date archives, searches, and 404 pages are located under this tab.', 'breadcrumb-navxt' );?>"><?php _e( 'Miscellaneous', 'breadcrumb-navxt' ); ?></legend>
<h2><?php _e('Author Archives', 'breadcrumb-navxt'); ?></h2>
<table class="form-table">
<?php
$this->textbox(__('Author Template', 'breadcrumb-navxt'), 'Hauthor_template', '6', false, __('The template for author breadcrumbs.', 'breadcrumb-navxt'));
$this->textbox(__('Author Template (Unlinked)', 'breadcrumb-navxt'), 'Hauthor_template_no_anchor', '4', false, __('The template for author breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'));
$this->input_select(__('Author Display Format', 'breadcrumb-navxt'), 'Sauthor_name', array("display_name", "nickname", "first_name", "last_name"), false, __('display_name uses the name specified in "Display name publicly as" under the user profile the others correspond to options in the user profile.', 'breadcrumb-navxt'));
$optid = mtekk_adminKit::get_valid_id('aauthor_root');
?>
<tr valign="top">
<th scope="row">
<label for="<?php echo $optid;?>"><?php esc_html_e('Author Root Page', 'breadcrumb-navxt');?></label>
</th>
<td>
<?php wp_dropdown_pages(array('name' => $this->unique_prefix . '_options[aauthor_root]', 'id' => $optid, 'echo' => 1, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => $this->opt['aauthor_root']));?>
</td>
</tr>
</table>
<h2><?php _e('Miscellaneous', 'breadcrumb-navxt'); ?></h2>
<table class="form-table">
<?php
$this->textbox(__('Date Template', 'breadcrumb-navxt'), 'Hdate_template', '6', false, __('The template for date breadcrumbs.', 'breadcrumb-navxt'));
$this->textbox(__('Date Template (Unlinked)', 'breadcrumb-navxt'), 'Hdate_template_no_anchor', '4', false, __('The template for date breadcrumbs, used only when the breadcrumb is not linked.', 'breadcrumb-navxt'));
$this->textbox(__('Search Template', 'breadcrumb-navxt'), 'Hsearch_template', '6', false, __('The anchor template for search breadcrumbs, used only when the search results span several pages.', 'breadcrumb-navxt'));
$this->textbox(__('Search Template (Unlinked)', 'breadcrumb-navxt'), 'Hsearch_template_no_anchor', '4', false, __('The anchor template for search breadcrumbs, used only when the search results span several pages and the breadcrumb is not linked.', 'breadcrumb-navxt'));
$this->input_text(__('404 Title', 'breadcrumb-navxt'), 'S404_title', 'regular-text');
$this->textbox(__('404 Template', 'breadcrumb-navxt'), 'H404_template', '4', false, __('The template for 404 breadcrumbs.', 'breadcrumb-navxt'));
?>
</table>
<h2><?php _e('Deprecated', 'breadcrumb-navxt'); ?></h2>
<table class="form-table">
<tr valign="top">
<th scope="row">
<?php esc_html_e('Title Length', 'breadcrumb-navxt'); ?>
</th>
<td>
<label>
<input name="bcn_options[blimit_title]" type="checkbox" id="blimit_title" value="true" <?php checked(true, $this->opt['blimit_title']); ?> />
<?php printf(esc_html__('Limit the length of the breadcrumb title. (Deprecated, %suse CSS instead%s)', 'breadcrumb-navxt'), '<a title="' . esc_attr__('Go to the guide on trimming breadcrumb title lengths with CSS', 'breadcrumb-navxt') . '" href="https://mtekk.us/archives/guides/trimming-breadcrumb-title-lengths-with-css/">', '</a>');?>
</label><br />
<ul>
<li>
<label for="amax_title_length">
<?php esc_html_e('Max Title Length: ','breadcrumb-navxt');?>
<input type="number" name="bcn_options[amax_title_length]" id="amax_title_length" min="1" step="1" value="<?php echo esc_html($this->opt['amax_title_length'], ENT_COMPAT, 'UTF-8'); ?>" class="small-text" />
</label>
</li>
</ul>
</td>
</tr>
</table>
<?php do_action($this->unique_prefix . '_after_settings_tab_miscellaneous', $this->opt); ?>
</fieldset>
<?php do_action($this->unique_prefix . '_after_settings_tabs', $this->opt); ?>
</div>
<p class="submit"><input type="submit" class="button-primary" name="bcn_admin_options" value="<?php esc_attr_e('Save Changes') ?>" /></p>
</form>
</div>
<?php
}
}

View File

@@ -0,0 +1,283 @@
<?php
/*
Copyright 2007-2020 John Havlik (email : john.havlik@mtekk.us)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once(dirname(__FILE__) . '/includes/block_direct_access.php');
//The breadcrumb class
class bcn_breadcrumb
{
//Our member variables
const version = '6.4.0';
//The main text that will be shown
protected $title;
//The breadcrumb's template, used durring assembly
protected $template;
//The breadcrumb's no anchor template, used durring assembly when there won't be an anchor
protected $template_no_anchor;
//Boolean, is this element linked
protected $linked = false;
//The link the breadcrumb leads to, null if $linked == false
protected $url;
//The corresponding resource ID
protected $id = null;
private $_title = null;
//The type of this breadcrumb
protected $type;
protected $allowed_html = array();
const default_template_no_anchor = '<span class="%type%">%htitle%</span>';
/**
* The enhanced default constructor, ends up setting all parameters via the set_ functions
*
* @param string $title (optional) The title of the breadcrumb
* @param string $template (optional) The html template for the breadcrumb
* @param string $type (optional) The breadcrumb type
* @param string $url (optional) The url the breadcrumb links to
* @param bool $linked (optional) Whether or not the breadcrumb uses the linked or unlinked template
*/
public function __construct($title = '', $template = '', array $type = array(), $url = '', $id = null, $linked = false)
{
//Filter allowed_html array to allow others to add acceptable tags
$this->allowed_html = apply_filters('bcn_allowed_html', wp_kses_allowed_html('post'));
//The breadcrumb type
$this->type = $type;
//Set the resource id
$this->set_id($id);
//Set the title
$this->set_title($title);
//Set the default anchorless templates value
$this->template_no_anchor = bcn_breadcrumb::default_template_no_anchor;
//If we didn't get a good template, use a default template
if($template == null)
{
$this->set_template(bcn_breadcrumb::get_default_template());
}
//If something was passed in template wise, update the appropriate internal template
else
{
if($linked)
{
$this->set_template($template);
}
else
{
$this->template_no_anchor = wp_kses(apply_filters('bcn_breadcrumb_template_no_anchor', $template, $this->type, $this->id), $this->allowed_html);
$this->set_template(bcn_breadcrumb::get_default_template());
}
}
//Always null if unlinked
$this->set_url($url);
$this->set_linked($linked);
}
/**
* Function to return the translated default template
*
* @return string The default breadcrumb template
*/
static public function get_default_template()
{
return sprintf('<span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="%1$s" href="%%link%%" class="%%type%%" bcn-aria-current><span property="name">%%htitle%%</span></a><meta property="position" content="%%position%%"></span>', esc_attr__('Go to %title%.','breadcrumb-navxt'));
}
/**
* Function to set the protected title member
*
* @param string $title The title of the breadcrumb
*/
public function set_title($title)
{
//Set the title
$this->title = apply_filters('bcn_breadcrumb_title', $title, $this->type, $this->id);
$this->_title = $this->title;
}
/**
* Function to get the protected title member
*
* @return $this->title
*/
public function get_title()
{
//Return the title
return $this->title;
}
/**
* Function to set the internal URL variable
*
* @param string $url the url to link to
*/
public function set_url($url)
{
$url = trim($url);
$this->url = apply_filters('bcn_breadcrumb_url', $url, $this->type, $this->id);
}
/**
* Function to se tthe internal breadcrumb linked status
*
* @param bool $linked whether or not the breadcrumb uses the linked or unlinked template
*/
public function set_linked($linked)
{
$this->linked = $linked;
}
/**
* Function to set the internal breadcrumb template
*
* @param string $template the template to use durring assebly
*/
public function set_template($template)
{
//Assign the breadcrumb template
$this->template = wp_kses(apply_filters('bcn_breadcrumb_template', $template, $this->type, $this->id), $this->allowed_html);
}
/**
* Function to set the internal breadcrumb ID
*
* @param int $id the id of the resource this breadcrumb represents
*/
public function set_id($id)
{
$this->id = $id;
}
/**
* Function to get the internal breadcrumb ID
*
* @return int the id of the resource this breadcrumb represents
*/
public function get_id()
{
return $this->id;
}
/**
* Append a type entry to the type array
*
* @param string $type the type to append
*/
public function add_type($type)
{
$this->type[] = $type;
}
/**
* Return the type array
*
* @return array The type array
*/
public function get_types()
{
return $this->type;
}
/**
* This function will intelligently trim the title to the value passed in through $max_length. This function is deprecated, do not call.
*
* @param int $max_length of the title.
* @deprecated since 5.2.0
*/
public function title_trim($max_length)
{
_deprecated_function(__FUNCTION__, '5.2.0');
//To preserve HTML entities, must decode before splitting
$this->title = html_entity_decode($this->title, ENT_COMPAT, 'UTF-8');
$title_length = mb_strlen($this->title);
//Make sure that we are not making it longer with that ellipse
if($title_length > $max_length && ($title_length + 2) > $max_length)
{
//Trim the title
$this->title = mb_substr($this->title, 0, $max_length - 1);
//Make sure we can split, but we want to limmit to cutting at max an additional 25%
if(mb_strpos($this->title, ' ', .75 * $max_length) > 0)
{
//Don't split mid word
while(mb_substr($this->title,-1) != ' ')
{
$this->title = mb_substr($this->title, 0, -1);
}
}
//Remove the whitespace at the end and add the hellip
$this->title = rtrim($this->title) . html_entity_decode('&hellip;', ENT_COMPAT, 'UTF-8');
}
//Return to the encoded version of all HTML entities (keep standards complance)
$this->title = force_balance_tags(htmlentities($this->title, ENT_COMPAT, 'UTF-8'));
}
/**
* Assembles the parts of the breadcrumb into a html string
*
* @param bool $linked Allow the output to contain anchors?
* @param int $position The position of the breadcrumb in the trail (between 1 and n when there are n breadcrumbs in the trail)
* @param bool $is_current_item Whether or not this breadcrumb represents the current item
*
* @return string The compiled breadcrumb string
*/
public function assemble($linked, $position, $is_current_item = false)
{
if($is_current_item)
{
$aria_current_str = 'aria-current="page"';
}
else
{
$aria_current_str = '';
}
//Build our replacements array
$replacements = array(
'%title%' => esc_attr(strip_tags($this->title)),
'%link%' => esc_url($this->url),
'%htitle%' => $this->title,
'%type%' => apply_filters('bcn_breadcrumb_types', $this->type, $this->id),
'%ftitle%' => esc_attr(strip_tags($this->_title)),
'%fhtitle%' => $this->_title,
'%position%' => $position,
'bcn-aria-current' => $aria_current_str
);
//The type may be an array, implode it if that is the case
if(is_array($replacements['%type%']))
{
array_walk($replacements['%type%'], 'sanitize_html_class');
$replacements['%type%'] = esc_attr(implode(' ', $replacements['%type%']));
}
else
{
_doing_it_wrong(__CLASS__ . '::' . __FUNCTION__, __('bcn_breadcrumb::type must be an array', 'breadcrumb-navxt'), '6.0.2');
}
$replacements = apply_filters('bcn_template_tags', $replacements, $this->type, $this->id);
//If we are linked we'll need to use the normal template
if($this->linked && $linked)
{
//Return the assembled breadcrumb string
return str_replace(array_keys($replacements), $replacements, $this->template);
}
//Otherwise we use the no anchor template
else
{
//Return the assembled breadcrumb string
return str_replace(array_keys($replacements), $replacements, $this->template_no_anchor);
}
}
/**
* Assembles the parts of the breadcrumb into a JSON-LD ready object-array
*
* @param int $position The position of the breadcrumb in the trail (between 1 and n when there are n breadcrumbs in the trail)
*
* @return array(object) The prepared array object ready to pass into json_encode
*/
public function assemble_json_ld($position)
{
return (object) apply_filters('bcn_breadcrumb_assembled_json_ld_array', array(
'@type' => 'ListItem',
'position' => $position,
'item' => (object)array(
'@id' => esc_url($this->url),
'name' => esc_attr($this->title))
), $this->type, $this->id);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,193 @@
<?php
/*
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once(dirname(__FILE__) . '/includes/block_direct_access.php');
//Include admin base class
if(!class_exists('bcn_admin'))
{
require_once(dirname(__FILE__) . '/class.bcn_admin.php');
}
/**
* The administrative interface class
*
*/
class bcn_network_admin extends bcn_admin
{
const version = '6.4.0';
protected $full_name = 'Breadcrumb NavXT Network Settings';
protected $access_level = 'manage_network_options';
/**
* Administrative interface class default constructor
* @param bcn_breadcrumb_trail $breadcrumb_trail a breadcrumb trail object
* @param string $basename The basename of the plugin
*/
function __construct(bcn_breadcrumb_trail &$breadcrumb_trail, $basename)
{
//We're going to make sure we load the parent's constructor
parent::__construct($breadcrumb_trail, $basename);
//Change to the proper name
$this->full_name = __('Breadcrumb NavXT Network Settings', 'breadcrumb-navxt');
//Remove the hook added by the parent as we don't want this classes settings page everywhere
remove_action('admin_menu', array($this, 'add_page'));
//Replace with the network_admin hook
add_action('network_admin_menu', array($this, 'add_page'));
}
/**
* admin initialization callback function
*
* is bound to wordpress action 'admin_init' on instantiation
*
* @since 3.2.0
* @return void
*/
function init()
{
//We're going to make sure we run the parent's version of this function as well
parent::init();
}
function wp_loaded()
{
parent::wp_loaded();
}
/**
* Return the URL of the settings page for the plugin
*/
function admin_url()
{
return admin_url('network/settings.php?page=' . $this->identifier);
}
/**
* Adds the adminpage the menu and the nice little settings link
*/
function add_page()
{
//Add the submenu page to "settings" menu
$hookname = add_submenu_page('settings.php', $this->full_name, $this->short_name, $this->access_level, $this->identifier, array($this, 'admin_page'));
// check capability of user to manage options (access control)
if(current_user_can($this->access_level))
{
//Register admin_head-$hookname callback
add_action('admin_head-' . $hookname, array($this, 'admin_head'));
//Register admin_print_styles-$hookname callback
add_action('admin_print_styles-' . $hookname, array($this, 'admin_styles'));
//Register admin_print_scripts-$hookname callback
add_action('admin_print_scripts-' . $hookname, array($this, 'admin_scripts'));
//Register Help Output
add_action('load-' . $hookname, array($this, 'help'));
}
}
/**
* Have to hook into get_option and replace with network wide alternate
*
* @param string $option The name of the option to retrieve
* @return mixed The value of the option
*/
function get_option($option)
{
return get_site_option($option);
}
/**
* Have to hook into update_option and replace with network wide alternate
*
* @param string $option The name of the option to update
* @param mixed $newvalue The new value to set the option to
*
*/
function update_option($option, $newvalue)
{
return update_site_option($option, $newvalue);
}
/**
* Have to hook into add_option and replace with network wide alternate
*
* @param string $option The name of the option to update
* @param mixed $value The new value to set the option to
* @param null $deprecated Deprecated parameter
* @param string $autoload Whether or not to autoload the option, it's a string because WP is special
*
*/
function add_option($option, $value = '', $deprecated = '', $autoload = 'yes')
{
return add_site_option($option, $value);
}
/**
* Have to hook into delete_option and replace with network wide alternate
*
* @param string $option The name of the option to delete
*/
function delete_option($option)
{
return delete_site_option($option);
}
/**
* A message function that checks for the BCN_SETTINGS_* define statement
*/
function multisite_settings_warn()
{
if(is_multisite())
{
if(defined('BCN_SETTINGS_USE_LOCAL') && BCN_SETTINGS_USE_LOCAL)
{
$this->messages[] = new mtekk_adminKit_message(esc_html__('Warning: Individual site settings will override any settings set in this page.', 'breadcrumb-navxt'), 'warning', true, $this->unique_prefix . '_msg_ns_isiteoveride');
}
else if(defined('BCN_SETTINGS_USE_NETWORK') && BCN_SETTINGS_USE_NETWORK)
{
}
else if(defined('BCN_SETTINGS_FAVOR_LOCAL') && BCN_SETTINGS_FAVOR_LOCAL)
{
$this->messages[] = new mtekk_adminKit_message(esc_html__('Warning: Individual site settings may override any settings set in this page.', 'breadcrumb-navxt'), 'warning', true, $this->unique_prefix . '_msg_ns_isitemayoveride');
}
else if(defined('BCN_SETTINGS_FAVOR_NETWORK') && BCN_SETTINGS_FAVOR_NETWORK)
{
$this->messages[] = new mtekk_adminKit_message(esc_html__('Warning: Individual site settings may override any settings set in this page.', 'breadcrumb-navxt'), 'warning', true, $this->unique_prefix . '_msg_ns_nsmayoveride');
}
//Fall through if no settings mode was set
else
{
$this->messages[] = new mtekk_adminKit_message(esc_html__('Warning: No BCN_SETTINGS_* define statement found, defaulting to BCN_SETTINGS_USE_LOCAL.', 'breadcrumb-navxt'), 'warning', true, $this->unique_prefix . '_msg_ns_nosetting');
$this->messages[] = new mtekk_adminKit_message(esc_html__('Warning: Individual site settings will override any settings set in this page.', 'breadcrumb-navxt'), 'warning', true, $this->unique_prefix . '_msg_ns_isiteoveride');
}
}
}
/**
* A message function that checks for deprecated settings that are set and warns the user
*/
function deprecated_settings_warn()
{
parent::deprecated_settings_warn();
}
/**
* Function checks the current site to see if the blog options should be disabled
*
* @return boool Whether or not the blog options should be disabled
*/
function maybe_disable_blog_options()
{
return false;
}
/**
* Function checks the current site to see if the mainsite options should be disabled
*
* @return bool Whether or not the mainsite options should be disabled
*/
function maybe_disable_mainsite_options()
{
return false;
}
}

View File

@@ -0,0 +1,251 @@
<?php
/*
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once(dirname(__FILE__) . '/includes/block_direct_access.php');
//Do a PHP version check, require 5.3 or newer
if(version_compare(phpversion(), '5.3.0', '<'))
{
//Only purpose of this function is to echo out the PHP version error
function bcn_phpold()
{
printf('<div class="notice notice-error"><p>' . __('Your PHP version is too old, please upgrade to a newer version. Your version is %1$s, Breadcrumb NavXT requires %2$s', 'breadcrumb-navxt') . '</p></div>', phpversion(), '5.3.0');
}
//If we are in the admin, let's print a warning then return
if(is_admin())
{
add_action('admin_notices', 'bcn_phpold');
}
return;
}
class bcn_rest_controller
{
const version = '1';
protected $unique_prefix = 'bcn';
protected $breadcrumb_trail = null;
protected $methods = array('GET', 'OPTIONS');
/**
* Default constructor
*
* @param bcn_breadcrumb_trail $breadcrumb_trail An instance of a bcn_breadcrumb_trail object to use for everything
* @param string $unique_prefix The unique prefix to use for the API endpoint
*/
public function __construct(bcn_breadcrumb_trail $breadcrumb_trail, $unique_prefix)
{
$this->breadcrumb_trail = $breadcrumb_trail;
$this->unique_prefix = $unique_prefix;
add_action('rest_api_init', array($this, 'register_routes'));
}
/**
* A quick wrapper for register_rest_route to add our inclusion filter
*
* @param string $namespace The first URL segment after core prefix. Should be unique
* @param string $route The base URL for route being added
* @param array $args Optional. Either an array of options for the endpoint, or an array of arrays for
* multiple methods. Default empty array.
* @param bool $override Optional. If the route already exists, should we override it?
* @param string $endpoint The endpoint name passed into the bcn_register_rest_endpoint filter
* @return boolean True on success, false on error.
*/
protected function register_rest_route($namespace, $route, $args = array(), $override = false, $endpoint)
{
if(apply_filters('bcn_register_rest_endpoint', false, $endpoint, $this::version, $this->methods))
{
return register_rest_route($namespace, $route, $args, $override);
}
return false;
}
public function register_routes()
{
$this->register_rest_route( $this->unique_prefix . '/v' . $this::version, '/post/(?P<id>[\d]+)', array(
'args' => array(
'id' => array(
'description' => __('The ID of the post (any type) to retrieve the breadcrumb trail for.', 'breadcrumb-navxt'),
'type' => 'integer',
'required' => true,
'validate_callback' => array($this, 'validate_id')
)
),
'methods' => $this->methods,
'callback' => array($this, 'display_rest_post'),
'permission_callback' => array($this, 'display_rest_post_permissions_check')
), false, 'post'
);
$this->register_rest_route( $this->unique_prefix . '/v' . $this::version, '/term/(?P<taxonomy>[\w-]+)/(?P<id>[\d]+)', array(
'args' => array(
'id' => array(
'description' => __('The ID of the term to retrieve the breadcrumb trail for.', 'breadcrumb-navxt'),
'type' => 'integer',
'required' => true,
'validate_callback' => array($this, 'validate_id')
),
'taxonomy' => array(
'description' => __('The taxonomy of the term to retrieve the breadcrumb trail for.', 'breadcrumb-navxt'),
'type' => 'string',
'required' => true,
'validate_callback' => array($this, 'validate_taxonomy')
)
),
'methods' => $this->methods,
'callback' => array($this, 'display_rest_term')
), false, 'term'
);
$this->register_rest_route( $this->unique_prefix . '/v' . $this::version, '/author/(?P<id>\d+)', array(
'args' => array(
'id' => array(
'description' => __('The ID of the author to retrieve the breadcrumb trail for.', 'breadcrumb-navxt'),
'type' => 'integer',
'required' => true,
'validate_callback' => array($this, 'validate_id')
)
),
'methods' => $this->methods,
'callback' => array($this, 'display_rest_author')
), false, 'author'
);
}
/**
* Checks to see if the request ID looks like it could be an ID (numeric and greater than 0)
*
* @param mixed $param The parameter to validate
* @param WP_REST_Request $request REST API request data
* @param string $key The paramter key
* @return bool Whether or not the ID is valid (or atleast looks valid)
*/
public function validate_id($param, $request, $key)
{
return is_numeric($param) && absint($param) > 0;
}
/**
* Checks to see if the request taxonomy is a valid taxonomy
*
* @param mixed $param The parameter to validate
* @param WP_REST_Request $request REST API request data
* @param string $key The paramter key
* @return bool Whether or not the ID is valid (or atleast looks valid)
*/
public function validate_taxonomy($param, $request, $key)
{
return taxonomy_exists(esc_attr($param));
}
/**
* Check permissions for the post
*
* @param WP_REST_Request $request The request to check the permissions on
* @return bool | WP_Error Whether or not the user can view the requested post
*/
public function display_rest_post_permissions_check(WP_REST_Request $request)
{
$post = get_post(absint($request->get_param('id')));
if($post === null)
{
return true;
}
return $this->check_post_read_permission($post);
}
/**
* Check to ensure the current user can read the post (and subsequently view its breadcrumb trail)
*
* @param WP_Post $post The post to check if the current user can view the breadcrumb trail for
* @return bool Whether or not the post should be readable
*/
public function check_post_read_permission($post)
{
if(!($post instanceof WP_Post))
{
return false;
}
$post_type = get_post_type_object($post->post_type);
if(empty($post_type) || empty($post_type->show_in_rest))
{
return false;
}
if($post->post_status === 'publish' || current_user_can($post_type->cap->read_post, $post->ID))
{
return true;
}
$post_status_obj = get_post_status_object($post->post_status);
if($post_status_obj && $post_status_obj->public)
{
return true;
}
if($post->post_status === 'inherit' && $post->post_parent > 0)
{
$parent = get_post($post->post_parent);
if($parent)
{
return $this->check_post_read_permission($parent);
}
}
if($post->post_status === 'inherit')
{
return true;
}
return false;
}
/**
* Breadcrumb trail handler for REST requests for post breadcrumb trails
*
* @param WP_REST_Request $request REST API request data
* @return STD_Object Basic object data of the Schema.org Breadcrumb List compatible breadcrumb trail
*/
public function display_rest_post(WP_REST_Request $request)
{
$post = get_post(absint($request->get_param('id')));
if($post instanceof WP_Post)
{
$this->breadcrumb_trail->breadcrumbs = array();
//Generate the breadcrumb trail
$this->breadcrumb_trail->fill_REST($post);
return $this->breadcrumb_trail->display_json_ld(false);
}
}
/**
* Breadcrumb trail handler for REST requests for term breadcrumb trails
*
* @param WP_REST_Request $request REST API request data
* @return STD_Object Basic object data of the Schema.org Breadcrumb List compatible breadcrumb trail
*/
public function display_rest_term(WP_REST_Request $request)
{
$term = get_term(absint($request->get_param('id')), esc_attr($request->get_param('taxonomy')));
if($term instanceof WP_Term)
{
$this->breadcrumb_trail->breadcrumbs = array();
//Generate the breadcrumb trail
$this->breadcrumb_trail->fill_REST($term);
return $this->breadcrumb_trail->display_json_ld(false);
}
}
/**
* Breadcrumb trail handler for REST requests for term breadcrumb trails
*
* @param WP_REST_Request $request REST API request data
* @return STD_Object Basic object data of the Schema.org Breadcrumb List compatible breadcrumb trail
*/
public function display_rest_author(WP_REST_Request $request)
{
$user = get_user_by('ID', absint($request->get_param('id')), esc_attr($request->get_param('taxonomy')));
if($user instanceof WP_User)
{
$this->breadcrumb_trail->breadcrumbs = array();
//Generate the breadcrumb trail
$this->breadcrumb_trail->fill_REST($user);
return $this->breadcrumb_trail->display_json_ld(false);
}
}
}

View File

@@ -0,0 +1,141 @@
<?php
/*
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once(dirname(__FILE__) . '/includes/block_direct_access.php');
class bcn_widget extends WP_Widget
{
const version = '6.4.0';
protected $allowed_html = array();
protected $defaults = array('title' => '', 'pretext' => '', 'type' => 'microdata', 'linked' => true, 'reverse' => false, 'front' => false, 'force' => false);
//Default constructor
function __construct()
{
//Filter allowed_html array to allow others to add acceptable tags
$this->allowed_html = apply_filters('bcn_allowed_html', wp_kses_allowed_html('post'));
//@see https://core.trac.wordpress.org/ticket/10527
if(!is_textdomain_loaded('breadcrumb-navxt'))
{
load_plugin_textdomain('breadcrumb-navxt', false, 'breadcrumb-navxt/languages');
}
$ops = array('classname' => 'widget_breadcrumb_navxt', 'description' => __('Adds a breadcrumb trail to your sidebar', 'breadcrumb-navxt'));
parent::__construct('bcn_widget', 'Breadcrumb NavXT', $ops);
}
function widget($args, $instance)
{
//Make sure we grab defaults in the case of out of date instance settings being sent
$instance = wp_parse_args((array) $instance, $this->defaults);
$instance['title'] = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
$instance['pretext'] = apply_filters('widget_text', $instance['pretext'], $instance);
$instance['pretext'] = apply_filters('bcn_widget_pretext', $instance['pretext'], $instance);
$title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
//A bit of a hack but we need the DB settings to know if we should exit early
$opt = get_option('bcn_options');
//If we are on the front page and don't display on the front, return early
if($instance['front'] && is_front_page() && !(is_paged() && $opt['bpaged_display']))
{
return;
}
//Manditory before widget junk
echo $args['before_widget'];
if(!empty($title))
{
echo $args['before_title'] . $title . $args['after_title'];
}
//We'll want to switch between the two breadcrumb output types
if($instance['type'] === 'list')
{
//Display the list output breadcrumb
echo wp_kses($instance['pretext'], $this->allowed_html) . '<ol class="breadcrumb_trail breadcrumbs">';
bcn_display_list(false, $instance['linked'], $instance['reverse'], $instance['force']);
echo '</ol>';
}
else if($instance['type'] === 'microdata' || $instance['type'] === 'breadcrumblist_rdfa')
{
echo '<div class="breadcrumbs" vocab="https://schema.org/" typeof="BreadcrumbList">' . wp_kses($instance['pretext'], $this->allowed_html);
//Display the regular output breadcrumb
bcn_display(false, $instance['linked'], $instance['reverse'], $instance['force']);
echo '</div>';
}
else if($instance['type'] === 'breadcrumblist_microdata')
{
echo '<div class="breadcrumbs" itemscope itemtype="https://schema.org/BreadcrumbList">' . wp_kses($instance['pretext'], $this->allowed_html);
//Display the regular output breadcrumb
bcn_display(false, $instance['linked'], $instance['reverse'], $instance['force']);
echo '</div>';
}
else if($instance['type'] === 'plain')
{
//Display the pretext
echo wp_kses($instance['pretext'], $this->allowed_html);
//Display the regular output breadcrumb
bcn_display(false, $instance['linked'], $instance['reverse'], $instance['force']);
}
else
{
//If we recieved a type that is not of the built in displays, it must be relegated to an extension plugin
do_action('bcn_widget_display_trail', $instance);
}
//Manditory after widget junk
echo $args['after_widget'];
}
function update($new_instance, $old_instance)
{
//Filter out anything that could be invalid
$old_instance['title'] = strip_tags($new_instance['title']);
$old_instance['pretext'] = wp_kses($new_instance['pretext'], $this->allowed_html);
$old_instance['type'] = strip_tags($new_instance['type']);
$old_instance['linked'] = isset($new_instance['linked']);
$old_instance['reverse'] = isset($new_instance['reverse']);
$old_instance['front'] = isset($new_instance['front']);
$old_instance['force'] = isset($new_instance['force']);
return $old_instance;
}
function form($instance)
{
$instance = wp_parse_args((array) $instance, $this->defaults);?>
<p>
<label for="<?php echo esc_attr($this->get_field_id('title')); ?>"> <?php _e('Title:', 'breadcrumb-navxt'); ?></label>
<input class="widefat" type="text" name="<?php echo esc_attr($this->get_field_name('title')); ?>" id="<?php echo esc_attr($this->get_field_id('title')); ?>" value="<?php echo esc_attr($instance['title']);?>" />
</p>
<p>
<label for="<?php echo esc_attr($this->get_field_id('pretext')); ?>"> <?php _e('Text to show before the trail:', 'breadcrumb-navxt'); ?></label>
<input class="widefat" type="text" name="<?php echo esc_attr($this->get_field_name('pretext')); ?>" id="<?php echo esc_attr($this->get_field_id('pretext')); ?>" value="<?php echo esc_attr($instance['pretext']);?>" />
</p>
<p>
<label for="<?php echo esc_attr($this->get_field_id('type')); ?>"> <?php _e('Output trail as:', 'breadcrumb-navxt'); ?></label>
<select name="<?php echo esc_attr($this->get_field_name('type')); ?>" id="<?php echo esc_attr($this->get_field_id('type')); ?>">
<option value="list" <?php selected('list', $instance['type']);?>><?php _e('List', 'breadcrumb-navxt'); ?></option>
<option value="microdata" <?php selected('microdata', $instance['type']);?>><?php _e('Schema.org BreadcrumbList (RDFa)', 'breadcrumb-navxt'); ?></option>
<option value="breadcrumblist_microdata" <?php selected('breadcrumblist_microdata', $instance['type']);?>><?php _e('Schema.org BreadcrumbList (microdata)', 'breadcrumb-navxt'); ?></option>
<option value="plain" <?php selected('plain', $instance['type']);?>><?php _e('Plain', 'breadcrumb-navxt'); ?></option>
<?php do_action('bcn_widget_display_types', $instance);?>
</select>
</p>
<p>
<input class="checkbox" type="checkbox" name="<?php echo esc_attr($this->get_field_name('linked')); ?>" id="<?php echo esc_attr($this->get_field_id('linked')); ?>" value="true" <?php checked(true, $instance['linked']);?> />
<label for="<?php echo esc_attr($this->get_field_id('linked')); ?>"> <?php _e('Link the breadcrumbs', 'breadcrumb-navxt'); ?></label><br />
<input class="checkbox" type="checkbox" name="<?php echo esc_attr($this->get_field_name('reverse')); ?>" id="<?php echo esc_attr($this->get_field_id('reverse')); ?>" value="true" <?php checked(true, $instance['reverse']);?> />
<label for="<?php echo esc_attr($this->get_field_id('reverse')); ?>"> <?php _e('Reverse the order of the trail', 'breadcrumb-navxt'); ?></label><br />
<input class="checkbox" type="checkbox" name="<?php echo esc_attr($this->get_field_name('front')); ?>" id="<?php echo esc_attr($this->get_field_id('front')); ?>" value="true" <?php checked(true, $instance['front']);?> />
<label for="<?php echo esc_attr($this->get_field_id('front')); ?>"> <?php _e('Hide the trail on the front page', 'breadcrumb-navxt'); ?></label><br />
<input class="checkbox" type="checkbox" name="<?php echo esc_attr($this->get_field_name('force')); ?>" id="<?php echo esc_attr($this->get_field_id('force')); ?>" value="true" <?php checked(true, $instance['force']);?> />
<label for="<?php echo esc_attr($this->get_field_id('force')); ?>"> <?php _e('Ignore breadcrumb cache', 'breadcrumb-navxt'); ?></label><br />
</p>
<?php
}
}

View File

@@ -0,0 +1,27 @@
<?php
/*
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//If this file is included directly (e.g. WordPress isn't running), return 404
if(!defined('ABSPATH'))
{
//First catches the Apache users
header("HTTP/1.0 404 Not Found");
//This should catch FastCGI users
header("Status: 404 Not Found");
die();
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,99 @@
<?php
/*
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once(dirname(__FILE__) . '/block_direct_access.php');
class mtekk_adminKit_message
{
const version = '1.0.0';
protected $type = '';
protected $contents = '';
protected $dismissed = false;
protected $dismissible = false;
protected $uid;
/**
* Default constructor function
*
* @param string $contents The string to display in the message
* @param string $type The message type, 'error', 'warning', 'success', or 'info'
* @param bool $dismissible Whether or not the message is dismissable
* @param string $uid The message unique ID, only necessary if the message is dismissable
*/
public function __construct($contents, $type = 'info', $dismissible = false, $uid = '')
{
$uid = sanitize_html_class($uid);
//If the message is dismissable, the UID better not be null/empty
if($dismissible === true && $uid === '')
{
//Let the user know they're doing it wrong
_doing_it_wrong(__CLASS__ . '::' . __FUNCTION__, __('$uid must not be null if message is dismissible', 'mtekk_adminKit'), '1.0.0');
//Treat the message as non-dismissible
$dismissible = false;
}
$this->contents = $contents;
$this->type = $type;
$this->dismissible = $dismissible;
$this->uid = $uid;
if($this->dismissible)
{
$this->dismissed = $this->was_dismissed();
}
}
/**
* Attempts to retrieve the dismissal transient for this message
*
* @return bool Whether or not the message has been dismissed
*/
public function was_dismissed()
{
$this->dismissed = get_transient($this->uid);
return $this->dismissed;
}
/**
* Dismisses the message, preventing it from being rendered
*/
public function dismiss()
{
if($this->dismissible && isset($_POST['uid']) && esc_attr($_POST['uid']) === $this->uid)
{
check_ajax_referer($this->uid . '_dismiss', 'nonce');
$this->dismissed = true;
//If the message was dismissed, update the transient for 30 days
$result = set_transient($this->uid, $this->dismissed, 2592000);
}
}
/**
* Function that prints out the message if not already dismissed
*/
public function render()
{
if($this->dismissible)
{
//Don't render dismissed messages
if($this->was_dismissed())
{
return;
}
wp_enqueue_script('mtekk_adminkit_messages');
printf('<div class="notice notice-%1$s is-dismissible"><p>%2$s</p><meta property="uid" content="%3$s"><meta property="nonce" content="%4$s"></div>', esc_attr($this->type), $this->contents, esc_attr($this->uid), wp_create_nonce($this->uid . '_dismiss'));
}
else
{
printf('<div class="notice notice-%1$s"><p>%2$s</p></div>', esc_attr($this->type), $this->contents);
}
}
}

View File

@@ -0,0 +1,70 @@
<?php
/*
Copyright 2015-2020 John Havlik (email : john.havlik@mtekk.us)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once(dirname(__FILE__) . '/block_direct_access.php');
/**
* Breadcrumb NavXT abstract plugin uninstaller class
*
* @author Tom Klingenberg
*/
abstract class mtekk_adminKit_uninstaller
{
protected $unique_prefix = '';
protected $plugin_basename = null;
protected $_uninstall_result = false;
/**
* get plugin path
*
* @return string full path to plugin file
*/
protected function _get_plugin_path()
{
return sprintf('%s/%s', dirname(dirname(__FILE__)), $this->plugin_basename);
}
/**
* constructor
*
* @param array $options class options
* plugin =>
*/
public function __construct()
{
$this->_uninstall_result = $this->uninstall();
}
/**
* Result Getter
*
* @return bool wether or not uninstall did run successfull.
*/
public function get_result()
{
return $this->_uninstall_result;
}
public function is_installed()
{
return ((get_option($this->unique_prefix . '_options') !== false)
&& (get_option($this->unique_prefix . '_options_bk') !== false)
&& (get_option($this->unique_prefix . '_version') !== false)
&& (get_site_option($this->unique_prefix . '_options') !== false)
&& (get_site_option($this->unique_prefix . '_options_bk') !== false)
&& (get_site_option($this->unique_prefix . '_version') !== false));
}
} /// class bcn_uninstaller_abstract

View File

@@ -0,0 +1,37 @@
jQuery(function()
{
jQuery(".adminkit-engroup input:checkbox.adminkit-enset-ctrl").each(mtekk_admin_enable_group);
jQuery("input:checkbox.adminkit-enset-ctrl").each(mtekk_admin_enable_set);
});
function mtekk_admin_enable_group(){
var setting = this;
jQuery(this).parents(".adminkit-engroup").find("input, textarea").each(function(){
if(this != setting){
if(jQuery(setting).prop("checked")){
jQuery(this).prop("disabled", false);
jQuery(this).removeClass("disabled");
}
else{
jQuery(this).prop("disabled", true);
jQuery(this).addClass("disabled");
}
}
});
}
function mtekk_admin_enable_set(){
var setting = this;
jQuery(this).parents(".adminkit-enset-top").find("input.adminkit-enset, textarea.adminkit-enset").each(function(){
if(this != setting){
if(jQuery(setting).prop("checked")){
jQuery(this).prop("disabled", false);
jQuery(this).removeClass("disabled");
}
else{
jQuery(this).prop("disabled", true);
jQuery(this).addClass("disabled");
}
}
});
}
jQuery(".adminkit-engroup input:checkbox.adminkit-enset-ctrl").change(mtekk_admin_enable_group);
jQuery("input:checkbox.adminkit-enset-ctrl").change(mtekk_admin_enable_set);

View File

@@ -0,0 +1 @@
jQuery(function(){jQuery(".adminkit-engroup input:checkbox.adminkit-enset-ctrl").each(mtekk_admin_enable_group);jQuery("input:checkbox.adminkit-enset-ctrl").each(mtekk_admin_enable_set)});function mtekk_admin_enable_group(){var a=this;jQuery(this).parents(".adminkit-engroup").find("input, textarea").each(function(){if(this!=a){if(jQuery(a).prop("checked")){jQuery(this).prop("disabled",false);jQuery(this).removeClass("disabled")}else{jQuery(this).prop("disabled",true);jQuery(this).addClass("disabled")}}})}function mtekk_admin_enable_set(){var a=this;jQuery(this).parents(".adminkit-enset-top").find("input.adminkit-enset, textarea.adminkit-enset").each(function(){if(this!=a){if(jQuery(a).prop("checked")){jQuery(this).prop("disabled",false);jQuery(this).removeClass("disabled")}else{jQuery(this).prop("disabled",true);jQuery(this).addClass("disabled")}}})}jQuery(".adminkit-engroup input:checkbox.adminkit-enset-ctrl").change(mtekk_admin_enable_group);jQuery("input:checkbox.adminkit-enset-ctrl").change(mtekk_admin_enable_set);

View File

@@ -0,0 +1,11 @@
jQuery(function()
{
jQuery("div.notice button.notice-dismiss").click(function (event){
data = {
'action': 'mtekk_admin_message_dismiss',
'uid': jQuery(this).parent().children("meta[property='uid']").attr("content"),
'nonce': jQuery(this).parent().children("meta[property='nonce']").attr("content")
};
jQuery.post(ajaxurl, data);
});
});

View File

@@ -0,0 +1,11 @@
jQuery(function()
{
jQuery("div.notice button.notice-dismiss").click(function (event){
data = {
'action': 'mtekk_admin_message_dismiss',
'uid': jQuery(this).parent().children("meta[property='uid']").attr("content"),
'nonce': jQuery(this).parent().children("meta[property='nonce']").attr("content")
};
jQuery.post(ajaxurl, data);
});
});

View File

@@ -0,0 +1,8 @@
#hasadmintabs ul.ui-tabs-nav{float: left; width: 100%; border-bottom:1px solid #ccc; font-size:12px; height:27px; list-style-image:none; list-style-position:outside; list-style-type:none; margin:14px 0 0; overflow:visible;padding:0 0 0 6px;}
#hasadmintabs ul.ui-tabs-nav li{display:block; float:left; line-height:200%; list-style-image:none; list-style-position:outside; list-style-type:none; margin:0; padding:0; position:relative; text-align:center; white-space:nowrap; width:auto;}
#hasadmintabs ul.ui-tabs-nav li a{border-bottom:1px solid #ccc; display:block; color:#464646; float:left; line-height:25px; padding:1px 13px 0; position:relative; text-decoration:none;margin:0 4px 0 0;}
#hasadmintabs ul.ui-tabs-nav li.ui-tabs-active a{background:none;border:1px solid #ccc; border-bottom-color:#f1f1f1; height: 25px; color:#464646; font-weight:normal; padding:1px 13px 0;color:#000;}
#hasadmintabs ul.ui-tabs-nav li.ui-tabs-active a:hover, #hasadmintabs ul.ui-tabs-nav a:hover{outline-color:-moz-use-text-color; outline-style:none; outline-width:medium;}
#hasadmintabs ul.ui-tabs-nav li a:focus, #hasadmintabs ul.ui-tabs-nav li a:active{outline: none;}
#hasadmintabs ul.ui-tabs-nav span{font-size: 12px; font-weight: bolder;}
#screen-options-wrap p.submit {margin:0; padding:0;}

View File

@@ -0,0 +1,39 @@
jQuery(function()
{
mtekk_admin_tabulator_init();
});
/**
* Tabulator Bootup
*/
function mtekk_admin_tabulator_init(){
if(!jQuery("#hasadmintabs").length) return;
/* init markup for tabs */
jQuery('#hasadmintabs').prepend('<ul class="nav-tab-wrapper"><\/ul>');
jQuery('#hasadmintabs > fieldset').each(function(i){
id = jQuery(this).attr('id');
cssc = jQuery(this).attr('class');
title = jQuery(this).find('legend').data('title');
caption = jQuery(this).find('legend').text();
jQuery('#hasadmintabs > ul').append('<li><a href="#'+id+'" class="nav-tab '+cssc+'" title="'+title+'"><span>'+caption+"<\/span><\/a><\/li>");
});
var form = jQuery('#'+objectL10n.mtad_uid+'-options');
/* init the tabs plugin */
var tabs = jQuery("#hasadmintabs").tabs({
beforeActivate: function(event, ui){
form.find('input').each(function(){
if(!this.checkValidity()){
form.find(':submit').click();
event.preventDefault();
}
});
/* Update form action for reload on tab traversal*/
var action = form.attr("action").split('#', 1) + '#' + ui.newPanel[0].id;
form.get(0).setAttribute("action", action);
},
create: function(event, ui){
/* Update form action for reload of current tab on page load */
var action = form.attr("action").split('#', 1) + '#' + ui.panel[0].id;
form.get(0).setAttribute("action", action);
}
});
}

View File

@@ -0,0 +1 @@
#hasadmintabs ul.ui-tabs-nav{float:left;width:100%;border-bottom:1px solid #ccc;font-size:12px;height:27px;list-style-image:none;list-style-position:outside;list-style-type:none;margin:14px 0 0;overflow:visible;padding:0 0 0 6px}#hasadmintabs ul.ui-tabs-nav li{display:block;float:left;line-height:200%;list-style-image:none;list-style-position:outside;list-style-type:none;margin:0;padding:0;position:relative;text-align:center;white-space:nowrap;width:auto}#hasadmintabs ul.ui-tabs-nav li a{border-bottom:1px solid #ccc;display:block;color:#464646;float:left;line-height:25px;padding:1px 13px 0;position:relative;text-decoration:none;margin:0 4px 0 0}#hasadmintabs ul.ui-tabs-nav li.ui-tabs-active a{background:0;border:1px solid #ccc;border-bottom-color:#f1f1f1;height:25px;color:#464646;font-weight:normal;padding:1px 13px 0;color:#000}#hasadmintabs ul.ui-tabs-nav li.ui-tabs-active a:hover,#hasadmintabs ul.ui-tabs-nav a:hover{outline-color:-moz-use-text-color;outline-style:none;outline-width:medium}#hasadmintabs ul.ui-tabs-nav li a:focus,#hasadmintabs ul.ui-tabs-nav li a:active{outline:0}#hasadmintabs ul.ui-tabs-nav span{font-size:12px;font-weight:bolder}#screen-options-wrap p.submit{margin:0;padding:0}

View File

@@ -0,0 +1 @@
function mtekk_admin_tabulator_init(){if(jQuery("#hasadmintabs").length){jQuery("#hasadmintabs").prepend('<ul class="nav-tab-wrapper"></ul>'),jQuery("#hasadmintabs > fieldset").each(function(t){id=jQuery(this).attr("id"),cssc=jQuery(this).attr("class"),title=jQuery(this).find("legend").data("title"),caption=jQuery(this).find("legend").text(),jQuery("#hasadmintabs > ul").append('<li><a href="#'+id+'" class="nav-tab '+cssc+'" title="'+title+'"><span>'+caption+"</span></a></li>")});var e=jQuery("#"+objectL10n.mtad_uid+"-options");jQuery("#hasadmintabs").tabs({beforeActivate:function(t,a){e.find("input").each(function(){this.checkValidity()||(e.find(":submit").click(),t.preventDefault())});var i=e.attr("action").split("#",1)+"#"+a.newPanel[0].id;e.get(0).setAttribute("action",i)},create:function(t,a){var i=e.attr("action").split("#",1)+"#"+a.panel[0].id;e.get(0).setAttribute("action",i)}})}}jQuery(function(){mtekk_admin_tabulator_init()});

View File

@@ -0,0 +1,111 @@
<?php
/*
A small library that adds in fallbacks for some of the PHP multibyte string
functions. Mainly inteneded to be used with Breadcrumb NavXT
Copyright 2009-2020 John Havlik (email : john.havlik@mtekk.us)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once(dirname(__FILE__) . '/block_direct_access.php');
if(!function_exists('mb_strlen'))
{
/**
* Fallback for mb_strlen for users without multibyte support
*
* @param string $string the string to determine the lenght of
* @return int the number of characters in the string
*/
function mb_strlen($string)
{
return strlen($string);
}
}
if(!function_exists('mb_strpos'))
{
/**
* Fallback for mb_strpos for users without multibyte support
*
* @param string $haystack the string to search within
* @param string $needle the string to search for
* @return mixed position of the first instances of needle, or false if needle not found
*/
function mb_strpos($haystack, $needle, $offset = 0)
{
return strpos($haystack, $needle, $offset);
}
}
if(!function_exists('mb_substr'))
{
/**
* Fallback for mb_substr for users without multibyte support
*
* @param string $string the input string
* @param int $start the start
* @param int length the length of the substring
* @return string the substring of specified length
*/
function mb_substr($string, $start, $length = 'a')
{
//This happens to be the easiest way to preserve the behavior of substr
if($length = 'a')
{
return substr($string, $start);
}
else
{
return substr($string, $start, $length);
}
}
}
if(!function_exists('mb_strtolower'))
{
/**
* Fallback for mb_strtolower for users without multibyte support
*
* @param string $str the string to change to lowercase
* @param string $encoding the encoding of the string
* @return string the lowercase string
*/
function mb_strtolower($str, $encoding = 'UTF-8')
{
return strtolower($str);
}
}
//We need this constant to be defined, otherwise things will break
if(!defined('MB_CASE_TITLE'))
{
define('MB_CASE_TITLE', '1');
}
if(!function_exists('mb_convert_case'))
{
/**
* A very hacky fallback for mb_convert_case for users without multibyte support
*
* @param string $str the string to change the case on
* @param int $mode the mode of case convert to use
* @param string $encoding the encoding of the string
* @return string the case converted string
*/
function mb_convert_case($str, $mode = MB_CASE_TITLE, $encoding = 'UTF-8')
{
//Only implementing MB_CASE_TITLE
if($mode = MB_CASE_TITLE)
{
return ucwords($str);
}
return $str;
}
}

View File

@@ -0,0 +1,988 @@
# Copyright (C) 2016 Breadcrumb NavXT
# This file is distributed under the same license as the Breadcrumb NavXT package.
msgid ""
msgstr ""
"Project-Id-Version: Breadcrumb NavXT 5.5.1\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/breadcrumb-navxt\n"
"POT-Creation-Date: 2016-08-13 19:01:09+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
#: breadcrumb-navxt.php:35 class.bcn_admin.php:25
#: class.bcn_network_admin.php:25
msgid ""
"Your PHP version is too old, please upgrade to a newer version. Your version "
"is %1$s, Breadcrumb NavXT requires %2$s"
msgstr ""
#: class.bcn_admin.php:64
msgid "Breadcrumb NavXT Settings"
msgstr ""
#: class.bcn_admin.php:295 class.bcn_network_admin.php:366
msgid "Tips for the settings are located below select options."
msgstr ""
#: class.bcn_admin.php:296 class.bcn_network_admin.php:367
msgid "Resources"
msgstr ""
#: class.bcn_admin.php:297 class.bcn_network_admin.php:368
msgid ""
"%sTutorials and How Tos%s: There are several guides, tutorials, and how tos "
"available on the author's website."
msgstr ""
#: class.bcn_admin.php:297 class.bcn_network_admin.php:368
msgid "Go to the Breadcrumb NavXT tag archive."
msgstr ""
#: class.bcn_admin.php:298 class.bcn_network_admin.php:369
msgid ""
"%sOnline Documentation%s: Check out the documentation for more indepth "
"technical information."
msgstr ""
#: class.bcn_admin.php:298 class.bcn_network_admin.php:369
msgid "Go to the Breadcrumb NavXT online documentation"
msgstr ""
#: class.bcn_admin.php:299 class.bcn_network_admin.php:370
msgid ""
"%sReport a Bug%s: If you think you have found a bug, please include your "
"WordPress version and details on how to reproduce the bug."
msgstr ""
#: class.bcn_admin.php:299 class.bcn_network_admin.php:370
msgid "Go to the Breadcrumb NavXT support post for your version."
msgstr ""
#: class.bcn_admin.php:300 class.bcn_network_admin.php:371
msgid "Giving Back"
msgstr ""
#: class.bcn_admin.php:301 class.bcn_network_admin.php:372
msgid ""
"%sDonate%s: Love Breadcrumb NavXT and want to help development? Consider "
"buying the author a beer."
msgstr ""
#: class.bcn_admin.php:301 class.bcn_network_admin.php:372
msgid "Go to PayPal to give a donation to Breadcrumb NavXT."
msgstr ""
#: class.bcn_admin.php:302 class.bcn_network_admin.php:373
msgid ""
"%sTranslate%s: Is your language not available? Visit the Breadcrumb NavXT "
"translation project on WordPress.org to start translating."
msgstr ""
#: class.bcn_admin.php:302 class.bcn_network_admin.php:373
msgid "Go to the Breadcrumb NavXT translation project."
msgstr ""
#: class.bcn_admin.php:307 class.bcn_admin.php:446 class.bcn_admin.php:447
#: class.bcn_network_admin.php:378 class.bcn_network_admin.php:518
#: class.bcn_network_admin.php:519
msgid "General"
msgstr ""
#: class.bcn_admin.php:310 class.bcn_network_admin.php:381
msgid ""
"For the settings on this page to take effect, you must either use the "
"included Breadcrumb NavXT widget, or place either of the code sections below "
"into your theme."
msgstr ""
#: class.bcn_admin.php:311 class.bcn_network_admin.php:382
msgid "Breadcrumb trail with separators"
msgstr ""
#: class.bcn_admin.php:317 class.bcn_network_admin.php:388
msgid "Breadcrumb trail in list form"
msgstr ""
#: class.bcn_admin.php:326 class.bcn_network_admin.php:397
msgid "Quick Start"
msgstr ""
#: class.bcn_admin.php:329 class.bcn_network_admin.php:400
msgid ""
"Using the code from the Quick Start section above, the following CSS can be "
"used as base for styling your breadcrumb trail."
msgstr ""
#: class.bcn_admin.php:341 class.bcn_network_admin.php:412
msgid "Styling"
msgstr ""
#: class.bcn_admin.php:347 class.bcn_network_admin.php:418
msgid "Import/Export/Reset"
msgstr ""
#: class.bcn_admin.php:371 class.bcn_network_admin.php:442
#: includes/class.mtekk_adminkit.php:841
msgid "Import"
msgstr ""
#: class.bcn_admin.php:372 class.bcn_network_admin.php:443
#: includes/class.mtekk_adminkit.php:842
msgid "Export"
msgstr ""
#: class.bcn_admin.php:373 class.bcn_network_admin.php:444
#: includes/class.mtekk_adminkit.php:843
msgid "Reset"
msgstr ""
#: class.bcn_admin.php:391
msgid ""
"Warning: Your network settings will override any settings set in this page."
msgstr ""
#: class.bcn_admin.php:395 class.bcn_admin.php:399
msgid ""
"Warning: Your network settings may override any settings set in this page."
msgstr ""
#: class.bcn_admin.php:404 class.bcn_network_admin.php:475
msgid ""
"Warning: No BCN_SETTINGS_* define statement found, defaulting to "
"BCN_SETTINGS_USE_LOCAL."
msgstr ""
#: class.bcn_admin.php:416 class.bcn_network_admin.php:488
msgid ""
"Warning: Your are using a deprecated setting \"Title Length\" (see "
"Miscellaneous &gt; Deprecated), please %1$suse CSS instead%2$s."
msgstr ""
#: class.bcn_admin.php:416 class.bcn_admin.php:704
#: class.bcn_network_admin.php:488 class.bcn_network_admin.php:776
msgid "Go to the guide on trimming breadcrumb title lengths with CSS"
msgstr ""
#: class.bcn_admin.php:446 class.bcn_network_admin.php:518
msgid ""
"A collection of settings most likely to be modified are located under this "
"tab."
msgstr ""
#: class.bcn_admin.php:450 class.bcn_network_admin.php:522
msgid "Breadcrumb Separator"
msgstr ""
#: class.bcn_admin.php:450 class.bcn_network_admin.php:522
msgid "Placed in between each breadcrumb."
msgstr ""
#: class.bcn_admin.php:454 class.bcn_network_admin.php:526
msgid "Current Item"
msgstr ""
#: class.bcn_admin.php:457 class.bcn_network_admin.php:529
msgid "Link Current Item"
msgstr ""
#: class.bcn_admin.php:457 class.bcn_network_admin.php:529
msgid "Yes"
msgstr ""
#: class.bcn_admin.php:458 class.bcn_network_admin.php:530
msgctxt ""
"Paged as in when on an archive or post that is split into multiple pages"
msgid "Paged Breadcrumb"
msgstr ""
#: class.bcn_admin.php:458 class.bcn_network_admin.php:530
msgid "Place the page number breadcrumb in the trail."
msgstr ""
#: class.bcn_admin.php:458 class.bcn_network_admin.php:530
msgid ""
"Indicates that the user is on a page other than the first of a paginated "
"archive or post."
msgstr ""
#: class.bcn_admin.php:459 class.bcn_network_admin.php:531
msgctxt ""
"Paged as in when on an archive or post that is split into multiple pages"
msgid "Paged Template"
msgstr ""
#: class.bcn_admin.php:459 class.bcn_network_admin.php:531
msgid "The template for paged breadcrumbs."
msgstr ""
#: class.bcn_admin.php:463 class.bcn_admin.php:466
#: class.bcn_network_admin.php:535 class.bcn_network_admin.php:538
msgid "Home Breadcrumb"
msgstr ""
#: class.bcn_admin.php:466 class.bcn_network_admin.php:538
msgid "Place the home breadcrumb in the trail."
msgstr ""
#: class.bcn_admin.php:467 class.bcn_network_admin.php:539
msgid "Home Template"
msgstr ""
#: class.bcn_admin.php:467 class.bcn_network_admin.php:539
msgid "The template for the home breadcrumb."
msgstr ""
#: class.bcn_admin.php:468 class.bcn_network_admin.php:540
msgid "Home Template (Unlinked)"
msgstr ""
#: class.bcn_admin.php:468 class.bcn_network_admin.php:540
msgid ""
"The template for the home breadcrumb, used when the breadcrumb is not linked."
msgstr ""
#: class.bcn_admin.php:472 class.bcn_admin.php:475
#: class.bcn_network_admin.php:544 class.bcn_network_admin.php:547
msgid "Blog Breadcrumb"
msgstr ""
#: class.bcn_admin.php:475 class.bcn_network_admin.php:547
msgid "Place the blog breadcrumb in the trail."
msgstr ""
#: class.bcn_admin.php:476 class.bcn_network_admin.php:548
msgid "Blog Template"
msgstr ""
#: class.bcn_admin.php:476 class.bcn_network_admin.php:548
msgid ""
"The template for the blog breadcrumb, used only in static front page "
"environments."
msgstr ""
#: class.bcn_admin.php:477 class.bcn_network_admin.php:549
msgid "Blog Template (Unlinked)"
msgstr ""
#: class.bcn_admin.php:477 class.bcn_network_admin.php:549
msgid ""
"The template for the blog breadcrumb, used only in static front page "
"environments and when the breadcrumb is not linked."
msgstr ""
#: class.bcn_admin.php:481 class.bcn_network_admin.php:553
msgid "Mainsite Breadcrumb"
msgstr ""
#: class.bcn_admin.php:484 class.bcn_network_admin.php:556
msgid "Main Site Breadcrumb"
msgstr ""
#: class.bcn_admin.php:484 class.bcn_network_admin.php:556
msgid "Place the main site home breadcrumb in the trail in an multisite setup."
msgstr ""
#: class.bcn_admin.php:485 class.bcn_network_admin.php:557
msgid "Main Site Home Template"
msgstr ""
#: class.bcn_admin.php:485 class.bcn_network_admin.php:557
msgid ""
"The template for the main site home breadcrumb, used only in multisite "
"environments."
msgstr ""
#: class.bcn_admin.php:486 class.bcn_network_admin.php:558
msgid "Main Site Home Template (Unlinked)"
msgstr ""
#: class.bcn_admin.php:486 class.bcn_network_admin.php:558
msgid ""
"The template for the main site home breadcrumb, used only in multisite "
"environments and when the breadcrumb is not linked."
msgstr ""
#: class.bcn_admin.php:493 class.bcn_network_admin.php:565
msgid ""
"The settings for all post types (Posts, Pages, and Custom Post Types) are "
"located under this tab."
msgstr ""
#: class.bcn_admin.php:493 class.bcn_network_admin.php:565
msgid "Post Types"
msgstr ""
#: class.bcn_admin.php:494 class.bcn_network_admin.php:566
msgid "Posts"
msgstr ""
#: class.bcn_admin.php:497 class.bcn_network_admin.php:569
msgid "Post Template"
msgstr ""
#: class.bcn_admin.php:497 class.bcn_network_admin.php:569
msgid "The template for post breadcrumbs."
msgstr ""
#: class.bcn_admin.php:498 class.bcn_network_admin.php:570
msgid "Post Template (Unlinked)"
msgstr ""
#: class.bcn_admin.php:498 class.bcn_network_admin.php:570
msgid ""
"The template for post breadcrumbs, used only when the breadcrumb is not "
"linked."
msgstr ""
#: class.bcn_admin.php:499 class.bcn_network_admin.php:571
msgid "Post Hierarchy Display"
msgstr ""
#: class.bcn_admin.php:499 class.bcn_network_admin.php:571
msgid ""
"Show the hierarchy (specified below) leading to a post in the breadcrumb "
"trail."
msgstr ""
#: class.bcn_admin.php:500 class.bcn_network_admin.php:572
msgid "Post Hierarchy Referer Influence"
msgstr ""
#: class.bcn_admin.php:500 class.bcn_admin.php:578
#: class.bcn_network_admin.php:572 class.bcn_network_admin.php:650
msgid ""
"Allow the refereing page to influence the taxonomy selected for the "
"hierarchy."
msgstr ""
#: class.bcn_admin.php:504 class.bcn_network_admin.php:576
msgid "Post Hierarchy"
msgstr ""
#: class.bcn_admin.php:508 class.bcn_admin.php:627
#: class.bcn_network_admin.php:580 class.bcn_network_admin.php:699
msgid "Categories"
msgstr ""
#: class.bcn_admin.php:509 class.bcn_admin.php:588
#: class.bcn_network_admin.php:581 class.bcn_network_admin.php:660
msgid "Dates"
msgstr ""
#: class.bcn_admin.php:510 class.bcn_admin.php:634
#: class.bcn_network_admin.php:582 class.bcn_network_admin.php:706
msgid "Tags"
msgstr ""
#: class.bcn_admin.php:512 class.bcn_admin.php:587
#: class.bcn_network_admin.php:584 class.bcn_network_admin.php:659
msgid "Post Parent"
msgstr ""
#: class.bcn_admin.php:528 class.bcn_admin.php:612
#: class.bcn_network_admin.php:600 class.bcn_network_admin.php:684
msgid ""
"The hierarchy which the breadcrumb trail will show. Note that the \"Post "
"Parent\" option may require an additional plugin to behave as expected since "
"this is a non-hierarchical post type."
msgstr ""
#: class.bcn_admin.php:532 class.bcn_network_admin.php:604
msgid "Pages"
msgstr ""
#: class.bcn_admin.php:535 class.bcn_network_admin.php:607
msgid "Page Template"
msgstr ""
#: class.bcn_admin.php:535 class.bcn_network_admin.php:607
msgid "The template for page breadcrumbs."
msgstr ""
#: class.bcn_admin.php:536 class.bcn_network_admin.php:608
msgid "Page Template (Unlinked)"
msgstr ""
#: class.bcn_admin.php:536 class.bcn_network_admin.php:608
msgid ""
"The template for page breadcrumbs, used only when the breadcrumb is not "
"linked."
msgstr ""
#: class.bcn_admin.php:539 class.bcn_network_admin.php:611
msgid "Attachments"
msgstr ""
#: class.bcn_admin.php:542 class.bcn_network_admin.php:614
msgid "Attachment Template"
msgstr ""
#: class.bcn_admin.php:542 class.bcn_network_admin.php:614
msgid "The template for attachment breadcrumbs."
msgstr ""
#: class.bcn_admin.php:543 class.bcn_network_admin.php:615
msgid "Attachment Template (Unlinked)"
msgstr ""
#: class.bcn_admin.php:543 class.bcn_network_admin.php:615
msgid ""
"The template for attachment breadcrumbs, used only when the breadcrumb is "
"not linked."
msgstr ""
#: class.bcn_admin.php:563 class.bcn_admin.php:665
#: class.bcn_network_admin.php:635 class.bcn_network_admin.php:737
msgid "%s Template"
msgstr ""
#: class.bcn_admin.php:563 class.bcn_admin.php:665
#: class.bcn_network_admin.php:635 class.bcn_network_admin.php:737
msgid "The template for %s breadcrumbs."
msgstr ""
#: class.bcn_admin.php:564 class.bcn_admin.php:666
#: class.bcn_network_admin.php:636 class.bcn_network_admin.php:738
msgid "%s Template (Unlinked)"
msgstr ""
#: class.bcn_admin.php:564 class.bcn_admin.php:666
#: class.bcn_network_admin.php:636 class.bcn_network_admin.php:738
msgid ""
"The template for %s breadcrumbs, used only when the breadcrumb is not linked."
msgstr ""
#: class.bcn_admin.php:569 class.bcn_network_admin.php:641
msgid "%s Root Page"
msgstr ""
#: class.bcn_admin.php:572 class.bcn_network_admin.php:644
msgid "&mdash; Select &mdash;"
msgstr ""
#: class.bcn_admin.php:576 class.bcn_network_admin.php:648
msgid "%s Archive Display"
msgstr ""
#: class.bcn_admin.php:576 class.bcn_network_admin.php:648
msgid ""
"Show the breadcrumb for the %s post type archives in the breadcrumb trail."
msgstr ""
#: class.bcn_admin.php:577 class.bcn_network_admin.php:649
msgid "%s Hierarchy Display"
msgstr ""
#: class.bcn_admin.php:577 class.bcn_network_admin.php:649
msgid ""
"Show the hierarchy (specified below) leading to a %s in the breadcrumb trail."
msgstr ""
#: class.bcn_admin.php:578 class.bcn_network_admin.php:650
msgid "%s Hierarchy Referer Influence"
msgstr ""
#: class.bcn_admin.php:582 class.bcn_network_admin.php:654
msgid "%s Hierarchy"
msgstr ""
#: class.bcn_admin.php:608 class.bcn_network_admin.php:680
msgid "The hierarchy which the breadcrumb trail will show."
msgstr ""
#: class.bcn_admin.php:626 class.bcn_network_admin.php:698
msgid ""
"The settings for all taxonomies (including Categories, Tags, and custom "
"taxonomies) are located under this tab."
msgstr ""
#: class.bcn_admin.php:626 class.bcn_network_admin.php:698
msgid "Taxonomies"
msgstr ""
#: class.bcn_admin.php:630 class.bcn_network_admin.php:702
msgid "Category Template"
msgstr ""
#: class.bcn_admin.php:630 class.bcn_network_admin.php:702
msgid "The template for category breadcrumbs."
msgstr ""
#: class.bcn_admin.php:631 class.bcn_network_admin.php:703
msgid "Category Template (Unlinked)"
msgstr ""
#: class.bcn_admin.php:631 class.bcn_network_admin.php:703
msgid ""
"The template for category breadcrumbs, used only when the breadcrumb is not "
"linked."
msgstr ""
#: class.bcn_admin.php:637 class.bcn_network_admin.php:709
msgid "Tag Template"
msgstr ""
#: class.bcn_admin.php:637 class.bcn_network_admin.php:709
msgid "The template for tag breadcrumbs."
msgstr ""
#: class.bcn_admin.php:638 class.bcn_network_admin.php:710
msgid "Tag Template (Unlinked)"
msgstr ""
#: class.bcn_admin.php:638 class.bcn_network_admin.php:710
msgid ""
"The template for tag breadcrumbs, used only when the breadcrumb is not "
"linked."
msgstr ""
#: class.bcn_admin.php:641 class.bcn_network_admin.php:713
msgid "Post Formats"
msgstr ""
#: class.bcn_admin.php:644 class.bcn_network_admin.php:716
msgid "Post Format Template"
msgstr ""
#: class.bcn_admin.php:644 class.bcn_network_admin.php:716
msgid "The template for post format breadcrumbs."
msgstr ""
#: class.bcn_admin.php:645 class.bcn_network_admin.php:717
msgid "Post Format Template (Unlinked)"
msgstr ""
#: class.bcn_admin.php:645 class.bcn_network_admin.php:717
msgid ""
"The template for post_format breadcrumbs, used only when the breadcrumb is "
"not linked."
msgstr ""
#: class.bcn_admin.php:675 class.bcn_network_admin.php:747
msgid ""
"The settings for author and date archives, searches, and 404 pages are "
"located under this tab."
msgstr ""
#: class.bcn_admin.php:675 class.bcn_admin.php:684
#: class.bcn_network_admin.php:747 class.bcn_network_admin.php:756
msgid "Miscellaneous"
msgstr ""
#: class.bcn_admin.php:676 class.bcn_network_admin.php:748
msgid "Author Archives"
msgstr ""
#: class.bcn_admin.php:679 class.bcn_network_admin.php:751
msgid "Author Template"
msgstr ""
#: class.bcn_admin.php:679 class.bcn_network_admin.php:751
msgid "The template for author breadcrumbs."
msgstr ""
#: class.bcn_admin.php:680 class.bcn_network_admin.php:752
msgid "Author Template (Unlinked)"
msgstr ""
#: class.bcn_admin.php:680 class.bcn_network_admin.php:752
msgid ""
"The template for author breadcrumbs, used only when the breadcrumb is not "
"linked."
msgstr ""
#: class.bcn_admin.php:681 class.bcn_network_admin.php:753
msgid "Author Display Format"
msgstr ""
#: class.bcn_admin.php:681 class.bcn_network_admin.php:753
msgid ""
"display_name uses the name specified in \"Display name publicly as\" under "
"the user profile the others correspond to options in the user profile."
msgstr ""
#: class.bcn_admin.php:687 class.bcn_network_admin.php:759
msgid "Date Template"
msgstr ""
#: class.bcn_admin.php:687 class.bcn_network_admin.php:759
msgid "The template for date breadcrumbs."
msgstr ""
#: class.bcn_admin.php:688 class.bcn_network_admin.php:760
msgid "Date Template (Unlinked)"
msgstr ""
#: class.bcn_admin.php:688 class.bcn_network_admin.php:760
msgid ""
"The template for date breadcrumbs, used only when the breadcrumb is not "
"linked."
msgstr ""
#: class.bcn_admin.php:689 class.bcn_network_admin.php:761
msgid "Search Template"
msgstr ""
#: class.bcn_admin.php:689 class.bcn_network_admin.php:761
msgid ""
"The anchor template for search breadcrumbs, used only when the search "
"results span several pages."
msgstr ""
#: class.bcn_admin.php:690 class.bcn_network_admin.php:762
msgid "Search Template (Unlinked)"
msgstr ""
#: class.bcn_admin.php:690 class.bcn_network_admin.php:762
msgid ""
"The anchor template for search breadcrumbs, used only when the search "
"results span several pages and the breadcrumb is not linked."
msgstr ""
#: class.bcn_admin.php:691 class.bcn_network_admin.php:763
msgid "404 Title"
msgstr ""
#: class.bcn_admin.php:692 class.bcn_network_admin.php:764
msgid "404 Template"
msgstr ""
#: class.bcn_admin.php:692 class.bcn_network_admin.php:764
msgid "The template for 404 breadcrumbs."
msgstr ""
#: class.bcn_admin.php:695 class.bcn_network_admin.php:767
msgid "Deprecated"
msgstr ""
#: class.bcn_admin.php:699 class.bcn_network_admin.php:771
msgid "Title Length"
msgstr ""
#: class.bcn_admin.php:704 class.bcn_network_admin.php:776
msgid ""
"Limit the length of the breadcrumb title. (Deprecated, %suse CSS instead%s)"
msgstr ""
#: class.bcn_admin.php:709 class.bcn_network_admin.php:781
msgid "Max Title Length: "
msgstr ""
#: class.bcn_admin.php:721 class.bcn_network_admin.php:793
msgid "Save Changes"
msgstr ""
#: class.bcn_breadcrumb.php:91
msgid ""
"<span property=\"itemListElement\" typeof=\"ListItem\"><a property=\"item\" "
"typeof=\"WebPage\" title=\"Go to %title%.\" href=\"%link%\" class=\"%type%"
"\"><span property=\"name\">%htitle%</span></a><meta property=\"position\" "
"content=\"%position%\"></span>"
msgstr ""
#: class.bcn_breadcrumb_trail.php:77
msgid ""
"<span property=\"itemListElement\" typeof=\"ListItem\"><span property=\"name"
"\">Page %htitle%</span><meta property=\"position\" content=\"%position%\"></"
"span>"
msgstr ""
#: class.bcn_breadcrumb_trail.php:102
msgid "404"
msgstr ""
#: class.bcn_breadcrumb_trail.php:105
msgid ""
"<span property=\"itemListElement\" typeof=\"ListItem\"><span property=\"name"
"\">Search results for &#39;<a property=\"item\" typeof=\"WebPage\" title="
"\"Go to the first page of search results for %title%.\" href=\"%link%\" "
"class=\"%type%\">%htitle%</a>&#39;</span><meta property=\"position\" content="
"\"%position%\"></span>"
msgstr ""
#: class.bcn_breadcrumb_trail.php:107
msgid ""
"<span property=\"itemListElement\" typeof=\"ListItem\"><span property=\"name"
"\">Search results for &#39;%htitle%&#39;</span><meta property=\"position\" "
"content=\"%position%\"></span>"
msgstr ""
#: class.bcn_breadcrumb_trail.php:110
msgid ""
"<span property=\"itemListElement\" typeof=\"ListItem\"><a property=\"item\" "
"typeof=\"WebPage\" title=\"Go to the %title% tag archives.\" href=\"%link%\" "
"class=\"%type%\"><span property=\"name\">%htitle%</span></a><meta property="
"\"position\" content=\"%position%\"></span>"
msgstr ""
#: class.bcn_breadcrumb_trail.php:115 class.bcn_breadcrumb_trail.php:131
msgid ""
"<span property=\"itemListElement\" typeof=\"ListItem\"><a property=\"item\" "
"typeof=\"WebPage\" title=\"Go to the %title% archives.\" href=\"%link%\" "
"class=\"%type%\"><span property=\"name\">%htitle%</span></a><meta property="
"\"position\" content=\"%position%\"></span>"
msgstr ""
#: class.bcn_breadcrumb_trail.php:120
msgid ""
"<span property=\"itemListElement\" typeof=\"ListItem\"><span property=\"name"
"\">Articles by: <a title=\"Go to the first page of posts by %title%.\" href="
"\"%link%\" class=\"%type%\">%htitle%</a>"
msgstr ""
#: class.bcn_breadcrumb_trail.php:122
msgid ""
"<span property=\"itemListElement\" typeof=\"ListItem\"><span property=\"name"
"\">Articles by: %htitle%</span><meta property=\"position\" content="
"\"%position%\"></span>"
msgstr ""
#: class.bcn_breadcrumb_trail.php:127
msgid ""
"<span property=\"itemListElement\" typeof=\"ListItem\"><a property=\"item\" "
"typeof=\"WebPage\" title=\"Go to the %title% category archives.\" href="
"\"%link%\" class=\"%type%\"><span property=\"name\">%htitle%</span></a><meta "
"property=\"position\" content=\"%position%\"></span>"
msgstr ""
#: class.bcn_breadcrumb_trail.php:465
msgid "$post global is not of type WP_Post"
msgstr ""
#: class.bcn_breadcrumb_trail.php:563
msgctxt "day archive breadcrumb date format"
msgid "d"
msgstr ""
#: class.bcn_breadcrumb_trail.php:583
msgctxt "month archive breadcrumb date format"
msgid "F"
msgstr ""
#: class.bcn_breadcrumb_trail.php:600
msgctxt "year archive breadcrumb date format"
msgid "Y"
msgstr ""
#: class.bcn_network_admin.php:63
msgid "Breadcrumb NavXT Network Settings"
msgstr ""
#: class.bcn_network_admin.php:458 class.bcn_network_admin.php:476
msgid ""
"Warning: Individual site settings will override any settings set in this "
"page."
msgstr ""
#: class.bcn_network_admin.php:466 class.bcn_network_admin.php:470
msgid ""
"Warning: Individual site settings may override any settings set in this page."
msgstr ""
#: class.bcn_widget.php:32
msgid "Adds a breadcrumb trail to your sidebar"
msgstr ""
#: class.bcn_widget.php:99
msgid "Title:"
msgstr ""
#: class.bcn_widget.php:103
msgid "Text to show before the trail:"
msgstr ""
#: class.bcn_widget.php:107
msgid "Output trail as:"
msgstr ""
#: class.bcn_widget.php:109
msgid "List"
msgstr ""
#: class.bcn_widget.php:110
msgid "Google (RDFa) Breadcrumbs"
msgstr ""
#: class.bcn_widget.php:111
msgid "Plain"
msgstr ""
#: class.bcn_widget.php:117
msgid "Link the breadcrumbs"
msgstr ""
#: class.bcn_widget.php:119
msgid "Reverse the order of the trail"
msgstr ""
#: class.bcn_widget.php:121
msgid "Hide the trail on the front page"
msgstr ""
#: includes/class.mtekk_adminkit.php:113
msgid "Insufficient privileges to proceed."
msgstr ""
#: includes/class.mtekk_adminkit.php:236
msgid "Settings"
msgstr ""
#: includes/class.mtekk_adminkit.php:312
msgid ""
"Your settings are for an older version of this plugin and need to be "
"migrated."
msgstr ""
#: includes/class.mtekk_adminkit.php:312 includes/class.mtekk_adminkit.php:321
msgid "Migrate the settings now."
msgstr ""
#: includes/class.mtekk_adminkit.php:312
msgid "Migrate now."
msgstr ""
#: includes/class.mtekk_adminkit.php:321
msgid "Your settings are for a newer version of this plugin."
msgstr ""
#: includes/class.mtekk_adminkit.php:321
msgid "Attempt back migration now."
msgstr ""
#: includes/class.mtekk_adminkit.php:329
msgid "Your plugin install is incomplete."
msgstr ""
#: includes/class.mtekk_adminkit.php:329
msgid "Load default settings now."
msgstr ""
#: includes/class.mtekk_adminkit.php:329
msgid "Complete now."
msgstr ""
#: includes/class.mtekk_adminkit.php:337
msgid "One or more of your plugin settings are invalid."
msgstr ""
#: includes/class.mtekk_adminkit.php:337
msgid "Attempt to fix settings now."
msgstr ""
#: includes/class.mtekk_adminkit.php:337
msgid "Fix now."
msgstr ""
#: includes/class.mtekk_adminkit.php:536
msgid "Settings successfully saved."
msgstr ""
#: includes/class.mtekk_adminkit.php:536 includes/class.mtekk_adminkit.php:549
msgid "Undo the options save."
msgstr ""
#: includes/class.mtekk_adminkit.php:536 includes/class.mtekk_adminkit.php:549
#: includes/class.mtekk_adminkit.php:654 includes/class.mtekk_adminkit.php:678
#: includes/class.mtekk_adminkit.php:695
msgid "Undo"
msgstr ""
#: includes/class.mtekk_adminkit.php:540
msgid "Settings did not change, nothing to save."
msgstr ""
#: includes/class.mtekk_adminkit.php:544
msgid "Settings were not saved."
msgstr ""
#: includes/class.mtekk_adminkit.php:549
msgid "Some settings were not saved."
msgstr ""
#: includes/class.mtekk_adminkit.php:550
msgid "The following settings were not saved:"
msgstr ""
#: includes/class.mtekk_adminkit.php:555
msgid "Please include this message in your %sbug report%s."
msgstr ""
#: includes/class.mtekk_adminkit.php:555
msgid "Go to the %s support post for your version."
msgstr ""
#: includes/class.mtekk_adminkit.php:654
msgid "Settings successfully imported from the uploaded file."
msgstr ""
#: includes/class.mtekk_adminkit.php:654
msgid "Undo the options import."
msgstr ""
#: includes/class.mtekk_adminkit.php:659
msgid "Importing settings from file failed."
msgstr ""
#: includes/class.mtekk_adminkit.php:678
msgid "Settings successfully reset to the default values."
msgstr ""
#: includes/class.mtekk_adminkit.php:678
msgid "Undo the options reset."
msgstr ""
#: includes/class.mtekk_adminkit.php:695
msgid "Settings successfully undid the last operation."
msgstr ""
#: includes/class.mtekk_adminkit.php:695
msgid "Undo the last undo operation."
msgstr ""
#: includes/class.mtekk_adminkit.php:730
msgid "Settings successfully migrated."
msgstr ""
#: includes/class.mtekk_adminkit.php:737
msgid "Default settings successfully installed."
msgstr ""
#: includes/class.mtekk_adminkit.php:833
msgid ""
"Import settings from a XML file, export the current settings to a XML file, "
"or reset to the default settings."
msgstr ""
#: includes/class.mtekk_adminkit.php:836
msgid "Settings File"
msgstr ""
#: includes/class.mtekk_adminkit.php:839
msgid "Select a XML settings file to upload and import settings from."
msgstr ""
#. Plugin Name of the plugin/theme
msgid "Breadcrumb NavXT"
msgstr ""
#. Plugin URI of the plugin/theme
msgid "http://mtekk.us/code/breadcrumb-navxt/"
msgstr ""
#. Description of the plugin/theme
msgid ""
"Adds a breadcrumb navigation showing the visitor&#39;s path to their current "
"location. For details on how to use this plugin visit <a href=\"http://mtekk."
"us/code/breadcrumb-navxt/\">Breadcrumb NavXT</a>."
msgstr ""
#. Author of the plugin/theme
msgid "John Havlik"
msgstr ""
#. Author URI of the plugin/theme
msgid "http://mtekk.us/"
msgstr ""

View File

@@ -0,0 +1,153 @@
=== Breadcrumb NavXT ===
Contributors: mtekk, hakre
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=FD5XEU783BR8U&lc=US&item_name=Breadcrumb%20NavXT%20Donation&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted
Tags: breadcrumb, breadcrumbs, trail, navigation, menu, widget
Requires at least: 4.8
Tested up to: 5.4.0
Stable tag: 6.4.0
Requires PHP: 5.5
License: GPLv2 or later
Adds breadcrumb navigation showing the visitor's path to their current location.
== Description ==
Breadcrumb NavXT, the successor to the popular WordPress plugin Breadcrumb Navigation XT, was written from the ground up to be better than its ancestor. This plugin generates locational breadcrumb trails for your WordPress powered blog or website. These breadcrumb trails are highly customizable to suit the needs of just about any website running WordPress. The Administrative interface makes setting options easy, while a direct class access is available for theme developers and more adventurous users.
= PHP Requirements =
Breadcrumb NavXT 5.2 and newer require PHP5.3
Breadcrumb NavXT 5.1.1 and older require PHP5.2
= Features (non-exhaustive) =
* RDFa format Schema.org BreadcrumbList compatible breadcrumb generation.
* Extensive breadcrumb customization control via a settings page with appropriate default values for most use cases.
* Network admin settings page for managing breadcrumb settings for all subsites with [configurable global priority](http://mtekk.us/archives/guides/controlling-breadcrumb-navxt-settings-from-the-network-settings-page/ "Go to the article on configuring the network settings priority.").
* Built in WordPress Widget.
* Extensible via OOP and provided [actions](http://mtekk.us/code/breadcrumb-navxt/breadcrumb-navxt-doc/2/#action_reference "Go to the Breadcrumb NavXT Documentation's action reference.") and [filters](http://mtekk.us/code/breadcrumb-navxt/breadcrumb-navxt-doc/2/#filter_reference "Go to the Breadcrumb NavXT Documentation's filter reference.").
* WPML compatible (enhanced compatibility with WPML extensions plugin).
* Polylang compatible (enhanced compatibility with Polylang extensions plugin).
* bbPress compatible (enhanced compatibility with bbPress extensions plugin).
* BuddyPress compatible (enhanced compatibility with BuddyPress extensions plugin).
= Translations =
Breadcrumb NavXT now supports WordPress.org language packs. Want to translate Breadcrumb NavXT? Visit [Breadcrumb NavXT's WordPress.org translation project](https://translate.wordpress.org/projects/wp-plugins/breadcrumb-navxt/).
== Installation ==
Breadcrumb NavXT can be installed from within WordPress administration panel. After installing and activating the plugin, to get breadcrumb trails to display either use the included widget, or call the breadcrumb trail in your theme (or child theme). See the [Calling the Breadcrumb Trail](http://mtekk.us/archives/guides/calling-the-breadcrumb-trail "Read more on calling the breadcrumb trail") article for more information on calling the breadcrumb trail.
To customize the breadcrumb trail you may edit the default values for the options in the administrative interface. This is located in your administration panel under Settings > Breadcrumb NavXT.
Please visit [Breadcrumb NavXT's Documentation](http://mtekk.us/code/breadcrumb-navxt/breadcrumb-navxt-doc/ "Go to Breadcrumb NavXT's Documentation.") page for more information.
== Screenshots ==
1. This screenshot shows 5 different examples of breadcrumbs generated by Breadcrumb NavXT
2. A screenshot of the General tab of the settings page
3. A screenshot of the Post Types tab of the settings page
4. A screenshot of the Taxonomies tab of the settings page
5. A screenshot of the Miscellaneous tab of the settings page
6. A screenshot of the Settings Import/Export/Reset form under the Help menu
== Changelog ==
= 6.4.0 =
Release date: December, 31st 2019
* Behavior change: Attachment post type settings moved to Media, additional post type options made available.
* Behavior change: Privately published parent posts are now, by default, skipped over in breadcrumb trails.
* Behavior change: On single post breadcrumb trails, the hierarchical term code path is now used in cases where only a single term from a non-hierarchical taxonomy is present for the current post.
* New feature: Allow `%link%` tag in unlinked breadcrumb templates.
* New feature: Added `bcn_show_post_private` filter.
* New feature: Added `bcn_show_type_term_archive` filter.
= 6.3.0 =
Release date: May, 3rd 2019
* New feature: Added Gutenberg block for displaying breadcrumb trails.
* New feature: Added `bcn_display_attribute_array` filter.
* New feature: Added `bcn-aria-current` template tag to facilitate WAI-ARIA Breadcrumb support.
* Bug Fix: Updated settings page to follow WP core standards for header structure.
* Bug Fix: Updated checkbox in adminKit to eliminate multiple labels to follow WCAG 2.0.
* Bug Fix: Fixed PHP error in circumstances of `bcn_breadcrumb_trail::fill()` falling back on treating an unknown item as a taxonomy.
= 6.2.1 =
Release date: October, 26th 2018
* Behavior change: Added `span` element wrapping the breadcrumb title in the default unlinked breadcrumb template.
* Bug fix: Fixed issue that caused PHP warnings and “the following settings were not saved” messages for hierarchical CPTs.
= 6.2.0 =
Release date: September, 24th 2018
* Behavior change: Cleaned up translations for default templates, simplifying and clarifying the translatable content.
* Behavior change: Default unlinked breadcrumb templates no longer contain Schema.org BreadcrumbList markup.
* Behavior change: Breadcrumb NavXT REST API endpoints are no longer enabled by default.
* New feature: Added `bcn_register_rest_endpoint` filter.
* New feature: Added `bcn_breadcrumb_assemble_json_ld_array` filter.
* New feature: Added support for following the post parent hierarchy first then falling back to a secondary hierarchy.
* Bug fix: Fixed issue where on loading the settings page immediately after migrating settings causes PHP warnings on CPT and custom taxonomy settings.
* Bug fix: Fixed issue that caused the settings reset option under the help drop down to not work.
= 6.1.0 =
Release date: June, 1st 2018
* Behavior change: Links to generate support requests migrated to the WordPress.org forums.
* New feature: Added support for Schema.org BreadcrumbList (microdata format) in the included widget.
* New feature: Added new Root Page support for author archives.
* New feature: Added REST API endpoint for posts, terms, and author archives.
* Bug fix: Corrected label for the Schema.org BreadcrumbList (RDFa format) option in the included widget.
* Bug fix: Fixed issue where a PHP warning would be thrown due to `get_term()` returning something other than an instance of `WP_Term`.
= 6.0.4 =
Release date: January, 26th 2018
* Behavior change: Added auto migration of post type hierarchy settings to `bcn_display*()` functions.
* Bug fix: Fixed issue where a PHP notice would be generated on the page for posts when the blog breadcrumb display option is set to false.
* Bug fix: Fixed issue where a PHP notice would be generated on archive pages where attachments were included in the `wp_query` results.
= 6.0.3 =
Release date: January, 1st 2018
* Bug fix: Fixed issue where an improper breadcrumb would be generated in the trail for pages under some circumstances.
* Bug fix: Fixed issue where the post and page roots were not updating to track user changes in Settings > Reading.
= 6.0.2 =
Release date: December, 30th 2017
* Behavior change: Added warning alerting that `bcn_breadcrumb::type` must be an array.
* Bug fix: Changed Breadcrumb Separator and Paged Template from an input field to a textbox to reduce confusion caused by HTML entities.
* Bug fix: Fixed issue where the parents of a page may not show up in the breadcrumb trail.
* Bug fix: Fixed issue where the `$reverse` parameter for `bcn_display` and `bcn_display_list` did not work properly.
* Bug fix: Fixed issue where the `bcn_display_list` function did not include the `li` elements.
= 6.0.1 =
Release date: December, 28th 2017
* Behavior change: Removed unused Blog Template and Blog Template (Unlinked) from settings page.
* Bug fix: Fixed issue where changes to the hierarchy type for any post type would not save.
* Bug fix: Fixed issue where the blog display setting was ignored.
= 6.0.0 =
Release date: December, 26th 2017
* Behavior change: `bcn_breadcrumb_trail::display_list()` deprecated in favor of using the `$template` parameter in `bcn_breadcrumb_trail::display()`.
* Behavior change: `bcn_breadcrumb_trail::do_attachment()` deprecated in favor of calling `bcn_breadcrumb_trail::do_post()`.
* Behavior change: `bcn_breadcrumb_trail::do_front_page()` deprecated in favor of calling `bcn_breadcrumb_trail::do_home()`.
* Behavior change: `bcn_li_attributes` filter was deprecated in favor of `bcn_display_attributes`.
* Behavior change: `bcn_breadcrumb_trail::do_archive_by_date()` deprecated in favor of calling bcn_breadcrumb_trail::do_day()`, `bcn_breadcrumb_trail::do_month()`, and/or `bcn_breadcrumb_trail::do_year()`.
* Behavior change: `bcn_breadcrumb_trail::find_type()` deprecated and removed from bcn_breadcrumb_trail.
* Behavior change: Breadcrumb for 404 error pages changed to be a child of the front page.
* New feature: Added support for various HTML tags in the widget's pretext field.
* New feature: Added `bcn_default_hierarchy_display` filter.
* New feature: Added `bcn_default_hierarchy_type` filter.
* New feature: Added `$posttype_name` as the third parameter to `bcn_show_tax_private`.
* Bug fix: Fixed UI/UX issue in the settings screen where enabling/disabling settings groups for the Home, Blog, and Mainsite breadcrumb settings did not work.
* Bug fix: Fixed UI/UX issue in the settings screen where not including the paged breadcrumb still allowed the paged breadcrumb template to be edited.
* Bug fix: Removed use of `create_function` in registering the widget as it was deprecated in PHP 7.2.
== Upgrade Notice ==
= 6.3.0 =
This version requires PHP5.5 or newer. This version introduces a Gutenberg Breadcrumb Trail block.
= 6.0.0 =
This version requires PHP5.3 or newer. This version introduces three new filters and deprecates a filter.

View File

@@ -0,0 +1,124 @@
<?php
/**
* Breadcrumb NavXT - uninstall script
*
* uninstall script based on WordPress Uninstall Plugin API
*
*
* Because bcn_admin->uninstall() does not work with WPMU,
* an uninstaller class has been written, that encapsulates
* the uninstall logic and calls bcn_admin->uninstall()
* when applicable.
*
* @see http://codex.wordpress.org/Migrating_Plugins_and_Themes_to_2.7#Uninstall_Plugin_API
* @see http://trac.mu.wordpress.org/ticket/967
*
* this uninstall.php file was executed multiple times because
* breadcrumb navxt (until 3.3) constsisted of two plugins:
*
* 1.) breadcrumb_navxt_class.php / Core
* 2.) breadcrumb_navxt_admin.php / Adminstration Interface
*
* @author Tom Klingenberg
*/
/*
Copyright 2010-2020 John Havlik (email : john.havlik@mtekk.us)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//Ensure the uninstall.php file was only called by WordPress and not directly
if(!defined('WP_UNINSTALL_PLUGIN'))
{
//First catches the Apache users
header("HTTP/1.0 404 Not Found");
//This should catch FastCGI users
header("Status: 404 Not Found");
die();
}
require_once(dirname(__FILE__) . '/includes/class.mtekk_adminkit_uninstaller.php');
/**
* Breadcrumb NavXT uninstaller class
*
* @author Tom Klingenberg
*/
class bcn_uninstaller extends mtekk_adminKit_uninstaller
{
protected $unique_prefix = 'bcn';
protected $plugin_basename = null;
public function __construct()
{
$this->plugin_basename = plugin_basename('/breadcrumb-navxt.php');
parent::__construct();
}
/**
* Options uninstallation function for legacy
*/
private function uninstall_legacy()
{
delete_option($this->unique_prefix . '_options');
delete_option($this->unique_prefix . '_options_bk');
delete_option($this->unique_prefix . '_version');
delete_site_option($this->unique_prefix . '_options');
delete_site_option($this->unique_prefix . '_options_bk');
delete_site_option($this->unique_prefix . '_version');
}
/**
* uninstall breadcrumb navxt admin plugin
*
* @return bool
*/
private function uninstall_options()
{
if(version_compare(phpversion(), '5.3.0', '<'))
{
return $this->uninstall_legacy();
}
//Grab our global breadcrumb_navxt object
global $breadcrumb_navxt;
//Load dependencies if applicable
if(!class_exists('breadcrumb_navxt'))
{
require_once($this->_get_plugin_path());
}
//Initalize $breadcrumb_navxt so we can use it
$bcn_breadcrumb_trail = new bcn_breadcrumb_trail();
//Let's make an instance of our object takes care of everything
$breadcrumb_navxt = new breadcrumb_navxt($bcn_breadcrumb_trail);
//Uninstall
return $breadcrumb_navxt->uninstall();
}
/**
* uninstall method
*
* @return bool wether or not uninstall did run successfull.
*/
public function uninstall()
{
//Only bother to do things if we have something in the database
if($this->is_installed())
{
return $this->uninstall_options();
}
}
} /// class bcn_uninstaller
/*
* main
*/
new bcn_uninstaller();

View File

@@ -0,0 +1,611 @@
<?php
require_once WPCF7_PLUGIN_DIR . '/admin/includes/admin-functions.php';
require_once WPCF7_PLUGIN_DIR . '/admin/includes/help-tabs.php';
require_once WPCF7_PLUGIN_DIR . '/admin/includes/tag-generator.php';
require_once WPCF7_PLUGIN_DIR . '/admin/includes/welcome-panel.php';
require_once WPCF7_PLUGIN_DIR . '/admin/includes/config-validator.php';
add_action( 'admin_init', 'wpcf7_admin_init', 10, 0 );
function wpcf7_admin_init() {
do_action( 'wpcf7_admin_init' );
}
add_action( 'admin_menu', 'wpcf7_admin_menu', 9, 0 );
function wpcf7_admin_menu() {
global $_wp_last_object_menu;
$_wp_last_object_menu++;
do_action( 'wpcf7_admin_menu' );
add_menu_page( __( 'Contact Form 7', 'contact-form-7' ),
__( 'Contact', 'contact-form-7' )
. wpcf7_admin_menu_change_notice(),
'wpcf7_read_contact_forms', 'wpcf7',
'wpcf7_admin_management_page', 'dashicons-email',
$_wp_last_object_menu );
$edit = add_submenu_page( 'wpcf7',
__( 'Edit Contact Form', 'contact-form-7' ),
__( 'Contact Forms', 'contact-form-7' )
. wpcf7_admin_menu_change_notice( 'wpcf7' ),
'wpcf7_read_contact_forms', 'wpcf7',
'wpcf7_admin_management_page' );
add_action( 'load-' . $edit, 'wpcf7_load_contact_form_admin', 10, 0 );
$addnew = add_submenu_page( 'wpcf7',
__( 'Add New Contact Form', 'contact-form-7' ),
__( 'Add New', 'contact-form-7' )
. wpcf7_admin_menu_change_notice( 'wpcf7-new' ),
'wpcf7_edit_contact_forms', 'wpcf7-new',
'wpcf7_admin_add_new_page' );
add_action( 'load-' . $addnew, 'wpcf7_load_contact_form_admin', 10, 0 );
$integration = WPCF7_Integration::get_instance();
if ( $integration->service_exists() ) {
$integration = add_submenu_page( 'wpcf7',
__( 'Integration with Other Services', 'contact-form-7' ),
__( 'Integration', 'contact-form-7' )
. wpcf7_admin_menu_change_notice( 'wpcf7-integration' ),
'wpcf7_manage_integration', 'wpcf7-integration',
'wpcf7_admin_integration_page' );
add_action( 'load-' . $integration, 'wpcf7_load_integration_page', 10, 0 );
}
}
function wpcf7_admin_menu_change_notice( $menu_slug = '' ) {
$counts = apply_filters( 'wpcf7_admin_menu_change_notice',
array(
'wpcf7' => 0,
'wpcf7-new' => 0,
'wpcf7-integration' => 0,
)
);
if ( empty( $menu_slug ) ) {
$count = absint( array_sum( $counts ) );
} elseif ( isset( $counts[$menu_slug] ) ) {
$count = absint( $counts[$menu_slug] );
} else {
$count = 0;
}
if ( $count ) {
return sprintf(
' <span class="update-plugins %1$d"><span class="plugin-count">%2$s</span></span>',
$count,
esc_html( number_format_i18n( $count ) )
);
}
return '';
}
add_action( 'admin_enqueue_scripts', 'wpcf7_admin_enqueue_scripts', 10, 1 );
function wpcf7_admin_enqueue_scripts( $hook_suffix ) {
if ( false === strpos( $hook_suffix, 'wpcf7' ) ) {
return;
}
wp_enqueue_style( 'contact-form-7-admin',
wpcf7_plugin_url( 'admin/css/styles.css' ),
array(), WPCF7_VERSION, 'all'
);
if ( wpcf7_is_rtl() ) {
wp_enqueue_style( 'contact-form-7-admin-rtl',
wpcf7_plugin_url( 'admin/css/styles-rtl.css' ),
array(), WPCF7_VERSION, 'all'
);
}
wp_enqueue_script( 'wpcf7-admin',
wpcf7_plugin_url( 'admin/js/scripts.js' ),
array( 'jquery', 'jquery-ui-tabs' ),
WPCF7_VERSION, true
);
$args = array(
'apiSettings' => array(
'root' => esc_url_raw( rest_url( 'contact-form-7/v1' ) ),
'namespace' => 'contact-form-7/v1',
'nonce' => ( wp_installing() && ! is_multisite() )
? '' : wp_create_nonce( 'wp_rest' ),
),
'pluginUrl' => wpcf7_plugin_url(),
'saveAlert' => __(
"The changes you made will be lost if you navigate away from this page.",
'contact-form-7' ),
'activeTab' => isset( $_GET['active-tab'] )
? (int) $_GET['active-tab'] : 0,
'configValidator' => array(
'errors' => array(),
'howToCorrect' => __( "How to resolve?", 'contact-form-7' ),
'oneError' => __( '1 configuration error detected', 'contact-form-7' ),
'manyErrors' => __( '%d configuration errors detected', 'contact-form-7' ),
'oneErrorInTab' => __( '1 configuration error detected in this tab panel', 'contact-form-7' ),
'manyErrorsInTab' => __( '%d configuration errors detected in this tab panel', 'contact-form-7' ),
'docUrl' => WPCF7_ConfigValidator::get_doc_link(),
/* translators: screen reader text */
'iconAlt' => __( '(configuration error)', 'contact-form-7' ),
),
);
if ( $post = wpcf7_get_current_contact_form()
and current_user_can( 'wpcf7_edit_contact_form', $post->id() )
and wpcf7_validate_configuration() ) {
$config_validator = new WPCF7_ConfigValidator( $post );
$config_validator->restore();
$args['configValidator']['errors'] =
$config_validator->collect_error_messages();
}
wp_localize_script( 'wpcf7-admin', 'wpcf7', $args );
add_thickbox();
wp_enqueue_script( 'wpcf7-admin-taggenerator',
wpcf7_plugin_url( 'admin/js/tag-generator.js' ),
array( 'jquery', 'thickbox', 'wpcf7-admin' ), WPCF7_VERSION, true );
}
add_action( 'doing_dark_mode', 'wpcf7_dark_mode_support', 10, 1 );
function wpcf7_dark_mode_support( $user_id ) {
wp_enqueue_style( 'contact-form-7-admin-dark-mode',
wpcf7_plugin_url( 'admin/css/styles-dark-mode.css' ),
array( 'contact-form-7-admin' ), WPCF7_VERSION, 'screen' );
}
add_filter( 'set-screen-option', 'wpcf7_set_screen_options', 10, 3 );
function wpcf7_set_screen_options( $result, $option, $value ) {
$wpcf7_screens = array(
'cfseven_contact_forms_per_page',
);
if ( in_array( $option, $wpcf7_screens ) ) {
$result = $value;
}
return $result;
}
function wpcf7_load_contact_form_admin() {
global $plugin_page;
$action = wpcf7_current_action();
do_action( 'wpcf7_admin_load',
isset( $_GET['page'] ) ? trim( $_GET['page'] ) : '',
$action
);
if ( 'save' == $action ) {
$id = isset( $_POST['post_ID'] ) ? $_POST['post_ID'] : '-1';
check_admin_referer( 'wpcf7-save-contact-form_' . $id );
if ( ! current_user_can( 'wpcf7_edit_contact_form', $id ) ) {
wp_die( __( 'You are not allowed to edit this item.', 'contact-form-7' ) );
}
$args = $_REQUEST;
$args['id'] = $id;
$args['title'] = isset( $_POST['post_title'] )
? $_POST['post_title'] : null;
$args['locale'] = isset( $_POST['wpcf7-locale'] )
? $_POST['wpcf7-locale'] : null;
$args['form'] = isset( $_POST['wpcf7-form'] )
? $_POST['wpcf7-form'] : '';
$args['mail'] = isset( $_POST['wpcf7-mail'] )
? $_POST['wpcf7-mail'] : array();
$args['mail_2'] = isset( $_POST['wpcf7-mail-2'] )
? $_POST['wpcf7-mail-2'] : array();
$args['messages'] = isset( $_POST['wpcf7-messages'] )
? $_POST['wpcf7-messages'] : array();
$args['additional_settings'] = isset( $_POST['wpcf7-additional-settings'] )
? $_POST['wpcf7-additional-settings'] : '';
$contact_form = wpcf7_save_contact_form( $args );
if ( $contact_form and wpcf7_validate_configuration() ) {
$config_validator = new WPCF7_ConfigValidator( $contact_form );
$config_validator->validate();
$config_validator->save();
}
$query = array(
'post' => $contact_form ? $contact_form->id() : 0,
'active-tab' => isset( $_POST['active-tab'] )
? (int) $_POST['active-tab'] : 0,
);
if ( ! $contact_form ) {
$query['message'] = 'failed';
} elseif ( -1 == $id ) {
$query['message'] = 'created';
} else {
$query['message'] = 'saved';
}
$redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) );
wp_safe_redirect( $redirect_to );
exit();
}
if ( 'copy' == $action ) {
$id = empty( $_POST['post_ID'] )
? absint( $_REQUEST['post'] )
: absint( $_POST['post_ID'] );
check_admin_referer( 'wpcf7-copy-contact-form_' . $id );
if ( ! current_user_can( 'wpcf7_edit_contact_form', $id ) ) {
wp_die( __( 'You are not allowed to edit this item.', 'contact-form-7' ) );
}
$query = array();
if ( $contact_form = wpcf7_contact_form( $id ) ) {
$new_contact_form = $contact_form->copy();
$new_contact_form->save();
$query['post'] = $new_contact_form->id();
$query['message'] = 'created';
}
$redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) );
wp_safe_redirect( $redirect_to );
exit();
}
if ( 'delete' == $action ) {
if ( ! empty( $_POST['post_ID'] ) ) {
check_admin_referer( 'wpcf7-delete-contact-form_' . $_POST['post_ID'] );
} elseif ( ! is_array( $_REQUEST['post'] ) ) {
check_admin_referer( 'wpcf7-delete-contact-form_' . $_REQUEST['post'] );
} else {
check_admin_referer( 'bulk-posts' );
}
$posts = empty( $_POST['post_ID'] )
? (array) $_REQUEST['post']
: (array) $_POST['post_ID'];
$deleted = 0;
foreach ( $posts as $post ) {
$post = WPCF7_ContactForm::get_instance( $post );
if ( empty( $post ) ) {
continue;
}
if ( ! current_user_can( 'wpcf7_delete_contact_form', $post->id() ) ) {
wp_die( __( 'You are not allowed to delete this item.', 'contact-form-7' ) );
}
if ( ! $post->delete() ) {
wp_die( __( 'Error in deleting.', 'contact-form-7' ) );
}
$deleted += 1;
}
$query = array();
if ( ! empty( $deleted ) ) {
$query['message'] = 'deleted';
}
$redirect_to = add_query_arg( $query, menu_page_url( 'wpcf7', false ) );
wp_safe_redirect( $redirect_to );
exit();
}
$post = null;
if ( 'wpcf7-new' == $plugin_page ) {
$post = WPCF7_ContactForm::get_template( array(
'locale' => isset( $_GET['locale'] ) ? $_GET['locale'] : null,
) );
} elseif ( ! empty( $_GET['post'] ) ) {
$post = WPCF7_ContactForm::get_instance( $_GET['post'] );
}
$current_screen = get_current_screen();
$help_tabs = new WPCF7_Help_Tabs( $current_screen );
if ( $post
and current_user_can( 'wpcf7_edit_contact_form', $post->id() ) ) {
$help_tabs->set_help_tabs( 'edit' );
} else {
$help_tabs->set_help_tabs( 'list' );
if ( ! class_exists( 'WPCF7_Contact_Form_List_Table' ) ) {
require_once WPCF7_PLUGIN_DIR . '/admin/includes/class-contact-forms-list-table.php';
}
add_filter( 'manage_' . $current_screen->id . '_columns',
array( 'WPCF7_Contact_Form_List_Table', 'define_columns' ), 10, 0 );
add_screen_option( 'per_page', array(
'default' => 20,
'option' => 'cfseven_contact_forms_per_page',
) );
}
}
function wpcf7_admin_management_page() {
if ( $post = wpcf7_get_current_contact_form() ) {
$post_id = $post->initial() ? -1 : $post->id();
require_once WPCF7_PLUGIN_DIR . '/admin/includes/editor.php';
require_once WPCF7_PLUGIN_DIR . '/admin/edit-contact-form.php';
return;
}
if ( 'validate' == wpcf7_current_action()
and wpcf7_validate_configuration()
and current_user_can( 'wpcf7_edit_contact_forms' ) ) {
wpcf7_admin_bulk_validate_page();
return;
}
$list_table = new WPCF7_Contact_Form_List_Table();
$list_table->prepare_items();
?>
<div class="wrap" id="wpcf7-contact-form-list-table">
<h1 class="wp-heading-inline"><?php
echo esc_html( __( 'Contact Forms', 'contact-form-7' ) );
?></h1>
<?php
if ( current_user_can( 'wpcf7_edit_contact_forms' ) ) {
echo wpcf7_link(
menu_page_url( 'wpcf7-new', false ),
__( 'Add New', 'contact-form-7' ),
array( 'class' => 'page-title-action' )
);
}
if ( ! empty( $_REQUEST['s'] ) ) {
echo sprintf( '<span class="subtitle">'
/* translators: %s: search keywords */
. __( 'Search results for &#8220;%s&#8221;', 'contact-form-7' )
. '</span>', esc_html( $_REQUEST['s'] )
);
}
?>
<hr class="wp-header-end">
<?php
do_action( 'wpcf7_admin_warnings',
'wpcf7', wpcf7_current_action(), null );
wpcf7_welcome_panel();
do_action( 'wpcf7_admin_notices',
'wpcf7', wpcf7_current_action(), null );
?>
<form method="get" action="">
<input type="hidden" name="page" value="<?php echo esc_attr( $_REQUEST['page'] ); ?>" />
<?php $list_table->search_box( __( 'Search Contact Forms', 'contact-form-7' ), 'wpcf7-contact' ); ?>
<?php $list_table->display(); ?>
</form>
</div>
<?php
}
function wpcf7_admin_add_new_page() {
$post = wpcf7_get_current_contact_form();
if ( ! $post ) {
$post = WPCF7_ContactForm::get_template();
}
$post_id = -1;
require_once WPCF7_PLUGIN_DIR . '/admin/includes/editor.php';
require_once WPCF7_PLUGIN_DIR . '/admin/edit-contact-form.php';
}
function wpcf7_load_integration_page() {
do_action( 'wpcf7_admin_load',
isset( $_GET['page'] ) ? trim( $_GET['page'] ) : '',
wpcf7_current_action()
);
$integration = WPCF7_Integration::get_instance();
if ( isset( $_REQUEST['service'] )
and $integration->service_exists( $_REQUEST['service'] ) ) {
$service = $integration->get_service( $_REQUEST['service'] );
$service->load( wpcf7_current_action() );
}
$help_tabs = new WPCF7_Help_Tabs( get_current_screen() );
$help_tabs->set_help_tabs( 'integration' );
}
function wpcf7_admin_integration_page() {
$integration = WPCF7_Integration::get_instance();
$service = isset( $_REQUEST['service'] )
? $integration->get_service( $_REQUEST['service'] )
: null;
?>
<div class="wrap" id="wpcf7-integration">
<h1><?php echo esc_html( __( 'Integration with Other Services', 'contact-form-7' ) ); ?></h1>
<?php
do_action( 'wpcf7_admin_warnings',
'wpcf7-integration', wpcf7_current_action(), $service );
do_action( 'wpcf7_admin_notices',
'wpcf7-integration', wpcf7_current_action(), $service );
if ( $service ) {
$message = isset( $_REQUEST['message'] ) ? $_REQUEST['message'] : '';
$service->admin_notice( $message );
$integration->list_services( array( 'include' => $_REQUEST['service'] ) );
} else {
$integration->list_services();
}
?>
</div>
<?php
}
/* Misc */
add_action( 'wpcf7_admin_notices', 'wpcf7_admin_updated_message', 10, 3 );
function wpcf7_admin_updated_message( $page, $action, $object ) {
if ( ! in_array( $page, array( 'wpcf7', 'wpcf7-new' ) ) ) {
return;
}
if ( empty( $_REQUEST['message'] ) ) {
return;
}
if ( 'created' == $_REQUEST['message'] ) {
$updated_message = __( "Contact form created.", 'contact-form-7' );
} elseif ( 'saved' == $_REQUEST['message'] ) {
$updated_message = __( "Contact form saved.", 'contact-form-7' );
} elseif ( 'deleted' == $_REQUEST['message'] ) {
$updated_message = __( "Contact form deleted.", 'contact-form-7' );
}
if ( ! empty( $updated_message ) ) {
echo sprintf( '<div id="message" class="notice notice-success is-dismissible"><p>%s</p></div>', esc_html( $updated_message ) );
return;
}
if ( 'failed' == $_REQUEST['message'] ) {
$updated_message = __( "There was an error saving the contact form.",
'contact-form-7' );
echo sprintf( '<div id="message" class="notice notice-error is-dismissible"><p>%s</p></div>', esc_html( $updated_message ) );
return;
}
if ( 'validated' == $_REQUEST['message'] ) {
$bulk_validate = WPCF7::get_option( 'bulk_validate', array() );
$count_invalid = isset( $bulk_validate['count_invalid'] )
? absint( $bulk_validate['count_invalid'] ) : 0;
if ( $count_invalid ) {
$updated_message = sprintf(
_n(
/* translators: %s: number of contact forms */
"Configuration validation completed. %s invalid contact form was found.",
"Configuration validation completed. %s invalid contact forms were found.",
$count_invalid, 'contact-form-7'
),
number_format_i18n( $count_invalid )
);
echo sprintf( '<div id="message" class="notice notice-warning is-dismissible"><p>%s</p></div>', esc_html( $updated_message ) );
} else {
$updated_message = __( "Configuration validation completed. No invalid contact form was found.", 'contact-form-7' );
echo sprintf( '<div id="message" class="notice notice-success is-dismissible"><p>%s</p></div>', esc_html( $updated_message ) );
}
return;
}
}
add_filter( 'plugin_action_links', 'wpcf7_plugin_action_links', 10, 2 );
function wpcf7_plugin_action_links( $links, $file ) {
if ( $file != WPCF7_PLUGIN_BASENAME ) {
return $links;
}
if ( ! current_user_can( 'wpcf7_read_contact_forms' ) ) {
return $links;
}
$settings_link = wpcf7_link(
menu_page_url( 'wpcf7', false ),
__( 'Settings', 'contact-form-7' )
);
array_unshift( $links, $settings_link );
return $links;
}
add_action( 'wpcf7_admin_warnings', 'wpcf7_old_wp_version_error', 10, 3 );
function wpcf7_old_wp_version_error( $page, $action, $object ) {
$wp_version = get_bloginfo( 'version' );
if ( ! version_compare( $wp_version, WPCF7_REQUIRED_WP_VERSION, '<' ) ) {
return;
}
?>
<div class="notice notice-warning">
<p><?php
echo sprintf(
/* translators: 1: version of Contact Form 7, 2: version of WordPress, 3: URL */
__( '<strong>Contact Form 7 %1$s requires WordPress %2$s or higher.</strong> Please <a href="%3$s">update WordPress</a> first.', 'contact-form-7' ),
WPCF7_VERSION,
WPCF7_REQUIRED_WP_VERSION,
admin_url( 'update-core.php' )
);
?></p>
</div>
<?php
}
add_action( 'wpcf7_admin_warnings', 'wpcf7_not_allowed_to_edit', 10, 3 );
function wpcf7_not_allowed_to_edit( $page, $action, $object ) {
if ( $object instanceof WPCF7_ContactForm ) {
$contact_form = $object;
} else {
return;
}
if ( current_user_can( 'wpcf7_edit_contact_form', $contact_form->id() ) ) {
return;
}
$message = __( "You are not allowed to edit this contact form.",
'contact-form-7' );
echo sprintf(
'<div class="notice notice-warning"><p>%s</p></div>',
esc_html( $message ) );
}

View File

@@ -0,0 +1,72 @@
#wpcf7-contact-form-list-table span.shortcode input,
#wpcf7-contact-form-editor span.shortcode input {
color: #fff;
}
div.config-error, span.config-error, ul.config-error {
color: #bbc8d4;
}
.keyboard-interaction {
color: #bbc8d4;
}
#contact-form-editor .contact-form-editor-panel {
background-color: #32373c;
}
#contact-form-editor-tabs {
border-bottom: 1px solid #aaa;
}
#contact-form-editor-tabs li {
border: 1px solid #ccc;
border-bottom: 1px solid #aaa;
background-color: #37444c;
}
#contact-form-editor-tabs li:hover {
background-color: #000;
}
#contact-form-editor-tabs li.ui-tabs-active,
#contact-form-editor-tabs li.ui-tabs-active:hover {
border-top: 1px solid #aaa;
border-right: 1px solid #aaa;
border-left: 1px solid #aaa;
border-bottom: 1px solid #32373c;
background-color: #32373c;
}
#contact-form-editor-tabs li a {
color: #bbc8d4;
}
#contact-form-editor-tabs li.ui-tabs-active a {
color: #fff;
}
#contact-form-editor-tabs li a:hover {
color: #fff;
}
.contact-form-editor-box-mail span.mailtag {
color: #ddd;
}
.contact-form-editor-box-mail span.mailtag.used {
color: #999;
}
#mail-panel .contact-form-editor-box-mail table.form-table tr th,
#mail-panel .contact-form-editor-box-mail table.form-table tr td {
background-color: #32373c;
}
div.wrap#wpcf7-integration .card.active {
border-color: #00a0d2;
}
div.wrap#wpcf7-integration .card .infobox {
color: #aaa;
}

View File

@@ -0,0 +1,62 @@
/*
* Tabs
*/
#contact-form-editor-tabs {
padding: 9px 10px 0 15px;
}
/*
* Form Tab
*/
.tag-generator-panel {
text-align: right;
}
.tag-generator-panel .control-box > fieldset legend {
border: 1px solid #dfdfdf;
border-right: 4px solid #00a0d2;
}
.tag-generator-panel .insert-box input.tag {
float: right;
}
.tag-generator-panel .insert-box .submitbox input[type="button"] {
float: left;
}
/*
* Mail Tab
*/
.contact-form-editor-box-mail span.mailtag {
margin: 0 4px 0 0;
}
/*
* Welcome Panel
*/
.welcome-panel .welcome-panel-column,
.welcome-panel .welcome-panel-column:first-child {
padding: 0 0 0 2%;
}
/*
* Integration
*/
.card {
border-left: 1px solid #e5e5e5;
border-right: 4px solid #e5e5e5;
}
.card img.icon {
float: right;
margin: 8px -8px 8px 8px;
}
.card h2.title {
float: right;
}
.card .infobox {
float: left;
}

View File

@@ -0,0 +1,439 @@
#titlediv .inside p.description {
margin: 8px 2px 0;
}
#titlediv .inside p.description label {
cursor: pointer;
}
span.shortcode {
display: block;
margin: 2px 0;
}
span.shortcode.old {
background: #777;
color: #fff;
}
span.shortcode input {
font-size: 12px;
border: none;
box-shadow: none;
padding: 4px 8px;
margin: 0;
}
#wpcf7-contact-form-list-table span.shortcode input,
#wpcf7-contact-form-editor span.shortcode input {
background: transparent;
}
#wpcf7-contact-form-list-table span.shortcode input {
color: #444;
}
#wpcf7-contact-form-editor span.shortcode input {
color: #fff;
}
#submitpost input.copy {
margin-bottom: 10px;
}
#submitpost input.delete {
padding: 0;
margin: 0;
border: none;
cursor: pointer;
background: inherit;
color: #a00;
}
#submitpost input.delete:hover {
color: #f00;
}
#submitpost input.delete:focus {
outline: thin dotted;
}
.postbox-container .postbox h3 {
border-bottom: 1px solid transparent;
}
.keyboard-interaction {
visibility: hidden;
color: #23282d;
}
div.config-error, span.config-error, ul.config-error {
color: #444;
font-style: normal;
font-size: 13px;
}
ul.config-error {
margin: 2px 0;
}
ul.config-error li {
list-style: none;
padding: 2px 2px;
margin: 0;
}
[data-config-field][aria-invalid="true"] {
border-color: #d00;
}
#contact-form-editor-tabs li a .icon-in-circle,
#contact-form-editor .config-error .icon-in-circle,
.wp-list-table .config-error .icon-in-circle,
.icon-in-circle {
display: inline-block;
vertical-align: text-top;
margin: 1px 6px 0;
padding: 0 5px;
min-width: 7px;
height: 17px;
border-radius: 11px;
background-color: #ca4a1f;
color: #fff;
font-size: 12px;
font-weight: bold;
line-height: 17px;
text-align: center;
z-index: 26;
}
/*
* Tabs
*/
#contact-form-editor-tabs {
border-bottom: 1px solid #aaa;
padding: 9px 15px 0 10px;
margin: 0;
}
#contact-form-editor-tabs li {
display: inline-block;
list-style: none;
border: 1px solid #ccc;
border-bottom: 1px solid #aaa;
padding: 0;
margin: 0 4px -1px;
background-color: #e4e4e4;
}
#contact-form-editor-tabs li:hover {
background-color: #fff;
}
#contact-form-editor-tabs li.ui-tabs-active,
#contact-form-editor-tabs li.ui-tabs-active:hover {
border-top: 1px solid #aaa;
border-right: 1px solid #aaa;
border-left: 1px solid #aaa;
border-bottom: 1px solid #f5f5f5;
background-color: #f5f5f5;
}
#contact-form-editor-tabs li a {
padding: 6px 10px;
font-size: 14px;
font-weight: normal;
line-height: 30px;
color: #333;
text-decoration: none;
}
#contact-form-editor-tabs li.ui-tabs-active a {
color: #000;
font-size: 14px;
font-weight: bold;
}
#contact-form-editor-tabs li a:hover {
color: #000;
}
#contact-form-editor .contact-form-editor-panel > div.config-error {
margin-bottom: 1.4em;
}
#contact-form-editor-tabs li.ui-tabs-active a .icon-in-circle {
display: none;
}
#contact-form-editor .contact-form-editor-panel h2 {
font-size: 18px;
font-weight: 400;
line-height: 24px;
margin: 8px 0;
padding: 0;
}
#contact-form-editor .contact-form-editor-panel {
background-color: #f5f5f5;
border: 1px solid #aaa;
border-top: none;
padding: 16px;
}
#contact-form-editor .form-table th {
width: 100px;
}
#contact-form-editor .contact-form-editor-panel fieldset legend {
line-height: 1.5;
margin: .6em 0 .4em;
}
/*
* Form Tab
*/
#tag-generator-list a.button {
font-size: 12px;
height: 26px;
line-height: 24px;
margin: 2px;
padding: 0 8px 1px;
}
.tag-generator-panel {
position: relative;
height: 495px;
}
.tag-generator-panel .control-box {
padding: 0;
margin: 0;
height: 380px;
overflow: auto;
}
.tag-generator-panel .control-box > fieldset legend {
border: 1px solid #dfdfdf;
border-left: 4px solid #00a0d2;
background: #f7fcfe;
padding: 4px 12px;
margin: 4px 0;
line-height: 1.4em;
width: 95%;
}
.tag-generator-panel table {
width: 100%;
}
.tag-generator-panel table.form-table th {
width: 120px;
padding: 4px 10px 4px 0;
font-size: 13px;
}
.tag-generator-panel table.form-table td {
padding: 4px 10px;
font-size: 13px;
}
.tag-generator-panel .control-box input.oneline {
width: 200px;
}
.tag-generator-panel .control-box input.large-text {
width: 400px;
}
.tag-generator-panel .control-box textarea.values {
width: 200px;
height: 6em;
}
.tag-generator-panel .control-box input[type="number"],
.tag-generator-panel .control-box input[type="date"] {
width: 88px;
}
.tag-generator-panel .control-box table caption {
text-align: left;
font-size: 110%;
font-weight: bold;
color: #777;
margin: 10px 0 5px;
}
.tag-generator-panel .control-box table.form-table td label {
line-height: 1.1em;
}
.tag-generator-panel .control-box table.form-table td label .description {
line-height: 1.4em;
}
.tag-generator-panel .insert-box {
position: absolute;
left: -15px;
right: -15px;
bottom: -15px;
width: 100%;
height: 84px;
margin: 0;
padding: 8px 16px;
background-color: #fcfcfc;
border-top: 1px solid #dfdfdf;
overflow: auto;
}
.tag-generator-panel .insert-box input.tag {
width: 480px;
float: left;
background-color: transparent;
box-shadow: none;
}
.tag-generator-panel .insert-box .submitbox {
padding: 2px 4px;
}
.tag-generator-panel .insert-box .submitbox input[type="button"] {
float: right;
}
.tag-generator-panel .insert-box .description label {
cursor: text;
}
/*
* Mail Tab
*/
.contact-form-editor-box-mail span.mailtag {
display: inline-block;
margin: 0 0 0 4px;
padding: 1px 2px;
cursor: pointer;
color: #000;
}
.contact-form-editor-box-mail span.mailtag.used {
color: #666;
}
.contact-form-editor-box-mail span.mailtag.unused {
font-weight: bold;
}
/*
* Messages Tab
*/
#messages-panel p.description {
margin: 5px 0 10px;
}
/*
* List Table
*/
.fixed .column-title {
width: 38%;
}
.fixed .column-shortcode {
width: 38%;
}
/*
* Welcome Panel
*/
.welcome-panel .welcome-panel-column,
.welcome-panel .welcome-panel-column:first-child {
width: 48%;
padding: 0 2% 0 0;
margin: 0 0 1em 0;
}
@media screen and (max-width: 870px) {
.welcome-panel .welcome-panel-column,
.welcome-panel .welcome-panel-column:first-child {
display: block;
float: none;
width: 100%;
}
}
.welcome-panel h3 {
font-size: 16px;
font-weight: 600;
line-height: 2.1em;
margin: 1em 0 1.2em;
}
.welcome-panel h3 .dashicons {
position: relative;
top: -2px;
display: inline-block;
width: 60px;
color: #575757;
font-size: 40px;
}
.welcome-panel p a {
font-weight: bold;
}
.welcome-panel-close {
z-index: 2;
}
/*
* Integration
*/
.card {
background: #fff none repeat scroll 0 0;
border: 1px solid #e5e5e5;
border-left: 4px solid #e5e5e5;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
margin-top: 20px;
max-width: 520px;
min-width: 255px;
padding: 0.7em 2em 1em;
position: relative;
}
.card.active {
border-color: #00a0d2;
}
.card img.icon {
float: left;
margin: 8px 8px 8px -8px;
}
.card h2.title {
float: left;
max-width: 240px;
font-size: 1.3em;
font-weight: 600;
}
.card .infobox {
float: right;
font-size: 13px;
color: #666;
margin: 2px 0 5px;
line-height: 1.5;
max-width: 240px;
}
.card .inside .form-table th {
padding: 15px 10px 15px 0;
width: 160px;
}
.card .inside .form-table td {
padding: 10px 10px;
}
.card .checkboxes li {
margin: 0;
}

View File

@@ -0,0 +1,296 @@
<?php
// don't load directly
if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}
function wpcf7_admin_save_button( $post_id ) {
static $button = '';
if ( ! empty( $button ) ) {
echo $button;
return;
}
$nonce = wp_create_nonce( 'wpcf7-save-contact-form_' . $post_id );
$onclick = sprintf(
"this.form._wpnonce.value = '%s';"
. " this.form.action.value = 'save';"
. " return true;",
$nonce );
$button = sprintf(
'<input type="submit" class="button-primary" name="wpcf7-save" value="%1$s" onclick="%2$s" />',
esc_attr( __( 'Save', 'contact-form-7' ) ),
$onclick );
echo $button;
}
?><div class="wrap" id="wpcf7-contact-form-editor">
<h1 class="wp-heading-inline"><?php
if ( $post->initial() ) {
echo esc_html( __( 'Add New Contact Form', 'contact-form-7' ) );
} else {
echo esc_html( __( 'Edit Contact Form', 'contact-form-7' ) );
}
?></h1>
<?php
if ( ! $post->initial()
and current_user_can( 'wpcf7_edit_contact_forms' ) ) {
echo wpcf7_link(
menu_page_url( 'wpcf7-new', false ),
__( 'Add New', 'contact-form-7' ),
array( 'class' => 'page-title-action' )
);
}
?>
<hr class="wp-header-end">
<?php
do_action( 'wpcf7_admin_warnings',
$post->initial() ? 'wpcf7-new' : 'wpcf7',
wpcf7_current_action(),
$post
);
do_action( 'wpcf7_admin_notices',
$post->initial() ? 'wpcf7-new' : 'wpcf7',
wpcf7_current_action(),
$post
);
?>
<?php
if ( $post ) :
if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) {
$disabled = '';
} else {
$disabled = ' disabled="disabled"';
}
?>
<form method="post" action="<?php echo esc_url( add_query_arg( array( 'post' => $post_id ), menu_page_url( 'wpcf7', false ) ) ); ?>" id="wpcf7-admin-form-element"<?php do_action( 'wpcf7_post_edit_form_tag' ); ?>>
<?php
if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) {
wp_nonce_field( 'wpcf7-save-contact-form_' . $post_id );
}
?>
<input type="hidden" id="post_ID" name="post_ID" value="<?php echo (int) $post_id; ?>" />
<input type="hidden" id="wpcf7-locale" name="wpcf7-locale" value="<?php echo esc_attr( $post->locale() ); ?>" />
<input type="hidden" id="hiddenaction" name="action" value="save" />
<input type="hidden" id="active-tab" name="active-tab" value="<?php echo isset( $_GET['active-tab'] ) ? (int) $_GET['active-tab'] : '0'; ?>" />
<div id="poststuff">
<div id="post-body" class="metabox-holder columns-2">
<div id="post-body-content">
<div id="titlediv">
<div id="titlewrap">
<label class="screen-reader-text" id="title-prompt-text" for="title"><?php echo esc_html( __( 'Enter title here', 'contact-form-7' ) ); ?></label>
<?php
$posttitle_atts = array(
'type' => 'text',
'name' => 'post_title',
'size' => 30,
'value' => $post->initial() ? '' : $post->title(),
'id' => 'title',
'spellcheck' => 'true',
'autocomplete' => 'off',
'disabled' =>
current_user_can( 'wpcf7_edit_contact_form', $post_id ) ? '' : 'disabled',
);
echo sprintf( '<input %s />', wpcf7_format_atts( $posttitle_atts ) );
?>
</div><!-- #titlewrap -->
<div class="inside">
<?php
if ( ! $post->initial() ) :
?>
<p class="description">
<label for="wpcf7-shortcode"><?php echo esc_html( __( "Copy this shortcode and paste it into your post, page, or text widget content:", 'contact-form-7' ) ); ?></label>
<span class="shortcode wp-ui-highlight"><input type="text" id="wpcf7-shortcode" onfocus="this.select();" readonly="readonly" class="large-text code" value="<?php echo esc_attr( $post->shortcode() ); ?>" /></span>
</p>
<?php
if ( $old_shortcode = $post->shortcode( array( 'use_old_format' => true ) ) ) :
?>
<p class="description">
<label for="wpcf7-shortcode-old"><?php echo esc_html( __( "You can also use this old-style shortcode:", 'contact-form-7' ) ); ?></label>
<span class="shortcode old"><input type="text" id="wpcf7-shortcode-old" onfocus="this.select();" readonly="readonly" class="large-text code" value="<?php echo esc_attr( $old_shortcode ); ?>" /></span>
</p>
<?php
endif;
endif;
?>
</div>
</div><!-- #titlediv -->
</div><!-- #post-body-content -->
<div id="postbox-container-1" class="postbox-container">
<?php if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) : ?>
<div id="submitdiv" class="postbox">
<h3><?php echo esc_html( __( 'Status', 'contact-form-7' ) ); ?></h3>
<div class="inside">
<div class="submitbox" id="submitpost">
<div id="minor-publishing-actions">
<div class="hidden">
<input type="submit" class="button-primary" name="wpcf7-save" value="<?php echo esc_attr( __( 'Save', 'contact-form-7' ) ); ?>" />
</div>
<?php
if ( ! $post->initial() ) :
$copy_nonce = wp_create_nonce( 'wpcf7-copy-contact-form_' . $post_id );
?>
<input type="submit" name="wpcf7-copy" class="copy button" value="<?php echo esc_attr( __( 'Duplicate', 'contact-form-7' ) ); ?>" <?php echo "onclick=\"this.form._wpnonce.value = '$copy_nonce'; this.form.action.value = 'copy'; return true;\""; ?> />
<?php endif; ?>
</div><!-- #minor-publishing-actions -->
<div id="misc-publishing-actions">
<?php do_action( 'wpcf7_admin_misc_pub_section', $post_id ); ?>
</div><!-- #misc-publishing-actions -->
<div id="major-publishing-actions">
<?php
if ( ! $post->initial() ) :
$delete_nonce = wp_create_nonce( 'wpcf7-delete-contact-form_' . $post_id );
?>
<div id="delete-action">
<input type="submit" name="wpcf7-delete" class="delete submitdelete" value="<?php echo esc_attr( __( 'Delete', 'contact-form-7' ) ); ?>" <?php echo "onclick=\"if (confirm('" . esc_js( __( "You are about to delete this contact form.\n 'Cancel' to stop, 'OK' to delete.", 'contact-form-7' ) ) . "')) {this.form._wpnonce.value = '$delete_nonce'; this.form.action.value = 'delete'; return true;} return false;\""; ?> />
</div><!-- #delete-action -->
<?php endif; ?>
<div id="publishing-action">
<span class="spinner"></span>
<?php wpcf7_admin_save_button( $post_id ); ?>
</div>
<div class="clear"></div>
</div><!-- #major-publishing-actions -->
</div><!-- #submitpost -->
</div>
</div><!-- #submitdiv -->
<?php endif; ?>
<div id="informationdiv" class="postbox">
<h3><?php echo esc_html( __( "Do you need help?", 'contact-form-7' ) ); ?></h3>
<div class="inside">
<p><?php echo esc_html( __( "Here are some available options to help solve your problems.", 'contact-form-7' ) ); ?></p>
<ol>
<li><?php echo sprintf(
/* translators: 1: FAQ, 2: Docs ("FAQ & Docs") */
__( '%1$s &#38; %2$s', 'contact-form-7' ),
wpcf7_link(
__( 'https://contactform7.com/faq/', 'contact-form-7' ),
__( 'FAQ', 'contact-form-7' )
),
wpcf7_link(
__( 'https://contactform7.com/docs/', 'contact-form-7' ),
__( 'Docs', 'contact-form-7' )
)
); ?></li>
<li><?php echo wpcf7_link(
__( 'https://wordpress.org/support/plugin/contact-form-7/', 'contact-form-7' ),
__( 'Support Forums', 'contact-form-7' )
); ?></li>
<li><?php echo wpcf7_link(
__( 'https://contactform7.com/custom-development/', 'contact-form-7' ),
__( 'Professional Services', 'contact-form-7' )
); ?></li>
</ol>
</div>
</div><!-- #informationdiv -->
</div><!-- #postbox-container-1 -->
<div id="postbox-container-2" class="postbox-container">
<div id="contact-form-editor">
<div class="keyboard-interaction"><?php
echo sprintf(
/* translators: 1: ◀ ▶ dashicon, 2: screen reader text for the dashicon */
esc_html( __( '%1$s %2$s keys switch panels', 'contact-form-7' ) ),
'<span class="dashicons dashicons-leftright" aria-hidden="true"></span>',
sprintf(
'<span class="screen-reader-text">%s</span>',
/* translators: screen reader text */
esc_html( __( '(left and right arrow)', 'contact-form-7' ) )
)
);
?></div>
<?php
$editor = new WPCF7_Editor( $post );
$panels = array();
if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) {
$panels = array(
'form-panel' => array(
'title' => __( 'Form', 'contact-form-7' ),
'callback' => 'wpcf7_editor_panel_form',
),
'mail-panel' => array(
'title' => __( 'Mail', 'contact-form-7' ),
'callback' => 'wpcf7_editor_panel_mail',
),
'messages-panel' => array(
'title' => __( 'Messages', 'contact-form-7' ),
'callback' => 'wpcf7_editor_panel_messages',
),
);
$additional_settings = trim( $post->prop( 'additional_settings' ) );
$additional_settings = explode( "\n", $additional_settings );
$additional_settings = array_filter( $additional_settings );
$additional_settings = count( $additional_settings );
$panels['additional-settings-panel'] = array(
'title' => $additional_settings
? sprintf(
/* translators: %d: number of additional settings */
__( 'Additional Settings (%d)', 'contact-form-7' ),
$additional_settings )
: __( 'Additional Settings', 'contact-form-7' ),
'callback' => 'wpcf7_editor_panel_additional_settings',
);
}
$panels = apply_filters( 'wpcf7_editor_panels', $panels );
foreach ( $panels as $id => $panel ) {
$editor->add_panel( $id, $panel['title'], $panel['callback'] );
}
$editor->display();
?>
</div><!-- #contact-form-editor -->
<?php if ( current_user_can( 'wpcf7_edit_contact_form', $post_id ) ) : ?>
<p class="submit"><?php wpcf7_admin_save_button( $post_id ); ?></p>
<?php endif; ?>
</div><!-- #postbox-container-2 -->
</div><!-- #post-body -->
<br class="clear" />
</div><!-- #poststuff -->
</form>
<?php endif; ?>
</div><!-- .wrap -->
<?php
$tag_generator = WPCF7_TagGenerator::get_instance();
$tag_generator->print_panels( $post );
do_action( 'wpcf7_admin_footer', $post );

View File

@@ -0,0 +1,22 @@
<?php
function wpcf7_current_action() {
if ( isset( $_REQUEST['action'] ) and -1 != $_REQUEST['action'] ) {
return $_REQUEST['action'];
}
if ( isset( $_REQUEST['action2'] ) and -1 != $_REQUEST['action2'] ) {
return $_REQUEST['action2'];
}
return false;
}
function wpcf7_admin_has_edit_cap() {
return current_user_can( 'wpcf7_edit_contact_forms' );
}
function wpcf7_add_tag_generator( $name, $title, $elm_id, $callback, $options = array() ) {
$tag_generator = WPCF7_TagGenerator::get_instance();
return $tag_generator->add( $name, $title, $callback, $options );
}

View File

@@ -0,0 +1,255 @@
<?php
if ( ! class_exists( 'WP_List_Table' ) ) {
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
}
class WPCF7_Contact_Form_List_Table extends WP_List_Table {
public static function define_columns() {
$columns = array(
'cb' => '<input type="checkbox" />',
'title' => __( 'Title', 'contact-form-7' ),
'shortcode' => __( 'Shortcode', 'contact-form-7' ),
'author' => __( 'Author', 'contact-form-7' ),
'date' => __( 'Date', 'contact-form-7' ),
);
return $columns;
}
public function __construct() {
parent::__construct( array(
'singular' => 'post',
'plural' => 'posts',
'ajax' => false,
) );
}
public function prepare_items() {
$current_screen = get_current_screen();
$per_page = $this->get_items_per_page( 'cfseven_contact_forms_per_page' );
$args = array(
'posts_per_page' => $per_page,
'orderby' => 'title',
'order' => 'ASC',
'offset' => ( $this->get_pagenum() - 1 ) * $per_page,
);
if ( ! empty( $_REQUEST['s'] ) ) {
$args['s'] = $_REQUEST['s'];
}
if ( ! empty( $_REQUEST['orderby'] ) ) {
if ( 'title' == $_REQUEST['orderby'] ) {
$args['orderby'] = 'title';
} elseif ( 'author' == $_REQUEST['orderby'] ) {
$args['orderby'] = 'author';
} elseif ( 'date' == $_REQUEST['orderby'] ) {
$args['orderby'] = 'date';
}
}
if ( ! empty( $_REQUEST['order'] ) ) {
if ( 'asc' == strtolower( $_REQUEST['order'] ) ) {
$args['order'] = 'ASC';
} elseif ( 'desc' == strtolower( $_REQUEST['order'] ) ) {
$args['order'] = 'DESC';
}
}
$this->items = WPCF7_ContactForm::find( $args );
$total_items = WPCF7_ContactForm::count();
$total_pages = ceil( $total_items / $per_page );
$this->set_pagination_args( array(
'total_items' => $total_items,
'total_pages' => $total_pages,
'per_page' => $per_page,
) );
}
public function get_columns() {
return get_column_headers( get_current_screen() );
}
protected function get_sortable_columns() {
$columns = array(
'title' => array( 'title', true ),
'author' => array( 'author', false ),
'date' => array( 'date', false ),
);
return $columns;
}
protected function get_bulk_actions() {
$actions = array(
'delete' => __( 'Delete', 'contact-form-7' ),
);
return $actions;
}
protected function column_default( $item, $column_name ) {
return '';
}
public function column_cb( $item ) {
return sprintf(
'<input type="checkbox" name="%1$s[]" value="%2$s" />',
$this->_args['singular'],
$item->id()
);
}
public function column_title( $item ) {
$edit_link = add_query_arg(
array(
'post' => absint( $item->id() ),
'action' => 'edit',
),
menu_page_url( 'wpcf7', false )
);
$output = sprintf(
'<a class="row-title" href="%1$s" aria-label="%2$s">%3$s</a>',
esc_url( $edit_link ),
esc_attr( sprintf(
/* translators: %s: title of contact form */
__( 'Edit &#8220;%s&#8221;', 'contact-form-7' ),
$item->title()
) ),
esc_html( $item->title() )
);
$output = sprintf( '<strong>%s</strong>', $output );
if ( wpcf7_validate_configuration()
and current_user_can( 'wpcf7_edit_contact_form', $item->id() ) ) {
$config_validator = new WPCF7_ConfigValidator( $item );
$config_validator->restore();
if ( $count_errors = $config_validator->count_errors() ) {
$error_notice = sprintf(
_n(
/* translators: %s: number of errors detected */
'%s configuration error detected',
'%s configuration errors detected',
$count_errors, 'contact-form-7' ),
number_format_i18n( $count_errors )
);
$output .= sprintf(
'<div class="config-error"><span class="icon-in-circle" aria-hidden="true">!</span> %s</div>',
$error_notice
);
}
}
return $output;
}
protected function handle_row_actions( $item, $column_name, $primary ) {
if ( $column_name !== $primary ) {
return '';
}
$edit_link = add_query_arg(
array(
'post' => absint( $item->id() ),
'action' => 'edit',
),
menu_page_url( 'wpcf7', false )
);
$actions = array(
'edit' => wpcf7_link( $edit_link, __( 'Edit', 'contact-form-7' ) ),
);
if ( current_user_can( 'wpcf7_edit_contact_form', $item->id() ) ) {
$copy_link = add_query_arg(
array(
'post' => absint( $item->id() ),
'action' => 'copy',
),
menu_page_url( 'wpcf7', false )
);
$copy_link = wp_nonce_url(
$copy_link,
'wpcf7-copy-contact-form_' . absint( $item->id() )
);
$actions = array_merge( $actions, array(
'copy' => wpcf7_link( $copy_link, __( 'Duplicate', 'contact-form-7' ) ),
) );
}
return $this->row_actions( $actions );
}
public function column_author( $item ) {
$post = get_post( $item->id() );
if ( ! $post ) {
return;
}
$author = get_userdata( $post->post_author );
if ( false === $author ) {
return;
}
return esc_html( $author->display_name );
}
public function column_shortcode( $item ) {
$shortcodes = array( $item->shortcode() );
$output = '';
foreach ( $shortcodes as $shortcode ) {
$output .= "\n" . '<span class="shortcode"><input type="text"'
. ' onfocus="this.select();" readonly="readonly"'
. ' value="' . esc_attr( $shortcode ) . '"'
. ' class="large-text code" /></span>';
}
return trim( $output );
}
public function column_date( $item ) {
$post = get_post( $item->id() );
if ( ! $post ) {
return;
}
$t_time = mysql2date( __( 'Y/m/d g:i:s A', 'contact-form-7' ),
$post->post_date, true );
$m_time = $post->post_date;
$time = mysql2date( 'G', $post->post_date )
- get_option( 'gmt_offset' ) * 3600;
$time_diff = time() - $time;
if ( $time_diff > 0 and $time_diff < 24*60*60 ) {
$h_time = sprintf(
/* translators: %s: time since the creation of the contact form */
__( '%s ago', 'contact-form-7' ),
human_time_diff( $time )
);
} else {
$h_time = mysql2date( __( 'Y/m/d', 'contact-form-7' ), $m_time );
}
return sprintf( '<abbr title="%2$s">%1$s</abbr>',
esc_html( $h_time ),
esc_attr( $t_time )
);
}
}

Some files were not shown because too many files have changed in this diff Show More