greenpeace/planet4-child-theme-switzerland
Composer 安装命令:
composer require greenpeace/planet4-child-theme-switzerland
包简介
Child theme for the swiss website in the Planet 4 project.
README 文档
README
Child theme for the Planet 4 Wordpress project. The related master theme’s code lives at:
https://github.com/greenpeace/planet4-master-theme.
Please check the master theme code for more information.
Development
Coding standards
Using mostly WordPress coding standards, with a few exceptions.
Make sure to use the configured code linters for PHP, JS, CSS and Markdown. See package.json for the commands.
Stylesheets
Three stylesheets are generated using SCSS:
sass src/scss/style.scss style.css --style=compressed sass src/scss/editor-style.scss admin/css/editor-style.css --style=compressed
Translations
- Export a pot file using wp-cli (Don't use WPML for the .pot file, it will not contain the references where the strings are used). When used inside the dev environment:
npx wp-env run cli wp i18n make-pot wp-content/themes/planet4-child-theme-switzerland/ wp-content/themes/planet4-child-theme-switzerland/languages/planet4-child-theme-switzerland.pot
If your most up to date translation is in WPML:
- Scan the theme using for new translation strings using WPML. Make sure the scanning of Javascript is enabled if you need to find strings in JS.
- Update the translations in WPML string translation
- Export .po files for each language from WPML and save them to the theme's /languages folder: 3.1 Go to WPML String Translation 3.2 Filter by the translation domain you want to export 3.3 Select all strings 3.4 Export a .po file without translations and a separate one for each language. The export functionality is below the strings table.
- Update the po files to also contain the references to where the strings are used using POEdit: 4.1 Open each .po file in POEdit 4.2 Go to Translation -> Update from .pot file and select the .pot file exported in 1. 4.3 Save
If your most up to date translations are in .po files, use the same process, but don't overwrite the .po files from WPML
- Generate the JSON files needed to translate strings in JS files:
npx wp-env run cli wp i18n make-json wp-content/themes/planet4-child-theme-switzerland/languages/ - Rename the generated JSON files. The hashes are not needed, but make sure the language code is exactly the same as the language. So for us
de_CH,fr_FRandit_CH.defor example doesn't work as a fallback. A valid name is for example:planet4-child-theme-switzerland-de_CH-planet4-child-theme-switzerland-food-quiz-view-script
PHPStorm settings
File watchers for SCSS
File > Settings > Tools > File Watchers
Main style.css
File Type: SCSS Style Sheet
Scope: Create a scope that:
- Includes
src/scss - Excludes
/src/scss/editor-style.scss
Program: sass
Arguments:
--no-cache --update $FileName$:$ProjectFileDir$/$FileNameWithoutExtension$.css --style compressed
Output paths to refresh:
$ProjectFileDir$/$FileNameWithoutExtension$.css
editor-style.css
File Type: SCSS Style Sheet
Scope: Create a scope that:
- Includes
src/scss - Excludes
/src/scss/style.scss
Program: sass
Arguments:
--no-cache --update $FileName$:$ProjectFileDir$/admin/css/$FileNameWithoutExtension$.css --style compressed
Output paths to refresh:
$ProjectFileDir$/admin/css/$FileNameWithoutExtension$.css
greenpeace/planet4-child-theme-switzerland 适用场景与选型建议
greenpeace/planet4-child-theme-switzerland 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.69k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2019 年 03 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 greenpeace/planet4-child-theme-switzerland 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 greenpeace/planet4-child-theme-switzerland 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.69k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2019-03-29