php - 如何在我的子主题中覆盖 wordpress 父主题功能?
问题描述
我正在尝试在我的子主题中更新此父主题功能的内容,但是一旦将其复制到子主题 functions.php 文件中,我就会在浏览器中收到此错误“该站点遇到技术问题。请检查您的站点管理员电子邮件收件箱以获取说明。”
我只想更新函数正文中的文本。请问我该怎么做?
function oblique_footer_credits() {
echo '<a href="' . esc_url( __( 'http://wordpress.org/', 'oblique' ) ) . '" rel="nofollow">';
/* translators: WordPress */
printf( __( 'Proudly powered by %s', 'oblique' ), 'WordPress' );
echo '</a>';
echo '<span class="sep"> | </span>';
/* translators: 1 - Theme author 2 - Theme name */
printf( __( 'Theme: %2$s by %1$s.', 'oblique' ), 'Themeisle', '<a href="http://themeisle.com/themes/oblique/" rel="nofollow">Oblique</a>' );
echo '</div>';
}
add_action( 'oblique_footer', 'oblique_footer_credits' );
解决方案
推荐阅读
- vector - 如何使用 PDFBOX 捕获 PDF 文件中的矢量图像
- windows-installer - 当 Advanced Installer 尝试安装已安装在 Windows 中的程序时,如何选择默认选项?
- listview - 如何在具有许多列表视图的许多活动中使用适配器
- rust - 如何将嵌套 Vecs 与 wasm-bindgen 一起使用?
- c++ - 如何使用 GOBLIN 最大流量求解器
- jdbc - 在 JDBC URL 中为 Netezza 指定数据库
- android - ObjectAnimator 的暂停进度
- xml - 将 href 与 span 标签连接起来
- algorithm - 微服务和发布状态与状态变化
- sql-order-by - 我的远程 Postgres 查询似乎永远挂起