=== ACS Portfolio ===
Contributors: hanchan
Tags: portfolio, projects, showcase, gallery, downloads
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A portfolio you can filter without a page reload, and, when you want it, a download page that counts how often each file is taken.

== Description ==

A portfolio is two things at once: a wall of work you are proud of, and a list somebody has to keep tidy. **ACS Portfolio** is built for the second half.

Your work lives in its own post type, away from your blog posts. Each item carries the details a portfolio actually needs — the client, the finished site, when the work ran, what it was built with — and you place the whole thing on a page with one shortcode.

= Filtering that does not reload the page =

Categories become buttons above the grid. Pressing one fetches the matching items over Ajax and fades them in; the visitor never leaves the page or loses their place. A sort drop-down sits next to it: newest, oldest, or by title.

Both are optional. `show_filter="false"` and `show_sort="false"` turn them off when you only want a clean grid.

= Fields that belong to a project =

* **Client** — printed under the title on the card
* **Project URL** — adds a link straight to the finished work
* **Started** and **Finished** — either one on its own is fine
* **Tools and technology** — a comma separated list

= A download library, if that is what you need =

Switch on **download library mode** and the same portfolio becomes a page that hands out files. Each item gets a download button, a like button, the terms of use you wrote, and a running count of both.

* The file is whatever you pick from your own media library. Nothing else can be linked, and file types that can carry code — SVG, HTML, PHP, shell scripts and the like — are refused
* The download link is an ordinary link, so the count is right even for visitors with JavaScript switched off
* The same visitor clicking twice inside five minutes counts once
* A like is one per visitor and can be taken back
* Pick which categories are handed out, and finished work and downloadable files can live side by side in one portfolio
* The post list gains **Downloads** and **Likes** columns, and both sort
* Counters are read only. There is a reset for one item and a reset for everything, for after a test run

With the mode switched off, none of this is added to your pages.

= What it does not do =

There is no telemetry, no license check, no update server, no external font and no analytics script. Nothing leaves your site.

The one optional exception is a browser side event: if you tick **Analytics event** and your theme or your analytics plugin has already loaded `gtag`, a click on a download or a like sends a `cta_click` event to the analytics account **you** configured. This plugin loads no analytics code of its own, and with the box unticked it sends nothing.

= Coming from ACS Portfolio Pro 3.x =

If this site already holds items from ACS Portfolio Pro 3.x, deactivate that plugin and a notice offers to import them. The import moves the items, their categories and their fields over. Nothing is deleted — the old values stay on each item — and it only runs when you press the button.

== Installation ==

1. Upload the plugin under Plugins > Add New > Upload Plugin, then activate it
2. Open **Portfolio > Categories** and add the categories you want as filter buttons
3. Open **Portfolio > Add New** and write your first item. Set a featured image; the card uses it
4. Put `[acs_portfolio]` on any page
5. Optional: open **Portfolio > Settings** to switch on the download library

Shortcode attributes:

* `limit="6"` — show at most this many items, `-1` for all
* `category="web-design"` — one category only, or several separated by commas
* `show_filter="false"` — hide the category buttons
* `show_sort="false"` — hide the sort drop-down
* `download_only="true"` — show only the categories that are handed out as downloads

== Frequently Asked Questions ==

= Do I have to use the download library? =

No. It is off when you install the plugin, and while it is off nothing is added to the front end — no buttons, no counters, no extra markup. Switch it on only if you want the portfolio to hand out files.

= Which files can be handed out? =

Only attachments that are already in this site's media library. Anything that can carry code is refused: SVG, HTML, XML, JavaScript, PHP, shell scripts and Windows executables. If you do not pick a file, the full size featured image is offered instead, which is what a photo or texture library usually wants.

= Are the download counts accurate? =

They count a real request for the file, not a click, so they are still right for visitors with JavaScript switched off. The same visitor is only counted once every five minutes, so a double click or a retry does not inflate the number. Likes are one per visitor, remembered in a cookie and, as a backstop, in a short lived record keyed by a hash of the address — the address itself is never stored.

= Does anything leave my site? =

Nothing is sent by the plugin. It has no license check, no update server and no telemetry, and it loads no font or script from anywhere else. The one thing that can leave the visitor's browser is the optional `cta_click` analytics event, and only when you tick that box and your site has already loaded `gtag` for your own analytics account.

= Can I change how a card looks? =

Yes. Copy `templates/portfolio-item.php` out of the plugin, put it in your theme, and point the `acs_portfolio_item_template` filter at your copy. The query, the wrapper classes, the sort options and the shortcode attributes each have a filter as well.

= I already use ACS Portfolio Pro 3. What happens to my items? =

Deactivate version 3 first, then activate this plugin. A notice tells you how many items it found and offers to import them. The import keeps the items, the categories and every field; the old values are left on each item, so nothing is destroyed if you change your mind. Afterwards open Settings > Permalinks and press Save once so the links are rebuilt.

= Where do I ask for help? =

At https://acs-developer.com/forum/ — please include your WordPress version, your PHP version and the shortcode you used.

== Screenshots ==

1. The portfolio on the front end: a responsive grid with Ajax category buttons and a sort drop-down.
2. Editing one portfolio item. Client, project URL, start and finish dates and the tools you used are all optional.
3. The settings screen, where the download library mode, the categories to hand out, the terms of use and the button text are set.
4. Download library mode switched on: every card gains a download button, a like button, the counts and your terms of use.
5. The portfolio list in the admin, with sortable Downloads and Likes columns.

== 日本語 ==

WordPress にポートフォリオ用の投稿タイプを追加し、カテゴリ絞り込み（Ajax・ページ再読込なし）、並び替え、レスポンシブなグリッド表示、クライアント名・URL・期間・使用技術のカスタムフィールドを提供します。ショートコードは `[acs_portfolio]` です。

「ダウンロード集モード」をONにすると、実績紹介ではなく素材・テンプレートの配布ページとして使えます。ダウンロードボタン・高評価ボタン・利用条件の表示と、ダウンロード数・高評価数の記録が有効になり、投稿一覧に「Downloads」「Likes」列が追加されます。配布ファイルは自サイトのメディアライブラリのものだけで、SVG など危険な形式は選べません。既定はOFFで、OFFの間はフロントに何も追加されません。

ライセンス認証・更新サーバー・外部送信・トラッキングはありません。GA4イベント（`cta_click`）の送出だけは設定でONにでき、その場合もサイト側にすでに `gtag` が読み込まれているときにのみ動作します。

管理画面は英語表記です。翻訳は translate.wordpress.org で提供され、訳が揃うと WordPress が自動で取得します（プラグインに翻訳ファイルは同梱していません）。

サポート窓口: https://acs-developer.com/forum/

== Changelog ==

= 1.0.0 =
* First release.
