WP Manifestindependent plugin directory
manifest / developer / catpow

Catpow WP Registry grade B. Medium-severity findings · 2 findingsWP RegistryMedium-severity findings · 2 findingsOpen the reportB

WordPress plugin for functional theme development

★ 3stars
0.4.0-alphalatest · 3 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/synchrovision/catpow/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

概要

CatpowはWordPressでサイト固有のオリジナルCMSのテーマを制作するためのプラグインです。

カスタム投稿・カスタムフィールド・カスタムカテゴリ・カスタムロール等の設定情報をテーマが設定ファイルとして持つことで、サイト固有のデザインと機能が一体になったテーマの開発を効率化します。

導入

このページから最新のリリースzipファイルをダウンロードしてWordPressの管理画面からプラグインとしてインストールしてください

機能

設定ファイルでカスタム投稿等を簡単設定

テーマ内のconfig/system_config.phpに以下のように配列でカスタム投稿・カスタムフィールド・カスタムカテゴリの構成を記述することで簡単にそれらを設定できます

$post_types=[
    'my_post_type'=>[
        'label'=>'カスタムポスト',
        'taxonomies'=>[
            'my_taxonomy'=>['label'=>'カスタム分類']
        ],
        'meta'=>[
            'my_custom_field'=>['type'=>'textarea','label'=>'カスタムフィールド'],
        ]
    ]
];

テーマ内のSCSSを自動でコンパイル

SCSSのコンパイルにコマンドを実行する必要はありません、管理者としてログインしている時にページを閲覧した時、そのページに使われているcssに対応するscssファイルに更新があればそのscssはコンパイルされ、cssは更新されます。

Catpow対応テーマ・拡張プラグインのJSXをコンパイル

カスタムブロックの開発するのであれば、CatpowにはJSXと翻訳JSONファイルのコンパイラが備えられています。プラグイン内のjsx_compilerディレクトでnpm run watchを実行することでcatpowから始まる名前を持つテーマとプラグインの中にあるJSXファイルとブロックの翻訳ファイルの更新を監視してコンパイルします。JSXはWordPressが内蔵するReactを利用するものとしてコンパイルされます。

テーマからプラグインの機能を簡単に拡張

Catpowの多くの機能がテーマかプラグインに特定のファイルやクラスが存在することをトリガーにしています。カスタムブロック、カスタムフィールドのタイプ、APIのエンドポイントなどの追加・拡張に登録の処理を行う必要はありません。テーマ内に所定の命名規則でファイル・クラスを作成するだけこれらを拡張することができます。

沢山のブロックからサイトに必要なものだけ有効に

Catpowには50以上ブロックが実装されていますがこの中から有効化されるのはテーマにblocks/[ブロック名]のディレクトリが存在するものだけであり、このディレクトリに置かれたfront_style.cssがページ内でそのブロックが使われている時だけ読み込まれるようになります。また、ほとんどのブロックはテーマでcssを定義することを前提としており、プラグインからcssが読み込まれることはなく、CSSのセレクタの優先度をプラグインと競うことはありません。

Releases

Newest 25 of 26 recorded releases.

Tag
Published
0.4.0-alpha latest
Feb 6, 2023 3 years ago
Jan 10, 2022 4 years ago
Jan 10, 2022 4 years ago
Jan 8, 2022 4 years ago
Jan 7, 2022 4 years ago
Dec 20, 2021 4 years ago
Dec 17, 2021 4 years ago
Nov 14, 2021 4 years ago
Oct 26, 2021 4 years ago
Oct 25, 2021 4 years ago
Oct 17, 2021 5 years ago
Oct 15, 2021 5 years ago
Oct 13, 2021 5 years ago
Oct 1, 2021 5 years ago
Oct 1, 2021 5 years ago
Sep 17, 2021 5 years ago
Sep 16, 2021 5 years ago
Aug 9, 2021 5 years ago
Jul 21, 2021 5 years ago
Jun 11, 2021 5 years ago
Jun 10, 2021 5 years ago
Jun 9, 2021 5 years ago
Jun 8, 2021 5 years ago
Jun 8, 2021 5 years ago
Jun 7, 2021 5 years ago
All releases on GitHub →

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

B grade

Security

Catpow 0.4.0-alpha · audited by WP Registry

Medium-severity findings.

1 medium 1 low
Audited release
0.4.0-alpha
Findings
2
Worst severity
medium
Content hash
f8cb38b9e1484865b5232d99…

Findings

  • medium cp_post_sort lacks current_user_can and echoes unsanitized JSONP callback

    missing_capability

    The wp_ajax_cp_post_sort handler only calls check_admin_referer('bulk-posts') then UPDATEs menu_order for all posts of a type. There is no current_user_can('edit_others_posts') (or similar). It also prints $_REQUEST['callback'] wrapping JSON (JSONP), enabling reflected script execution if a browser/extension evaluates the response as script. cp_term_sort similarly lacks a capability check beyond bulk-tags nonce.

    functions/post_sort/functions.php:18-36

    Recommendation

    Require current_user_can for the post type; allowlist callback or return application/json without JSONP.

  • low Widespread eval() in inputs/CSV/template helpers (framework by design)

    eval_by_design

    classes/inputs.php and CSV/template helpers use eval() to build nested selectors. This is framework design for path expressions; not directly wired to raw $_REQUEST in the traced paths, but expands RCE risk if any caller passes attacker-controlled selectors.

    classes/inputs.php:18-62

    Recommendation

    Replace eval-based selectors with explicit array path walking; never pass request input into $sel.

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.