
內容簡介
此外掛僅適用於已新增支援的佈景主題。
Footer Credits 提供一個標準化的方式來編輯佈景主題的設計者資訊。它在自訂器中登記一個新的區段及欄位以修改資訊並選擇它們的顯示方式。
佈景主題作者可以讓您的使用者及消費者知道您的佈景主題支援 Footer Credits 外掛。
如果您的佈景主題不支援 Footer Credits,請聯絡開發者並請求新增支援。指示可以在「其他筆記」區段找到。
其他資源
寫評論
在 GitHub 上貢獻
追蹤 @cedaroco
造訪 Cedaro
筆記
如果您是佈景主題作者,想要新增支援,您只需要將預設的設計者資訊字串傳送至 footer_credits 篩檢器即可。
1. 建立一個含預設設計者資訊及篩檢器的樣板標籤:
<?php
if ( ! function_exists( 'themename_credits' ) ) :
/**
* 佈景主題設計者資訊文字。
*/
function themename_credits() {
$text = sprintf( __( '%s by Cedaro.', 'themename' ),
'<a href="https://www.cedaro.com/wordpress/themes/hyalite/">Hyalite</a>'
);
echo apply_filters( 'footer_credits', $text );
}
endif;
2. 於佈景主題 footer 的某處呼叫樣板標籤:
<footer class="site-footer">
<div class="credits">
<?php themename_credits(); ?>
</div>
</footer>
外掛標籤
開發者團隊
原文外掛簡介
This plugin only works with themes that have added support.
Footer Credits provides a standardized method for making theme credits editable. It registers a new section and fields in the Customizer for modifying the credits and choosing how they appear.
Theme authors, let your users and customers know your theme supports the Footer Credits plugin.
If your theme doesn’t work with Footer Credits, ask the developer to add support. Instructions can be find in the Other Notes section.
Additional Resources
Write a review
Contribute on GitHub
Follow @cedaroco
Visit Cedaro
Notes
If you’re a theme author and want to add support, all you need to do is pass the default credits string through a footer_credits filter.
1. Create a template tag with the default credits and filter:
Hyalite'
);
echo apply_filters( 'footer_credits', $text );
}
endif;
2. Then call the template tag somewhere in the footer of the theme:
