# Custom Post Type Permalinks 3.3.1 をリリースしました。

- リンク: https://torounit.com/blog/custom-post-type-permalinks-3-3-1-%e3%82%92%e3%83%aa%e3%83%aa%e3%83%bc%e3%82%b9%e3%81%97%e3%81%be%e3%81%97%e3%81%9f%e3%80%82/
- 公開日: 2018-12-14T13:12:19+09:00
- 作成者: Toro\_Unit

[Custom Post Type Permalinks](https://wordpress.org/plugins/custom-post-type-permalinks/)
を久々にアップデートしました。

ちゃんとリリースノートとか書かねばとは思うのですが、取り急ぎ、ざっくりとした変更
点の解説。

## 日付・著者での投稿タイプアーカイブの無効化

デフォルトで有効になっていますが、`register_post_type` の設定でこれらを無効化できる
ようにしました。

    ```wp-block-code
    register_post_type( 'foo',
        array(
            'public' => true,
            'has_archive' => true,
            'cptp' => array(
                'author_archive' => false,
                'date_archive' => false,
            )
        )
    );
    ```

## PHP でのパーマリンク設定

以前にも似たような機能はありましたが、以下のようにしてパーマリンクの設定を出来る
ようにしています。

    ```wp-block-code
    register_post_type( 'foo',
        array(
            'public' => true,
            'has_archive' => true,
            'cptp' => array(
                'permalink_structure' => '%post_id%',
            )
        )
    );
    ```

## その他

 * 階層無しのタクソノミーでも階層ありのパーマリンクと同様にパースしていたのを修正
 * WordPress 5.0 でのテスト

抜本的な変更はなかなか難しいのですが、細かいリファクタリングなどは続けていきたい
なーとは思います。
