php - adding to PHP echo or styling
问题描述
I am trying to amend the custom layout from one of my WordPress plugins.
%1s and %2s below I would like to wrap in to add a class so that I can add some styling to this elements but am unsure how to do this
<?php if (!is_quote()) : ?>
<p><?php echo sprintf(__('We have sent you invoice %1s with a balance of %2s.', ud_get_wp_invoice()->domain), invoice_id(array('return' => true)), balance_due(array('return' => true))); ?></p>
<?php endif; ?>
I have tried breaking up and adding span as so:
<?php echo sprintf(__('We have sent you invoice' <span>'%1s'</span> 'with a balance of' <span>'%2s'</span>'.', ud_get_wp_invoice()->domain)...
but no joy, I have never tried anything like this so am unsure what options I have
解决方案
推荐阅读
- linux - 货物错误:无法为“atk-sys v0.10.0”运行自定义构建命令
- python - 我用 for 循环写了这个等式。有人知道写这个方程的其他形式吗?
- google-calendar-api - 增量同步忽略原始过滤器
- node.js - Node.js Multer req.file 未定义
- javascript - Webpack 5:重新加载/卸载联合模块
- visual-studio-code - 随机人的 GitHub 链接在启动我的 VS Code 时打开
- angularjs - 图表 js 图形未显示在画布上
- python - 为什么 cv2.imread 无法从我的路径文件夹中读取我的所有文件夹?
- reactjs - 如何修复错误类型 void 不可分配给使用 react 和 typescript 的类型?
- powershell - powershell:for循环只循环一次而不是多次