承接 mmikkel/cp-field-inspect 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

mmikkel/cp-field-inspect

最新稳定版本:2.0.4

Composer 安装命令:

composer require mmikkel/cp-field-inspect

包简介

Inspect field handles and easily edit field and element source settings

README 文档

README

Scrutinizer Code Quality

‼️ CP Field Inspect has been retired!

Since Craft 5.8+, the majority of features provided by CP Field Inspect are now in Craft core ???? – making this plugin redundant.

For the time being, I'll make sure things keep working for any upcoming Craft 4.x releases, but installs using Craft 5.8 or later are encouraged to uninstall the plugin.

About CP Field Inspect

CP Field Inspect is a tiny utility plugin, that makes content modelling a little bit easier in Craft.

The plugin adds two things to the Craft control panel (hence the first part of the name!):

  1. A link for quickly accessing field settings to the field handles in element edit forms (for admin users who opt to display those). This link appears as a little cogwheel inside the field handle, and clicking this link redirects you to the fields' settings pages, and back to your content when you save the settings.

  2. Links for quickly accessing element source settings (i.e. entry type, section, volume, category group etc.) to element edit forms, cards, chips and inline Matrix entries (nee blocks)

img.png

The caveats!

CP Field Inspect will only add field settings links and element source buttons to the Craft control panel if

If either of the above are false, CP Field Inspect will do absolutely nothing.

Additionally, the field settings cogwheels requires the "Show field handles in edit forms" admin user preference.

Requirements

This plugin requires Craft CMS 5.0+.

But, the plugin doesn't appear to do anything!

If CP Field Inspect's links won't appear in environments where allowAdminChanges is enabled and the user is an admin, the reason is most likely due to the site having one or several plugins or custom modules installed, that call Craft::$app->getUser()->getIdentity() or related methods from within their constructor or init() methods. This has been confirmed, due to a bug in Craft, to prevent CP Field Inspect from displaying the cogwheels, since Craft::$app->getUser()->getIsAdmin() will actually return a false negative in plugins, in this scenario.

The workaround is to defer any calls to Craft::$app->getUser() (such as Craft::$app->getUser()->getIdentity() etc.) in the offending custom module to after Craft has finished initialising (the below would go in your custom module's primary class):

public function init() { parent::init(); Craft::$app->onInit(function () { $this->doIt(); } } protected function doIt() { $currentUser = Craft::$app->getUser()->getIdentity(); // ... all other logic dependant on `$currentUser` }

Disclaimer

Please report any bugs or other issues here.

Plugin icon: CUSTOMIZE SEARCH by creative outlet from the Noun Project

统计信息

  • 总下载量: 531.39k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 29
  • 点击次数: 1
  • 依赖项目数: 13
  • 推荐数: 0

GitHub 信息

  • Stars: 29
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固